This is a simple MOD I wrote which will improve your site for registered users. It ads an advert in topics, but only viewable by guests (Making them register).
Its very easy to install, and will take under 1 minute..
Open: viewtopic.php
Find:
Code:
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
Replace with:
Code:
$row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$num ++;
Find:
Code:
'U_POST_ID' => $postrow[$i]['post_id'])
);
After, Add:
Code:
if($userdata['user_id'] == '-1')
{
$row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$num ++;
$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad';
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POST_DATE' => $post_date,
'POST_SUBJECT' => 'Advertisement',
'MINI_POST_IMG' => $mini_post_img,
'POSTER_NAME' => 'Advertisement',
'POSTER_RANK' => 'Advertiser',
'MESSAGE' => '<div align="center">Ad code here</div>',
'L_MINI_POST_ALT' => $mini_post_alt,
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => 'ad')
);
}
Save/Close all files.
Many registered members dont like adverts, as they often slow it down or get in the way. You will also get more members signing up this way.