Verfasst: 13.11.2006 02:21
danke... im nachhinein bereue ich es, so eine dumme frage gestellt zu haben 

phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
1. Seite, 1 BeitragNach einem freundlichen Hinweis:
Ihr müsst natürlich den Googlecode von Eurem Useraccount nehmen damit Google weiß wohin das Geld soll
Also da wo "google_ad_client = "pub-4267689453885886";" steht muss eure Nummer rein.
Code: Alles auswählen
//
// Handle anon users posting with usernames
//
Hab auch mit der viewtopic_body experimentiert aber leider hab ich es nicht unter den ersten Beitrag bekommen. Zudem wurde die Leiste immer doppelt dargestellt.Petra20 hat geschrieben:würde gerne die ads im ersten beitrag haben, also direkt unter dem text aber wie?
Code: Alles auswählen
$template->assign_block_vars('postrow', array(
Code: Alles auswählen
if (!($userdata['session_logged_in']))
{
$postrow[0]['googlemessage'] = '
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
}
$template->assign_block_vars('postrow', array(
'GOOGLE_MESSAGE' => $postrow[$i]['googlemessage'],
Code: Alles auswählen
{postrow.MESSAGE}
Code: Alles auswählen
{postrow.MESSAGE}<br>{postrow.GOOGLE_MESSAGE}
Code: Alles auswählen
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => $poster,
Code: Alles auswählen
// Google Ad Mod
if (!($userdata['session_logged_in']))
{
if($num_post > 7 && $i == $total_posts-1)
{
$row_color = ( !($num_post % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($num_post % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$num_post ++;
$_message = '
<script type="text/javascript"><!--
google_ad_client = "pub-6627613145839558";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE3E7";
google_color_bg = "DEE3E7";
google_color_link = "006699";
google_color_url = "006699";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
$rankimage = '
<script type="text/javascript"><!--
google_ad_client = "pub-6627613145839558";
google_ad_width = 120;
google_ad_height = 60;
google_ad_format = "120x60_as_rimg";
var ua = navigator.userAgent.toLowerCase();
var isFirefox = (ua.indexOf(\'firefox/\') != -1);
if (isFirefox) {
google_cpa_choice = "CAAQuLSkgwIaCACA992HFv4vKMi84IEB";
} else {
google_cpa_choice = "CAAQuLSkgwIaCACA992HFv4vKMi84IEB";
}
google_ad_channel = "";
//--></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' => '',
'POST_DATE' => '',
'POST_SUBJECT' => ' ',
'MESSAGE' => $_message,
'MINI_POST_IMG' => $mini_post_img,
'RANK_IMAGE' => $rankimage,
'U_POST_ID' => '0'
));
}
}
// Ende Google Ad Mod
Code: Alles auswählen
if (!($userdata['session_logged_in']))
{
$x = 0;
while($x < $total_posts+1){
$postrow[$x]['googlemessage'] = '
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
$x=$x+5;
}
}
$template->assign_block_vars('postrow', array(
'GOOGLE_MESSAGE' => $postrow[$i]['googlemessage'],