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)

djbaxter 08-30-2010 09:38 PM

1. This add-on works for me with 4.06.

2. Since 4.04 , you can do insert the appropriate placeholder for this add-on into an appropriate location in postbit, similar to the instructuions given in the second link provided:

In the postbit template (or I guess postbit_legacy if that's what you're using), FIND at the end of the template:

Code:

{vb:raw template_hook.postbit_end}
ADD BEFORE:

Code:

<!-- ad after first post -->
<vb:if condition="$post['isfirstshown']">
<div align="center" style="padding: 10px;">
<!--@vbbanners:0@-->
<br/>
</div>
</vb:if>
<!-- end ad after first post -->

Change "<!--@vbbanners:0@-->" to the appropriate placeholder for your banners.

atlemacks 08-31-2010 08:41 PM

How do I get the banners to show? I am using 4.0.1 and nothing shows up no matter what position i put my banners...

djbaxter 08-31-2010 08:58 PM

Quote:

Originally Posted by atlemacks (Post 2092164)
How do I get the banners to show? I am using 4.0.1 and nothing shows up no matter what position i put my banners...

If you're using vBSEO, turn off "remove white space" as an option.

Check View Source from your browser on a page where you should be seeing the ad. Do you see a placeholder something like <!--@vbbanners:0@--> anywhere on the page?

inigo 08-31-2010 10:20 PM

I need more than 10 different banner locations, can be done?

djbaxter 08-31-2010 10:41 PM

Why on earth do you need more than 10 locations? You do realize you can put more than one banner per location, right? And that you can add the placeholder for one "ad location" to more than one template?

In real;ity, all you really need is one for each size banner you're using, e.g., vertical, small banner, sqaure, rectangle, etc.

inigo 09-01-2010 05:03 AM

Sorry for my english, I´ll try to explain my project, and why I think I need more locations.

I have 50 forum ids in my forum. I want to put different banners in each forum, so I think I need 50 different banner locations, didn´t I?

In each forum for example 6 banners, with the same banner code, but one banner code for each forum id, because in forum Id=1 it will be 6 banners showing (and 15 banner possibilities for example in that banner code), but in forum id=2 it will be other 6 banners (of 12 possibilities for example, but different than the 15 previous ones, so i´ll nedd other banner code),... and all the same for the 50 forum ids.

apart of this i`ll need other

So I need for example 50 banner locations for the forums, and about 10 more locations (for photo gallery, news peage cms, downloads, ...). So i´ll like about 75 different locations if it´s possible, or the way to add myself the number of locations I want.

Any help or suggestion would be apreciated,

Thanks in advance,

onehost 09-13-2010 03:20 AM

Is it possible to setup banners in-post? as if the banner is part of a post?
if so, I would like an ad to show like every 5 posts or so...

demo:
http://www.patientenfragen.net/en/vo...ome-t1810.html

y2ksw 09-13-2010 08:40 AM

Quote:

Originally Posted by onehost (Post 2097404)
Is it possible to setup banners in-post? as if the banner is part of a post?
if so, I would like an ad to show like every 5 posts or so...

demo:
http://www.patientenfragen.net/en/vo...ome-t1810.html

Yes sure. put a placeholder in the postbit template and every post will hold a banner, unless they are all used up :)

However, you presumably use vB4 and then you would use the vBulletin advertising for discussions, select the box to the right of the first/last post, and paste into the Banner HTML a placeholder, set eventually some criteria (which is ideally handled by vbulletin only) and save.

Nephalim 09-19-2010 11:52 PM

Hello. Really nice add-on. Can't wait to really make use of it. Right now I put the <!--@vbbanners:4@--> in the ad_thread_first_content template. copy and paste my google adsense code into the text area of that positions banner in the banner rotation system dropdown. And there's space now where it should be, but it does not show. I have the default VB4 style and custom VB skin. Niether will show my banner there. But I do have my banner working under the navbar. I just went thru all 60 pages here and didn't see help on this.

Thank you much! What did I do wrong? lol

adsense ad size is 200px X 200px

y2ksw 09-20-2010 05:06 AM

Quote:

Originally Posted by Nephalim (Post 2100733)
Hello. Really nice add-on. Can't wait to really make use of it. Right now I put the <!--@vbbanners:4@--> in the ad_thread_first_content template. copy and paste my google adsense code into the text area of that positions banner in the banner rotation system dropdown. And there's space now where it should be, but it does not show. I have the default VB4 style and custom VB skin. Niether will show my banner there. But I do have my banner working under the navbar. I just went thru all 60 pages here and didn't see help on this.

Thank you much! What did I do wrong? lol

adsense ad size is 200px X 200px

There are also some problems reported with Blogs. Probably it is related to caching, which in some way does not handle correctly banner replacements. It is also a version problem, since it has been working until 4.0.3. Maybe refreshing the CMS cache will solve the problem temporarily.

Nephalim 09-20-2010 05:13 AM

OK thank you. I don't have the CMS, just the bulletin board :). Maybe I can use the regular VBulletin spot for that one?

y2ksw 09-20-2010 05:42 AM

Quote:

Originally Posted by Nephalim (Post 2100812)
OK thank you. I don't have the CMS, just the bulletin board :). Maybe I can use the regular VBulletin spot for that one?

Yes of course :)

The vBulletin ad_* templates work best for RBS placeholders.

Arae 09-20-2010 10:27 PM

Can I use this add-on for a rotating header (itself) of the forums?
I don't have any ads at the moment but I'm looking for a rotating header banners every refresh. :)

^__^

y2ksw 09-21-2010 06:43 AM

Quote:

Originally Posted by Arae (Post 2101184)
Can I use this add-on for a rotating header (itself) of the forums?
I don't have any ads at the moment but I'm looking for a rotating header banners every refresh. :)

^__^

With some restrictions it may work with headers, but I can't tell, because I never tried. If you have your styles in files, probably it will not work, because they are plugged together from the client's browsers. However, try and let us know :)

biggeorge 10-01-2010 01:20 AM

I cannot get this to work... 4.0.7, Maybe it's me.

No offense to the work the developer put into this mod, but there should be an easier way to rotate banners, and it shouldn't be restricted to only 10 banners.

djbaxter 10-01-2010 01:38 AM

Quote:

Originally Posted by biggeorge (Post 2105344)
No offense to the work the developer put into this mod, but there should be an easier way to rotate banners, and it shouldn't be restricted to only 10 banners.

It's not restricted to 10 banners. It's restricted to 10 different banner sizes/shapes.

Once you define the type of banner, you can have as many separate banners of that size and shape rotating within a single placeholder. Then you still have 9 other placeholders to use.

y2ksw 10-01-2010 06:49 AM

Quote:

Originally Posted by inigo (Post 2092289)
Sorry for my english, I?ll try to explain my project, and why I think I need more locations.

I have 50 forum ids in my forum. I want to put different banners in each forum, so I think I need 50 different banner locations, didn?t I?

In each forum for example 6 banners, with the same banner code, but one banner code for each forum id, because in forum Id=1 it will be 6 banners showing (and 15 banner possibilities for example in that banner code), but in forum id=2 it will be other 6 banners (of 12 possibilities for example, but different than the 15 previous ones, so i?ll nedd other banner code),... and all the same for the 50 forum ids.

apart of this i`ll need other

So I need for example 50 banner locations for the forums, and about 10 more locations (for photo gallery, news peage cms, downloads, ...). So i?ll like about 75 different locations if it?s possible, or the way to add myself the number of locations I want.

Any help or suggestion would be apreciated,

Thanks in advance,

Sorry, I missed this question :)

In the banner options, you may select for each banner where (forum section) to show up, thus you can use one and the same placeholder to fill all 50 or more forum sections without any collision problem.

You don't have to worry about banner id's either. If you have for "forum 1" about 20 banners, they will rotate, even though you may have only 1 placeholder on a page. Rotating is done randomly and is pretty much even on all instances of banners for that page.

If you have the same placeholder more times on a page, say under the navbar and above the footer, 2 different banners will be taken for those placeholders, with the same randomness and guarantee to be unique on that page. No banner is ever shown twice on the same page.

If you put together all the possible filters for a banner, besides timing, you get as many locations as you need, without using actually more than one or two of the 10 available locations / shapes / banner sizes / banner types or whatever you want to call them :). The software design makes it possible to reuse a single placeholder for many occasions.

Quote:

Although it seems to be difficult to explain, it is easy to use. Just think about a glass. You may fill it with water, juice, beer or wine. You may also use sand, gasoline or bullets if you wish. Normally you would not mix one of the drinks, nor would you throw away the glass after using it. Depending of the occasion, you will probably reuse the same glass as often as possible with as many drinks you may think of. In you parties you'll have green and blue smoking cocktails with fuzzy glitter and funny taste, on company meetings you'll rather offer something more sobre, unless you need to surprise the other companies about your taste :)

biggeorge 10-01-2010 02:02 PM

Quote:

Originally Posted by djbaxter (Post 2105349)
It's not restricted to 10 banners. It's restricted to 10 different banner sizes/shapes.

Once you define the type of banner, you can have as many separate banners of that size and shape rotating within a single placeholder. Then you still have 9 other placeholders to use.

So I went back and tried again. I was making a very simple error and not removing the % from the <!--@vbbanners:%d@--> tag. It's now up and running, and I'm happy I gave it a second try. Thank you.

Devanand 10-06-2010 02:07 PM

I have problem with counting clicks if I use text form to enter code. It's count impressions but not clicks.

y2ksw 10-06-2010 03:34 PM

Quote:

Originally Posted by Devanand (Post 2107415)
I have problem with counting clicks if I use text form to enter code. It's count impressions but not clicks.

This is what the manual says :)

If you wish to count clicks, you will have to include the respective code in your script as well. If you enable click tracking for an image banner, you will see what it needs.

Basically you'll have to call the [forumhome]rbs_banner.php?id=123 script, where 123 is your banner id. Unfortunately I'm unable to tell what happens if there is one or no destination URL. Most probably you'll have to fix the script for your specific needs, too. I believe it may work, if your scripts have no dynamic destination.

fridaypassion 10-16-2010 03:50 PM

Hi

I have a forum that uses a new style not the default vb style so this mod doesnt show up automatically.

If I have a banner set to say position 1 what is the tag I have to add in the template to get the banner to show?

Which template is the normal position one vertical position in? This is the position I want to add to my style

Thanks

djbaxter 10-16-2010 05:47 PM

Quote:

Originally Posted by fridaypassion (Post 2110748)
If I have a banner set to say position 1 what is the tag I have to add in the template to get the banner to show?

<!--@vbbanners:1@-->

Quote:

Originally Posted by fridaypassion (Post 2110748)
Which template is the normal position one vertical position in?

Any "ad postion" in this add-on can be vertical or horizontal, depending entirely on how you want to define it. You then put the placeholder (see above) in whatever template you wish.

If you use the built in vBulletin advertising templates, the only one with a built in vertical is the Blog Sidebar template. However, you can use any of the sidebar templates if you have those enabled and just add the banner placeholder in that spot.

alan92rttt 10-22-2010 04:30 AM

Is there any reporting for click/views per month to the person paying for the ad?

y2ksw 10-22-2010 04:29 PM

Quote:

Originally Posted by alan92rttt (Post 2112631)
Is there any reporting for click/views per month to the person paying for the ad?

You may enable click tracking (works for images only). In the header and in the listings you see also the number of views.

You may also limit the number of clicks (Max. Clicks) or impressions (Max. Impressions) beforehand, such that the banner disappears when it has reached the prepaid amount of clicks and/or views.

pitzerwm 10-22-2010 11:42 PM

I'm using this on my HTML pages, see a previous post. In FireFox the banners are not showing up. this is new, so IMO its one of the patches. Gio, you have any ideas?

You can see this by using FireFox and this URL: http://www.autocareforum.com/buyersguide.html

The banners that you might see are Flash and they work fine. Its the Gif & Jpg that do not.

This is the code to display it.


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>
<style type=\"text/css\">

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

<body>
<!--@vbbanners:2@-->
</body>
</html>';
eval('print_output("' . $html . '");');
?>





Thanks,

y2ksw 10-23-2010 12:38 PM

Quote:

Originally Posted by pitzerwm (Post 2112974)
I'm using this on my HTML pages, see a previous post. In FireFox the banners are not showing up. this is new, so IMO its one of the patches. Gio, you have any ideas?

You can see this by using FireFox and this URL: http://www.autocareforum.com/buyersguide.html

The banners that you might see are Flash and they work fine. Its the Gif & Jpg that do not.


Thanks,

Well I tried hard to get an image banner on the home page, but probably you have them disabled ... on the forum I got one though (footer) and it works to me.

If an image banner doesn't show, maybe you have exceptions for (not loading) images on your own site (?). This is the only one I could think of ... or a buggy plugin, such for example a local image cache, or so.

onesexforum 10-23-2010 03:07 PM

this mod is brilliant just what i was looking for. If you are doing affiliate ads and don't have to worry about monetizing it yourself then this is for you. It is a simple banner ad rotation mod. You may have to fiddle around in the templates a bit to get the ads where you want them, but you will figure it out after a while. It's not too hard :D

thanks :D and Keep up the good work !

pitzerwm 10-23-2010 08:07 PM

Gio,

It is a FireFox issue, IE and Chrome are ok. The forum is fine as it uses your normal code. I have java, and reader etc I don't have but a couple of add-ons.

I'll keep messing around. I noticed that I didn't have any images on the Ebay site, so something is turned off, but don't know whay.

fridaypassion 10-27-2010 06:31 PM

Quote:

Originally Posted by djbaxter (Post 2110770)
<!--@vbbanners:1@-->



Any "ad postion" in this add-on can be vertical or horizontal, depending entirely on how you want to define it. You then put the placeholder (see above) in whatever template you wish.

If you use the built in vBulletin advertising templates, the only one with a built in vertical is the Blog Sidebar template. However, you can use any of the sidebar templates if you have those enabled and just add the banner placeholder in that spot.

Thanks for this reply

Do you know which template this position is (the top ad in this site) this is the location I want to use in my site but I cant find it!

http://www.meganesport.net/community/

djbaxter 10-27-2010 07:10 PM

Quote:

Originally Posted by fridaypassion (Post 2114973)
Thanks for this reply

Do you know which template this position is (the top ad in this site) this is the location I want to use in my site but I cant find it!

http://www.meganesport.net/community/

Admin CP > Advertising > Add New Ad > Ad Selector > Global: Below Navbar

or

Styles & templates > Style manager > Ad Location Templates > ad_global_below_navbar

jnrdavo 10-28-2010 07:56 PM

Love the mod, and have been using it on 5 sites for about a year now....

I've been modding the swf files I have and redirecting them to a php file so I could log additional information.

$Usr= $_SERVER['remote_user'];

$CallingServer = $_SERVER['SERVER_NAME'];
$UserID = $_COOKIE['bbuserid'];

chdir('/home/sitename/public_html/redirects');

$con = mysql_connect("localhost","sitelogin","sitepasswor d");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("site_forum", $con);


// Get IP Address of remote address

// $ip=@$REMOTE_ADDR;
$ip=$_SERVER['REMOTE_ADDR'];

// Update values that are required
$sql="INSERT INTO page_hits (i_date, i_time, ip_address, calling_site, calling_ad, UserName)
VALUES
(now(),curtime(),'$ip','$CallingServer','Sponsor - General','$UserID')";

Would it be possible to add some further details in to this mod so that we can record the following:

calling sitename
IP address of user who click on the ad
Date
Time
username (if they have a login)

If so, then I reckon we would have an excellet tool and be able to produce some meaning full stats that could help people taget their advertising.

y2ksw 10-29-2010 07:07 AM

Quote:

Originally Posted by jnrdavo (Post 2115386)
Love the mod, and have been using it on 5 sites for about a year now....

I've been modding the swf files I have and redirecting them to a php file so I could log additional information.

$Usr= $_SERVER['remote_user'];

$CallingServer = $_SERVER['SERVER_NAME'];
$UserID = $_COOKIE['bbuserid'];

chdir('/home/sitename/public_html/redirects');

$con = mysql_connect("localhost","sitelogin","sitepasswor d");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("site_forum", $con);


// Get IP Address of remote address

// $ip=@$REMOTE_ADDR;
$ip=$_SERVER['REMOTE_ADDR'];

// Update values that are required
$sql="INSERT INTO page_hits (i_date, i_time, ip_address, calling_site, calling_ad, UserName)
VALUES
(now(),curtime(),'$ip','$CallingServer','Sponsor - General','$UserID')";

Would it be possible to add some further details in to this mod so that we can record the following:

calling sitename

IP address of user who click on the ad
Date
Time
username (if they have a login)


If so, then I reckon we would have an excellet tool and be able to produce some meaning full stats that could help people taget their advertising.

I put this on schedule for the next revision. It is a reasonable addition, although some data can't be tracked as 100% reliable, such as "the user who clicked", because it may depend on specific cookie settings to make this information available. Also, some proxies may show an IP of 127.0.0.1, which then would look like as if your server had clicked the ad ;)

Along this addition, I'll also add an optional and complete banner impression trace, which will allow to see at least, who is viewing the banners in general. However, I will not add any statistics at this point, which have to be studied a bit beforehand.

For all those users who would like statistics, please tell what you need, including what you would like to show (directly) to your sponsors/customers.

fridaypassion 11-03-2010 07:09 PM

Quote:

Originally Posted by djbaxter (Post 2114985)
Admin CP > Advertising > Add New Ad > Ad Selector > Global: Below Navbar

or

Styles & templates > Style manager > Ad Location Templates > ad_global_below_navbar

I'm more confused now! do you also need to change a setting in the rotating banner system section as well? I've added the ad location but the new location doesn't appear in the rotating ad system only the usual horizontal position 1 etc.

y2ksw 11-04-2010 09:23 AM

Quote:

Originally Posted by fridaypassion (Post 2117609)
I'm more confused now! do you also need to change a setting in the rotating banner system section as well? I've added the ad location but the new location doesn't appear in the rotating ad system only the usual horizontal position 1 etc.

Please read the included guide and eventually have a look at the Flash Guide as indicated in the first post of this thread.

You need to make changes to your templates and insert banners in the database in order to show banners. The way you do it, is easy and straight forward. There are no such fixed locations as the inbuilt vBulletin locations, but you may use them if you wish.

DieselTruck 11-04-2010 01:34 PM

1 Attachment(s)
Call me stupid, but I cannot get a banner to display.

I have tried <!--@vbbanners:0@--> in all the ad hook locations, none will show. I get this when adding to the header location. See attachment.

As you can see, it just shows the code.

y2ksw 11-04-2010 07:40 PM

1 Attachment(s)
Quote:

Originally Posted by DieselTruck (Post 2117868)
Call me stupid, but I cannot get a banner to display.

I have tried <!--@vbbanners:0@--> in all the ad hook locations, none will show. I get this when adding to the header location. See attachment.

As you can see, it just shows the code.

Could you please just try the template called "ad_navbar_below" with:
Code:

<div align="center"><!--@vbbanners:0@--></div>
and enable one of the default banners. You should get a banner between the navbar (menu) and the forum contents, similar to:

Attachment 123395

y2ksw 11-04-2010 07:43 PM

1 Attachment(s)
PS: if it still shows the code, check also the options. It should look like:

Attachment 123396

DieselTruck 11-05-2010 02:08 AM

1 Attachment(s)
So, I've been playing with it all evening and I'm down to this "x" where the ad should be (See attachment).

I can successfully see the the banner in the browser address bar with the URL the same as I put in the URL Field.
If I click the image placeholder it takes me to the banner successfully.

DieselTruck 11-06-2010 05:48 PM

Any ideas?

y2ksw 11-06-2010 06:18 PM

Quote:

Originally Posted by DieselTruck (Post 2118758)
Any ideas?

Oh, I thought you solved the problem ... so what?

You say you click the placeholder, then you go to the banner? You mean your banner shows on a single page and nothing else? Sounds like you target your banner.

Maybe you have put the image URL into the target field. Please check this first. If this isn't the problem, ... maybe you better reinstall and use the default banners for a start. I have the strong idea we miss something :)


All times are GMT. The time now is 02:57 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.08826 seconds
  • Memory Usage 1,891KB
  • 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
  • (4)bbcode_code_printable
  • (21)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