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)

Hostboard 12-29-2005 08:30 PM

I wanted my banners to appear under the Navbar so I added

Code:

<ad what"zone:1" />
To the bottom of the template and when I went to save it I got the following error. Any idea?

Code:

Database error in vBulletin 3.5.2:
Invalid SQL:

  SELECT title, styleid
  FROM template
  WHERE templateid = 1020;

MySQL Error  : Table 'phpads.template' doesn't exist
Error Number : 1146
Date                : Thursday, December 29th 2005 @ 05:26:00 PM
Script          : [removed]
Referrer        : [removed]
IP Address  : [removed]
Username        : [removed]
Classname        : vb_database


Masiello 12-29-2005 08:34 PM

You have to set the correct path of phpAdsNew on the forum

Hostboard 12-29-2005 10:02 PM

I did that :) I even cut and pasted it in to the command line to change directories and it is perfect.

Maybe I need a slash at the end?

Code:

/usr/local/path/to/my/phpAdsNew

beansbaxter 12-30-2005 05:02 AM

I've been trying for two hours and I cannot get this to work running on 3.5.2!!!!!

This has to be the most difficult thing to get working (sigh)

I do everything, but no banner shows up at all uggggggggggg

beansbaxter 12-30-2005 05:19 AM

Quote:

Originally Posted by fbastello
OK, I think I cracked it
Basically, I added the following line just before return "<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->";
in the view_ad function plugin:
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);

This basically will allow you to have several <ad what="zone:1" /> anywhere in your templates and be sure that the same banner is not displayed twice.

I've just done it so it's not quite well tested yet, I'm sure that the whole thing could be improved via the ad tag (something like <ad what="zone:1" duplicate_banner_id="1" /> or <ad what="zone:1" duplicate_banner_id="0" /> to switch the option on or off).

Hope this help and thanks again for this great plugin!
F

I got it to work finally, by doing this (sigh)...it's a good hack, just needs better instructions and support IMHO. I'm gonna click install now. Thanks.

Hostboard 12-30-2005 09:15 AM

Ok I added this line but now I get 2 errors when I try entering
Code:

<ad what"zone:1" />
into my NAVBAR template

Code:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/path/to/forums/includes/init.php(292) : eval()'d code on line 123
Code:

Fatal error: Call to undefined function: view_ad() in /usr/local/path/to/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 225
Snipit from view_ad function plugin to show where I put the statement

Code:

Remember bannerid to prevent showing banner multiple times on same page
        $phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);
        }
 
        return "
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);
<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->";
  }
  }
 }
}


Hostboard 12-30-2005 09:33 AM

Ok now I am not happy. I have been trying to figure this out so I chnaged the config file of phpAdsNew as noted, copied the 2 files over to the includes directory and blew VB completly out of the water. All I get now when trying to access the forums or ACP is:

Code:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/pwrhouse/htdocs/hostboard/forums/includes/init.php(292) : eval()'d code on line 122


Unable to add cookies, header already sent.
File: N/A
Line: 0


Sigh...

Can anyone tell me how to manualy modify whatever it is I need to get at least the system back up???

Masiello 12-30-2005 09:53 AM

Quote:

Originally Posted by Hostboard
I did that :) I even cut and pasted it in to the command line to change directories and it is perfect.

Maybe I need a slash at the end?

Code:

/usr/local/path/to/my/phpAdsNew

Yes :) using a slash at the end

Hostboard 12-30-2005 10:47 AM

Ok, but I need to know how to edit this stuff manulally now seeing as I am completly dead in the water.

Trickle 12-30-2005 02:09 PM

Ok I lied. Added another banner and now the 2 banners do not rotate. Guess I'll wait till there is a dummies how to set of instructions hopefully in the near future.


All times are GMT. The time now is 01:52 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.01533 seconds
  • Memory Usage 1,746KB
  • 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
  • (9)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