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
viewsource
Nucleus Newbie


Joined: 18 Feb 2006
Posts: 6

Post Posted: Thu Feb 23, 2006 9:02 am   Post subject:
Reply with quote

ketsugi wrote:
hang on and wait a couple months more (wish it could be sooner but I've too much school work to do >_<)

darn school-work!
Wink

thanks ketsugi, it's good to hear about the plugin! for now, i've put my Nucleus experimentatin on hold. After playing around w/ it for a while, i decided i really like it.
I have experience w/ b2ev and WP's, and as anyone who's tried them would likely testify, Nucleus is indeed most unique.

What i want to do w/ this particular 'blog is to log my web app development notes-- nothing specific, and in no specific order-- heck, i guess that's largely the point of a web log-- the ability to let it do the categorization for you! so, the reason i've been concerned about the "Fancy URL's" is that i was thinking that this blog may turn out to be a useful "pocket dictionary" kind of reference for others who might be looking for quick little bits of code / scripts, etc to solve any of a number of particular development tasks.

i don't know how considerable a difference there is to having the default URL vs the "tagged" or "Fancy" Url's, but whatever will make it more likely to show up as something potentially helpful for anyone else-- that's what will make me most happy.

haha-- it's probably quite a fantastic thought to imagine someone might actually stumble upon one of MY log entries and find it to be useful, but i guess ya never know.
Smile

_________________
CSS Beginner? Try my brief overview:
Using CSS for Styling HTML Documents

Back to top

View user's profile Send private message AIM Address Yahoo Messenger
wmmyg
Nucleus Newbie


Joined: 09 Feb 2006
Posts: 10
Location: Scotland

Post Posted: Thu Feb 23, 2006 11:21 am   Post subject:
Reply with quote

Legolas wrote:
Your .htaccess probably sends all fancy links to index.php. So to stop that problem you'll probably need to start with creating a prefix. (Can you post your .htaccess?)


Oh, good point!

Here's my .htaccess

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

---
also index.php

<?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://www.iwp.net';

include('./config.php');

selector();

?>

----

Thanks in advance Legolas....Smile

William

_________________
William: http://www.iwp.net

Back to top

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


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

Post Posted: Thu Feb 23, 2006 8:35 pm   Post subject:
Reply with quote

Ok, how about making .htaccess this way:
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
RewriteRule ^articles/(.*) articles.php?arr=$1


and you articles.php something like:

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;
}
//else {
//  header('Status: 404 Not Found');
//}

$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://www.iwp.net/articles';

include('./config.php');

selectBlog('articles');
selector();

?>


does that work?

Back to top

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


Joined: 09 Feb 2006
Posts: 10
Location: Scotland

Post Posted: Mon Feb 27, 2006 8:02 pm   Post subject:
Reply with quote

Legolas wrote:
Ok, how about making .htaccess this way:
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
RewriteRule ^articles/(.*) articles.php?arr=$1


and you articles.php something like:


...
[/code]

does that work?


Nope...same result, no entries show for the archive...Sad

But, I am beginning to suspect the problem is not with fancyurls and must be somewhere else.

After all, I am not getting a 'page not found' error or something that would indicate that the rewrite was going to the wrong place. It is showing my the correct text 'This is the archive for February 2006'., but just not showing any entries.

I think I'll switch off fancyurls for a while, till I am sure my site is behaving right with mutiple blogs, then try fancyurls on again at a later date.

Many thanks for your help...Smile

Regards,

William

_________________
William: http://www.iwp.net

Back to top

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


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

Post Posted: Mon Feb 27, 2006 8:18 pm   Post subject:
Reply with quote

take a look: http://www.iwp.net/articles/archive/1/2006-02 and http://www.iwp.net/archive/1/2006-02

Back to top

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


Joined: 09 Feb 2006
Posts: 10
Location: Scotland

Post Posted: Tue Feb 28, 2006 7:30 pm   Post subject:
Reply with quote

Legolas wrote:
take a look: http://www.iwp.net/articles/archive/1/2006-02 and http://www.iwp.net/archive/1/2006-02


Thanks, there correct items are showing now so nearly there...Smile

Only thing is that with fancyurls switched on in Global Settings, the fancyurls only appear as links in my first blog, but not on any other one.

All the blogs are currently using the same skin, so its not a skin issue.

links from my main blog are like this:
http://www.iwp.net/archive/1/2006-02

Links from my articles blog are like this:
http://www.iwp.net/articles.php?blogid=2&archive=2006-02

The links go to the correct items, categories, archive etc., but for anything other than the first blog they are not fancy...Sad

I realise that this is not a problem caused by the fancyurl plugin, but any help would be much appreciated.


Cheers,

William

_________________
William: http://www.iwp.net

Back to top

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


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

Post Posted: Tue Feb 28, 2006 9:03 pm   Post subject:
Reply with quote

to activate this in the blog settings change the url so that it is http://www.iwp.net/articles/ and turn on fancy urls Smile

Back to top

View user's profile Send private message Visit poster's website
0wn4g3
Nucleus Fan


Joined: 05 May 2006
Posts: 25

Post Posted: Mon May 08, 2006 5:51 pm   Post subject:
Reply with quote

jettrue wrote:
Oh sorry, I misunderstood...

yes, that was where the problem lied. In the template it was like this:
<a href="?itemid=<%itemid%>

I changed it to:
<a href="<%itemlink%>

Is that the best way to do it?. Wink

Thanks for your help, btw!




Would you care to elaborate on which template you edited to find that piece of code? I too am experiencing this issue with the ALL CATEGORIES link.

Back to top

View user's profile Send private message
ketsugi
Nucleus Professional


Joined: 14 Jan 2005
Posts: 801
Location: Singapore

Post Posted: Thu Jun 08, 2006 6:07 pm   Post subject:
Reply with quote

I'm having a problem getting categories to work...

I have this code in my c.php file (which is what the .htaccess calls for a category link)

Code:
<?php
$exectimestart = microtime();
include('./fancyurls.config.php');
include('./config.php');
$data = explode("/",serverVar('PATH_INFO'));
if (is_numeric($data[1])) $catid = intval($data[1]);
else {
   $query = 'SELECT `catid` FROM '.sql_table('category').' WHERE `cname` = "'.urldecode($data[1]).'"';
   $cat = mysql_fetch_assoc(sql_query($query));
   $catid = $cat['catid'];
}
//echo "THE CATID IS $catid YAY! :O";
selector();

?>

But as you can see from this link, it doesn't work. I've verified (using that commented-out line) that the $catid variable is set properly.

I'm pretty sure I've come across this problem before, and I'm also pretty sure someone posted a solution to this, but I can't remember what that solution is.

I've tried setting $blogid, but that only results in Nucleus thinking it's a search page (because of $query).

_________________
The Panegyrist

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: Thu Jun 08, 2006 8:07 pm   Post subject:
Reply with quote

First I'd like to warn you, because here you've created a big MySQL injection problem.
Since the category selection uses the default blog here you may want to see if that is the right blog and you should alter your query's WHERE clause to only look for that blog.

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 Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next

Page 7 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