Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
Legolas
Nucleus Guru
Nucleus Guru


Joined: 31 Jan 2004
Posts: 813
Location: Woerden, Nederland

Post Posted: Sat Mar 05, 2005 9:42 am   Post subject: Fancyurls without forcetypes
Reply with quote

.htaccess
Code:

RewriteEngine On
RewriteRule ^member/(.*) index.php?arr=member/$1
RewriteRule ^item/(.*) index.php?arr=item/$1
RewriteRule ^category/(.*) index.php?arr=category/$1
RewriteRule ^blog/(.*) index.php?arr=blog/$1
RewriteRule ^archive/(.*) index.php?arr=archive/$1
RewriteRule ^archives/(.*) index.php?arr=archives/$1


index.php
Code:

<?php

$requestvars = $_GET["arr"];
$request_arr = explode("/", $requestvars);
if ($request_arr[0] == "item") {
   $_GET["itemid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "member") {
   $_GET["memberid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "category") {
   $_GET["catid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "blog") {
   $_GET["blogid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "archive") {
   $_GET["blogid"] = $request_arr[1];
   $_GET["archive"] = $request_arr[2];
   $firsti = 3;
}
elseif ($request_arr[0] == "archives") {
   $_GET["archivelist"] = $request_arr[1];
   $firsti = 2;
}

$xflag = true;
for ($i = $firsti; $i < count($request_arr); $i++) {
   if ($xflag == true) {
      $j = $i + 1;
      $_GET[$request_arr[$i]] = $request_arr[$j];
      $xflag = false;
   }
   elseif ($xflag == false) {
      $xflag = true;
   }
}

// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'http://ww.example.com/blog';

include('./config.php');

selector();

?>


like it?

EDIT: Wanna see it in action Razz? http://www.leerlingenweb.net/ublog/

EDIT2: Don't forget to edit the $CONF['SELF'] line to the absolute url to your blog without ending slash!


Last edited by Legolas on Sun Mar 13, 2005 7:24 pm; edited 1 time in total

Back to top

View user's profile Send private message Visit poster's website
roel
Nucleus Guru
Nucleus Guru


Joined: 16 Apr 2002
Posts: 4575
Location: Rotterdam, The Netherlands

Post Posted: Sat Mar 05, 2005 11:46 am   Post subject:
Reply with quote

Nice one, Legolas!
We have to add this to the wiki or somethin'

_________________
Is your question not solved yet?

Back to top

View user's profile Send private message Visit poster's website
moraes
Nucleus Guru
Nucleus Guru


Joined: 23 Dec 2001
Posts: 2399
Location: Curitiba, Brazil

Post Posted: Sat Mar 05, 2005 1:16 pm   Post subject:
Reply with quote

Very cool! I need this solution. Thanks a lot. Very Happy

moraes

_________________
tipos.com.br | smalltalking.com

Back to top

View user's profile Send private message Visit poster's website ICQ Number
Legolas
Nucleus Guru
Nucleus Guru


Joined: 31 Jan 2004
Posts: 813
Location: Woerden, Nederland

Post Posted: Wed Mar 09, 2005 1:10 pm   Post subject:
Reply with quote

AltFancyURLs goes wiki ^^ http://wakka.xiffy.nl/altfancyurl (same for langcheck Razz)

Back to top

View user's profile Send private message Visit poster's website
jettrue
Nucleus Newbie


Joined: 09 Mar 2005
Posts: 18

Post Posted: Fri Mar 11, 2005 8:03 am   Post subject:
Reply with quote

Hmm, I tried this with no result here:

http://blog.beanstalk.jadetrue.com

I uploaded the .htaccess and the index.php...

I have mod_rewrite working on this server on another site...

_________________
Jade
Sagefish.com

Back to top

View user's profile Send private message
jettrue
Nucleus Newbie


Joined: 09 Mar 2005
Posts: 18

Post Posted: Fri Mar 11, 2005 1:57 pm   Post subject:
Reply with quote

I got it to work by changing:
Quote:
// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'index.php';

include('./config.php');

selector();


to

Quote:
// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'http://blog.beanstalk.jadetrue.com';

include('./config.php');

selector();

_________________
Jade
Sagefish.com

Back to top

View user's profile Send private message
jettrue
Nucleus Newbie


Joined: 09 Mar 2005
Posts: 18

Post Posted: Fri Mar 11, 2005 2:02 pm   Post subject:
Reply with quote

Me again....

I notice links to specific items are like this:

http://blog.beanstalk.jadetrue.com/blog/1?itemid=1

instead of:

http://blog.beanstalk.jadetrue.com/blog/item/1

_________________
Jade
Sagefish.com

Back to top

View user's profile Send private message
Boston_JM
Nucleus Newbie


Joined: 12 Mar 2005
Posts: 10
Location: http://www.onsitetechsnet.com/blog/

Post Posted: Sun Mar 13, 2005 4:54 pm   Post subject: Fancy Urls not working please Help
Reply with quote

my fancy urls are not working
my ht access file reads

RewriteEngine On
RewriteRule ^member/(.*) index.php?arr=member/$1
RewriteRule ^item/(.*) index.php?arr=item/$1
RewriteRule ^category/(.*) index.php?arr=category/$1
RewriteRule ^blog/(.*) index.php?arr=blog/$1
RewriteRule ^archive/(.*) index.php?arr=archive/$1
RewriteRule ^archives/(.*) index.php?arr=archives/$1

my index.php reads

<?
// This file will generate and return the main page of your site
$CONF['Self'] = "http://www.onsitetechsnet.com/blog";
include('config.php');
selectBlog('ComputerNews');
selector();
?>

and i have moved the files to root and also enabled it in admin

what else needs to be done

Now i get the fancy urls working but the navigation dont work
please view here

http://www.onsitetechsnet.com/blog/category/3/blogid/1

also is there a way to change category in the link to the category it belongs to ?

_________________
Computer News & Jokes Computer Tech Services

Back to top

View user's profile Send private message
Degtyarev
Nucleus Fan


Joined: 07 Mar 2005
Posts: 43
Location: Breda - Nederland

Post Posted: Sun Mar 13, 2005 7:06 pm   Post subject:
Reply with quote

The Boston_JM thing was solved.
_________________
Uw website online voor een tientje: www.happyhoster.nl

Back to top

View user's profile Send private message Visit poster's website MSN Messenger
Legolas
Nucleus Guru
Nucleus Guru


Joined: 31 Jan 2004
Posts: 813
Location: Woerden, Nederland

Post Posted: Sun Mar 13, 2005 7:18 pm   Post subject:
Reply with quote

jettrue wrote:
Me again....

I notice links to specific items are like this:

http://blog.beanstalk.jadetrue.com/blog/1?itemid=1

instead of:

http://blog.beanstalk.jadetrue.com/blog/item/1


Have you activated fancyurls in the nucleus admin?

EDIT: It goes only for the title links, can you give me some template coding for the items? It probably is there Smile.


Last edited by Legolas on Sun Mar 13, 2005 7:27 pm; edited 1 time in total

Back to top

View user's profile Send private message Visit poster's website
Post new topic Reply to topic
Display posts from previous:   

Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next

Page 1 of 9

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group