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)

hohleweg 02-16-2010 05:58 PM

hi
i have e new style
what must i do to see the rbs in the new style
in my standard style i see the rbs
thanks
jo

y2ksw 02-16-2010 06:48 PM

Quote:

Originally Posted by hohleweg (Post 1983935)
hi
i have e new style
what must i do to see the rbs in the new style
in my standard style i see the rbs
thanks
jo

You will have to change the same templates you have changed in the other style(s). If you search for vbbanners in your styles, you'll find out quickly which they are :)

meissenation 02-17-2010 01:10 PM

Throws an error code in VB 4.0.2:
Fatal error: Call to undefined function rbs_url_sanity() in \includes\functions.php(6783) : eval()'d code on line 108

Line 6783 is the call to the global_complete template hook.

Golzarion 02-17-2010 01:30 PM

Nice ! I will test it .

djbaxter 02-17-2010 03:17 PM

This needs to be updated for vBulletin 4.02. While it will still work in the forum, it breaks the CMS.

See http://www.vbulletin.com/forum/showt...o-4.02-upgrade

djbaxter 02-17-2010 03:19 PM

Quote:

Originally Posted by meissenation (Post 1984583)
Throws an error code in VB 4.0.2:
Fatal error: Call to undefined function rbs_url_sanity() in \includes\functions.php(6783) : eval()'d code on line 108

Line 6783 is the call to the global_complete template hook.

Yes. See my post above. In my case, I didn't see the error message initially because it was being suppressed by vBSEO - it appeared when I disabled vBSEO temporarily in my search for the blank CMS problem.

hohleweg 02-17-2010 06:52 PM

Hi
Thanks
Now i found it!
Jo

Skyrider 02-17-2010 07:06 PM

I just installed it :s
Quote:

$f = intval($vbulletin->GPC['forumid']); $ids = array(); $qids = array(); $SQL = "SELECT * FROM " . TABLE_PREFIX . "rbs_banners WHERE enabled=1 AND startdate<=" . TIMENOW . " AND enddate>=" . TIMENOW . " AND IF(forumhome, $f=0, IF(forumids='', 1, FIND_IN_SET('$f', forumids))) AND IF(maximpressions>0, impressions0 AND clicksdb->query_read($SQL); while($rs = $vbulletin->db->fetch_array($rss)) { // Handle primary and secondary usergroups if($rs['usergroups']) { // Field defined $usergroups = explode(',', $rs['usergroups']); if(!is_member_of($vbulletin->userinfo, $usergroups)) { // Not member of these groups, skip continue; } } $ids["$rs[position]"][] = $rs; } $vbulletin->db->free_result($rss); // Set target to new page if not local to forum $bburl = $vbulletin->options['bburl']; if(!$rbs_target = $vbulletin->options['rbs_target']) { $rbs_target = '_blank'; } // For each banner position $rbs_n_placeholder = $vbulletin->options['rbs_n_placeholder']; $phs = array(); foreach($ids AS $key => $idx) { $ph = @sprintf($rbs_n_placeholder, $key); $len = strlen($ph); $phs[] = $ph; // Shuffle (mix) the ads randomly shuffle($idx); // Check for available replacements foreach($idx as $rs) { if(!$npos = strpos(strtolower($output), strtolower($ph))) { break; } // Replace next placeholder $html = ''; $embed = ''; $image = rbs_url_sanity($rs['image']); $name = htmlspecialchars($rs['name']); if($rs['clicktrack']) { $url = $bburl . '/rbs_banner.php?id=' . $rs['id']; } else { $url = rbs_url_sanity($rs['url']); } if($rs['flash']) { if($rs['embed']) { $embed = '

steve71 02-17-2010 11:52 PM

I just did a fresh install then placed <!--@vbbanners:%d@--> in the navbar_below as in the video tutorial but the google test banner is not showing. I copied <!--@vbbanners:%d@--> from the box in rotating banners/options.

??????????

djbaxter 02-18-2010 12:14 AM

Quote:

Originally Posted by steve71 (Post 1985146)
I just did a fresh install then placed <!--@vbbanners:%d@--> in the navbar_below as in the video tutorial but the google test banner is not showing. I copied <!--@vbbanners:%d@--> from the box in rotating banners/options.

??????????

What version of vBulletin?

steve71 02-18-2010 12:29 AM

4.0.2

Which rbs version should I have...currently running 2.21

Are there any template edits necessary for a fresh install? (I had this working fine in 3.8 but reverted all templates)

Videx 02-18-2010 12:33 AM

Quote:

Originally Posted by steve71 (Post 1985146)
but the google test banner is not showing.

FWIW I have never seen the google banners, and I'm not completely sure why. I remember an old banner mod (I think?) specifically excluded Admins because of the google TOS. Anyway, I can see them if I use my regular member login.

steve71 02-18-2010 12:40 AM

Quote:

Originally Posted by Videx (Post 1985159)
FWIW I have never seen the google banners, and I'm not completely sure why. I remember an old banner mod (I think?) specifically excluded Admins because of the google TOS. Anyway, I can see them if I use my regular member login.


I have tried with some custom banners as well with no success. I think (if I have the right version) it has something to do with <!--@vbbanners:%d@--> because I recall having this issue before.


Quote:

Originally Posted by steve71 (Post 1985158)
4.0.2

Which rbs version should I have...currently running 2.21

Are there any template edits necessary for a fresh install? (I had this working fine in 3.8 but reverted all templates)


djbaxter 02-18-2010 12:41 AM

Quote:

Originally Posted by djbaxter (Post 1984709)
This needs to be updated for vBulletin 4.02. While it will still work in the forum, it breaks the CMS.

See http://www.vbulletin.com/forum/showt...o-4.02-upgrade

Quote:

Originally Posted by meissenation (Post 1984583)
Throws an error code in VB 4.0.2:
Fatal error: Call to undefined function rbs_url_sanity() in \includes\functions.php(6783) : eval()'d code on line 108

Line 6783 is the call to the global_complete template hook.

Quote:

Originally Posted by djbaxter (Post 1984712)
Yes. See my post above. In my case, I didn't see the error message initially because it was being suppressed by vBSEO - it appeared when I disabled vBSEO temporarily in my search for the blank CMS problem.

Quote:

Originally Posted by steve71 (Post 1985158)
4.0.2

Which rbs version should I have...currently running 2.21

Are there any template edits necessary for a fresh install? (I had this working fine in 3.8 but reverted all templates)

Version 2.24 worked in 4.01 but this add-on currently isn't working correctly in 4.02.

jbizzle 02-18-2010 04:40 AM

For some reason I cannot get this to show up on my forum, any help? I added "<!--@vbbanners:%0@-->" but nothing comes up..

LCN2007 02-18-2010 04:55 AM

does this mod auto template and locations?

LCN2007 02-18-2010 04:54 PM

I am having the hardest time installing the locations.

Im trying to install the hooks at the same locations of the vb admanager locations.

can anyone help?

HappyFeet 02-18-2010 05:13 PM

Quote:

Originally Posted by LCN2007 (Post 1985719)
I am having the hardest time installing the locations.

Im trying to install the hooks at the same locations of the vb admanager locations.

can anyone help?

Here is what I did... I'm using this mod thru the existing vB ad system.

I add banners to say "position 0" and then go to the vB manage ads section. For my under navbar ad, I simply put <center><!--@vbbanners:0@--></center> in the box.

Ads put in "position 2" , I want above footer. So I go to manage ads > above footer and I put this <center><!--@vbbanners:2@--></center> in the box. Etc, etc...

The ads I put in the rotating banner system work perfectly through the vB ad system. That is until 4.0.2, it crashed my CMS so I had to disable it. I'm waiting for an update to fix it so I can enable it again.

Hope this helps...


Phillip

LCN2007 02-18-2010 06:11 PM

Quote:

Originally Posted by HappyFeet (Post 1985729)
Here is what I did... I'm using this mod thru the existing vB ad system.

I add banners to say "position 0" and then go to the vB manage ads section. For my under navbar ad, I simply put <center><!--@vbbanners:0@--></center> in the box.

Ads put in "position 2" , I want above footer. So I go to manage ads > above footer and I put this <center><!--@vbbanners:2@--></center> in the box. Etc, etc...

The ads I put in the rotating banner system work perfectly through the vB ad system. That is until 4.0.2, it crashed my CMS so I had to disable it. I'm waiting for an update to fix it so I can enable it again.

Hope this helps...


Phillip

this is exactly what i needed thank you.

You say that it doesn't work on 4.0.2?

ill test asap and see how it goes thank you again

djbaxter 02-18-2010 07:37 PM

Quote:

Originally Posted by LCN2007 (Post 1985796)
You say that it doesn't work on 4.0.2?

Sad but true. It generates error messages and effectively nulls the CMS.

y2ksw 02-18-2010 09:01 PM

Quote:

Originally Posted by steve71 (Post 1985146)
I just did a fresh install then placed <!--@vbbanners:%d@--> in the navbar_below as in the video tutorial but the google test banner is not showing. I copied <!--@vbbanners:%d@--> from the box in rotating banners/options.

??????????

Copy <!--@vbbanners:0@--> and it will work.

y2ksw 02-18-2010 09:03 PM

Quote:

Originally Posted by jbizzle (Post 1985298)
For some reason I cannot get this to show up on my forum, any help? I added "<!--@vbbanners:%0@-->" but nothing comes up..

Remove the % :)

y2ksw 02-18-2010 09:05 PM

Quote:

Originally Posted by LCN2007 (Post 1985302)
does this mod auto template and locations?

Nope. It replaces a specially formatted string just before output.

y2ksw 02-18-2010 09:12 PM

Quote:

Originally Posted by djbaxter (Post 1985167)
Version 2.24 worked in 4.01 but this add-on currently isn't working correctly in 4.02.

You may try to move the "Rotating Banner System" -> "Functions" plugin from the hook "global_start" to "global_complete".

HappyFeet 02-18-2010 10:15 PM

Quote:

Originally Posted by y2ksw (Post 1985939)
You may try to move the "Rotating Banner System" -> "Functions" plugin from the hook "global_start" to "global_complete".

SUPER!!!

Thank you very much.:up: Works perfect!!!

Your Mod is awesome, wish I could nominate it 100 more times! Donation coming soon!!!

Thanks again!

Phillip

jbizzle 02-18-2010 10:52 PM

Okay I got it but how come it won't rotate banners?

jbizzle 02-18-2010 11:02 PM

Never mind, thanks to everyone who helped :)

TrailRecon 02-18-2010 11:54 PM

works perfectly! Thank you for this!

TrailRecon 02-19-2010 12:54 AM

I was just thinking. would there be any way to add a filter to the impresions and clicks to show only the ones for a certain time frame?

something like a drop down that would show impressions and clicks for the last 24 hours, 30 days, year, all time, average per month, etc?

maybe even a graph to show progression? maybe thats a bit much :)

y2ksw 02-19-2010 06:22 AM

Quote:

Originally Posted by HappyFeet (Post 1985972)
SUPER!!!

Thank you very much.:up: Works perfect!!!

Your Mod is awesome, wish I could nominate it 100 more times! Donation coming soon!!!

Thanks again!

Phillip

Thank you for trying ... which leads us to a hotfix :)

y2ksw 02-19-2010 06:26 AM

Quote:

Originally Posted by TrailRecon (Post 1986061)
I was just thinking. would there be any way to add a filter to the impresions and clicks to show only the ones for a certain time frame?

something like a drop down that would show impressions and clicks for the last 24 hours, 30 days, year, all time, average per month, etc?

maybe even a graph to show progression? maybe thats a bit much :)

You are welcome to code it by yourself :)

iadventure 02-19-2010 09:53 AM

can you add coding to see a banner ad?

Videx 02-19-2010 01:06 PM

Quote:

Originally Posted by iadventure (Post 1986313)
can you add coding to see a banner ad?

I'm not sure I understand the question, as you can do that with the stock vb4. This mod allows you to rotate your banners so they don't always show up in the same spot.

meissenation 02-19-2010 02:11 PM

Thanks!

dadams982 02-19-2010 08:33 PM

Call me dumb, but I am wanting to place two banners between forums on the forum home side by side with a few spaces in between them. How would I go about doing that?

LCN2007 02-19-2010 09:17 PM

I cant get images to show up?

The sample ads show if i turn them on but i cant get my new ones too.

Any ideas?

Videx 02-19-2010 11:01 PM

Quote:

Originally Posted by LCN2007 (Post 1986831)
The sample ads show if i turn them on but i cant get my new ones too.

Sounds like a path problem. Assuming of course that you can see them if you browse to them.

djbaxter 02-19-2010 11:20 PM

Quote:

Originally Posted by dadams982 (Post 1986774)
Call me dumb, but I am wanting to place two banners between forums on the forum home side by side with a few spaces in between them. How would I go about doing that?

At the location where you want them to appear, try something like this:

Code:

<span align="center">
<!--@vbbanners:0@-->&nbsp;&nbsp;&nbsp;<!--@vbbanners:1@-->
</span>

assuming that you have set up banner 0 and banner 1 as the correct dimensions.

I haven't tryied to do this, mind you, partly because I upgraded to 4.02 and this add-on isn't yet upgraded for 4.02, but it's worth a try.

LCN2007 02-19-2010 11:48 PM

Quote:

Originally Posted by Videx (Post 1986910)
Sounds like a path problem. Assuming of course that you can see them if you browse to them.

I am able to see the images in a browser if I navigate to them.

we don't have to add any html correct should just be the path to the images right?

dadams982 02-20-2010 01:11 AM

Quote:

Originally Posted by djbaxter (Post 1986922)
At the location where you want them to appear, try something like this:

Code:

<span align="center">
<!--@vbbanners:0@-->&nbsp;&nbsp;&nbsp;<!--@vbbanners:1@-->
</span>

assuming that you have set up banner 0 and banner 1 as the correct dimensions.

I haven't tryied to do this, mind you, partly because I upgraded to 4.02 and this add-on isn't yet upgraded for 4.02, but it's worth a try.

Oh, good call.. I am on 4.0.2, so I will await with you.


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

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.02647 seconds
  • Memory Usage 1,845KB
  • 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
  • (2)bbcode_code_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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