vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   phpAdsNew 2 beta 7 (https://vborg.vbsupport.ru/showthread.php?t=41495)

Paul 07-25-2002 02:00 AM

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

Tuan Le 09-02-2003 01:45 PM

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. :confused: 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'];
}
?>



All times are GMT. The time now is 08:45 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.01087 seconds
  • Memory Usage 1,710KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete