With this MOD, your article pages urls will contain the title of the article for better search engine optimization.

1 in .htaccess
FIND

##Article Page Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]

REPLACE BY

##Article Page Rewrite
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule (.*)articles/(.*)\.html$ article.php [NC,QSA,L]

If you have installed the mod for seo friendly details pages, please place this code above the rewrite rules for the details pages which begin with

##Details Link Page Rewrite

2. in /article.php
FIND

preg_match ('#(.*)article(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);

REPLACE BY

preg_match('#articles/(.*)(_|-)(\d+)\.htm[l]?$#i',request_uri(),$matches);

in /templates/your_template/articlelink.tpl
FIND

article-{$article.ID}.html

REPLACE BY

{$article.TITLE|replace:" ":"-"}-{$article.ID}.html

August 23rd, 2007phpLD Custom Category Titles

If you want to customize the titles of the categories pages and not limit it to the name of the category you can use the following modification.
Example:
Category: Internet
Custom Title: Web resources.

Category: Employment
Custom Title: Find you next job

1.

In phpMyadmin, run the following mysql query:

ALTER TABLE `PLD_CATEGORY` ADD `CUSTOM_NAME` TEXT NULL ;

2.

OPEN /templates/Code/admin/dir_categs_edit.tpl

FIND:

{if $symbolic ne 1}
      <tr>

BEFORE THAT, ADD:

<tr>
<td class="label"><label for="CUSTOM_NAME">
Custom Name:</label></td>
<td class="smallDesc">
<input type="text" id="CUSTOM_NAME" name="CUSTOM_NAME" 
 value="{$CUSTOM_NAME|escape|trim}" class="text" />      
</td>
</tr>

3.

OPEN /admin/dir_categs.php

FIND

//Determine columns
$columns = array ('TITLE' => _L('Title'), 'TITLE_URL' => _L('URL Title'),
'DESCRIPTION' => _L('Description'), 'PARENT' => _L('Parent'),
'SYMBOLIC' => _L('Type'), 'STATUS' => _L('Status'),
'HITS' => _L('Hits'), 'DATE_ADDED' => _L('Date Added'));

REPLACE BY

//Determine columns
$columns = array ('TITLE' => _L('Title'), 'TITLE_URL' => _L('URL Title'),
'CUSTOM_NAME' => _L('Custom Name'), 'DESCRIPTION' => _L('Description'),
'PARENT' => _L('Parent'), 'SYMBOLIC' => _L('Type'), 'STATUS' => _L('Status'),
 'HITS' => _L('Hits'), 'DATE_ADDED' => _L('Date Added'));

4.
To add the custom category name in the page title or the body of the page, ADD {$category.CUSTOM_NAME|escape|trim}
to the appropriate template file (header.tpl, top_bar.tpl, main.tpl, …)


© 2007 rakCha resources | Powered by Wordpress | rakCha web directory