Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 08:45 pm EDT
Geeklog Forums
Change URL for stories
Status: offline
alb3rt
Forum User
Regular Poster
Registered: 10/30/06
Posts: 71
Location:Mexico City
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:
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!
D Web Studio - www.d-webstudio.net
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!
D Web Studio - www.d-webstudio.net
16
10
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
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?
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
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?
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
9
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
bye, Dirk
9
9
Quote
Status: offline
alb3rt
Forum User
Regular Poster
Registered: 10/30/06
Posts: 71
Location:Mexico City
Yeah, in search function shows the old url, It's other problem. Anyway I'll try with the rewrite class as said Dirk.
D Web Studio - www.d-webstudio.net
Quote 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?
D Web Studio - www.d-webstudio.net
11
12
Quote
All times are EDT. The time is now 08:45 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content