PDA

View Full Version : Full Article Rewrite [phpld 3.3]


paul.martin
01-19-2008, 06:33 AM
Mod Title: Full Article Rewrite

Last Updated: 19 Jan. 2008

Supported by Mod Developer: Yes

Where to Download: http://www.phpldaddons.com/phpLD-Mods/Article-Rewrite/

Support Via This Thread or Download Site: Download Site

Compatible With: phpLD 3.3



I guess this is the first phpLD 3.3 Mod :)

The mod changes your article URLs from http://www.mydirectory.com/articles/article-239.html to http://www.mydirectory.com/articles/your-article-title-here.html

All the info available at http://www.phpldaddons.com/phpLD-Mods/Article-Rewrite/

I wanted to have it done quickly (it's been about 24h from the 3.3 release launch) because it's a bad choice to change the URLs of your pages after the search engines index them.

For questions and support use my phpLD Forum (http://www.phpldaddons.com/forum/)

Paul

digichiew
01-21-2008, 08:06 AM
Hi paul.martin,

Instead of ...articles/your-article-title-here.html (http://www.mydirectory.com/articles/your-article-title-here.html) ,
can it be display as ...articles/your_article_title_here.html (http://www.mydirectory.com/articles/your_article_title_here.html) ?

So that it is the same URL rewrite format with the pages.

Do I just replace (in red)
$data['TITLE_REWRITE'] = preg_replace ('`[^\w_-]+`', '-', $data['TITLE']);

with

$data['TITLE_REWRITE'] = preg_replace ('`[^\w_-]+`', '_', $data['TITLE']);

Please advise, thanks!

paul.martin
01-21-2008, 09:28 AM
Yes, that's all. Make sure you change it in both places.
And please use the support forum as specified in the thread header for future questions. Questions asked here may be overlooked.

Paul

beldorian
01-24-2008, 04:31 AM
You said to look for the following line in the index.php - don't see it there... any ideas???

RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]

paul.martin
01-24-2008, 04:35 AM
Sorry for that. It's been fixed

beldorian
01-24-2008, 06:39 AM
Also, just to clarify - on step 7 - basically, anywhere there is a .ID we should replace that with .TITLE_REWRITE

correct?

beldorian
01-24-2008, 06:53 AM
Hey there Paul -

After making all of the changes and running each of the SQL queries individually, and double checking against your instructions, I am being sent to the following URL - http://www.quotemyauto.com/articles/article-article-3.html at QuoteMyAuto.com when clicking on the article title in the right.tpl from the index page or if I click on the Read More link from the Latest Articles page http://www.quotemyauto.com/index.php?list=latestarticles

I get the following error...

Content visible to registered users only.

However, if I click on the article title from the Latest Articles page, it takes me to the article at the following URL: http://www.quotemyauto.com/articles/article-3.html

paul.martin
01-24-2008, 10:47 AM
As far as I see the problem is fixed (the links in all the places are of the form http://www.quotemyauto.com/articles/article-x.html)

One thing to note: the article links for articles added before the mod is installed are left unchanged! This is a safety measure to avoid broken links and loosing pages indexed in the search engines.

If you want to modify those titles too you'll have to do it by hand from phpMyAdmin - edit the TITLE_REWRITE field to the desired page name.
One more thing:
Please use the support forum as specified in the thread header for future questions. Questions asked here may be overlooked.

Paul

paul.martin
01-24-2008, 05:57 PM
Hello Joe
You most likely got the wrong thread: the problems you describe are unlikely to be related to this mod.
For questions regarding this mod use the support forum at http://www.phpldaddons.com/forum/ as specified in the first post!

I (the author of this mod) am in no way affiliated with the creators of phpLD so you might find answers (especially to the question regarding the financial issues) from them.

Paul

beldorian
01-25-2008, 10:34 PM
Howdy Paul - I "undid" the changes so that the site wouldn't be broken. Wasn't sure if/when you would be back to check on it.

Content visible to registered users only.

paul.martin
01-25-2008, 10:45 PM
I can't give any help/suggestions if I can't see any problems except to read carefully the mod installation instructions. I think that fixes 9 out of 10 problems :)

Simonsig
03-12-2008, 01:49 AM
Does anyone know how to rewrite special characters with .htaccess..
What I mean is that for example a link "webpage.com/tolge.html"
would show a search engine that it is "webpage.com/tőlge.html"
Notice the one word difference ;)

Thanking in advance