Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
hallo wie gehts

hilfe bei hack einbau

Recommended Posts

Problem: der Ad-Bot post wird zwar angezeigt nur befinden sich keine informationen in dem Post, kein name, kein titel, kein post (ad)

Habe schon etliche sachen ausprobiert, leider ohne erfolg :(

es geht um folgenden hack:

/*

+-----------------------------------------------

| Google Adsense Banner Mod (Topic View)

| Written by: Daijoubu for zorafex

| Tested with: 1.3 Final

+-----------------------------------------------

| - Show Google Adsense banner between 2 posts

+-----------------------------------------------

| 1.0	Initial release

+-----------------------------------------------

*/

------------------------------------------------

 OPEN: sources\Topics.php

------------------------------------------------

  +-------------------------------------------

  | FIND:

  +-------------------------------------------


  //-------------------------------------

  // 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() )

  {


  +-------------------------------------------

  | ADD BELOW:

  +-------------------------------------------

 	 

 	 //-------------------------------------

 	 // 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&amp;CODE=06&amp;f={$ibforums->input[f]}&amp;t={$ibforums->input[t]}&amp;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++;

 	 }


------------------------------------------------

 Close Topics.php, upload and test

 The mod is hardcoded to remove the Posted: used in the default skin, 

 if your skin_topic.php RenderRow is different: either edit the template

 or change the following line:

	'<b><a title="'.$ibforums->lang['tt_link'].'" href="#" onclick="link_to_post(); return false;" style="text-decoration:underline">'.$ibforums->lang['posted_on'].'</a></b> '

 to match yours

 Please upload the avatar you wish to use for the bot, you can get a selection here:

	http://www.google.com/stickers.html

------------------------------------------------

Share this post


Link to post

so ist meine function RenderRow($data) { aufgebaut:

{$data[POSTER]['name']}

{$data[POSTER]['avatar']}

{$data[POSTER]['title']}


{$data[POST]['post']}

{$data[POST]['attachment']} 

{$data[POST]['signature']}

usw.

Share this post


Link to post

der hack wird kaum ohne "um-modden" in einem IPB 1.1 laufen.... denk ich mal...

edit: desweitern verstösst dieser mod gegen die nutzungsbedingungen von google....

aber muss ja nicht unbedingt im zusammenhang mit google-adsense verwendet werden...

Hello XXX,


You may not place the AdSense banner in posts in your forum, as this may

draw undue attention to the AdWords ads being served and, thus, encourage

your users to click on the ads being served. If users click on ads without

the intention of converting to customers, advertiser costs can be

artificially inflated. Therefore, such activity is in violation of our

program policies (https://www.google.com/adsense/policies).


Please do not implement your forum in such a way that the AdSense banner

is posted in the middle of your forum's threads.


Thank you for your cooperation.


Feel free to email us at adsense-support@google.com if you have additional

questions or concerns. For technical support, please email

adsense-tech@google.com.   


Sincerely,


The Google Team
hab nicht ich bekommen... ;) und ich hoffe das ist noch aktuell... EDIT: anscheinend doch nicht mehr!!!! ( http://www.google.com/support/adsense/bin/...?page=tips.html )
Wie können mehrere Anzeigenblöcke effektiv eingesetzt werden?


Mehrere Anzeigenblöcke können zu einer Leistungssteigerung beitragen, indem Sie unseren großen Anzeigenbestand nutzen. Sie können auf einer Seite bis zu drei Anzeigenblöcke platzieren. Der beste Weg, den Effekt mehrerer Anzeigenblöcke zu messen, besteht darin, die Auswirkungen auf Ihre Gesamteinnahmen zu betrachten. Im Folgenden sind einige Beispiele aufgeführt, in denen mehrere Anzeigenblöcke sich als erfolgreich erweisen können:


    * Seiten mit viel Text, bei denen Nutzer die Seite nach unten scrollen müssen

    [b]* Forum- oder Nachrichtenbrettseiten, insbesondere innerhalb von Threads[/b]

    * Seiten, auf die nur kleinere Anzeigenformate passen (z. B. 125 x 125 Button).

hab auch noch irgendwo gelesen, dass der adsense-teil NICHT wie ein "normales" posting aussehen darf...

Edited by zer0

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×