vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Using PHPadsnew 2 with Vbulletin 3. (https://vborg.vbsupport.ru/showthread.php?t=75475)

epic1 04-14-2005 05:49 PM

Has anyone integrated phpadsnew with magnus's AdColumns1.0 ?

I want to add a sidebar that rotates the display order on my forum on every refresh. I already have the zone and ads setup, just not sure how to deliver it with this script.

bL@De 04-16-2005 11:04 AM

Hi,
I've struck a slight problem which I can't workout. I have tested the following on my internal test site which works flawlessly following the instructions on page 1 however no matter what I do it doesn't show the banner.

My phpinclude_start is as follows
Quote:

if (@include(getenv('DOCUMENT_ROOT').'/sponsors/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '_blank', '', '0', $phpAds_context);
}
I've then put in my header
Quote:

<center>$phpAds_raw[html] <center />
I've removed the 'center' part but the problem is persisting that's for sure. No error bounces back just no banners are displayed and the pages looks as normal as it normally is.

Any ideas would be great.

Cheers
Darren

Pulsorock 04-20-2005 01:44 AM

I'm using Max Media Manager 0.1x (same as PAN2.1) but I can't make it work. The phpinclude_start has this:
PHP Code:

ob_start();
    if (@include(
getenv('DOCUMENT_ROOT').'/maxserver/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_local (''500'_blank''''0'$phpAds_context);
    }
ob_end_clean(); 

But on the forum I get Database error
Quote:

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT
user.username, (user.options & 512) AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1113963706
ORDER BY username ASC

mysql error: Table 'maxmediamanager.user' doesn't exist

mysql error number: 1146

Date: Tuesday 19th of April 2005 10:36:46 PM
Script: http://www.pulsorock6.com:8081/foro/?styleid=5
Any idea? :disappointed:

Michael Morris 04-21-2005 11:29 AM

Quote:

Originally Posted by Pulsorock
I'm using Max Media Manager 0.1x (same as PAN2.1) but I can't make it work. The phpinclude_start has this:
PHP Code:

ob_start();
    if (@include(
getenv('DOCUMENT_ROOT').'/maxserver/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_local (''500'_blank''''0'$phpAds_context);
    }
ob_end_clean(); 

But on the forum I get Database error

Any idea? :disappointed:

Not familiar with MaxMediaManager, but your view_local function call isn't specifying a zone, and the PHP Ads new function is view_raw.

Also, is you're ad server on the same machine as your vbulletin? If not that would explain the SQL error, which appears to be caused by the SQL server you're talking to not having the appropriate table.

sdsvtdriver 04-27-2005 05:13 AM

Michael,

Thanks for the information. It works great.

Oddly enough, on my first site, it gives me the option to use local invocation, but on the second, only javascript.

This is probably due to the fact the second site is on a different webserver, but alas, it works.

Thanks again

cerebro 06-14-2005 03:03 AM

i have a logout problem whit this code...some1 test if can logout whit this code on?

GetGamer.com 06-17-2005 09:51 PM

For the life of me, I can't get this to work. Here is my phpinclude_start template:
PHP Code:

/*
// Example of how to include a seperate file:

ob_start();
include('yourheader.html');
$your_code = ob_get_contents();
ob_end_clean();

// Now place a reference to $your_code where you want the resulting HTML to be displayed.
// This will most likely be the header or footer template.
*/

    
if (@include(getenv('DOCUMENT_ROOT').'/a/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_raw ('zone:24'0'''''0'$phpAds_context);
    } 

The invocation code was cut-and-pasted from phpAdsNew (which I've been using successfully with Javascript invocation for ages).

And here is a snippet from my footer template showing two different zones, one with local invocation and the other with javascript:
PHP Code:

<!-- 120 x 600 zone -->            
$phpAds_raw[html]
<
br />
<!-- 
120 x 240 zone -->
<
script language='JavaScript' type='text/javascript'>
<!--
   if (!
document.phpAds_useddocument.phpAds_used ',';
   
phpAds_random = new String (Math.random()); phpAds_random phpAds_random.substring(2,11);
   
   
document.write ("<" "script language='JavaScript' type='text/javascript' src='");
   
document.write ("http://www.bigblueball.com/a/adjs.php?n=" phpAds_random);
   
document.write ("&amp;what=zone:19");
   
document.write ("&amp;exclude=" document.phpAds_used);
   if (
document.referer)
      
document.write ("&amp;referer=" escape(document.referer));
   
document.write ("'><" "/script>");
//-->
</script><noscript><a href='http://www.bigblueball.com/a/adclick.php?n=aa4c0db4' target='_blank'><img src='http://www.bigblueball.com/a/adview.php?what=zone:19&amp;n=aa4c0db4' border='0' alt=''></a></noscript

The javascript invocation method works fine, but not the local method. You can see this in action here. Note that the ads actually appear in the right-hand column, even though the are part of the footer template.

Any ideas as to why I can't get local invocation to work?

EDIT: As a test, I tried local invocation on a non-forum page at the same site, and it works fine. You can see this on http://www.bigblueball.com/index.php (it's serving the 120x90 ad in in the right column). Still can't get it to work in the forums though.

EDIT: After re-pasting the invocation code a second time, it seems to be working now. Nevermind..... :)

Trana 06-23-2005 05:43 AM

I am experiencing a strange problem when using this script.

To begin with, I originally added the banner to my page with the ob method described on the vbulletin website. When I found this thread, I removed those methods and added the php code directly to the include file as described here.

The banners work fine.

Unfortunately, I have a "shoutbox" module (CMPS) which is not working now that I added the phpadsnew script to my header. The shoutbox has not displayed properly with either method of calling the phpadsnew script.

The reason that I know these two are related, is that in the shoutbox module window, I get the following error message:

Table 'bannerads.adv_shoutbox' doesn't exist

So obviously, phpadsnew is changing the database from "forum" to "bannerads", running the script, and then for some reason not going back to the original database. I am guessing that it needs to do a USE FORUM sql statement in order to get the default database back into the focus.

So, do you think it is the phpadsnew or the shoutbox that needs the tweak? Any ideas on what could be causing this?

Thanks.

jsharper 07-06-2005 03:02 PM

Quote:

Originally Posted by cerebro
i have a logout problem whit this code...some1 test if can logout whit this code on?

I'm also having a logout problem. Whenever my phpinclude_start is calling phpadsnew.inc.php, my vBulletin logout function is broken. clicking Log Out just returns a blank page and doesn't actually perform the logout.

Ideas? I'm using vBulletin 3.0.7 and phpAdsNew 2.0.5. I did try both with and without "Use database compatibility mode".

Razasharp 07-07-2005 04:04 PM

Thanks for a brill tutorial Michael!

Can I just ask you to check what I'm doing is ok please? (It all seems to be working ok)

I have two zones on the same page and this is how I've set it up:

My phpinclude star file contains:

HTML Code:

if (@include(getenv('DOCUMENT_ROOT').'/adserver/phpadsnew.inc.php'))

if (!isset($phpAds_context))
{
    $phpAds_context = array();
        $phpAds_raw = view_raw ('zone:2', 0, '_blank', '', '0', $phpAds_context);
}
{

$phpAds_context2 = array();
        $phpAds_raw2 = view_raw ('zone:3', 0, '_blank', '', '0', $phpAds_context2);
 }

And the pages contain:

$phpAds_raw[html] -where I want the first zones ads to show, and,

$phpAds_raw2[html] -where I want zone two ads to show.

It all seems to be working fine, but just wondered if I have done it right or not!

Thanks for looking.

Fallback 07-07-2005 04:50 PM

This mod works great for me with no problems... thanks!

m0nde 07-07-2005 06:53 PM

I haven't used the script in this thread at all to use phpAdsNew. I've set it up as if phpadsnew were residing on a separate computer all together and simply called it using the invocation code generated in phpAdsNew for each publication location. This works fine and i'm using it on several sites.

http://www.bostonlove.org uses it for several spots on the site include the top the middle and the bottom.

http://www.yyzlifestyle.com uses it for the stuff at the bottom.

I've tied it into the vbaffiliates hack so that it counts each link in the affiliates module each time someone clicks on the appropriate affiliate's banner - all of this with just using phpadsnew without customisation for vbulletin.

I'm even using it to track who clicks on my paypal donation buttons.

- Sid

jsharper 07-09-2005 05:35 PM

Quote:

Originally Posted by jsharper
I'm also having a logout problem. Whenever my phpinclude_start is calling phpadsnew.inc.php, my vBulletin logout function is broken. clicking Log Out just returns a blank page and doesn't actually perform the logout.

Ideas? I'm using vBulletin 3.0.7 and phpAdsNew 2.0.5. I did try both with and without "Use database compatibility mode".

In case anyone else is running into this, a solution can be found here:
http://forum.phpadsnew.com/index.php?showtopic=8281

Jason

Rob Locke 07-10-2005 01:23 AM

Quote:

Originally Posted by Michael Morris
Here's a way to prevent certain usergroups from being logged as having seen an ad (they'll still see them but the ad view won't be logged). In the file phpadsnew.inc.php find the following code:

PHP Code:

if ($phpAds_config['log_adviews'] && !$phpAds_config['log_beacon']) 

Directly above it add

PHP Code:

if (is_member_of($bbuserinfo6))
{
$phpAds_config['log_adviews'] = false;


If you need to use your phpadsnew installation for non vbulletin pages you'll need to create seperate versions of phpadnew.inc.php for vbulletin and your other pages to call.

May I just double check that if I want to include several usergroups, the id numbers would just be separated by commas?

For Example:
PHP Code:

if (is_member_of($bbuserinfo6,7,8)) 


wolf314 07-10-2005 08:28 PM

Quote:

Originally Posted by jsharper
In case anyone else is running into this, a solution can be found here:
http://forum.phpadsnew.com/index.php?showtopic=8281

Jason


Thanks!!! This is what I've been looking for.

boske 07-12-2005 06:19 PM

Quote:

Originally Posted by camoman
I think I am looking for a similiar thing.. Basically I want to be able to have a unique zone for each forum... so banners at the top of each forum would be relevent to the forum title. ie. in the boat forum I only want boat related ads showing up, in the snowmobile forum I only want snowmobile ads showing up etc..

Can this be done??

yeah Ive seen this done on other vb boards..im sure there is a way....

I don't know how, but I'd like to do the same thing.. :squareeyed:

After trying this numerous times, I still can't get it to work...

Gio 07-13-2005 04:01 PM

Will this work on 3.5.0 vb?

cerebro 07-13-2005 04:46 PM

i upgrate to phpAdsNew 2.0.5 and the logout function inst work.
When reload the site...the user still there. Didt work :(

ludachris 07-14-2005 06:01 PM

Hey Michael, not sure if you're still paying attention to this thread or not, but....

I tried setting up the Maintenance.php to be run via the Scheduled Tasks Manager. I'm receiving errors when running it:


Warning: Cannot modify header information - headers already sent by (output started at /var/www/mysitename.com/html/forums/includes/adminfunctions.php:222) in /var/www/mysitename.com/html/phpads/libraries/lib-cache.inc.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /var/www/mysitename.com/html/forums/includes/adminfunctions.php:222) in /var/www/mysitename.com/html/phpads/libraries/lib-cache.inc.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /var/www/mysitename.com/html/forums/includes/adminfunctions.php:222) in /var/www/mysitename.com/html/phpads/libraries/lib-cache.inc.php on line 18

Done


What could this be attributed to, and does this mean the maintenance script is NOT running?

jsharper 07-15-2005 04:03 PM

Quote:

Originally Posted by cerebro
i upgrate to phpAdsNew 2.0.5 and the logout function inst work.
When reload the site...the user still there. Didt work :(

Look up a few posts to post #53.

cerebro 07-15-2005 04:23 PM

Quote:

Originally Posted by jsharper
Look up a few posts to post #53.


thanks Jsharper...i dont understand in first place...now just comment the line and work. Thanks

cmiller1014 07-18-2005 03:22 AM

Does anyone know if there is a 3rd party script for phpadsnew that would allow automated signup for advertisers and possibly paypal integration to automate billing?

bamaster 07-19-2005 02:44 AM

Quote:

Originally Posted by ssanders
I can't get it to work.

I followed the tutorial verbatim, but they wont show up on my forums. :(

ideas?


Mine weren't working either. However, I discovered I did not have the Publishers & Zones setup correctly. Then only one of the two banners was showing up. It turns out that one of the banners was not 468x60 as I specified... it was off by one pixel.

Once I correctly created the Zone (I'm only using one banner location, and it's on all my pages... hence only one Zone) and linked the banners, and corrected that one banner's size, everything worked fine.

The phpAdsNew interface isn't the most intuitive. I had to read *gasp* the manual to get it correctly setup. Read the documentation, double-check the banner dimensions, and review the instructions on this thread. All should work.

Best of luck!

Michael Morris 07-20-2005 06:24 PM

Quote:

Originally Posted by jsharper
Look up a few posts to post #53.

Yeah, that *should* work.

(Has personally been moving away from PHPadsnew)

cmiller1014 07-20-2005 06:29 PM

Quote:

Originally Posted by Michael Morris

(Has personally been moving away from PHPadsnew)

Our of curiosity, what do you use? I am looking for a all inclusive system where my advertisers can signup and select the type of advertising, pay, etc. Something fully automated.

ludachris 07-20-2005 07:22 PM

Quote:

Originally Posted by Michael Morris
Yeah, that *should* work.

(Has personally been moving away from PHPadsnew)

How about this one:
https://vborg.vbsupport.ru/showpost....3&postcount=59

Any idea on that problem? And I'd also be interested in what ad solution you're moving towards as well.

Gio~Logist 07-26-2005 03:49 AM

would you care to try and do this with cute news?

ludachris 07-28-2005 05:14 PM

Does anyone know how to implement the Maintenance script into the Scheduled Tasks menu in vB as explained in this post? I've followed the installation instructions but it's not being run daily as I have it set up to do. When I run it manually I'm receiving errors. The errors I'm receiving are posted here:
https://vborg.vbsupport.ru/showpost....3&postcount=59

If anyone can help me fix this, I'd appreciate it. I'm running the 3.01 version of vb.

Spinball 07-31-2005 10:00 AM

I am investigating replacing my banner serving scripts integrated with vBulletin with PHPAdsNew.
My script has a lot of features (geotargetting, limited impressions per ip, advertiser updatable adverts) but I'm wondering whether PHPAdsNew will do the job better.

I have read the instructions at the top of this thread but I don't think it will work in my case. Unless I am missing something.
I serve 3 or 4 banners on each page :

Very top Run of Site 468x60 which is invoked from the page header,
Forum-specific header
Forum-specific skyscraper (not shown in thread view when there is only 1 post)
Forum-specific footer.

I invoke my ad serving script with a zoneid.
There are some 'custom' zones like 'ROST' for run of site 468x60 top banner or 'ROSASIANT' for the Run of Site Asian DVD reviews top banner, but most banners are in specific forums.
The zone id is made up of the forum id number (originally generated and used by vbulletin) and a letter - H,S or F for header, skyscraper or footer.
It's called from FORUMDISPLAY and SHOWTHREAD php scripts and then displayed in the FORUMDISPLAY and SHOWTHREAD templates.
The skyscraper invocation only happens when there is more than one post in a thread as otherwise the page looks rubbish with a large skyscraper on the right.

Given that I need the forum id and in showthread the number of posts, I don't see how putting the invocation code in the headinclude script is going to work.

Please help.

Chris 96 WS6 08-01-2005 08:17 PM

I integrated as instructed but the ads only work in firefox. In IE the links are dead on mouseover.

Any ideas?

Nevermind, I figured it out. Slight syntax problem in my header template

mikexxx 08-02-2005 12:43 PM

Is there a manual to do this in 3.5 with the hook system? The phpinclude_start is not in the vbulletin 3.5 version, but I can’t get it to work with hook > global_start.

Sidewindr 08-19-2005 04:55 AM

This appears to be broken now with phpAdsNew v 2.0.6 and vBulletin 3.0.7

Get errors regarding ..

Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT forum.forumid, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount
FROM forum AS forum

mysql error: Table 'ls1ads.forum' doesn't exist

mysql error number: 1146

Date: Friday 19th of August 2005 03:51:53 PM
Script: http://www.ls1.com.au/forum/showthread.php?t=43313
Referer: http://www.ls1.com.au/
Username: Unregistered
IP Address: xxx.xxx.xxx.xxx
The table 'ls1ads.forum' does not exist and the phpAdsNew database is called ls1ads and the forum DB is called ls1 so it appears the new version of phpAdsNew is screwing with something where vBulletin is concerned.

flstreetscene 09-09-2005 02:26 AM

I get the following error with vb 3.5.0 RC3

Code:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:

                SELECT
                        user.username, (user.options & 512) AS invisible, user.usergroupid,
                        session.userid, session.inforum, session.lastactivity,
                        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                FROM session AS session
                LEFT JOIN user AS user ON(user.userid = session.userid)
                WHERE session.lastactivity > 1126235465
                ORDER BY username ASC;

MySQL Error  : Table 'florida_phpads.session' doesn't exist
Error Number : 1146
Date        : Thursday, September 8th 2005 @ 11:26:05 PM
Script      : http://www.floridastreetscene.com/testforums/index.php?
Referrer    : http://www.floridastreetscene.com/testforums/admincp/index.php?do=head
IP Address  : 68.223.209.100
Username    : zeno
Classname    : vb_database


Pulsorock 09-09-2005 02:39 AM

That used to happen to me too. The fix is found goin to Settings > Main Settings > In Database optimisations, check the option that reads: "Use database compatibility mode"

flstreetscene 09-09-2005 03:43 AM

Quote:

Originally Posted by Pulsorock
That used to happen to me too. The fix is found goin to Settings > Main Settings > In Database optimisations, check the option that reads: "Use database compatibility mode"

Thanks, you PulsoROCK! :speechless:

Pulsorock 09-09-2005 03:50 AM

Quote:

Originally Posted by flstreetscene
Thanks, you PulsoROCK! :speechless:

You are welcome... ;)

Chris 96 WS6 09-09-2005 12:44 PM

So how do I run 2 zones on one page? I have set up the 2nd zone and put the invocation code in phpincludes_start...but what tag do I put on the page (footer)? Right now I have the same tag on both places and so the zone 1 ad shows in both places.

mikexxx 09-09-2005 02:08 PM

Just put $phpAds_raw2[html] in any template ;)

flstreetscene 09-12-2005 06:15 AM

question:

Right now I have the '$phpAds_raw[html]' in my navbar template. How come when vbulletin message comes up (you just logged out, or you dont have permission to this page) the banner disappears? What do I edit so that it's visible there too?

Thanks.

kafi 09-18-2005 08:29 AM

PHP Code:

PhpAdsNew

Warning
Cannot modify header information headers already sent by (output started at /home/www/>>>>>>/www/includes/adminfunctions.php:222in /home/www/>>>>>>/www/adserver/libraries/lib-cache.inc.php on line 16

Warning
Cannot modify header information headers already sent by (output started at /home/www/>>>>>>/www/includes/adminfunctions.php:222in /home/www/>>>>>>/www/adserver/libraries/lib-cache.inc.php on line 17

Warning
Cannot modify header information headers already sent by (output started at /home/www/>>>>>>/www/includes/adminfunctions.php:222in /home/www/>>>>>>/www/adserver/libraries/lib-cache.inc.php on line 18

Done 

I am getting this errror after manual run of PhpAdsNew cron job on Vbulletin.

Please advise.
Thank you


All times are GMT. The time now is 09:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01819 seconds
  • Memory Usage 1,899KB
  • 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
  • (1)bbcode_html_printable
  • (8)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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