vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) (https://vborg.vbsupport.ru/showthread.php?t=100229)

Mythotical 11-19-2005 12:07 AM

Hi,

I am having problems seriously. I don't understand this whole setting up of a banner rotation. I have followed each image and still nothing, I have changed from relative to absolute path, I have followed all suggestions and still nothing. Help please.

http://www.vbrenegades.com/vbr.php it should be showing up aligned to the right.

Thanks
Myth

Erox 11-19-2005 12:54 AM

Beee-yoo-ti-ful!
I had my own makeshift banner ad server (that no longer works in 3.5), this is just what the doctor ordered. Thanks!

dutchbb 11-19-2005 08:58 AM

Thank you for this plugin.

Can you help me out with a error message? I get this error:

Code:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xch1295/domains/dutchbodybuilding.com/public_html/gallery/photopostpal.php on line 71
This is on line 71:
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

photopostpal is a script that shows thumbnails from photopostgallery on my forumhome...

My board: http://forum.dutchbodybuilding.com/

The M.I.P. 11-19-2005 11:03 AM

Quote:

Originally Posted by Mythotical
I am having problems seriously. I don't understand this whole setting up of a banner rotation. I have followed each image and still nothing, I have changed from relative to absolute path, I have followed all suggestions and still nothing. Help please.

http://www.vbrenegades.com/vbr.php it should be showing up aligned to the right.

Your script doesn't seem to call the view_ad function plugin, which resides on hook init_startup.
Make sure the plugin is enabled and the hook exists in you script.
As your script isn't part of original vBulletin, I can't give further free support.

Quote:

Originally Posted by Triple_T
Can you help me out with a error message? I get this error:

Code:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xch1295/domains/dutchbodybuilding.com/public_html/gallery/photopostpal.php on line 71
This is on line 71:
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

photopostpal.php isn't part of original vBulletin - contact the author of this script for support.
Check the SQL query some lines before ($result=...), the problem seems to start there.

@Third party developers:
If using this product in your scripts, make sure the init_startup hook exists (required for the calls to the view_ad function plugin).

dutchbb 11-20-2005 07:43 AM

Quote:

Originally Posted by The M.I.P.
photopostpal.php isn't part of original vBulletin - contact the author of this script for support.
Check the SQL query some lines before ($result=...), the problem seems to start there.

@Third party developers:
If using this product in your scripts, make sure the init_startup hook exists (required for the calls to the view_ad function plugin).

I understand but photopost says the same "we can't help because you're using a hack" :(

Maybe you can help, this is before/after the problem lines in the file:
Code:

$resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories");
    $ViewPerm = array();
    while ( list( $catugid, $ugnoview ) = mysql_fetch_row($resultb) ) {
        $noview=0; $ViewPerm[$catugid] = 1;

Code:

$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.width,c.catname,c.photos,c.posts
                        FROM {$pp_db_prefix}photos p
                        LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
                        WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
                        ORDER BY RAND()";
}
$result = mysql_query($query);

$counted = 0; $countcol = 0; $featured = "";

while (list($pid,$puser,$puserid,$pcat,$photo,$height,$width,$catname,$cphotos,$cposts) = mysql_fetch_row($result)) {
 
    if ( $ViewPerm[$pcat] == 1 ) continue;

Any clue?

The M.I.P. 11-20-2005 02:06 PM

@Triple_T:
I can't see any interrelation of your problem with this phpAdsnew integration.
Nevertheless, your cited code above doesn't show the line where variable $result is assigned (there's only a similar $resultb variable), so the context of the problem is not clear. As Photopost is closed source and I don't have access to it, I can't look for it by myself.

I really doubt, that your problem has anything to do with this phpAdsNew plugin.
To be sure that this is no problem of this product, uninstall phpAdsNew integration completely and don't forget to remove the <ad .. /> tag from your templates.

dutchbb 11-20-2005 02:47 PM

When I remove the <ad /> tag , the problem is gone so it has something to do with it.
The phpadsnew javascript code I normally use doesn't cause the error to show.

Photopost says the hack conflicts with the PP script in some way

Attached is the complete PP script file, can you take a look please?
Thanks!

Sleazy 11-21-2005 03:57 PM

I got the <ad /> tag to display all the banners in my inventory, but using any sort of variable such like zones, client id, etc doesn't work so I can't specify certain ads to display.

The code I am using is:
<ad what="zone:1" />

Anyone else having this problem?

Sidewindr 11-22-2005 04:20 AM

I can only get the xml display working (which I don't want to use) and the absolute path for direct invocation to my phpAdsNew causes the site to fail.

I cannot use XML as the resulting CPU load kills the forums.

It also appears that only the first argument after <ad is noticed..

For instance

<ad what="zone:4" clientid="6" \> returns random banners from zone:4

however

<ad clientid="6" \> returns the banner for client 6 every time.

kafi 11-26-2005 08:18 PM

I would like to use left column on my forumhome in which I want to place small banners.

I am using phpadsnew for banners delivery with this integration hack (works good for me ). I am using tag system in templates:
<ad what="zone:8" />

Since currently I have 4 small banners next to each other vertically I am not worried about their place, because it's quite equal.
Once i will move them to column some of the advertiser might be upset about vertical position of his banner ...1st 2nd 3rd from the top.

Is there a trick that will randomly switch these banner's position at refresh?

Thank you!

StarShaper 11-29-2005 01:16 AM

Works great! Thx, and greetings to all gulli members ;)

GrBear 11-29-2005 03:36 AM

This rocks! Thank you for your contribution!

*clicks installed*

Yorixz 11-29-2005 04:16 AM

I'm very glad with this, just one question; is it possible to let phpAdsNew show adsense when theres no other banner available/can't connect to the db? It's possible to show an image but I guess there could be another option around aswell.

Thanks!

klaush 11-29-2005 05:40 AM

Thanks for this!

Installed....

Great job!

dutchbb 11-29-2005 08:17 AM

Quote:

Originally Posted by The M.I.P.
In inc_features.php, there's no DB resource identifier used when accessing the database. In this case, PHP uses the last DB link which normally is vBulletin's database, but when using phpAdsNew integration, this might be the phpAdsNew database.

Solutions (untested, as I don't have access to Photopost):
Use a separate DB connection for the Photopost stuff as mentioned in the comments in inc_features.php.
Or add vBulletin's DB resource identifier to the mysql queries:
Code:

--- inc_features.php.orig        Mon Nov 21 11:54:09 2005
+++ inc_features.php        Mon Nov 21 11:56:21 2005
@@ -49,7 +49,7 @@
    }   
    $grouparr = explode( ",", $mygroups );
   
-    $resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories");
+    $resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories", $db->link);
    $ViewPerm = array();
    while ( list( $catugid, $ugnoview ) = mysql_fetch_row($resultb) ) {
        $noview=0; $ViewPerm[$catugid] = 1;
@@ -112,7 +112,7 @@
                        WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
                        ORDER BY RAND()";
 }
-$result = mysql_query($query);
+$result = mysql_query($query, $db->link);
 
 $counted = 0; $countcol = 0; $featured = "";


Thank you

I get this when I replace/add that code:

Quote:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/xch1295/domains/mydomain.com/public_html/gallery/inc_features.php on line 51

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xch1295/domains/mydomain.com/public_html/gallery/inc_features.php on line 53

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/xch1295/domains/mydomain.com/public_html/gallery/inc_features.php on line 114

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xch1295/domains/mydomain.com/public_html/gallery/inc_features.php on line 118

Skyline_GT 11-30-2005 06:30 AM

the if statment for usergroup doesn't work...

Xstreamist 12-01-2005 10:43 PM

OK.... I'm lost and pulling my hair out...
I installed phpAdsNew.. followed the admin manual to the tee for installation and the usermanual to the tee for set up... Installed the .xml which is posted here. Now I'm totally confused as to what to do...

I tried copying the invocation code to where I wanted the ads to appear, under my logo, and got sql errors. then tried just putting
<td align="center">
<ad what="zone:1" />
</td>

Where I want the banners to show and no go...

How do I use this? Am I supposed to copy the invocation code to a file somewhere? I don't see any instructions anywhere that say this.
I'm totally new to vBulleitin by the way but have been learning a lot in the past two weeks I have been using it. It's just this thing that's totally stumped me.
Thanks in advance for any assistance.

Xstreamist 12-02-2005 02:41 AM

OK finally got this to show the banner... But... notice I didn't say bannerS... It won't rotate the banners.. it shows the same one all the time...
Anyone know how I could fix this?

Also, any idea how I get the banners to show up on every page?

toxin 12-02-2005 01:03 PM

I'm pulling my hair out over this..

I've been running PAN successfully for ages, integrated into 3.0.7, but a couple of days ago I upgraded to vB 3.5.1 and moved to a new server..

I know PAN is working because i can invoke the banners manually or through my own php scripts, but vB isn't having any of it.

There are no errors, no banners.. no nothing.. its all a bit strange.

This is part of my header template:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><a href="/?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td width="50%"><div align="center">xxx<ad what="zone:1" />yyy</div></td>
</tr>
</table>
so this should show a banner, with text "xxx" before and "yyy" after. But when I view source on the forum webpage, i see this:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><a href="/?"><img src="/forums/images/misc/vbulletin3_logo_winter.gif" border="0" alt="Community Home Page" /></a></td>
<td width="50%"><div align="center">xxx
</tr>
</table>
notice that everything after xxx has vanished... ie, no banner and no "yyy"

Does anyone have any ideas of something that I can try, or where to start debugging?

dutchbb 12-02-2005 02:53 PM

Can you give some support on my question The M.I.P. ???

I'll be happy to donate if you can make it work for me. Not having java code in my forum sourcecode with the variable provided in this hack would be a good thing!

The M.I.P. 12-03-2005 04:38 AM

@Triple_T:
I'll have a look at it. Meanwhile, please use a separate DB connection as told in the comments in your inc_feeatures.php file.

@Xstreamist:
If your banner's don't rotate, please first check your phpadsnew setup - it might fall back into displaying a default ad when setup is not correct.
If you're sure that it's not directly related to phpadsnew, then switch vbulletin into debug mode or enable the display of template names in HTML and tell me exactly what is displayed between BEGIN ad and END ad HTML comments.
Also make sure that your browser doesn't cache your banners during your test phase.

@toxin:
It looks like the plugin isn't able to include the phpadsnew code. Please check if the path to you phpadsnew installation is set correctly and phpadsnew works cleanly outside of vbulletin.

@all:
When reporting problems, please also specify the PHP version and the OS you're using.

dutchbb 12-03-2005 07:57 AM

Quote:

Originally Posted by The M.I.P.
@Triple_T:
I'll have a look at it. Meanwhile, please use a separate DB connection as told in the comments in your inc_feeatures.php file.

Hm i'm not sure what you mean. Photopost provides/suggests the option to place it's tables in the vbulletin database when you first install it. I have used that option but there is no way back now. I don't see what else I could do...
Thanks again

toxin 12-03-2005 12:54 PM

Quote:

Originally Posted by The M.I.P.
:

@toxin:
It looks like the plugin isn't able to include the phpadsnew code. Please check if the path to you phpadsnew installation is set correctly and phpadsnew works cleanly outside of vbulletin.

yes, phpadsnew is working correctly outside of vBulletin.

My website directories are:
DOC ROOT: /home/httpd/vhosts/mydomain.com/httpdocs/
VBULLETIN: /home/httpd/vhosts/mydomain.com/httpdocs/forums/
PHPADSNEW: /home/httpd/vhosts/mydomain.com/httpdocs/adserver/
so I have used /adserver as the path in the vBulletin Server Settting and Optimization.

Xstreamist 12-03-2005 02:15 PM

Quote:

Originally Posted by The M.I.P.
@Xstreamist:
If your banner's don't rotate, please first check your phpadsnew setup - it might fall back into displaying a default ad when setup is not correct.
If you're sure that it's not directly related to phpadsnew, then switch vbulletin into debug mode or enable the display of template names in HTML and tell me exactly what is displayed between BEGIN ad and END ad HTML comments.
Also make sure that your browser doesn't cache your banners during your test phase.

Where do I look for the BEGIN ad and END ad ?
My browser isn't caching banners.

Here is how I am trying to add the phpAdsNew code:

Quote:

<!-- banners -->

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>
<td align="center">
<ad what="zone:1" />
</td>
</tr>
</table>

<!-- /banners -->
I am trying to add it to the Header template right after the logo. But when I do the banner only shows on the front page and no where else. When I try to add it to the Navbar template it will add it abve the Navbar but within the same table as the Navbar and only on the front page and the View Threads Page, not the View Posts page.

djsydeburnz 12-03-2005 03:13 PM

first off, let me say that this is looking to be something i can use greatly, thanks! second, let me apologize in advance if my questions have allready been asked and answered. i did breeze through the number of posts with no luck.

1) with phpAdsNew, i logged in as a client and didnt see a way for me to add banners that way, only logged in as admin. did i miss a setting in pan?

2) it seems that my default banner doesnt like to display (the one in the default banner settings)

3) when i tried adding google adsense through pan, it displays the script on the main page of the admin, and you can click on the link next to it to show the actual banner. i thought i was good to go, then when i went to my site, it is trying display the default banner only which shows a broken image. even now after i have delted the google banner. not sure what i did.

4) has anyone got a setup that would allow to use some sort of payment system through vb that would give someone access to adding banner campaigns??

thanks in advance

***on a side-note, i had an idea to reduce the amount of sifting through a multi page post to find q & a. a cool plugin for this type of site might be to have a second post directly under the original post that houses only FAQs from the post. maybe it would look a bit like hybrid mode display.

The M.I.P. 12-03-2005 03:46 PM

Hi Toxin,
Quote:

Originally Posted by toxin
My website directories are:
DOC ROOT: /home/httpd/vhosts/mydomain.com/httpdocs/
VBULLETIN: /home/httpd/vhosts/mydomain.com/httpdocs/forums/
PHPADSNEW: /home/httpd/vhosts/mydomain.com/httpdocs/adserver/
so I have used /adserver as the path in the vBulletin Server Settting and Optimization.

since version 1.0.1 of this plugin, the path to a local phpAdsNew is a "normal" filesystem path.
So in your case, the correct setting in vBulletin options is either /home/httpd/vhosts/mydomain.com/httpdocs/adserver or ../adserver. I'd prefer using an absolute path (the former one), even though a relative one (the latter one) is easier to type.

@Xstreamist:
I currently have no time to check, but I'll have a look at it after weekend.

@djsydeburnz:
When logged in as phpAdsNew admin, you have to add appropriate rights (zones, etc.) to the client. Please have a look at the excellent phpAdsNew handbook.

@Triple_T:
Regarding the temporary solution, have a look at lines 25,26 of your attached inc_features.php.
Fill in the DB settings of your Photopost database (or your vbulletin database when Photopost tables are inside vBulletin database; in line 25 replace $dbuserid with your db username, $dbuserpassword with the db password and in line 26 pp_database with the correct db name) and uncomment these lines in your original inc_features.php.
This makes Photopost use a separate db connection and should solve the problems you mentioned above.
I'm still trying to get my hands around a recent Photopost version to be able to check it out and present a clean solution.

djsydeburnz 12-03-2005 04:20 PM

there is alot of documentation that i read through last night. i just dont understand how it worked for a day, now it doesnt.

toxin 12-03-2005 04:28 PM

Quote:

Originally Posted by The M.I.P.
Hi Toxin,
since version 1.0.1 of this plugin, the path to a local phpAdsNew is a "normal" filesystem path.
So in your case, the correct setting in vBulletin options is either /home/httpd/vhosts/mydomain.com/httpdocs/adserver or ../adserver. I'd prefer using an absolute path (the former one), even though a relative one (the latter one) is easier to type.

Both paths give the same error:
Database error in vBulletin 3.5.1:

Invalid SQL:
SELECT pageid, title, name, parentid, userperms FROM adv_pages WHERE active = 1 ORDER BY displayorder;

MySQL Error : Table 'phpadsnew.adv_pages' doesn't exist
Error Number : 1146
Date : Saturday, December 3rd 2005 @ 06:24:43 PM
Script : http://www.mydomain.com/?
Referrer : http://www.mydomain.com/forums/forumdisplay.php?f=25
IP Address : 62.252.0.7
Username : admin
Classname : vb_database

toxin 12-03-2005 08:25 PM

ok, I've fixed it.

I was running PAN in its own database; when I merged it into the main vB database everything started working..

tgmorris 12-03-2005 09:39 PM

I've installed this and am running into the same problem that toxin had. My PAN (2.0.7) is in a separate db and runs fine on my existing forum. I'm in the process of brining up 3.5.1 on my test forum and getting PAN to work. If I try to specify an absolute path to the PAN directory I get a db error. The only way I get it to work is by using xml-rpc.

I guess the question is pretty simple at this point...

Does PAN need to be using the vb database to be considered a 'local' install?

If so, what would it take to allow for it to be on the same server but using a different db?

djsydeburnz 12-04-2005 12:53 AM

i feel really dumb that i cant figure this out. im usually pretty good with this type of stuff. is PAN what i want if im just running banners on my site only? it seems as though when reading about zone's in pan, it is referring to multiple sites. if i put zone:1 in the header information, where in the pan setting to i reference the same? i guess im just more confused since it was working fine until i tried adding a google adsense and then they all went away. it keeps wanting to display the default banner which it doesnt even display. argh.......

Skyline_GT 12-04-2005 01:30 AM

Quote:

Originally Posted by Skyline_GT
the if statment for usergroup doesn't work...

Can anyone answer my question?

DataAve 12-04-2005 01:08 PM

Smacks the install button. :p

SVZ 12-05-2005 12:39 AM

if you use this mod does it still get blocked by Norton Internet Security ad blocker?

The M.I.P. 12-05-2005 04:32 AM

@toxin, tgmorris:
Normally, phpAdsNew should run fine using a separate DB. Please give me some time to check what could have gone wrong...

@djsydeburnz:
When logged in as admin in phpAdsNew, you can add zones (don't forget to allow clients to use these zones). You can think of zones as a name for the location where a banner can be placed.

@Skyline_GT:
Did you use template conditionals or did you try to distinguish between several usergroups using keywords in phpAdsNew?

@SVZ:
You can't control any client-side filtering a user might do.
To complicate blocking banners, don't use keywords like "ad" or "banner" in your advertisement URLs and try to avoid standard banner sizes (e.g. 468x60).
This product encloses the ads delivered by phpAdsNew with a <!-- BEGIN/END ad --> HTML comment - you might want to remove this.

yayvb 12-09-2005 01:18 AM

I know that this makes me seem retarded and I know that this type of question is meant for the phpadsnew website, but please answer it here for me.

I fresh install phpadsnew, setup admin, setup advertising account (and upload a banner), even publisher account to try to get this working.
I download/install product (.xml file attached to this thread)
I updated the local location of pypadsnew in vb admincp.
I edit my header template to show <ad what="zone:1" />

No banner shows. How do I know which zone? I don't see a name or number point to which zone. Did I have to setup an advertising account and publisher account, all i want is to upload my own banner so when other people run out of credits my banners display.

I assumed I should create a publisher account so that I can get the code, but I was able to get the code I think without out. Plus the template variable <ad what="zone:1" /> is supposed to replace the code?

Just a little push, I think I'm almost there.

Thanks

yayvb 12-09-2005 01:26 AM

Quote:

Originally Posted by djsydeburnz
i feel really dumb that i cant figure this out. im usually pretty good with this type of stuff. is PAN what i want if im just running banners on my site only? it seems as though when reading about zone's in pan, it is referring to multiple sites. if i put zone:1 in the header information, where in the pan setting to i reference the same? i guess im just more confused since it was working fine until i tried adding a google adsense and then they all went away. it keeps wanting to display the default banner which it doesnt even display. argh.......

I'm having a bit of trouble myself, but zones usually (and in this case) refer to certain sections of your site that these ads will display in. Some people may only want to advertise in a marijuana or x-rated zone, etc. or even a header zone or sidebar zone, etc.

yayvb 12-10-2005 04:27 PM

No one knows why the variable I mentioned (2 posts above this one) isn't working for me? Like I mentioned, I think I did everything correctly. Any help would be appreciated, I would like to get these ads displaying.

Thanks in advance.

DomP 12-10-2005 07:13 PM

Did U try to get it to work without the plugin first ?

If not, create an invocation code (java) copy and paste that somewhere in your header template and see if its works.

Then start fiddling with this

Xstreamist 12-10-2005 07:40 PM

Still waiting to get assistance with my problem here... Banners aren't rotating and wont show up when I try to put them in my header...?? I got some pretty P'ed off sponsors right now.


All times are GMT. The time now is 01:02 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.01755 seconds
  • Memory Usage 1,887KB
  • 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
  • (5)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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