![]() |
Quote:
To you match google analytics and rotating Banner System, for example? Thanks again |
hi,
I have installed the rotating banner system long ago, and the banner worked fine in the forum section - see here s-maof.com/Forum but now, for no reason the banners show up in the blog page also see here - http://www.s-maof.com/Forum/blog.php how did this happened? |
I'm using this forum skin http://www.completevb.com/demovb4/forum.php?styleid=85
and as you can see there is a custom advertising space at the top of the skin. The HTML for this ad space is this Code:
<div class="bannerBox"><a name="top" href="URL" id="BannerBox"><img src="images/styles/twisteddark/style/bannerBox.png" alt="" /></a> My question is, is there any way to make this custom ad space rotating by adding a hook such as @vbbanners-custom@ Sorry if this has already been answered but I don't have time to go through 126 pages ;) |
I found a weired behaviour of the RBS, and I hope one can help me to figure out what to do.
I want to display a banner after every 5 and 10 Posts of a Thread. So I simply added one Banner Definition for Position2 and another for Position 3 and modified the postbit_legacy as follows: <vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '5')"> <div class="thread_controls"> <div style="width: 100%; text-align: center"> <!--@vbbanners:2@--> </div> </div> </vb:if> <vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '10')"> <div class="thread_controls"> <div style="width: 100%; text-align: center"> <!--@vbbanners:3@--> </div> </div> </vb:if> In most of the threads the banners are displayed as required. But there are some threads where not, and I have no idea why. I tried to use the "show only in Forums" setting by selecting all Forums, as well as to select not one, because it's ok to show the banner in all forums. I don't have a limitation on the usergroups, as all of them should see the banners. I have absolutely no idea where there could be the difference between two threads in the same forum, where in one thread the banners are displayed and in the other thread not. Btw., it doesn't matter if a thread has more than one page. If the banner is not displayed on page 1 of a thread, it's not displayed on page 23 of 45 neither. If it's fine on page 1, it's fine on the following pages, too. Maybe one has an idea. We're running VB Suite 4.1.11 |
I'm wrong,
the way I described is only working on Page 1 of a thread, I want to have it on every page. Our default "Posts per Page" is hardcoded to 15, and the users can't switch to another value. Any idea how to modify the postbit_legacy to support what I want? |
UPDATE:
I did it now by using: <vb:if condition="(THIS_SCRIPT == showthread) AND (in_array($post['postcount'], array(5,20,35,50,65,80,95,110,125,140,155,170,185, 200,215,230,245,260,275,290,30 5,320,335,350,365,380,395,410,425,440,455,470,485, 500,515,530,545,560,575,590,60 5,620,635,650,665,680,695,710,725,740,755,770,785, 800,815,830,845,860,875,890,90 5,920,935,950,965,980,995,1010,1025,1040,1055,1070 ,1085,1100,1115,1130,1145,1160 ,1175,1190,1205,1220,1235,1250,1265,1280,1295,1310 ,1325,1340,1355,1370,1385,1400 ,1415,1430,1445,1460,1475,1490,1505,1520,1535,1550 ,1565,1580,1595,1610,1625,1640 ,1655,1670,1685,1700,1715,1730,1745,1760,1775,1790 ,1805,1820,1835,1850,1865,1880 ,1895,1910,1925,1940,1955,1970,1985,2000,2015,2030 ,2045,2060,2075,2090,2105,2120 ,2135,2150,2165,2180,2195,2210,2225,2240,2255,2270 ,2285,2300,2315,2330,2345,2360 ,2375,2390,2405,2420,2435,2450,2465,2480,2495,2510 ,2525,2540,2555,2570,2585,2600 ,2615,2630,2645,2660,2675,2690,2705,2720,2735,2750 ,2765,2780,2795,2810,2825,2840 ,2855,2870,2885,2900,2915,2930,2945,2960,2975,2990 ,3005,3020,3035,3050,3065,3080 ,3095,3110,3125,3140,3155,3170,3185,3200,3215,3230 ,3245,3260,3275,3290,3305,3320 ,3335,3350,3365,3380,3395,3410,3425,3440,3455,3470 ,3485,3500,3515,3530,3545,3560 ,3575,3590,3605,3620,3635,3650,3665,3680,3695,3710 ,3725,3740)))"> <div class="thread_controls"> <div style="width: 100%; text-align: center"> <!--@vbbanners:2@--> </div> </div> </vb:if> <vb:if condition="(THIS_SCRIPT == showthread) AND (in_array($post['postcount'], array(10,25,40,55,70,85,100,115,130,145,160,175,19 0,205,220,235,250,265,280,295, 310,325,340,355,370,385,400,415,430,445,460,475,49 0,505,520,535,550,565,580,595, 610,625,640,655,670,685,700,715,730,745,760,775,79 0,805,820,835,850,865,880,895, 910,925,940,955,970,985,1000,1015,1030,1045,1060,1 075,1090,1105,1120,1135,1150,1 165,1180,1195,1210,1225,1240,1255,1270,1285,1300,1 315,1330,1345,1360,1375,1390,1 405,1420,1435,1450,1465,1480,1495,1510,1525,1540,1 555,1570,1585,1600,1615,1630,1 645,1660,1675,1690,1705,1720,1735,1750,1765,1780,1 795,1810,1825,1840,1855,1870,1 885,1900,1915,1930,1945,1960,1975,1990,2005,2020,2 035,2050,2065,2080,2095,2110,2 125,2140,2155,2170,2185,2200,2215,2230,2245,2260,2 275,2290,2305,2320,2335,2350,2 365,2380,2395,2410,2425,2440,2455,2470,2485,2500,2 515,2530,2545,2560,2575,2590,2 605,2620,2635,2650,2665,2680,2695,2710,2725,2740,2 755,2770,2785,2800,2815,2830,2 845,2860,2875,2890,2905,2920,2935,2950,2965,2980,2 995,3010,3025,3040,3055,3070,3 085,3100,3115,3130,3145,3160,3175,3190,3205,3220,3 235,3250,3265,3280,3295,3310,3 325,3340,3355,3370,3385,3400,3415,3430,3445,3460,3 475,3490,3505,3520,3535,3550,3 565,3580,3595,3610,3625,3640,3655,3670,3685,3700,3 715,3730,3745)))"> <div class="thread_controls"> <div style="width: 100%; text-align: center"> <!--@vbbanners:3@--> </div> </div> </vb:if> This way I'm prepared for threads with up to 250 pages, but this is much more dirty than quick :-) |
If I forced my users to use 15 posts per page they would revolt. Or they would just use that add-on that strings pages together. Do you also go to great efforts to force them not to use an adblocker? Because I know if I saw ads every 5 posts I would sure use one.
It seems to me you could have put two ads on each page simply by putting one at the top and one at the bottom, or after the first post. No custom coding required. |
The Issue is we moved from an old Board using SMF, and our contracts with our advertisers are set for a place between post 5 and 6 and between 10 and 11.
We don't want to change the contracts. Probably, to switch from 5 to the top will be accepted, but from 10 to the bottom for sure not.... If our users are using adblockers is not our issue... |
Quote:
|
Quote:
|
Quote:
PHP Code:
|
Unfortunately, the range() function call is not allowed in templates.
Thanks! |
well you still could use a plugin :D
... actually % (modulo) should work ... thus if (n % 15) == 0 then do something |
Quote:
|
Quote:
Like this, maybe? (You need a banner there at location 0): Code:
<div class="bannerBox"><!--@vbbanners:0@--></div> |
Hi Giovanni,
Any chance of implementing the thumbnails in banners list ? https://vborg.vbsupport.ru/showpost....postcount=1714 |
Many thanks to Mystics from vb-germany.com. He gave me the following code for the postbit_legacy and this one is working like a charme:
Code:
<vb:if condition="THIS_SCRIPT == 'showthread' AND (($post['postcount'] % 15 == 10) OR $post['postcount'] == 10)"> |
Quote:
|
Quote:
|
Quote:
I'm not going to waste a lot of time here... Let's just say you run a forum that is prone to attracting a lot of hackers, crackers, etc... Do you have a patched file that won't produce the all-too-common to not be addressed error: Quote:
|
Quote:
|
I think you completely misunderstood that. Thanks anyways... I think?
|
Quote:
|
My interpretation is that the original poster was being snarky/demanding because they didn't follow the instructions and received an error that some installation files were missing :)
Hopefully I misunderstood it, too! The product works exactly as it should, with a clean install and current version(s). There could be a conflict with something else you installed, i suppose. |
Can you use multiple position/placeholders for a banner, without making a banner for each position separately?
Using the same placeholder would not work as I could not limit the banner in additional positions |
|
Quote:
|
Quote:
|
Quote:
It's a matter of my forum has exploit attacks several times a hour, every hour. Changing permissions is NOT an option, which solves the problem for just about everyone else. I was looking for a file set that didn't require us changing certain requirements set by our server security administrator, such as those permission requirements. That's all, wasn't trying to pee in anyone's cheerio's.... Sorry if it was taken that way. FWIW, I'm definitely not the technically minded behind our forum... I'm just the guy that pays the bills :) All forgiven? If not, well... I really did try :) I'm being sincere when I say the original post and this post are meant with only the best possible intent. |
So, a non-technical explanation: It's highly unlikely that those hourly attacks are anything more than bots trying to find an easy way in. Don't worry - as long as you keep vb and the server updated they really aren't too much of a worry.
I don't think "check your access rights" is the same as saying "set all your file permissions to allow yourself to be hacked". In general, vb files should all be 644 and directories 755. I missed the part where you explained what error(s) you're getting, and where you gave us a link and test login (if required) to look at things. Have you already simply asked your tech people (your host's tech support?)? It's very common for them to set security in such a way that you can't run your own files. When that happens they can set exceptions. If you ask them nicely. :) |
hi,
I am trying to validate my site and getting this error: general entity "userid" not defined and no default entity ?.s-maof.com/Forum/rbs_banner.php?id=1&userid=0" target="_blank"><img src="http? I am trying to replace it to ?.s-maof.com/Forum/rbs_banner.php?id=1&userid=0" target="_blank"><img src="http? where in the code could I find that? :D |
never mind - I managed - it's in the - dbtech/vbnavtabs/includes/functions.php
|
Quote:
Please verify after the changes, the banners are still cliccable, since a some servers don't accept "amped" URL's without side effects. |
1 Attachment(s)
Great mod. Thank you very much
------------- In next release you may improve this: In the file (includes/functions_rbs.php) Replace this: Code:
$url = sprintf('%s/rbs_banner.php?id=%d&userid=%d', $bburl, $rs['id'], $rbs_userid); With: Code:
$url = sprintf('%s/rbs_banner.php?id=%d&userid=%d', $bburl, $rs['id'], $rbs_userid); Before: https://vborg.vbsupport.ru/attachmen...1&d=1337679644 After: https://vborg.vbsupport.ru/attachmen...1&d=1337679823 :) |
thanks. they are.
you are wright,btw, I changed it in the mods now that I think about it.. |
Yeah ... we have this problem handled for many times, and all I can tell about is, once again: not all web servers accept "amp"-ed & symbols. The unamped version is however handled everywhere and I prefer to have always cliccable banners than rather some not.
|
by servers you mean browsers? becasuse if you mean servers I have only one and I am not going to change it any time soon . I think getting rid of the validation errors is a noble enough cause.
|
I mean servers. Since not all are Apache nor IIS, and not all redirect mechanisms work the same way, some of the web servers redirect "amp"-ed URL's to nowhere.
I agree with you, that most servers should by now adhere to the standards, but since the problem has happened in the past and still there are strange things in the wild, you maybe are better off with changing this piece of code yourself ;) |
Quote:
No not the host's support, we have a dedicated server security admin as SEO forums attract a certain 'type' of web user. As soon as I put it in his hands, he had it running in under 5 minutes. The problem was unique to our server's configuration. So that just goes to show you that I shouldn't handle these things... But none the less, I wanted to apologize to anyone that may have been offended or misunderstood my previous posts. Sometimes I type things that end up sounding a lot different than how I meant them, so... I totally take the blame there. Again, apologies. :) |
Quote:
I did not understand this part, may explain it a little more? Quote:
|
All times are GMT. The time now is 09:31 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|