Search Engine Friendly URLS with News Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
bknoob

Search Engine Friendly URLS with News Module

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

Re: Search Engine Friendly URLS with News Module

Post 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
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: Search Engine Friendly URLS with News Module

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

Re: Search Engine Friendly URLS with News Module

Post 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
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: Search Engine Friendly URLS with News Module

Post 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
Piratos

Re: Search Engine Friendly URLS with News Module

Post 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.
djprozac

Re: Search Engine Friendly URLS with News Module

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

Re: Search Engine Friendly URLS with News Module

Post 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
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. :)
djprozac

Re: Search Engine Friendly URLS with News Module

Post by djprozac »

Thank you Elijah, works like a charm! :D

Good luck with your classes ;)
djprozac

Re: Search Engine Friendly URLS with News Module

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

Re: Search Engine Friendly URLS with News Module

Post 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
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: Search Engine Friendly URLS with News Module

Post 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
djprozac

Re: Search Engine Friendly URLS with News Module

Post by djprozac »

* Prays...
bknoob

Re: Search Engine Friendly URLS with News Module

Post by bknoob »

thank you for this!
Pierre M.

Re: Search Engine Friendly URLS with News Module

Post 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
Locked

Return to “Modules/Add-Ons”