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

Reply
 
Thread Tools Display Modes
  #21  
Old 03-03-2009, 03:56 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
So you have a page that works fine as a standalone page. Exactly what code are you using to put it somewhere else? What hook location, what code, etc.
if i take that page and include it in our cms like the following i get that error.

<div>
<?php include '../community/cforumstats.php'; ?>
</div>

or if i add the code directly into the page like:

<div>
<?php
error_reporting(E_ALL & ~E_NOTICE);

// # DEFINE IMPORTANT CONSTANTS
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'cforumstats');

// # REQUIRE BACK-END
$curdir = getcwd();
chdir('/home/***/public_html/community');
require_once('global.php');

// # START MAIN SCRIPT
$navbits = array();
eval('print_output("' . fetch_template('cforumstats') . '");');
chdir($curdir);
?>
</div>


for an update, i saw in the german vbulletin forum someone had the same problem but i can't read german so i don't know if it was solved or not. it looked like they were talking about cookeis.
Reply With Quote
  #22  
Old 03-04-2009, 07:18 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should ask at the support thread/site of your CMS.
Reply With Quote
  #23  
Old 03-04-2009, 03:51 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<?php include '../community/cforumstats.php'?>
That is your answer, you have to remove the "../". PHP does not call directories like HTML or other languages do. Remove that small snippet and put your full root path and it should work . Or at least that is my understanding, I remember when I transferred from HTML to PHP I was baffled at why my images and whatnot were not being displayed properly. I was told it was due to the ../ not moving directories as it does with HTML.

Should look like:
PHP Code:
<? include "/home/***/public_html/community/cforumstats.php';" ?>
Reply With Quote
  #24  
Old 03-06-2009, 01:30 AM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
You should ask at the support thread/site of your CMS.
they'll tell me it's not their code causing the problem. i'll give it a try though.



Quote:
Originally Posted by Mr-Moo View Post
PHP Code:
<?php include '../community/cforumstats.php'?>
That is your answer, you have to remove the "../". PHP does not call directories like HTML or other languages do. Remove that small snippet and put your full root path and it should work . Or at least that is my understanding, I remember when I transferred from HTML to PHP I was baffled at why my images and whatnot were not being displayed properly. I was told it was due to the ../ not moving directories as it does with HTML.

Should look like:
PHP Code:
<? include "/home/***/public_html/community/cforumstats.php';" ?>

no luck. same error.
Reply With Quote
  #25  
Old 03-06-2009, 03:50 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which error(s) are you getting specifically? The same few on the first page?
Reply With Quote
  #26  
Old 03-06-2009, 11:36 AM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first, thanks for everyone's replies so far. some boards will just ignore you or just tell you to move on. i appreciate everyone's input so far.

i get this error:
Fatal error: Call to a member function query_first_slave() on a non-object in /home/***/public_html/community/includes/functions.php on line 1368
Reply With Quote
  #27  
Old 03-07-2009, 10:30 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That error usually occurs when vBulletin's global.php is included inside of a function.
Reply With Quote
  #28  
Old 03-07-2009, 12:25 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so since it's not inside a function withing my cforumstats.php file you think the cms is executing a function to include that code maybe? did that make sense?

--------------- Added [DATE]1236457601[/DATE] at [TIME]1236457601[/TIME] ---------------

actually, it doesn't seem to work anywhere outside the forum directory. i don't get any errors when i try outside the cms but the page just won't load. i think it might have to do with the 'Product' i'm trying to call.
$cybtopstats == Cyb - Advanced Forum Statistics.

not sure why the developer keeps ignoring my questions when it says in the description that what i'm trying to do can be done and that it's a supported Mod.
Reply With Quote
  #29  
Old 03-08-2009, 04:59 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try adding this to the top of your headinclude template:
HTML Code:
<base href="http://www.yoursite.com/forum" />
Reply With Quote
  #30  
Old 03-22-2009, 11:37 AM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i seem to have this working anywhere outside the forum directory now.

it still won't work in the only place i need it though and that's the cms.

i'm guessing the cms is forcing it to be a nested function. is there anyway to get around the nested function thing?

thanks for stickin with me on this.
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 04:24 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.09323 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_html
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete