Module Clean URL's wih Album and News

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Module Clean URL's wih Album and News

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Module Clean URL's wih Album and News

Post 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.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Module Clean URL's wih Album and News

Post by Russ »

Thanks Ted, I think that clears it up for me and I will stick with what we have for now ;-)

Russ
NickR

Re: Module Clean URL's wih Album and News

Post by NickR »

Each module could maintain its own alias list in a db table and do a reverse lookup to get the correct id.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Module Clean URL's wih Album and News

Post 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  :D :) ;D
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Module Clean URL's wih Album and News

Post 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
Pierre M.

Re: Module Clean URL's wih Album and News

Post 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
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Module Clean URL's wih Album and News

Post 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) :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Post Reply

Return to “Developers Discussion”