How to make forum "bot" that posts adsense ads?

Discussion in 'Programming' started by Dominicc2003, Apr 12, 2006.

  1. virruss

    virruss Peon

    Messages:
    112
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #21
    What do you mean by "normal advertisements"? I think there's no need for a bot to add "normal" (or static) ads (for example, in the header, or footer).
     
    virruss, Sep 7, 2007 IP
  2. Jag100

    Jag100 Peon

    Messages:
    142
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #22
    No like selling own ad space and have bots to post them set the quantity
     
    Jag100, Sep 7, 2007 IP
  3. virruss

    virruss Peon

    Messages:
    112
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #23
    I've solved the problem (only for phpBB)! I've explained it, step by step here:

    http://www.forum.zeromedia.ro/viewtopic.php?p=2

    Sorry, you will have to copy and paste the address in your browser. You can also see it working there.
     
    virruss, Sep 7, 2007 IP
  4. virruss

    virruss Peon

    Messages:
    112
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #24
    Here it is, step by step:

    1. Open viewtopic.php

    2. Find:
    $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
    $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

    3. Replace with:
    $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
    $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
    $num ++;

    4. Find:
    'U_POST_ID' => $postrow[$i]['post_id'])
    );

    5. After, add:

    if($i == $ad_after)
    {
    $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')
    );
    }

    6. Save, exit and publish the file.
     
    virruss, Sep 8, 2007 IP
  5. Jag100

    Jag100 Peon

    Messages:
    142
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #25
    Okay but for MyBB?
     
    Jag100, Sep 8, 2007 IP