|
|
|
View previous topic
::
View next topic
|
| Author |
Message |
ramon fincken Site's programmer
Joined: 03 Aug 2007 Posts: 93 Location: Amsterdam, the Netherlands/Europe
|
Posted: Mon Mar 10, 2008 5:02 pm Post subject: phpbb2 inline google ads |
|
|
Want to have these google ads appearing in your forum?
Here's a howto:
OPEN
FIND
# Around line 840
| Code: | //
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
// |
FIND
| Code: | for($i = 0; $i < $total_posts; $i++)
{ |
REPLACE WITH
| Code: | // Google AD
// Ramon Fincken, Websitefreelancers.nl Ramonfincken.com
$i_clone = 0;
for($i = 0; $i < $total_posts; $i++)
{
$i_clone++;
// Google AD
// Ramon Fincken, Websitefreelancers.nl Ramonfincken.com |
FIND
| Code: | 'L_MINI_POST_ALT' => $mini_post_alt,
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => $postrow[$i]['post_id'])
); |
AFTER, ADD
| Code: |
// Google AD
// Ramon Fincken, Websitefreelancers.nl Ramonfincken.com
if($i_clone === 1 || $i_clone === 7)
{
$row_color = ( !($i_clone % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i_clone % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$i_clone++;
$message = '<strong>Advertisement</strong>';
$message .= '<script type="text/javascript"><!--
google_ad_client = "pub-0964453741274626";
google_ad_slot = "9315104464";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => 'Google adsense',
'POSTER_RANK' => 'Advertisement',
'RANK_IMAGE' => $rank_image,
'POSTER_JOINED' => '',
'POSTER_POSTS' => '',
'POSTER_FROM' => '',
'POSTER_AVATAR' => '',
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'SIGNATURE' => '',
'EDITED_MESSAGE' => '',
'MINI_POST_IMG' => $mini_post_img,
'PROFILE_IMG' => '',
'PROFILE' => '',
'SEARCH_IMG' => '',
'SEARCH' => '',
'PM_IMG' => '',
'PM' => $pm,
'EMAIL_IMG' => '',
'EMAIL' => '',
'WWW_IMG' => '',
'WWW' => '',
'ICQ_STATUS_IMG' => '',
'ICQ_IMG' => '',
'ICQ' => '',
'AIM_IMG' => '',
'AIM' => '',
'MSN_IMG' => '',
'MSN' => '',
'YIM_IMG' => '',
'YIM' => '',
'EDIT_IMG' => '',
'EDIT' => '',
'QUOTE_IMG' => '',
'QUOTE' => '',
'IP_IMG' => '',
'IP' => '',
'DELETE_IMG' => '',
'DELETE' => '',
'L_MINI_POST_ALT' => $mini_post_alt,
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => $postrow[$i]['post_id'])
);
}
// Google AD
// Ramon Fincken, Websitefreelancers.nl Ramonfincken.com
|
DIY INSTRUCTIONS
Edit the
| Code: | google_ad_client = "pub-0964453741274626";
google_ad_slot = "9315104464"; |
bit to fit your own google code, see the google page when creating a new ad
DIY INSTRUCTIONS
adjust the
| Code: | | if($i_clone === 1 || $i_clone === 7) |
to fit your needs ( and times ) to show the google ad, right now it will show after the 1rst and the 7th post |
|
| Back to top |
|
 |
Google adsense Advertisement
|
Posted: Mon Mar 10, 2008 5:02 pm Post subject: phpbb2 inline google ads |
|
|
Advertisement
|
|
| Back to top |
|
 |
ramon fincken Site's programmer
Joined: 03 Aug 2007 Posts: 93 Location: Amsterdam, the Netherlands/Europe
|
|
| Back to top |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
Technorati Profile
|