Page 1 of 6

Search Engine Friendly URLS with News Module

Posted: Sun Jun 04, 2006 11:38 pm
by bknoob
Hi everyone,

First of all I would like to say how awesome this CMS is. Great piece of work :)

I am messing around with the News Module and am planning to use it for article purposes on my site. I noticed that the URLs are in the form of domain/news/1/141 where the first number is the category ID and the second number is.. I dont know?

Is there a way to change it so that I can have Search Engine optimized URLS? For example: domain/category/title-of-news. Also, what do I Have to edit so that the title of the page is modified to go along with the title of the news post? What tag would I use to accomplish this?

Help is much appreciated!

Re: Search Engine Friendly URLS with News Module

Posted: Sat Aug 12, 2006 4:55 am
by Elijah Lofgren
bknoob wrote: Is there a way to change it so that I can have Search Engine optimized URLS? For example: domain/category/title-of-news.
Check out this patch:
[#915] Beautiful URLs hack
http://dev.cmsmadesimple.org/tracker/in ... 8&atid=111

Patch needs cleaning up and it could possibly make it into the core.  ;D

Re: Search Engine Friendly URLS with News Module

Posted: Sat Aug 12, 2006 5:15 am
by Russ
Very nice Elijah, I havn't been able to try this out yet as I'm still trying to solve some other Beta 4 problems, but I've been hard coding some  path stuff within news to get ta better url - still 1/22 - but better - so I look forward to trying this. I presume you are setting the 'return id' from the calling tag, which at least gives it some flexibility? And I think a good compromise for all modules for super clean url's. Certainly one I would accept. I expect you also considered the news RSS and search stuff ;-) Into the core I say!!

This could be quite good for Album as well, using a truncated album gallery name (remove spaces and convert to lower case,) and the image name, (again remove spaces and convert to lower case.) ?? Just an idea.

Russ

Re: Search Engine Friendly URLS with News Module

Posted: Sat Aug 12, 2006 5:48 am
by Elijah Lofgren
Russ wrote: I presume you are setting the 'return id' from the calling tag, which at least gives it some flexibility?
Actually no. It's hardcoded into the code. I created this patch from some files that themtz sent me. This patch needs to be fixed to add that flexibility before being commited. Hopefully I'll get around to this someday.....
Russ wrote: And I think a good compromise for all modules for super clean url's. Certainly one I would accept. I expect you also considered the news RSS and search stuff ;-)
Actually, I didn't but if this patch would work the same way for News RSS and Search then maybe it could be applied to them also.
Russ wrote: This could be quite good for Album as well, using a truncated album gallery name (remove spaces and convert to lower case,) and the image name, (again remove spaces and convert to lower case.) ?? Just an idea.
Hopefully if this patch works for News then I could adapt it to work with Album also.

But, right now I think I'm going to go to bed pretty soon (probably after adding Search integration to PageBlocks) and I'm leaving early tomorrow to go with my parents to drop my sister at college in Georgia and look at JAARS in North Carolina so I will not be back until Tuesday. Then about 1 week later, I'll be leaving for college on August 23rd.

I'm guessing that I will have much less time for CMSMS while I'm in college so I may not be very active for a while. Hopefully next summer I'll be able to actively work on CMSMS like I have been doing.

Later,

Elijah

Re: Search Engine Friendly URLS with News Module

Posted: Sat Aug 12, 2006 5:59 am
by Russ
Elijah, It's been good talking. You've done a lot of very good things for CMSMS so I hope your college days will allow you some time to play CMS ;-)

Have a good holiday and a fine time at college. My best regards.

May your god be with you.

Russ

Re: Search Engine Friendly URLS with News Module

Posted: Sat Aug 12, 2006 9:04 am
by Piratos
google and Yahoo and other serach engines have no problems with urls like index.php?page=4711  or so.

There is no need to make Search Engine Friendly URLS because this are parts of a yesterday story.

Re: Search Engine Friendly URLS with News Module

Posted: Mon Sep 18, 2006 12:34 pm
by djprozac
I can't seem to apply the patch!

TortoiseMerge simply says: 'An unknows line type was found at line 13!' and then rather rudely, quits.

Has anyone been able to apply this patch, and if so, would he/she be so kind and make them available somewhere?

Thanks!

Re: Search Engine Friendly URLS with News Module

Posted: Mon Sep 18, 2006 6:19 pm
by Elijah Lofgren
djprozac wrote: I can't seem to apply the patch!

TortoiseMerge simply says: 'An unknows line type was found at line 13!' and then rather rudely, quits.

Has anyone been able to apply this patch, and if so, would he/she be so kind and make them available somewhere?

Thanks!
Here's an updated patch: http://dev.cmsmadesimple.org/tracker/do ... atch.patch

Hope this helps.

Gotta run to class,

Elijah

Re: Search Engine Friendly URLS with News Module

Posted: Tue Sep 19, 2006 5:46 pm
by djprozac
Thank you Elijah, works like a charm! :D

Good luck with your classes ;)

Re: Search Engine Friendly URLS with News Module

Posted: Tue Sep 19, 2006 9:50 pm
by djprozac
There seems to be a problem, at least on my configuration  ???

When I upload the patched files, the 'Read more' link doesn't show up pages that are configured to show the summary of the news item. It doesn't matter if you have a custom read more link or if you leave it unspecified. The link just dissapears from the summary.

On another note, would it be possible to leave the final two numbers of the URL, so as to make /news/news_item_name instead of /news/news_item_name_50?

Thanks  for your efforts thus far; this is a step in the right direction. :) Our website depends on an external feed, with the URL's in a particular form. If we can match the title of the news items to this URL, we don't have to make a duplicate page and News item with the same content. Just to provide some background as to why this is important for us.

Re: Search Engine Friendly URLS with News Module

Posted: Tue Sep 19, 2006 10:14 pm
by Elijah Lofgren
djprozac wrote: There seems to be a problem, at least on my configuration  ???

When I upload the patched files, the 'Read more' link doesn't show up pages that are configured to show the summary of the news item. It doesn't matter if you have a custom read more link or if you leave it unspecified. The link just dissapears from the summary.

On another note, would it be possible to leave the final two numbers of the URL, so as to make /news/news_item_name instead of /news/news_item_name_50?

Thanks  for your efforts thus far; this is a step in the right direction. :) Our website depends on an external feed, with the URL's in a particular form. If we can match the title of the news items to this URL, we don't have to make a duplicate page and News item with the same content. Just to provide some background as to why this is important for us.
Sorry, but I knew this patch had issues which is why I didn't apply it to the released version of News. I don't know of any way to remove the number from the end of the URL.

Sorry I can't help more (I'm too busy too look into this more),

Elijah

Re: Search Engine Friendly URLS with News Module

Posted: Wed Sep 20, 2006 6:09 am
by Russ
I have had both patches working, the frst with a bit of fiddling, but there are some problems as you ahve discovered. It would be nice if they could be made to work with no number, but like Elijah said, it is hard to see a way without a lot of re-writing. Unless anyone has some divine inspiration?

Russ

Re: Search Engine Friendly URLS with News Module

Posted: Wed Sep 20, 2006 1:03 pm
by djprozac
* Prays...

Re: Search Engine Friendly URLS with News Module

Posted: Sat Sep 30, 2006 11:57 pm
by bknoob
thank you for this!

Re: Search Engine Friendly URLS with News Module

Posted: Mon Oct 02, 2006 6:46 pm
by Pierre M.
I don't want to disturb the prayers.

I just wanted to outline that if "search engines have no problems with urls like index.php?page=4711 or so" (which I agree) the ranking you get is better with a user friendly URL. So if it is not more difficult to have friendly URLs, let's have it for the users and the webmasters.
And everyone will bless pretty URLs ;)

PM