Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
PAH---Post Ad Hack Details »»
PAH---Post Ad Hack
Version: 1.00, by zajako zajako is offline
Developer Last Online: Aug 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-18-2003 Last Update: Never Installs: 8
 
No support by the author.

The Post admin hack is for those who need money for bandwith, or those who just don't mind advertising thought their site.

This hack adds posts randomly after someone replys. The posts are shown to the usergroups that are enabled to view them, in the forums that are set to show them.

This hack uses a bit of the organization of the tom bot hack, cause that is what inspried this idea, however the bot was totaly removed, and was replaced with a random ad genertor. The postbit used also was changed to make it dispaly clearly as an add rather than a post, however you can clone the postbit template to make it match.

If you use this hack, please leave the gama banner in the rotation. Its not required to use this hack, id just appriciate it since i did not create this hack for my use, but solely for anyone who would want to.

Also id like to see this in use on some of your sites so i know how i can improve it as well as other people see examples so if you post a url to your board with it installed, ill put a link in the first post.

ScreenShot:
Post Screen

File:
version 1.01

Updates:
From 1.0 to 1.01

Sites Using it:
waiting for urls to be submitted

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-16-2004, 07:41 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Okiewan
PLEASE!!! PRETTY PLEASE!!!
Can you port this to RC3? Did I say Please?
Any word on getting this for VB 3? I would love to put google ads up. . .
Reply With Quote
  #33  
Old 09-18-2004, 02:59 AM
Tom1234 Tom1234 is offline
 
Join Date: Sep 2003
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am thinking about installing this (on vB2 installation).

Google ads in a post would require the post to support Javascript. It sounds like that should work since it shouldn't go through any filter which would deny a certain format like HTML code... Has anyone tried this?

Looking at the remaining reported bugs concering adding, editing and deleting ads, it looks like that can be avoided by just using phpMyAdmin to edit and delete specific ads rather than using the vB Admin CP.
Reply With Quote
  #34  
Old 09-18-2004, 03:08 AM
Tom1234 Tom1234 is offline
 
Join Date: Sep 2003
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It sure would be great if something like this could read all the text in the thread and choose a best-match (local) ad based on keywords to post content-specific ads like Google Adsense does.

I'm sure lots of people would pay for a feature like this - including me.
Reply With Quote
  #35  
Old 09-20-2004, 05:10 AM
Tom1234 Tom1234 is offline
 
Join Date: Sep 2003
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Okiewan
Problem now is that for those user groups that don't get the ads, there is still a blank post by "Ad Bot" . Any way around this? They have scroll past a blank post, seems it doesn't matter if there is an ad in it or not....
There is a bug in the added code to admin/functions.php which does not account for "ad" posts that are not supposed to be viewable by the usergroup. I am not familiar with this area of the code well enough to do it most efficiently but the following works.

First create a new template called "postbit_donotshow" which is empty (contains nothing!)

In admin/functions.php, replace:

Code:
	// do posts from ignored users
	$getperms=$DB_site->query_first("SELECT canviewads FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'");
	if (($ignore[$post[userid]] and $post[userid] != 0)) {
		eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
	} elseif($post[adid] && $getperms[canviewads]==1) {
		$script=$DB_site->query_first("SELECT script FROM adholder WHERE id=$post[adid]");
		$post[message]=stripslashes("$script[script]");
		eval("\$retval = \"".gettemplate("postbit_advertisement")."\";");
	}else{
		eval("\$retval = \"".gettemplate("postbit")."\";");
	}
	return $retval;
with the following code:

Code:
	// do posts from ignored users
	$getperms=$DB_site->query_first("SELECT canviewads FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'");
	if (($ignore[$post[userid]] and $post[userid] != 0)) {
		eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
	} elseif($post[adid] && $getperms[canviewads]==1) {
		$script=$DB_site->query_first("SELECT script FROM adholder WHERE id=$post[adid]");
		$post[message]=stripslashes("$script[script]");
		eval("\$retval = \"".gettemplate("postbit_advertisement")."\";");
	} elseif($post[adid]) {
		eval("\$retval = \"".gettemplate("postbit_donotshow")."\";");
	}else{
		eval("\$retval = \"".gettemplate("postbit")."\";");
	}
	return $retval;
Reply With Quote
  #36  
Old 10-10-2004, 07:06 AM
Justice's Avatar
Justice Justice is offline
 
Join Date: Oct 2001
Location: New Orleans
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there something like this available for v3.0.3?
Reply With Quote
  #37  
Old 06-23-2006, 04:39 PM
Silviu's Avatar
Silviu Silviu is offline
 
Join Date: Oct 2001
Location: Bucharest, Romania
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone can make it work for 3.60 ? I would even pay for it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07737 seconds
  • Memory Usage 2,266KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete