Page 1 of 1
Module Clean URL's wih Album and News
Posted: Tue Jul 18, 2006 10:50 am
by Russ
I've managed to find time to have a quick peak through Elijahs' work on Clean URL's in modules and pretty good it is too! Whilst I'm no expert in PHP, would it be possible to alter the way the URL's are constructed to a more meaningfull one?
Whilst I agree that 'album/1/80' is a great leap forward froom the normal url, 'album/album_name/picture_name' might be a lot better? Not sure what you would do for news, probably 'news/date/article' or perhaps use category as well? I think it matters less... just need to make sure we use the ISO date format yyyy/mm/dd 2006/07/18..
Any comments,
Russ
Re: Module Clean URL's wih Album and News
Posted: Tue Jul 18, 2006 11:54 am
by Ted
Well, the problem is that the id has to be in there somewhere, or an alternate method of retrieving the record from the database will have to be built. Mind you, it's very possible, but it's probalby more than a quick fix.
Re: Module Clean URL's wih Album and News
Posted: Tue Jul 18, 2006 2:50 pm
by Russ
Thanks Ted, I think that clears it up for me and I will stick with what we have for now
Russ
Re: Module Clean URL's wih Album and News
Posted: Tue Jul 18, 2006 6:59 pm
by NickR
Each module could maintain its own alias list in a db table and do a reverse lookup to get the correct id.
Re: Module Clean URL's wih Album and News
Posted: Fri Jan 05, 2007 11:43 pm
by Elijah Lofgren
Russ wrote:
I've managed to find time to have a quick peak through Elijahs' work on Clean URL's in modules and pretty good it is too! Whilst I'm no expert in PHP, would it be possible to alter the way the URL's are constructed to a more meaningfull one?
Today someone in #cms was wanting to get the returnid out of their URL. I found out a way to that and commited the needed change to CMSMS's index.php (will be included in CMSMS 1.0.3):
http://viewsvn.cmsmadesimple.org/viewsv ... 1&view=rev
Then I made Album stop using the returnid in it's clean URLs:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
And then I made URLs be in the form of /page_alias/album_name/picture_name:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
If you check out the latest SVN versions of Album and CMSMS you can try it out for yourself (it needs a lot of testing before I release it). Right now it requires that the page you put album on have 'album' in the alias, I plan to move this to a pref so that it can be changed to any unique string such as 'pictures'.
Enjoy,
Elijah

Re: Module Clean URL's wih Album and News
Posted: Sat Jan 06, 2007 7:49 am
by Russ
Looks like more good work Elijah

I'll try and do some testing next week.
One thought though, I see you are including the Album CSS by default. It might be an idea to make this an option. Leave it included as default but set a flag in the tag so it can be ignored. Many people like myself, use their own CSS, with multiple stylesheets and allow users to change to different styles to view a web site. This new version of album without the tag would make this more difficult.
I see also you are using GreyBox as the default template, I seem to remember there were a few accessibility issues with this javascript, which were much better in thickbox. Is this still the case? I seem to remember in GreyBox the escape key did not get rid of the image or that clicking on the background did not get rid of the image either?? Plus you could not use the '' keys for navigation??
Just some thoughts, let me know what you think.
Russ
Re: Module Clean URL's wih Album and News
Posted: Sat Jan 06, 2007 2:10 pm
by Pierre M.
Russ wrote:
...ISO date format yyyy/mm/dd 2006/07/18..
Any comments,
Russ
Comment : I welcome ISO date format. And I like /iso/date/format/sometext URLs.
Hope it helps.
Thanks for the good work.
PM
Re: Module Clean URL's wih Album and News
Posted: Sat Jan 06, 2007 3:45 pm
by Elijah Lofgren
Russ wrote:
One thought though, I see you are including the Album CSS by default. It might be an idea to make this an option. Leave it included as default but set a flag in the tag so it can be ignored. Many people like myself, use their own CSS, with multiple stylesheets and allow users to change to different styles to view a web site. This new version of album without the tag would make this more difficult.
You're right. I'll hopefully turn this into a pref.
Russ wrote:
I see also you are using GreyBox as the default template, I seem to remember there were a few accessibility issues with this javascript, which were much better in thickbox. Is this still the case? I seem to remember in GreyBox the escape key did not get rid of the image or that clicking on the background did not get rid of the image either?? Plus you could not use the '' keys for navigation??
You are right about it being harder to get out of the big image in Greybox. I will maybe take another look at thickbox (was having trouble with multi-line captions).
Thanks for the feedback,
Elijah (who leaves to go back to college tomorrow)
