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)

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!


All times are GMT. The time now is 01:56 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.01357 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)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
  • (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