How to make a forum bot?

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators


How to make a forum bot?

Postby oops! » Fri Jul 14, 2006 4:30 pm

Hi everybody... I didn't find members introduction forum so I decided to skip on that one and get right to the point.... :D

ok, i was looking in google for a tut, how to create a bot for a forum, which will occasionally make posts, maybe news updates.. not something complicated that will respond to other's posts or send PM's, just "someone" who will log in from time to time and make posts.

is it possible? and if yes, does anyone know of any (free) script or easy tutorial?

thanks in advance
User avatar
oops!
 
Posts: 2
Joined: Fri Jul 14, 2006 4:20 pm

Advertisement

Postby Peter77 » Fri Jul 14, 2006 5:22 pm

Yes, there is the AI MOD http://www.phpbb.com/phpBB/viewtopic.php?t=392086 if you need support, ask on that thread. :)
User avatar
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 520
Joined: Wed May 10, 2006 9:46 am
Location: Michigan

Postby oops! » Fri Jul 14, 2006 5:33 pm

thanks Peter 77!
User avatar
oops!
 
Posts: 2
Joined: Fri Jul 14, 2006 4:20 pm

Postby dcz » Fri Jul 14, 2006 8:32 pm

Interesting indeed.

I had not seen that someone was developing such mod again. There was one in the phpbb dev forum for a long time, but was inactive for ages and I never tried it.

Will look forward for a demo on this one.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19916
Joined: Fri Apr 28, 2006 9:03 pm

Postby Silverado05 » Mon Jul 31, 2006 11:02 pm

I built one that only edits one file and 2 lines if you're interested.
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby dcz » Mon Jul 31, 2006 11:17 pm

Actually yes ;)

Not that I think bots can save a forum, but the principle is interesting, so I'd be happy to take a look to your coding :D

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19916
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Thu Aug 03, 2006 6:49 am

I ran the AI MOD back with phpbb versions 2.0.12 - 2.0.15 or so. it was actually not bad. the trick was to download or make theAIML files more intresting to have the bot appear smarter.


Silverado05, do share :)
User avatar
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 520
Joined: Wed May 10, 2006 9:46 am
Location: Michigan

Postby Silverado05 » Mon Aug 07, 2006 2:34 am

Ok here is the code I wrote for a google bot. I don't know if you would actually consider this as a bot, but what it does is add your google adsense ads after the first post of each thread. Now I am working on a ACP function that will allow you to edit ads on the fly and how many ads to add. I.E. just after the first of every other post of 3 post etc. Also allow you to add banners ads that will rotate with your google ads if that is your flavor. This is a real simple code. One file to edit and two lines. I looked for something like this but none that actually worked or looked right. As you can see this flows nicely with your fourm and looks like google actually posted it. Anyways enjoy and if you have an ideas let me know.


Now it you notice at the bottom of the code it says YOUR ADSENSE CODE HERE you need to replace that with your adsense code of course. Also if you wish to use an advatar with it you need to uncomment the line 'POSTER_AVATAR' and then upload your image to your image dir. and then name it accordingly

If you would like to download the entire mode with the code change done this click below.

Google_Adsense_in_topics_1.0.zip

Now if you have a stock forum or have not made changes to the viewtopic.php then just upload this over your exsiting file. Upload the image to your image dir. and you are good to go and it works right out of the box with no changes. I would advise you to change to adsesne code though unless you wish to make me money. :lol: The verison in the file uses the avartar. If you don't want to use it then just comment it like shown in the code below.


Screenshot is attached below

Code: Select all
<?php #
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

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

#
#-----[ REPLACE WITH ]------------------------------------------
#
   $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
   $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
   $num ++;

#
#-----[ FIND ]------------------------------------------
#
      'U_POST_ID' => $postrow[$i]['post_id'])
   );

#
#-----[ 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' => 'Sponsors<br />',
         // 'POSTER_AVATAR' => '<img src="images/google_avatar.gif" alt="" border="1" />',
         'MESSAGE' => '<div align=&quot;center&quot;>YOUR ADSENSE CODE HERE</div>',
         'L_MINI_POST_ALT' => $mini_post_alt,
         'U_MINI_POST' => $mini_post_url,
         'U_POST_ID' => 'ad')
      );
   }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM ?>


Image

Enjoy and is you have any questions let me know.
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby dcz » Mon Aug 07, 2006 11:38 am

Very interesting and thanks for sharing.

It's not really the kind of bot we where talking about here, but this can help out a lot for AdSense integration.

I'll soon start a Google AdSense forum here, and we'll start talking about such matter a bit more ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19916
Joined: Fri Apr 28, 2006 9:03 pm

Postby Silverado05 » Wed Aug 09, 2006 9:27 am

Yea I didn't think it was a "true" bot but it is a popular mod that people are looking for that I wrote up. So I thought I would share in case it was what they were looking for. Little simplier then a real google bot. Hopefully I or others can exaand it to be a little more user friendly via ACP.
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby acapellas4u » Wed Aug 09, 2006 10:54 am

Silverado, this is THE mod I was looking for not so long ago, If you go and visit an example of the Adsense block I installed you'll see that It doesn't show as a BOT like yours.. I actually WAS looking for your mod all along but couldn't find it so I ended up implementing this one.

Two things:

  • The fact that the mod I installed doesnt contain a proper continuous posting look and feel I had to opt for another display for the second set of google ads.
  • If there's a way I can revert all my changes AND install your mod then I will look to mirror the same display type which appears at the top of the forum


What do you think ?

Regards.
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby acapellas4u » Wed Aug 09, 2006 11:44 am

Update..

I've undone the old version I had and now I need to know who I can implement MY Adsense (which runs off of phpMyAds)

The code block taken from the viewforum_body.tpl :

Code: Select all
<table width="90%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr>
    <td width="100%" align="center" valign="bottom">
      <script language='JavaScript' type='text/javascript' src='http://ads.acapellas4u.co.uk/adx.js'></script>
      <script language='JavaScript' type='text/javascript'>
      <!--
        if (!document.phpAds_used) document.phpAds_used = ',';
        phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
         
        document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
        document.write ("http://ads.acapellas4u.co.uk/adjs.php?n=" + phpAds_random);
        document.write ("&amp;what=zone:1");
        document.write ("&amp;exclude=" + document.phpAds_used);
        if (document.referrer)
          document.write ("&amp;referer=" + escape(document.referrer));
        document.write ("'><" + "/script>");
      //-->
      </script>
      <noscript><a href='http://ads.acapellas4u.co.uk/adclick.php?n=a2f389b2' target='_blank'><img src='http://ads.acapellas4u.co.uk/adview.php?what=zone:1&amp;n=a2f389b2' border='0' alt=''></a></noscript>
    </td>
  </tr>
</table>


When I try simply replacing the YOUR GOOGLE ADSENSE HERE I get a blank screen, not good.. so until I hear back from someone It'll just say YOUR GOOGLE ADSENSE HERE until further notice..

Nice tweak though...
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby dcz » Wed Aug 09, 2006 12:30 pm

Have a look in the viewtopic.php file provided in the release, you need to put the full JS asdesnce code ;) (the one grabbed from the adsence page) :
Code: Select all
         'MESSAGE' => '<div align=&quot;center&quot;>
         <script type="text/javascript"><!--
         google_ad_client = "pub-YOUR_adsence_ID";
         google_ad_width = 728;
         google_ad_height = 90;
         google_ad_format = "728x90_as";
         google_ad_type = "text_image";
         google_ad_channel ="0306743934";
         google_color_border = "ECF1EF";
         google_color_bg = "ECF1EF";
         google_color_link = "56849B";
         google_color_text = "000000";
         google_color_url = "56849B";
         //--></script>
         <script type="text/javascript"
         src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
         </script></div>',


++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19916
Joined: Fri Apr 28, 2006 9:03 pm

Postby acapellas4u » Wed Aug 09, 2006 1:24 pm

Cheers dcz, I did consider that I might just have to use the Adsense Code without all the phpNewAds code wrap around..

In fact, we never used the phpNewAds to it's full potential anyway, and having to call an extra url's probably only slowing down the whole operation of displaying ads on the page..

I might just put the code into all relevant areas on the forum as it used to be, plani, clear and str8 forward.

Regards.
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby dcz » Wed Aug 09, 2006 1:29 pm

Just to make sure, I was talking about Silverado05's mod ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19916
Joined: Fri Apr 28, 2006 9:03 pm

Next

Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests


 
cron