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)

jnrdavo 05-03-2016 08:44 PM

Hi Guys, I love this product and use it on 5 forums that I am running.

I'm just starting up a new forum, with VB5 Connect (got to give it a go sometime!).

Has anybody tried this on VB5? I'm assuming that it won't work at all. Is there any workaround?

djbaxter 05-10-2016 06:54 PM

Quote:

Originally Posted by Greta@CPF (Post 2564639)
I am using this mod with the vBulletin Advertising system. It has served me quite well for several years now! But now I find I would like to have specific ads in specific forums. This is all fine except there is no option in the display criteria list to:

Criteria for ad are met

There is only:

Criteria for ad are not met

Is there any way to adjust this?

Quote:

Originally Posted by y2ksw (Post 2564647)
It never was asked. What kind of criteria would you not apply?

Quote:

Originally Posted by Greta@CPF (Post 2564648)
I have my Position 2 banners displaying in rotation below the navbar on a global level with no criteria checked so those banners display on every page of my forums. Now I want to set up my Position 3 banners to display in only one forum (Bicycle Forum) in place of the Position 2 banner with the criteria set for when user is browsing that specific forum. So it would be helpful to be able to set the Position 2 banners criteria to: "Criteria for ad <Bicycle Forum> ARE met.

Does that make sense?

Edit added for clarification: Wait... I just thought that through again and it won't work either. Ok - so how do I do what I want to do using the vBulletin Advertising system?

Quote:

Originally Posted by y2ksw (Post 2564649)
Yes. You can solve this problem by selecting all forums but the one to be excluded for position 2, just the one forum for position 3.

If specific forums are selected, the ads disappear on the home page and other pages which are NOT a specific forum.

How do I get around this problem?

djbaxter 05-10-2016 06:59 PM

Quote:

Originally Posted by Forensic (Post 2464138)
Two questions,
Can I display a single banner from within a large group of banners using the banner Id?
Is there a way to display a single group of banners in forum home and selective forums without maintaining redundant groups of banners?

I have our banners set to show everywhere. I can't use the Forums selection as it removes it from forum home and I can't select forum home because it removes it from forums.

If I can show a single banner I believe I can use an IF/Else statement to show a single banner for a forum id otherwise show the rotation.

Quote:

Originally Posted by y2ksw (Post 2464147)
  1. No. But you can duplicate a banner setting and have it (1) on forum home and (2) on certain forum sections as well.
  2. Then you would not select anything (nor home neither single sections) and that's it.
  3. You can show a single banner only if you have one banner per each location. However this product is intended to show as many banners as you have for a single location at a near to random frequency. Aditionally, you may define a weight and thus show some banners less or more frequently.

Okay... so duplicate the ad and in the duplicate version click Forum Home so it shows there too. Am I reading this correctly?

djbaxter 05-10-2016 08:37 PM

Just confirming that this (the two posts above) worked perfectly.

Thanks, y2ksw!

TheLastSuperman 05-15-2016 03:38 PM

Quote:

Originally Posted by djbaxter (Post 2570514)
Just confirming that this (the two posts above) worked perfectly.

Thanks, y2ksw!

This is literally my third favorite mod on this site, I've used it hundreds of times over and being able to paste other ad system codes into this just seals the deal.

Glad you got it working properly :D.

Scream And Fly 07-04-2016 03:26 PM

Hi, I've been using this addon for years and it's great.

I have a question about the horizontal banners. My site forums are located at http://www.screamandfly.com/forum.php

The horizontal banners display on the top and bottom. I was wondering if there is any easy way to specify the horizontal banners to only display in the header? Also, does this addon prevent the VBulletin system horizontal banners (above footer) from displaying?

Thank you!

rhody401 07-05-2016 11:28 AM

If you put all of the horizontal banners into the same group/position #, and reference that group in the header of the forum where you want them to display, it will just use that group there.

Scream And Fly 07-05-2016 09:26 PM

1 Attachment(s)
Thank you rhody I appreciate your help. I did not originally install this modification on my forums (my admin did, and unfortunately, he is no longer with us). So I am a bit ignorant as to why things are as they are. It appears that I have only one location for horizontal banners, and that location places all horizontal banners into rotation in both locations - above the footer, and below the header. I assume my old site admin set it up so 'position 0' is referenced in both those locations? I see no option to place banners in those two locations respectively.

Here is a screenshot of the CP for the banner system. Position 0 is for horizontal banners in both positions collectively. All other positions seem to be for vertical banners.

Thanks again for your help.:)

rhody401 07-10-2016 12:35 PM

If you have some that are a custom size and you want them isolated from the others, you could use group2 or group3 just for those, and reference it from the code that shows in your header. As long as the banners reference group 2, and the location references group 2, it will only pull from that group for that section.

I do something similar on one of my forums at www.ppfacorner.com If you refresh it several times, you'll see rotating banners from 3 different groups (each is a different size)

KevinL 07-30-2016 05:01 PM

figured it out

s_cocis 08-31-2016 04:32 AM

Hi y2ksw ,

from some days, an unknown users, uses "sql injection" in the rbs_banners table appending malware script in the field "text"

there are vulnerabilities to be corrected?
Can you help me ?

Thank you
Sandro
vbulletin: 3.8.9 Patch Level 1
PHP: 5.3.8
MYSQL: 5.5.16

Bulent Tekcan 09-22-2016 03:47 AM

Hello

My banner images on my server. How can I put local link without www like /banner/sample.gif ? My other problem is start and end date always change when I edit any banners,why ?

Regards

y2ksw 09-22-2016 05:14 AM

Quote:

Originally Posted by s_cocis (Post 2575381)
Hi y2ksw ,

from some days, an unknown users, uses "sql injection" in the rbs_banners table appending malware script in the field "text"

there are vulnerabilities to be corrected?
Can you help me ?

Thank you
Sandro
vbulletin: 3.8.9 Patch Level 1
PHP: 5.3.8
MYSQL: 5.5.16

Everything is correctly escaped, but if some malicious software has access to your forum, it can do what it wants.

The most recent WORM attacks write directly to the plugin cache and are untraceable through the plugin list. The real problem however are one or more scripts which have been introduced to your system or site, which can be called from attackers at will.

I have solved the problem with a dedicated server and strict rules: 1 forum administrator, 1 system operator, secure Apache build (no fast_cgi etc) with security modules enabled, binding and local security rules for PHP (open_basedir, upload_tmp_dir to dedicated folders for each site), and, last not least, fail2ban against insisting hackers.

To clean a broken system, practice has revealed that downloading all scripts and passing them through Avast helps to find all hacked scripts and intruders, while printing styles, plugins and cache tables help to find already injected code.

All together it takes 10-20 minutes to clean an infected system, but unless then, everything is "mayhem".

y2ksw 09-22-2016 05:24 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576144)
Hello

My banner images on my server. How can I put local link without www like /banner/sample.gif ? My other problem is start and end date always change when I edit any banners,why ?

Regards

You can use the "Text" field in order to use HTML, if the standard does not fit your needs.

Start and end dates may change on edit depending on your server settings and some time setting discrepancies between the system server and mysql server. I don't know the exact reason, but some servers work flawlessly while others do cause even irregular time skips, such as 1 hour and 42 minutes. It might be a missing or defective time synchronization between both.

Bulent Tekcan 09-22-2016 05:58 AM

Quote:

Originally Posted by y2ksw (Post 2576147)
You can use the "Text" field in order to use HTML, if the standard does not fit your needs.

Start and end dates may change on edit depending on your server settings and some time setting discrepancies between the system server and mysql server. I don't know the exact reason, but some servers work flawlessly while others do cause even irregular time skips, such as 1 hour and 42 minutes. It might be a missing or defective time synchronization between both.

Thanks for your reply :) Is it possible to show all banner stats in one clear table in admin cp ?

Regards

y2ksw 09-22-2016 06:15 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576148)
Thanks for your reply :) Is it possible to show all banner stats in one clear table in admin cp ?

Regards

The full statistics are available only at the database level and require some additional work (queries or scripts). It has worked out that in the end, even the single banner statistics were too detailed to most of the users, and the banner lists were just the statistics everybody needed.

Bulent Tekcan 09-29-2016 02:48 PM

Hi Again,

I'm sure some time problem in this product. When I enter any start or end time for example

Start : 23 Sep 2016 17:00
End : 25 Sep 2016 15:00

And save this and enter again same banner time seems like that

Start: 24 Sep 2016 03:00
End: 26 Sep 2016 01:00

+10 hours different when I enter again. Our server time is sync and mysql also sync with same clock. And never seen before similar problem. My forum version is 4.2.3

Here is my server result

root@ [~]# date
Thu Sep 29 20:24:25 EEST 2016

root@ [~]# mysql -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2016-09-29 20:24:30 |
+---------------------+

Any idea ? Because I never see any problem before other software or plugin etc.

y2ksw 09-30-2016 07:34 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576417)
Hi Again,

I'm sure some time problem in this product. When I enter any start or end time for example

Start : 23 Sep 2016 17:00
End : 25 Sep 2016 15:00

And save this and enter again same banner time seems like that

Start: 24 Sep 2016 03:00
End: 26 Sep 2016 01:00

+10 hours different when I enter again. Our server time is sync and mysql also sync with same clock. And never seen before similar problem. My forum version is 4.2.3

Here is my server result

root@ [~]# date
Thu Sep 29 20:24:25 EEST 2016

root@ [~]# mysql -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2016-09-29 20:24:30 |
+---------------------+


Any idea ? Because I never see any problem before other software or plugin etc.

I have no solution for this problem.

Bulent Tekcan 09-30-2016 08:09 AM

Quote:

Originally Posted by y2ksw (Post 2576429)
I have no solution for this problem.

Who know :D ? Because time read is wrong, when I edit banner time get wrong and I forgot sometimes correction again. This is bug

y2ksw 09-30-2016 11:12 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576430)
Who know :D ? Because time read is wrong, when I edit banner time get wrong and I forgot sometimes correction again. This is bug

It is not a blocking bug. It is an annoyance to which there is no real solution, because there are many server settings and there is no such thing as a "right" setup.

The queries you made in order to find out, are relative to the user account. If you query the system time of your server, you can only rely upon UTC.

Code:

# date -u
Fri Sep 30 13:05:50 UTC 2016
# date
Fri Sep 30 15:05:56 CEST 2016

Similarily, the mysql server time relies upon the settings of the server and your timezone settings for that mysql server, which may or may not differ. Thus, a mysql query

Code:

SELECT NOW();
may or may not show the current date and time. If you have a 10 hours offset each time you save, then you have probably a largely different UTC time compared to your "user" time.

Code:

mysql> SELECT NOW(), UTC_TIMESTAMP();
+---------------------+---------------------+
| NOW()              | UTC_TIMESTAMP()    |
+---------------------+---------------------+
| 2016-09-30 15:11:51 | 2016-09-30 13:11:51 |
+---------------------+---------------------+
1 row in set (0.00 sec)


y2ksw 09-30-2016 11:30 AM

In addition to what I said before, the RTC may or may not store the system time in UTC. I have several computers which run alternating Windows and Linux, and on a few I had to use specific flags in Linux in order to keep the time always the same between switching OS. Since it is a hardware setting, there is no guarantee that one setting working on one computer will do also on another.

Bulent Tekcan 09-30-2016 12:09 PM

I tested now here is the result

mysql> SELECT NOW(), UTC_TIMESTAMP();
+---------------------+---------------------+
| NOW() | UTC_TIMESTAMP() |
+---------------------+---------------------+
| 2016-09-30 17:12:12 | 2016-09-30 14:12:12 |
+---------------------+---------------------+
1 row in set (0.00 sec)

It is not 10 hour different

y2ksw 10-01-2016 07:37 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576437)
I tested now here is the result

mysql> SELECT NOW(), UTC_TIMESTAMP();
+---------------------+---------------------+
| NOW() | UTC_TIMESTAMP() |
+---------------------+---------------------+
| 2016-09-30 17:12:12 | 2016-09-30 14:12:12 |
+---------------------+---------------------+
1 row in set (0.00 sec)


It is not 10 hour different

As for you question (before you edited this one), the server cron jobs usually execute at UTC, but it depends also on how the time is stored in RTC. On my backup server, time in RTC is stored in local time, and thus runs at local time. The servers where I have the hosting running, store the RTC time in UTC, and run at UTC, while the "apache" user runs in Europe/Rome timezone and thus, vbulletin cron runs at that time. This timezone is also default for the mysql users, but my vary if the system administrator wishes.

This classic example makes clear that things can become pretty complex and explains also why vbulletin stores the current time in the constant TIMENOW, relative to the "apache" user. This variable may be then adjusted to specific needs, but this plugin does nothing to it, because it cannot make a choice.

So eventually I could add a parameter in the settings which allows you to change this offset manually, but then there will be quite some user having problems with their timing at another level, which is impossible to guess.

As long as there is no such parameter, there is no need for me to solve server side issues. If there was, I would have every day 10 questions how to make timing work properly, which I can't answer, because every server setting is different.

Taking all possible variables, there are 1*2*3*4=24 legit settings (server, mysql, apache, vbulletin) which would directly influence the behavior of any given setting at one place or another.

I hope I have answered your question and the final, short reply is: "There will be no option to set the offset manually" :)

Bulent Tekcan 10-01-2016 02:50 PM

Finaly problem solved :) My php.ini timezone was set Los Angeles time zone. It seems 10 hour different from here. Now I set Europe/Istanbul and problem gone :)

Thanks for your support

Regards

y2ksw 10-01-2016 07:02 PM

Quote:

Originally Posted by Bulent Tekcan (Post 2576478)
Finaly problem solved :) My php.ini timezone was set Los Angeles time zone. It seems 10 hour different from here. Now I set Europe/Istanbul and problem gone :)

Thanks for your support

Regards

Oh, that adds another element to the formula :D

Thank you for working out the problem, which will be helpful for all other users who have asked this question!

Bulent Tekcan 10-01-2016 07:22 PM

1 Attachment(s)
Quote:

Originally Posted by y2ksw (Post 2576489)
Oh, that adds another element to the formula :D

Thank you for working out the problem, which will be helpful for all other users who have asked this question!

Yes :up:

I have other question about the List screen. Is it possible to add start and end time to column like my attachment ? Because I cannot see start and end time in list. If I have 50 banners I'll be crazy :)

https://vborg.vbsupport.ru/attachmen...1&d=1475356866

Regards

y2ksw 10-02-2016 09:53 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576490)
Yes :up:

I have other question about the List screen. Is it possible to add start and end time to column like my attachment ? Because I cannot see start and end time in list. If I have 50 banners I'll be crazy :)

https://vborg.vbsupport.ru/attachmen...1&d=1475356866

Regards

Please use phpmyadmin for extended listings :D

rhody401 10-03-2016 06:08 PM

Thanks for posting this. Mine always adjusts it one hour every time I re-save a setting in this mod, and fixing it in the php file sounds like the perfect fix :) Great! Love this code add on

Bulent Tekcan 10-04-2016 04:00 AM

Quote:

Originally Posted by rhody401 (Post 2576535)
Thanks for posting this. Mine always adjusts it one hour every time I re-save a setting in this mod, and fixing it in the php file sounds like the perfect fix :) Great! Love this code add on

Yes, this is the trick :up: but why this product detect php default time I don't understand :)

y2ksw 10-04-2016 07:03 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576558)
Yes, this is the trick :up: but why this product detect php default time I don't understand :)

It doesn't, it takes what it gets :)

Bulent Tekcan 10-04-2016 07:26 AM

1 Attachment(s)
Anyway :) Dear y2ksw I made some works on 1 file. If you agreee you can put your product. Because now very useful I think. But please check the file, I tested many times it is working. Because I'm not coder but I'm a software engineer. I hope users happy with this. Only add Start and End Date table

https://vborg.vbsupport.ru/attachmen...1&d=1475573089

Regards,

y2ksw 10-04-2016 07:54 AM

Quote:

Many people cannot access phpmyadmin, and also dangeous also. I have add this table but how can I convert unix time to normal time ? Have you got any trick for this line
You do it with a query. Please see the MySQL documents for that.

Google search: mysql unix time
Result: https://dev.mysql.com/doc/refman/5.5...functions.html

Bulent Tekcan 10-04-2016 07:59 AM

Quote:

Originally Posted by y2ksw (Post 2576567)
You do it with a query. Please see the MySQL documents for that.

Google search: mysql unix time
Result: https://dev.mysql.com/doc/refman/5.5...functions.html

I did it :) Please check https://vborg.vbsupport.ru/showpost....postcount=2792

Regards

y2ksw 10-04-2016 08:03 AM

Then, if you really must, add this line to the file 'admin/admin_rbs_banner_list.php' at line 153:

Code:

$SQL = str_replace('ORDER BY id', 'ORDER BY enddate', $SQL);
which replaces the normal order with ordering by the end date and time. This is a hack and there you go :)

y2ksw 10-04-2016 08:08 AM

Quote:

Originally Posted by Bulent Tekcan (Post 2576565)
Anyway :) Dear y2ksw I made some works on 1 file. If you agreee you can put your product. Because now very useful I think. But please check the file, I tested many times it is working. Because I'm not coder but I'm a software engineer. I hope users happy with this. Only add Start and End Date table

https://vborg.vbsupport.ru/attachmen...1&d=1475573089

Regards,

Ah I see ... we are becoming overactive in the same moment :D

askandy 10-08-2016 01:12 PM

Hi @y2k (mod developer),

Curious if we could get your help to further extend RBS to allow more ad placements?

We are currently using all 10 spots on our forum, primarily serving ads to desktop users.

Now we'd like to add some additional ad positions in our mobile forum template so we can serve ads to mobile visitors and get more exposure for our advertising partners.

We may need about 5 more ad positions.

Is this addition we can pay for?

Thanks!
M

y2ksw 10-10-2016 02:50 PM

Quote:

Originally Posted by askandy (Post 2576738)
Hi @y2k (mod developer),

Curious if we could get your help to further extend RBS to allow more ad placements?

We are currently using all 10 spots on our forum, primarily serving ads to desktop users.

Now we'd like to add some additional ad positions in our mobile forum template so we can serve ads to mobile visitors and get more exposure for our advertising partners.

We may need about 5 more ad positions.

Is this addition we can pay for?

Thanks!
M

It's already there and you may change it in the settings ;)

askandy 10-12-2016 12:00 PM

Thank you!

theksmith 11-22-2016 04:40 PM

First, thanks for the excellent mod!

Click tracking is not working for me with vB 3.8, and version 2.3.4 of RBS.

I am using the "Image / Flash" field to point to a JPG, and the "URL" field to point to an external website - i.e I do NOT have a custom embedded script. The banner is active, enabled, and does NOT have Max Impressions or Max Clicks set.

The banner image is displayed correctly and the link does correctly point to the tracking page: /forum/rbs_banner.php?id=XXX&userid=YYY. The tracking PHP page also correctly redirects to my final destination URL.

However, the "Clicks" reading in the "Manage Banners" area and on the "Banner Statistics" pages both always shows 0, even after I have personally clicked on a banner. This happens for all 3 banners that I have running. The First/Last click statistics do show dates though!

Impressions: 231
Clicks: 0
CTR: 0%
First Click: Mon, 21-Nov-2016 09:33:57 GMT
Last Click: Tue, 22-Nov-2016 18:23:51 GMT

The only thing perhaps different about my use-case is that I am displaying the banner on a vBAdvanced CMS page which is in the root folder of my website but the vBulletin install is actually within a sub-folder called "/Forum". The banner image is also NOT beneath the "/Forum" path and therefore I had to use a fully qualified absolute URL to point to the image.

y2ksw 11-23-2016 09:16 AM

Quote:

Originally Posted by theksmith (Post 2578565)
First, thanks for the excellent mod!

Click tracking is not working for me with vB 3.8, and version 2.3.4 of RBS.

I am using the "Image / Flash" field to point to a JPG, and the "URL" field to point to an external website - i.e I do NOT have a custom embedded script. The banner is active, enabled, and does NOT have Max Impressions or Max Clicks set.

The banner image is displayed correctly and the link does correctly point to the tracking page: /forum/rbs_banner.php?id=XXX&userid=YYY. The tracking PHP page also correctly redirects to my final destination URL.

However, the "Clicks" reading in the "Manage Banners" area and on the "Banner Statistics" pages both always shows 0, even after I have personally clicked on a banner. This happens for all 3 banners that I have running. The First/Last click statistics do show dates though!

Impressions: 231
Clicks: 0
CTR: 0%
First Click: Mon, 21-Nov-2016 09:33:57 GMT
Last Click: Tue, 22-Nov-2016 18:23:51 GMT

The only thing perhaps different about my use-case is that I am displaying the banner on a vBAdvanced CMS page which is in the root folder of my website but the vBulletin install is actually within a sub-folder called "/Forum". The banner image is also NOT beneath the "/Forum" path and therefore I had to use a fully qualified absolute URL to point to the image.

I know there are a few web applications which use a different path of page rendering, one of which is photopost. I these cases it is impossible to use the banner system via template changes, but you may try the unsupported iframe in-place rotating banners solution.

Could you please try the same banners on a standard forum page? If they work there, then it's definitively a problem with rendering the pages.


All times are GMT. The time now is 10:58 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.05184 seconds
  • Memory Usage 1,898KB
  • 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
  • (25)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