vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [Adv] banners Hack (https://vborg.vbsupport.ru/showthread.php?t=73847)

J-TEK 01-11-2005 01:29 AM

Is there any uninstall script for this hack, just out of curiosity.

yinyang 01-11-2005 04:25 AM

sounds like a good hack and it'd be perfect for my forum if one additional option could be enabled.

would it be possible to make the ads show for some usergroups and not others? for example, a site with a regular membership would have those "pesky" ads. but for premium (paid) members, those ads would disappear.

would this be difficult?

apfparadise 01-11-2005 05:10 AM

oh, yeah, I would love that, also. I love the hack, installed and upgraded but this would be awesome. ANother upgrade? should be easy, a simple <if> thing, but I dont know how to.

I run it as a Contributor Program solicitation, so it would be awesome if the people who have contributed (donated) would not have to keep seeing it.

Creative Suite 01-11-2005 08:23 AM

J-TEK

just upload the attachment file to your admincp folder , & then run it using your browser , & don't forget to remove the code from the global.php file :)

yinyang & apfparadise

if you had installed the hack , do that

in the global.php file

find :

PHP Code:

$R THIS_SCRIPT;    

if(
$R != 'forumdisplay' AND $R != 'showthread' AND $R != 'login' ){

$queryxs  $DB_site->query("select * from adv where  script  LIKE '%*$R*%'  order by  RAND() limit 1");
$rowx $DB_site->num_rows($queryxs);

while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');

}
$update  $DB_site->query("UPDATE adv SET views = views+1  where  script LIKE '%*$R*%' ");
}

if(
$R == "forumdisplay"){
$foruminfo verify_id('forum'$_REQUEST['forumid'], 11);
$queryxs  $DB_site->query("select * from adv where   forumid  LIKE '%*$foruminfo[forumid]*%' order by  RAND() limit 1");

while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');

}
$update  $DB_site->query("UPDATE adv SET views = views+1  where forumid  LIKE '%*$foruminfo[forumid]*%'  ");
}


if(
$R == "showthread"){
$threadinfo verify_id('thread',$_REQUEST['threadid'], 11);
$queryxs  $DB_site->query("select * from adv where threadid LIKE '%*$threadinfo[threadid]*%'  order by  RAND() limit 1");

while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');

}
$update  $DB_site->query("UPDATE adv SET views = views+1  where threadid LIKE '%*$threadinfo[threadid]*%' ");


replace it with :

PHP Code:

global $bbuserinfo;
$R THIS_SCRIPT;    

if(
$R != 'forumdisplay' AND $R != 'showthread' AND $R != 'login' ){

$queryxs  $DB_site->query("select * from adv where  script  LIKE '%*$R*%'  order by 'id' desc ");
$rowx $DB_site->num_rows($queryxs);
if(
$bbuserinfo[usergroupid]==??){
while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');

}
$update  $DB_site->query("UPDATE adv SET views = views+1  where  script LIKE '%*$R*%' ");
}
else{
$do "nothing";
}}

if(
$R == "forumdisplay"){
$foruminfo verify_id('forum'$_REQUEST['forumid'], 11);
$queryxs  $DB_site->query("select * from adv where   forumid  LIKE '%*$foruminfo[forumid]*%' order by 'id' desc ");
if(
$bbuserinfo[usergroupid]==??){
while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');
}
$update  $DB_site->query("UPDATE adv SET views = views+1  where forumid  LIKE '%*$foruminfo[forumid]*%' ");
}
else{
$do "nothing";
}}


if(
$R == "showthread"){
$threadinfo verify_id('thread',$_REQUEST['threadid'], 11);
$queryxs  $DB_site->query("select * from adv where threadid LIKE '%*$threadinfo[threadid]*%'  order by 'id' desc ");
if(
$bbuserinfo[usergroupid]==6){
while(
$row $DB_site->fetch_array($queryxs)){
eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');

}
$update  $DB_site->query("UPDATE adv SET views = views+1  where threadid LIKE '%*$threadinfo[threadid]*%' ");
}
else{
$do "nothing";
}} 

with changing the "??" marks to the group id in this code
:


PHP Code:

$bbuserinfo[usergroupid]==?? 

if you want to add more than one group replace this code "for 3 time"

PHP Code:

$bbuserinfo[usergroupid]==

with :

PHP Code:

$bbuserinfo[usergroupid]==?? OR $bbuserinfo[usergroupid]==?? 

with changing the "??" marks to the groups id :)

that's all

best wishes ;)

lanc3lot 01-11-2005 11:04 AM

lol:) he is awesome:D

Nice speed mate:D

apfparadise 01-11-2005 01:45 PM

CS, will this work if I need to do that to 12 Groups? Dont ask why :)

MajorFm.com 01-11-2005 03:01 PM

Quote:

Originally Posted by Creative Suite
MajorFm.com

i shall try to add this options

I look forward to it... Thank u for keepin this hack updated with your support and updates... its appreciated.

PuntoPower 01-11-2005 04:30 PM

does this support swf (flash) banners??

we_scooter 01-11-2005 05:48 PM

Got every thing as being instructed in the upgrade guid , but stil the banner ads not showing ..!!

:surprised:

here are my settings for the banner and still nt showing , I did all the equired steps..

J-TEK 01-11-2005 07:21 PM

Quote:

Originally Posted by Creative Suite
J-TEK

just upload the attachment file to your admincp folder , & then run it using your browser , & don't forget to remove the code from the global.php file

What attachment file? The installer?


All times are GMT. The time now is 09:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01464 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete