How to make a forum bot?

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

Moderator: Moderators

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

Had a swap-around, What do you think?
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Advertisement

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

efficient enough I'd say ;)
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby Silverado05 » Fri Aug 11, 2006 9:30 am

Yea I have got a lot of that with people looking exactly what I have made. Trust me I looked for the longest for one that looked decent so I just scrapped code and slapped one together that was easy and worked.

Now like dcz said the code goes in the viewtopic.php not the viewforum_body.tpl template file. If you want to use your phpMyAds just slap that code in place of the google AdSense code. Sorry it took me so long to get back to you.

Like I said I am working on an admin function that will allow you to use mutiple ads just by adding them via the ACP. So you will be able to have a lot of different ad services. I.E. Google. Affilate Banners from other sites, etc. So with that you could use your phpMyAds and use google at the same time, it will just rotate on visit like it does not with the google ads, but it will be with all of the ads you enter. It is not on the top of my list to complete rigtht away but it is on my board to get completed in the near furture.
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby acapellas4u » Fri Aug 11, 2006 12:06 pm

Silverado05 wrote:
Like I said I am working on an admin function that will allow you to use mutiple ads just by adding them via the ACP. So you will be able to have a lot of different ad services. I.E. Google. Affilate Banners from other sites, etc. So with that you could use your phpMyAds and use google at the same time, it will just rotate on visit like it does not with the google ads, but it will be with all of the ads you enter. It is not on the top of my list to complete rigtht away but it is on my board to get completed in the near furture.


Thanks for getting back to me Silverado05.

I love the sound of what you are planning and I think thousands of other forum owners will also.

Gr8 stuff.!!
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby Silverado05 » Sun Aug 13, 2006 12:08 am

Were you able to get it working?
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby acapellas4u » Sun Aug 13, 2006 12:37 am

Silverado05 wrote:Were you able to get it working?


ya,it's in
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby Silverado05 » Sun Aug 13, 2006 1:26 am

That doesn't look like the one I wrote. Did you modify it or something. or you using a different one?
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby acapellas4u » Sun Aug 13, 2006 1:31 am

Silverado05 wrote:That doesn't look like the one I wrote. Did you modify it or something. or you using a different one?


soz, yeah used a slightly different version.. I did try yours but overall preferred the look of the current one.
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby Silverado05 » Sun Aug 13, 2006 3:58 am

Ah ok, just wasn't sure if it looked different with other templates. I haven't tested it with any other templates that's why I was curious. I have seen the one you are using before. I didn't really like that one because it doesn't look natural. Different strokes for different folks though right... 8)
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby supersteve9219 » Wed Aug 23, 2006 2:56 am

Silverado05 wrote: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.

is there anyway to change it so it is after the 5th post?
supersteve9219
 
Posts: 2
Joined: Wed Aug 23, 2006 2:54 am

bumb

Postby supersteve9219 » Wed Aug 23, 2006 8:04 pm

bumb? How do I get to show that google bot after the 5th post?
supersteve9219
 
Posts: 2
Joined: Wed Aug 23, 2006 2:54 am

Postby dcz » Wed Aug 23, 2006 9:29 pm

I am not sure this bump will help out ;)

By the way welcome :D

I am not the author of this mod nor I tried it so far.
But what you asked for should be possible.
I'll see this when I'll work on AdSense myself.

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby Silverado05 » Sat Aug 26, 2006 6:15 am

Do you just want this after the 5th post or after the 1st and 5th?
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby AmirAbbas » Sat Aug 26, 2006 9:00 am

hello

you can use this mod

inline banner ad

you can use your adsense code in this mod
you can configure it to show your ads after post 1 or 2 or 3 or 4 or .....
you can configure it to repeat your ad after each 1post , 2 post , ....


:wink:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby Silverado05 » Sat Aug 26, 2006 8:35 pm

Yea but the cosmetics of that mod are kinda cheesey looking. It doesn't actually look like google or someone posted it. Which is the point of this mod I put together. I am working on the admin side of this that will have a lot of the same features as the inline banner mod, but with better looking results.

It is possible to list this mod after any post, just need to know how actually you want it done. After 1st and 5th or just after 5th. I mentioned this before, but this feature will be available in the next release from the admin side. I just wanted to whip something up that was simple and could be of use now that works.
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

PreviousNext

Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests