Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2002, 02:00 AM
Paul Paul is offline
 
Join Date: Jan 2002
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default phpAdsNew 2 beta 7

Has anyone been able to successfully use local invocation in phpAdsNew 2 beta 7 with vBulletin? Everything worked fine with 2 beta 6, but with 7 the forum comes up as a blank page. Any ideas or suggestions? Anyone else experiencing this?

Here is the code I've put in the PHP Parsed code:

ob_start();
require(getenv('DOCUMENT_ROOT').'/a/phpadsnew.inc.php');
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('B', 3, '', '', '0', $phpAds_context);
$header = ob_get_contents();
ob_end_clean();

When I add $phpAds_raw['html'] to the header template, I get the following error:

Parse error: parse error, expecting `T_STRING' or
`T_VARIABLE' or `T_NUM_STRING'
in /home/www/public_html/forums/global.php(306) : eval()'d
code on line 24

Line 306 of global.php is the following:
eval("\$header .=
\"".gettemplate('header')."\";");

(where the header template is parsed, and where I'm adding
the $phpAds_raw array)

If I change the array to $phpAds_raw[html] (without the single
quotes) the error goes away, however no advertisement is
displayed.

What I'm not sure of is what's expecting T_STRING, T_VARIABLE, etc... is that vBulletin or phpAdsNew?

Jakeman suggested I ask over at vb.org since it involves a third-party product. I'm hoping someone here can help me with this

Thanks,
Paul
Reply With Quote
  #2  
Old 09-02-2003, 01:45 PM
Tuan Le Tuan Le is offline
 
Join Date: Aug 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got this added to the phpinclude_start

Code:
require("C:/../../phpadsnew/phpadsnew.inc.php");
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$variable_name = $phpAds_raw['html'];

But not sure where I need to put the local invocation code generated by phpadsnew. Do you know where I need to put them? I would greatly appreciated if you can point me to the right direction. Thanks.

Code:
<?php
if (@include('C:/../../phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 2, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:28 AM.


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.03354 seconds
  • Memory Usage 2,165KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete