Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

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

yea, same error.

i removed everything except the necessities and still same error.

PHP Code:
<?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);
?>
Reply With Quote
  #12  
Old 03-01-2009, 10:38 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have removed necessary stuff. You should start off with one of these (get it working with a basic template) and add from there - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Reply With Quote
  #13  
Old 03-01-2009, 11:16 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You have removed necessary stuff. You should start off with one of these (get it working with a basic template) and add from there - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
both ways work. i used that link to create it originally. you can see it in the first post.

either way, this link works http://www.ampprod.com/community/cforumstats.php

but if i do 'include /home/***/public_html/community/cforumstats.php' or add the code directly into a module on my main site it gets the following error.

PHP 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
  #14  
Old 03-01-2009, 11:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That query is right after a plugin. Have you tried disabling your plugins to see if that fixes the issue?
Reply With Quote
  #15  
Old 03-01-2009, 11:56 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
That query is right after a plugin. Have you tried disabling your plugins to see if that fixes the issue?
sorry if this is a dumb question i'm not sure what you mean. what query is right after what plugin?
Reply With Quote
  #16  
Old 03-02-2009, 03:21 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The one you are getting an error on...
Quote:
PHP 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
Line 1368 of functions.php is where the problem is and this is the line:
PHP Code:
    $user $vbulletin->db->query_first_slave(
This is just above there:
PHP Code:
    $hook_query_fields $hook_query_joins '';
    (
$hook vBulletinHook::fetch_hook('fetch_userinfo_query')) ? eval($hook) : false
Reply With Quote
  #17  
Old 03-02-2009, 05:00 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post the actual PHP file you are using (and any associated templates).
Reply With Quote
  #18  
Old 03-02-2009, 05:19 AM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Template (cforumstats)
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" style="background-image:none;padding:0px;margin:0px;background-color:none;">
<head>
<title></title>
$headinclude
</head>
<body style="background-image:none;padding:0px;margin:0px;background-color:#000000;">
<div style="width:100%;background-color:none;">
$cybtopstats
</div>
</body>
</html>
attached 'cforumstats.php'

working url: http://www.ampprod.com/community/cforumstats.php
Attached Files
File Type: php cforumstats.php (402 Bytes, 9 views)
Reply With Quote
  #19  
Old 03-03-2009, 02:12 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by testbot View Post
Template (cforumstats)
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" style="background-image:none;padding:0px;margin:0px;background-color:none;">
<head>
<title></title>
$headinclude
</head>
<body style="background-image:none;padding:0px;margin:0px;background-color:#000000;">
<div style="width:100%;background-color:none;">
$cybtopstats
</div>
</body>
</html>
attached 'cforumstats.php'

working url: http://www.ampprod.com/community/cforumstats.php
nothing?
Reply With Quote
  #20  
Old 03-03-2009, 03:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:13 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.07028 seconds
  • Memory Usage 2,284KB
  • 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
  • (2)bbcode_code
  • (3)bbcode_php
  • (4)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete