vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Rotating Banner System (https://vborg.vbsupport.ru/showthread.php?t=188328)

KrisP 08-04-2009 09:31 PM

delete

eric8476 08-05-2009 02:47 PM

is there a banner rotator for for under the first post?

y2ksw 08-05-2009 09:49 PM

Quote:

Originally Posted by eric8476 (Post 1861940)
is there a banner rotator for for under the first post?

There is a template called ad_showthread_firstpost where you may insert a placeholder in order to show a rotating banner.

eric8476 08-06-2009 05:42 PM

what does the placeholder look like

edit: I found it.

eric8476 08-06-2009 07:05 PM

ads are not running

eric8476 08-06-2009 08:21 PM

I removed the first two IDs and none of the banners are running.

y2ksw 08-07-2009 06:45 AM

Quote:

Originally Posted by eric8476 (Post 1862698)
what does the placeholder look like

edit: I found it.

Quote:

Originally Posted by eric8476 (Post 1862745)
ads are not running

There are many reasons why an ad could not run. But the most frequent reason is, you have not inserted the placeholder in any of the templates.

Also, it may happen you have restricted your banner set too much. Please try the inbuilt banners first, and if they fail, ask here. Also make sure to read the help, included in the package.

As for your PM (please don't post PM's if you can ask here), if you need to show one banner more often than others, just insert duplicate that one for as many times you need. A weight of 1:5 of 2 banners require to insert the second 5 times. You may use this script to duplicate banners 10 times (insert your values first):

PHP Code:

<?php
// No support provided!

define('MULTIPLIER'9);
define('USER''youruser');
define('PASS''yourpass');
define('HOST''localhost');
define('DBNAME''yourdb');
define('TABLE_PREFIX''');
 
$banner_id intval($_GET['id']);
mysql_connect(HOSTUSERPASS);
mysql_select_db(DBNAME);
$SQL "SELECT *
    FROM " 
TABLE_PREFIX "rbs_banners
    WHERE id=
$banner_id";
$rss mysql_query($SQL);
$rs mysql_fetch_assoc($rss);
mysql_free_result($rss);
if(!
$rs)
{
    echo 
"<br />Banner $banner_id not found";
    die;
}
$k = array();
$v = array();
foreach(
$rs AS $key => $value)
{
    if(
$key == 'id')
    {
     continue;
    }
    
$k[] = "`$key`";
    
$v[] = "'" addslashes($value) . "'";
}
$SQL "INSERT INTO " TABLE_PREFIX "rbs_banners (" implode(','$k) . ") VALUES (" implode(','$v) . ")";
for(
$i 0$i MULTIPLIER$i++)
{
    
mysql_query($SQL);
}
echo 
"<br />Banner $banner_id duplicated";
die;
?>


CLSSY56 08-15-2009 11:26 AM

Thanks for the mod, this works great! I use it in 3 different places on my homepage.

Wonksta 08-26-2009 12:16 AM

Does this work with animated gifs at all? I am using OpenX as the ad server so I just paste the insert code in this module but it only loads animated gifs for a split second than dissapears (the image). I revert back to a jpg and all is fine.... Odd...

y2ksw 08-26-2009 06:45 AM

Quote:

Originally Posted by SighK (Post 1874470)
Does this work with animated gifs at all? I am using OpenX as the ad server so I just paste the insert code in this module but it only loads animated gifs for a split second than dissapears (the image). I revert back to a jpg and all is fine.... Odd...

Yes it does.

Sounds like a browser issue to me ...


All times are GMT. The time now is 07:34 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.02879 seconds
  • Memory Usage 1,753KB
  • 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
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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