Bạn hack mod như sau:
Mở sources\Topics.php, tìm:
CODE
//-------------------------------------
// Format and print out the topic list
//-------------------------------------
$post_count = 0; // Use this as our master bater, er... I mean counter.
while ( $row = $DB->fetch_row() )
{
Thêm dưới:
CODE
//-------------------------------------
// Google Adsense banner mod
//-------------------------------------
// You can change the number in: "$post_count == 2" to one you want to display the ad banner, without exceeding the maximum you've set per page
// Default is 2, between 2nd and 3rd post
// Remove " and $first == 0" if you want ads displayed in every page instead of the first one only
//-------------------------------------
if ($post_count == 2 and $first == 0)
{
$ad = array ( 'name_css' => 'normalname',
'post_css' => ($post_count % 2 ? 'post1' : 'post2'),
// You may want to change the post icon here or completly remove it
'post_icon' => '<img src="'.$ibforums->vars['img_url'].'/icon11.gif" alt="" /> ',
// Paste your Google ad code inside the single quotes
'post' => '
<script type="text/javascript"><!--
google_ad_client = "pub-08745674748582";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_color_border = "040242";
google_color_bg = "110244";
google_color_link = "119900";
google_color_url = "119900";
google_color_text = "FFFFFF";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>'
);
$bot_poster = array (
/* You can customize the informations shown about your bot here
* Uncomment, by removing "//" in front of the lines you want to show up
*/
'name' => 'Ad-Bot',
'title' => 'Thanks for your support!',
'avatar' => $std->get_avatar( 'http://www.yourdomain.com/google.jpg', $ibforums->member['view_avs'], '128x53' ),
//'member_rank_img' => '<img src="" border="0" alt="Group Icon" />',
//'member_group' => $ibforums->lang['m_group'].' Bot',
/* You can enter the date the bot joined your board in UNIX timestamp
* http://www.invisiontools.com/index.php/pg/hosted-unix [Currently broken, needs to remove &p=unix off the url to work)
* Default is set to 25/01/04, replace the numbers with $ibforums->vars['board_start'] if you want to use your board start date
*/
//'member_joined' => $ibforums->lang['m_joined'].' '.$std->get_date( 1074988800, 'JOINED' ),
//'website_icon' => '<a href="http://google.com" target="_blank"><{P_WEBSITE}></a>',
);
$replace = array ( 'search' => array ("<a href='{$ibforums->base_url}act=Post&CODE=06&f={$ibforums->input[f]}&t={$ibforums->input[t]}&p='><{P_QUOTE}></a>",
'<b><a title="'.$ibforums->lang['tt_link'].'" href="#" onclick="link_to_post(); return false;" style="text-decoration:underline">'.$ibforums->lang['posted_on'].'</a></b> '
),
'replace' => array ('',
'<b>Yourdomain.com is a ad supported site</b>'
)
);
$this->output .= str_replace($replace['search'], $replace['replace'], $this->html->RenderRow( $ad, $bot_poster ));
$post_count++;
}
Nhớ sửa những phần thông tin cần thiết trong đoạn code trên nhé