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)

y2ksw 07-20-2009 07:51 AM

Quote:

Originally Posted by CLSSY56 (Post 1851992)
What am i doing wrong? I'm trying to set this in a vbadvanced module.
Code:

<td><center>
@vbbanners@
</center></td>

I'm also using 3.8.3, Thanks.

You need to use the new placeholder format, e.g.
HTML Code:

<!--@vbbanners:0@-->

CLSSY56 07-20-2009 12:20 PM

Thanks that worked. How often does it rotate? Is it per page visit or a set time? Can it be set to rotate every 6 seconds?

y2ksw 07-20-2009 12:48 PM

Quote:

Originally Posted by CLSSY56 (Post 1852151)
Thanks that worked. How often does it rotate? Is it per page visit or a set time? Can it be set to rotate every 6 seconds?

The rotation is evenly divided by the number of entries in the database at each page visit.

If you have 10 entries and 1-10 placeholders of the same type, over time the 10 banners will be rotated almost evenly (have about the same impression count).

CLSSY56 07-20-2009 12:52 PM

Is there any coding that can be done to rotate them on a timed basis instead? For me, that's the determining factor wether I use yours or not. Yours is more user friendly then the other one I may add.

y2ksw 07-20-2009 01:25 PM

Quote:

Originally Posted by CLSSY56 (Post 1852173)
Is there any coding that can be done to rotate them on a timed basis instead? For me, that's the determining factor wether I use yours or not. Yours is more user friendly then the other one I may add.

You may try with an IFRAME and a custom coded vBulletin page, which refreshes at certain times. However this product is not intended to dynamically rotate banners while the page is shown.

Besides a significant load to your server it would not add a real value to the visitors, who would see disappear a banner which they eventually chose to click. IMHO

CLSSY56 07-20-2009 02:17 PM

If I run 2 half banners, will they pull the same banner each time or will they run independently?

CLSSY56 07-20-2009 02:22 PM

I'll answer my own question, yes it will show 2 banners per page.

MIAPLAYA 07-21-2009 02:36 AM

1 Attachment(s)
Ok so maybe I'm dense but I installed the mod per the instructions and I have the tab in the ACP. I added a banner and the image to the server and configured every way I can imagine but I get no banner. Screen shots below. Site I'm working on www.turboneticsinc.com/forum

What am I missing?

y2ksw 07-21-2009 10:00 AM

Quote:

Originally Posted by MIAPLAYA (Post 1852606)
Ok so maybe I'm dense but I installed the mod per the instructions and I have the tab in the ACP. I added a banner and the image to the server and configured every way I can imagine but I get no banner. Screen shots below. Site I'm working on www.turboneticsinc.com/forum

What am I missing?

Did you try the default banners and did they work? Have you inserted a placeholder into the templates? BTW, the check on Forum Home overrides the forum selections.

ilanur 07-21-2009 03:27 PM

very nice, but what about a weighted impression option? i need to set a percentage of impressions above the total.. i don't know if iexlained it well.. hope you understood :)

MIAPLAYA 07-21-2009 05:45 PM

Quote:

Originally Posted by y2ksw (Post 1852764)
Did you try the default banners and did they work? Have you inserted a placeholder into the templates? BTW, the check on Forum Home overrides the forum selections.

I did try the default banners and got nothing there either. I also treid with that check box on and off. As for inserting a placeholder in the templates I saw a reference made to that but nothing in the Installation Instructions on altering the template. Sorry I'm coming from the phpBB world which was drastically different obviously. This is what I followed:

Quote:

Installing the Rotating Banner System software is simple. First, upload all files and folders you find in the upload folder to your forum home (where you find the index.php file of your forum).




Then login to your vBulletin board, and install a new product. Browse for the product's XML file (product-rbs.xml), and select the overwrite radio button, if you make an upgrade or want to replace an existing installation.




After clicking on the Import button one new table is created: [prefix]rbs_banners. Also a few default banners will be inserted. These records can be deleted or overwritten. If you leave them inserted and enabled, our advertising will be shown to your forum users, and we receive a little fee for each click your users make. It is a simple way to passively contribute to keep this software constantly updated.




Please note that the lang-it-rbs.xml file is intended to use only on boards where the Italian language is installed and used as default.
Did I miss a step somewhere else in the chm?

y2ksw 07-21-2009 09:34 PM

Quote:

Originally Posted by ilanur (Post 1852940)
very nice, but what about a weighted impression option? i need to set a percentage of impressions above the total.. i don't know if iexlained it well.. hope you understood :)

If you need to show a banner let's say at 2:1 weight, insert the first banner twice, and voil? ... ;)

y2ksw 07-21-2009 09:44 PM

Quote:

Originally Posted by MIAPLAYA (Post 1853052)
I did try the default banners and got nothing there either. I also treid with that check box on and off. As for inserting a placeholder in the templates I saw a reference made to that but nothing in the Installation Instructions on altering the template. Sorry I'm coming from the phpBB world which was drastically different obviously. This is what I followed:



Did I miss a step somewhere else in the chm?

First you need to get the default banners run. For example, insert in one template e.g at the bottom of the navbar, a placeholder
HTML Code:

<!--@vbbanners:0@-->
until the banner shows up. Once it is shown, you can try other options and templates. Once you are confident how it works, all the rest will be glass-clear :)

MIAPLAYA 07-21-2009 10:16 PM

Quote:

Originally Posted by y2ksw (Post 1853183)
First you need to get the default banners run. For example, insert in one template e.g at the bottom of the navbar, a placeholder
HTML Code:

<!--@vbbanners:0@-->
until the banner shows up. Once it is shown, you can try other options and templates. Once you are confident how it works, all the rest will be glass-clear :)

That's what I was missing. Banners are up and rotating. Thanks!

djbaxter 07-21-2009 10:46 PM

Quote:

Originally Posted by y2ksw (Post 1853179)
If you need to show a banner let's say at 2:1 weight, insert the first banner twice, and voil? ... ;)

Yes, that's what I did from the start. Works great. :)

jkcerda 07-30-2009 02:49 AM

umm, need to check it out

djbaxter 07-30-2009 02:59 AM

Quote:

Originally Posted by jkcerda (Post 1858259)
umm, need to check it out

umm, thanks for sharing

pitzerwm 07-30-2009 10:57 PM

I haven't installed this yet, just read all of the posts, sounds great and something that will solve my problems on my Forum. So I'm on the way to install.

I also have a HTML site, is there an easy way to add this to the pages of a HTML site? autocareforum.com

Thanks, for all of your work and obvious patience with us VB challenged souls.

y2ksw 07-31-2009 07:11 AM

Quote:

Originally Posted by pitzerwm (Post 1858784)
I haven't installed this yet, just read all of the posts, sounds great and something that will solve my problems on my Forum. So I'm on the way to install.

I also have a HTML site, is there an easy way to add this to the pages of a HTML site? autocareforum.com

Thanks, for all of your work and obvious patience with us VB challenged souls.

There is no easy way to install this on a simple HTML page. You may try to include a specifically created php script via IFRAME, though.

pitzerwm 08-01-2009 04:53 PM

Ok, I am a noobie, and I think that I installed it as per instructions, and I do have a sample/default banner at the bottom of my page/forum. What I can't seem to find is where to add more banners. I am the admin as well as the janitor.

Where exactly do I find that last screen shot.

Thanks

y2ksw 08-01-2009 06:52 PM

Quote:

Originally Posted by pitzerwm (Post 1859676)
Ok, I am a noobie, and I think that I installed it as per instructions, and I do have a sample/default banner at the bottom of my page/forum. What I can't seem to find is where to add more banners. I am the admin as well as the janitor.

Where exactly do I find that last screen shot.

Thanks

You can add, enable, edit, delete and list banners from the Admin CP, Menu - (at bottom) Rotating Banner System.

pitzerwm 08-01-2009 07:35 PM

I assume that you mean in the VB options, the first menu item? When I click on VB options, I see the "rotating banners" near the bottom, when I click on that, I see the "Rotating Banner System Options" but I don't see any place to go from there.

If I go to Products, I see it "installed info" but I see no menu?

BTW, I'm at 3.6 version

Thanks

y2ksw 08-01-2009 07:44 PM

Quote:

Originally Posted by pitzerwm (Post 1859739)
I assume that you mean in the VB options the first menu item? When I click on VB options, I see the "rotating banners" near the bottom, when I click on that, I see the "Rotating Banner System Options" but I don't see any place to go from there.

If I go to Products, I see it "installed" but I see no menu?

BTW, I'm at 3.6 version

Thanks

I mean the vbulletin menu (bottom left), not the options list. The menu where you select the options etc.

If you can't see the entry, you are probably not having maintenance rights. The "Rotating Banner System" Menu should be found just below Maintenance.

pitzerwm 08-01-2009 07:49 PM

Ok, at least we are making progress, I own the damn thing and there is no one else, how can't I have maintenance rights? How do I fix this?

I looked at the admin permissions and I have clicked yes to all of them including Maintenance "tools"

pitzerwm 08-01-2009 08:47 PM

OK!!!!! There is no doubt that you are one smart dude, and have given all of us a useful mod and I wish you continued success in everything you do, but you missed one small detail, you need to log out and log back in to see the menu option.

I haven't tried it, but I'm sure that it work as expected now.

y2ksw 08-01-2009 09:45 PM

Are you shouting at me? :)

In the description of the plugin it says:

Compatibility: from vBulletin 3.6.5 onwards

Before 3.6.5, there was some problem with correctly loading and installing the XML, due to an additional voice and generally because of the new plugin system, introduced in 3.6.0 and fixed in 3.6.5.

It may be possible you need to logout and login on 3.6, or simply refresh, I can't remember. It is years ago I've the last time looked into it. Anyway, the code changes are not such I would suspect a broken compatibility. I'm happy you can see the menu entry now, and add your own banners ;)

pitzerwm 08-01-2009 11:14 PM

I would never shout at you, I think that you have spent a ton of time developing and maintaining this, and have a ton of patience, with us noobies, and just dump asses. I missed that info. my bad, of course. I'm in 3.6.8

I was able to get images to work, animated gifs, and I said yes to "enable clicks" but so far it isn't counting clicks. I see that you set "limit" to 0 for "no limit", and see that no matter what you set it at, it reverts to "0".

Any direction, I'm sure that it is on my end?

y2ksw 08-02-2009 09:57 AM

Quote:

Originally Posted by pitzerwm (Post 1859816)
I would never shout at you, I think that you have spent a ton of time developing and maintaining this, and have a ton of patience, with us noobies, and just dump asses. I missed that info. my bad, of course. I'm in 3.6.8

I was able to get images to work, animated gifs, and I said yes to "enable clicks" but so far it isn't counting clicks. I see that you set "limit" to 0 for "no limit", and see that no matter what you set it at, it reverts to "0".

Any direction, I'm sure that it is on my end?

Never mind ...

I'll install 3.6.8 and see what's going on. :)

y2ksw 08-02-2009 10:34 AM

I have added a hotfix for 2.2.1 which saves the Max. Clicks value correctly. Thanks for dicovering this bug ... seems that nobody ever used it :)

The only affected file is admin_rbs.php in your forum/admincp folder.

For the rest I have verified (once again) that the product runs perfectly well on 3.6.8. Due to a refresh problem, after the product installation it is necessary to reload the whole page in order to view the menu entries at bottom. ;)

pitzerwm 08-02-2009 04:40 PM

Many thanks again for being so professional.

It does indeed work. I just checked it a bit, and I'm not positive that setting the Max to 0 works right, so to be safe, I just put it at 1M. I'm busy adding the banners before I start replacing the system that I have. Will post back when I have a chance. Now, I just have to find that "script" to make it work in regular HTML and I'm golden:)

y2ksw 08-02-2009 05:47 PM

Paste this in an empty file and call it as you like, e.g. rbs_html.php

PHP Code:

<?php
error_reporting
(E_ALL & ~E_NOTICE);
define('SKIP_SESSIONCREATE'1);
define('NOCOOKIES'1);
define('THIS_SCRIPT''rbs_blank');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
require_once(
'./global.php');
$html '<html>
<head>
 <title>Rotating Banner System</title>
</head>
<body>
<!--@vbbanners:0@-->
</body>
</html>'
;
eval(
'print_output("' $html '");');
?>

Within the HTML, you call this script, for example:

HTML Code:

<html>
<head>
 <title>Untitled</title>
</head>
<body>
    <iframe src="rbs_html.php" width="468" height="85" scrolling="no"></iframe>
</body>
</html>

rbs_html.php should stay in the forum home to work properly.

leylandfor 08-02-2009 06:24 PM

Hi

I have successfully got this mod displaying a banner in the header of my forum, but i would like it to display in the footer of each page too.

I have tried to edit footer, forumdisplay templates etc but it doesnt work, could someone give me step to step info on how to add a banner to footer of all pages please?

Thanks

y2ksw 08-02-2009 06:48 PM

Maybe you don't have enough banners in your database?

pitzerwm 08-02-2009 08:45 PM

I've added my banners and things are looking good. JFYI, the click counter didn't appear to be working as expected, I had the "limit" set at 0, when I make it 1M it appeared to count. I have only tested that a couple of times, while checking the links and getting the banners loaded. I'm thinking that it has to do with "refreshing" like seeing the menu correctly needed logging out and back in.

As I also remember reading some previous posts, there was a discussion whether the banners rotated without "refreshing" the forum page. In my case it does appears to need the page refreshed, to bring up a different banner, which BTW is fine with me.

pitzerwm 08-03-2009 02:36 AM

Quote:

Originally Posted by y2ksw (Post 1839744)
If you insert the flash in the image field, it works half and half. The Flash needs to have the right link inside, else it won't work.

If you prefer to use the code, you also will need to cover the flash with a transparent gif, as shown here. Then you may use a different link, but still you will have to code each Flash banner manually.
HTML Code:

<div>
    <div style="z-index: -1; position: absolute; height: 468px; width: 60px;">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="468" height="60">
            <param name="movie" value="images/banners/yourflash.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <embed src="images/banners/yourflash.swf" quality="high" wmode="transparent" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="468" height="60" ></embed>
        </object>
    </div>
    <div style="z-index: 10; position: absolute; width: 468px; height: 60px;">
        <a href="http://www.domain.tld/yourlink" target="_blank"><img alt="" border="0" height="60" src="img/transparent.gif" width="468" /></a>
    </div>
</div>


I have been messing with this trying to get it to work, and one thing, in the 2nd div line did you get the dimensions backwards? When I use this on my page, the banner is off to the right almost off the page, with about 10% showing. (my banner is on the right side of the pages.

I'm not understanding Reset Notifications, does this reset the counters, i.e. at the end of the month after a report has been sent?

If not have you thought about being able to reset the counters i.e. at the end of the month.

Thanks again for a great mod.

y2ksw 08-03-2009 08:47 AM

Quote:

Originally Posted by pitzerwm (Post 1860312)
I've added my banners and things are looking good. JFYI, the click counter didn't appear to be working as expected, I had the "limit" set at 0, when I make it 1M it appeared to count. I have only tested that a couple of times, while checking the links and getting the banners loaded. I'm thinking that it has to do with "refreshing" like seeing the menu correctly needed logging out and back in.




As I also remember reading some previous posts, there was a discussion whether the banners rotated without "refreshing" the forum page. In my case it does appears to need the page refreshed, to bring up a different banner, which BTW is fine with me.

Clicks are counted only on "image" banners, and only if click tracking is enabled. If the Max Clicks limit is set to 0, any number of clicks are allowed, else, the banner hides when the number of clicks has reached that value. I have tried that also on 3.6.8.

To see the number of clicks (and other data) updated, you need to browse the banners in ACP, no AJAX or other magic there ;)

As for your PM, the error page you show is probably coming from a "missing page". If your rbs_html.php file is in the /forum/ folder, the IFRAME source must read: src="/forum/rbs_html.php". In fact, it does not appear to exist in /

If you need cycling the banners at certain intervals, the above HTML can be changed with a REFRESH meta tag, so your banners would rotate at your refresh rate.

y2ksw 08-03-2009 08:51 AM

Quote:

Originally Posted by pitzerwm (Post 1860467)
I'm not understanding Reset Notifications, does this reset the counters, i.e. at the end of the month after a report has been sent?

This option resets a flag which indicates the mail was sent to users. This is useful if the mail has not arrived or if you test your settings, in order to repeat the notification.

pitzerwm 08-03-2009 04:22 PM

Thanks again, I found that I had a "line" at the top of the rbs_html.php code. Its always something small. It is working, I just need to "adjust" it a little to fit in the iframe right.

As for "rotating" the banner, there appeared to be some confusion as to whether it rotated on its own, without refreshing the page or when the page was refreshed. On my site it rotates when the page is refreshed which is fine for me.

pitzerwm 08-03-2009 06:13 PM

Quote:

Originally Posted by y2ksw (Post 1860223)
Paste this in an empty file and call it as you like, e.g. rbs_html.php

PHP Code:

<?php
error_reporting
(E_ALL & ~E_NOTICE);
define('SKIP_SESSIONCREATE'1);
define('NOCOOKIES'1);
define('THIS_SCRIPT''rbs_blank');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
require_once(
'./global.php');
$html '<html>
<head>
 <title>Rotating Banner System</title>
</head>
<body>
<!--@vbbanners:0@-->
</body>
</html>'
;
eval(
'print_output("' $html '");');
?>


I was having a problem with the banner lining up in the iframe, and with some outside help found that if you add this in the above code will fix it.

PHP Code:

<head>
 <
title>Rotating Banner System</title>
</
head>
<
style type=\"text/css\">

<!--
body {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
}
-->
</style>

<body> 

IMPORTANT: there is also a "\" at type=\"text/css\"> which appears to get killed in the above code.

I also added the margin controls in the html code.

<iframe src="/forum/rbs_html.php" width="600" height="80" scrolling="no" marginheight="0" marginwidth="0" ></iframe>

One or both of these fixed it tested in IE 5 and FireFox 3.5

y2ksw 08-03-2009 10:06 PM

I meant the refresh inside the small HTML snipplet ... of course you may also refresh the main page. :)

All double quotes must be escaped with \" in the PHP code I sent, else part or all of the HTML code disappears. Thus:

<style type="text/css"> => <style type=\"text/css\">


All times are GMT. The time now is 02:30 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.03614 seconds
  • Memory Usage 1,882KB
  • 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_code_printable
  • (5)bbcode_html_printable
  • (3)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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