View Single Post
  #1  
Old 03-19-2010, 11:43 AM
X672 X672 is offline
 
Join Date: Aug 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PHP not working in module (vBadvanced CMPS v3.0.1+vBulletin 3.6.8)

Hello

I have also posted this on the vBadvanced CMPS forum a couple of days ago but it seems no one can help me there, hopefully someone here can

I have this PHP file I would like to run in a module (vBadvanced CMPS v3.0.1+vBulletin 3.6.8) on our Lord of the Rings Online kinship page but I can't get it to work and I don't know why.
It works fine if I just open it in the web browser but as soon as I put it in a module I get errors.

The PHP file get data from another database (EQdkp-plus) (http://www.x672.net/the-forgotten/eqdkp/)

http://x672.net/the-forgotten/modules/raid_tracker.php

PHP Code:
<?php
/******************************
 * EQDKP HomepageTools 1.1.0
 * (c) 2006 - 2007 by kompsoft media 
 * Licensed under the GNU GPL.  
 * See COPYING for full terms.
 * ------------------
 * $Id: raid_tracker.php 290 2007-06-14 14:12:12Z wallenium $
 ******************************/
 
include_once('config.php');
include_once(
'include/hptools.class.php');
include_once(
'language/'.$config['language'].'.php');

$hpt = new HomepageTools($htdb['host'], $htdb['user'], $htdb['pass'], $htdb['datab'], $htdb['prefix'], $config$htlang);
echo 
$hpt->event_tracker();

?>
the config.php file.

PHP Code:
<?php
/******************************
 * EQDKP HomepageTools 1.1.0
 * (c) 2006 - 2007 by kompsoft media 
 * Licensed under the GNU GPL.  
 * See COPYING for full terms.
 * ------------------
 * $Id: config.php 296 2007-06-15 22:42:51Z wallenium $
 ******************************/

/******************************
 * General Settings
 ******************************/
$htdb['host']               = "mysql.hosted.servetheworld.net:3306";      // Host
$htdb['user']                = "X672net_eclipse";      // Username of SQL
$htdb['pass']               = "Password removed";  // User Password
$htdb['datab']              = "X672net_eqdkp";      // database
$htdb['prefix']              = "eqdkp_";          // database prefix

// if in the same database as the CMS you want to include this script
// set it to 0! If not, you might get errors because of closing the
// database table.
$config['other_table']       = 0;

/******************************
 * TIME SETTINGS
 ******************************/
$config['local']          = "de_DE";         // Local settings
$config['strftime']       = "%d.%m.%Y, %H:%M"// time format of strftime()

/******************************
 * GLOBAL SETTINGS
 ******************************/
// URL to DKP
$config['url']            = "http://www.x672.net/the-forgotten/eqdkp/";
// Path to itemstats
$config['is_path']        = "./eqdkp/itemstats";
// Path to homepagetools
$config['ht_path']        = "http://www.x672.net/the-forgotten/modules";
//Language
$config['language']       = "english";
// The Rest
$config['is_plus']        = 1;             // EQDKP PLUS 0.4.3.x oder h?her?
$config['sort']           = "ASC";             // ASC = Ascending, DESC = descending
$config['is_img_path']    = "./";         // Path to the images, if you 're using ustom paths' (with ending slash)
$config['newwindow']      = 1;              // Open Links in new window?

/******************************
 * ITEM TRACKER
 ******************************/
$config['limit_by']       = "days";          // LIMIT BY:? (days, items, raid, dkp)
$config['item_number']    = 10;             //How many days/items/raid (see option above) of raiding do you wish to show? (1 or more)

// settings :D
$config['showdays']       = 1;                // Do you want to see the date of the raid? (1=yes 0=no)
$config['showheader']     = 1;            // Do you want to see Name of each Raid?? (1=yes 0=no)*/
$config['uberloot']       = 2;                // What loot should show. 0=green and above(default), 1=blue and above, 2=epic and above
$config['showwinner']     = 0;              // Do you want to see who won the loot (1=yes 0=no)
$config['linkitem']       = 1;                // Do you want to link to the item dkp page from the block? (1=yes 0=no)
$config['showDKP']        = 0;            // Do you want to show the DKP Value at the list? (1=yes 0=no)
$config['textcolor']      = 0;                 // Show only the colored item name, no popup

/******************************
 * RAID TRACKER
 ******************************/
$config['limit']              = "3";        // set the amount of entries to show
$config['link_calendar']    = 0;        // Show a Link to the listraids.php
$config['show_tooltip']         = 1;            // Show Tooltip with more information

/******************************
* BOSS TRACKER
******************************/
$config['view_kill_times']  = 0// Do you want to see how often a boss was killing? (1=yes 0=down/waiting)

?>
So I got the raid_tracker.php to work but when I try to put it inside a module I just get this when I go to the kinship page. (www.x672.net/the-forgotten/) (vBulletin 3.6.8)
EQdkp-plus have it's own database that the PHP file is connecting to and is not the same one I use for vBadvanced CMPS v3.0.1

Code:
Database error in vBulletin 3.6.8:

Invalid SQL:

				SELECT IF(votenum >= 1, votenum, 0) AS votenum, IF(votenum >= 1 AND votenum != 0, votetotal / votenum, 0) AS voteavg, votetotal, threadid, firstpostid
				FROM mst_thread AS thread
				WHERE visible = 1
					AND open != 10
					AND (thread.forumid IN(8)
					
					)
					
				ORDER BY dateline DESC
				LIMIT 5;

MySQL Error  : Table 'X672net_eqdkp.mst_thread' doesn't exist Error Number : 1146
Date         : Tuesday, March 16th 2010 @ 09:29:11 AM
Script       : http://x672.net/the-forgotten/
Referrer     : http://x672.net/the-forgotten/
IP Address   : XXX.XXX.XXX.XXX
Username     : Gattsu
Classname    : vB_Database
I have very limited PHP/vB skills so any help at all would be appreciated
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01850 seconds
  • Memory Usage 1,841KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete