Hi, I user a recent topic mod. After installing this SEO mod, there is no change in the recent file. what I have to change, can anybody help me please?
Here is my recent.php:
Code: Select all
<?php
// ############ Edit below ########################################
$topic_length = '45'; // length of topic title
$topic_limit = '10'; // limit of displayed topics
$special_forums = '1'; // specify forums ('0' = no; '1' = yes)
$forum_ids = '25,22,23,27'; // IDs of forums; separate them with a comma
$config_path = '/forum/'; // path to config.php
$root_path = '/forum/'; // link path
// ############ Edit above ########################################
$path = dirname(__FILE__);
include_once($path.$config_path .'config.php');
mysql_connect($dbhost, $dbuser, $dbpasswd) OR die('Unable to select server.');
mysql_select_db($dbname) OR die('Unable to select database.');
// ############## output ##############
echo '<table width="340" cellpadding="3" cellspacing="0" border="0">
';
// ############## output ##############
$where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id NOT IN ('. $forum_ids .') AND ';
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time
FROM ". $table_prefix ."topics t, ". $table_prefix ."forums f, ". $table_prefix ."users u, ". $table_prefix ."posts p, ". $table_prefix ."posts p2, ". $table_prefix ."users u2
WHERE $where_forums t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id
ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
$result = mysql_query($sql);
if( !$result )
{
die('SQL Statement Error: '. mysql_error());
exit();
}
$line = array();
while( $row = mysql_fetch_array($result) )
{
$line[] = $row;
}
for( $i = 0; $i < count($line); $i++ )
{
$forum_id = $line[$i]['forum_id'];
$forum_url = $root_path.'forum'.$forum_id.'.html';
$topic_id = $line[$i]['topic_id'];
$topic_url = $root_path .'ftopic'. $topic_id.'.html';
$topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';
$topic_type = ( $line[$i]['topic_type'] == '2' ) ? '': '';
$topic_type .= ( $line[$i]['topic_type'] == '3' ) ? '': '';
$topic_type .= ( $line[$i]['topic_type'] == '1' ) ? '': '';
$topic_type .= ( $line[$i]['topic_vote'] ) ? '': '';
$views = $line[$i]['topic_views'];
$replies = $line[$i]['topic_replies'];
$first_time = date('d.m.', $line[$i]['topic_time']);
$first_author = ( $line[$i]['first_poster_id'] != '-1' ) ? '<a href="'. $root_path .'profile.php?mode=viewprofile&u='. $line[$i]['first_poster_id'] .'">'. $line[$i]['first_poster'] .'</a>' : ( ($line[$i]['first_poster_name'] != '' ) ? $line[$i]['first_poster_name'] : 'guest' );
$last_time = date('d.m.Y', $line[$i]['post_time']);
$last_author = ( $line[$i]['last_poster_id'] != '-1' ) ? $line[$i]['last_poster'] : ( ($line[$i]['last_poster_name'] != '' ) ? $line[$i]['last_poster_name'] : 'guest' );
$last_url = '<a href="'. $root_path .'viewtopic.php?p='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id'] .'">'. $last_author .'</a>';
// ############## output ##############
echo '<tr><td valign="top" nowrap="nowrap">'. $topic_type .'<a href="'. $topic_url .'" class="textnorms">'. $topic_title .'</a>
(<span class="textnorms">'. $last_author .' in <a href="'. $forum_url .'" class="textnorms">'. $line[$i]['forum_name'] .'</a></span>)
</td>
</tr>';
// ############## output ##############
}
echo '</table>';
mysql_close();
?>