Posted on: 04/14/11 09:54am
By: alb3rt
I like to change the URL for the articles, for example www.site/section/subsection/article (I use rewrite with apache), but I need to add a few lines in lib-story.php, for example:
Text Formatted Code
$customUrl = custom_STORY_LINK($story->DisplayElements('tid'));
And my function creates the URL that I want.
This work very well, but the problem is when I upgrade a new version, I always need to change lib-story.php again, I would like to use only lib-custom.php, but I can't get the "ID story" for the "home".
If I could get the ID for each story in lib-custom.php, I could add my customURL in CUSTOM_templateSetVars ()
Any ideas?
Thanks!
Re: Change URL for stories
Posted on: 04/14/11 05:05pm
By: beewee
But the url in the search function will still be the old one, am I correct? So you have to change something there as well.
Since the stories are part of the core code, you'll need to edit your changes with every update. If you make a readme file it's only a few minutes work, right?
Re: Change URL for stories
Posted on: 04/14/11 06:33pm
By: Dirk
Not sure if this would work, but I would look into abusing/reusing Geeklog's url rewrite class for that. That way, every other place in Geeklog, e.g. the search, would automatically be using your new URLs.
bye, Dirk
Re: Change URL for stories
Posted on: 04/14/11 07:17pm
By: alb3rt
Yeah, in search function shows the old url, It's other problem. Anyway I'll try with the rewrite class as said Dirk.
Quote by: beeweeBut the url in the search function will still be the old one, am I correct? So you have to change something there as well.
Since the stories are part of the core code, you'll need to edit your changes with every update. If you make a readme file it's only a few minutes work, right?