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 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 09:01 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.02779 seconds
  • Memory Usage 1,756KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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