The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
World of Warcraft Class Recruitment Status module (db backend) Details »» | |||||||||||||||||||||||||||
World of Warcraft Class Recruitment Status module (db backend)
Developer Last Online: Apr 2013
This mod is no longer supported it has been rewritten.
The new mod is available here: https://vborg.vbsupport.ru/showthread.php?t=150449 Show Your Support
|
Comments |
#12
|
|||
|
|||
Ahh right on, I will update the package tonight but to fix it change
Code:
private $vbObj; Code:
var $vbObj; |
#13
|
|||
|
|||
Upgraded to PHP 5.1.2. Tried it both ways and still get the same error.
|
#14
|
|||
|
|||
Some follow up troubleshooting:
Broke down the query line into two parts to find out which was failing: 31: $temp = $this->vbObj->db->query_read( "SELECT status FROM recruitment WHERE class='$query'" ); 32: $result = $this->vbObj->db->fetch_array( $temp ); Failed at line 31 still (Fatal error: Call to a member function query_read() on a non-object) So thinking vbObj is borked I put in if ($this->vbObj == null) print ( "vbObj = null"); .. and got: Recruitment Druid: vbObj = null Fatal error: Call to a member function query_read() on a non-object So yeah I'm guessing the constructor didn't get called (?) or didn't return a valid object. So checking that I put in: if ($this->vbObj == null) print ( "vbObj = null"); global $vbulletin; $vbObj = $vbulletin; if ($vbObj == null) print ( "vbObj2 = null"); if ($vbulletin == null) print ( "vbulletin = null"); .. which gives me vbObj = null vbObj2 = null vbulletin = null So the problem is with the constructor not returning a valid object. Trying to figure that one out now. |
#15
|
|||
|
|||
right, ima dumbass __construct is only valid in php5...
change Code:
function __construct()...... to function recruit() |
#16
|
|||
|
|||
Please click installed. <3
|
#17
|
|||
|
|||
Quote:
Code:
class recruit { private $vbObj; private $init=0; public function __construct() { global $vbulletin; $this->vbObj = $vbulletin; $this->init = 1; return $this->vbObj; } function getStatus( $query ) { print ( "Init = $this->init" ); $result = $this->vbObj->db->fetch_array( $this->vbObj->db->quer$ return strip_tags( $result['status'] ); } Code:
class recruit { private $vbObj; private $init=0; private $vbOnullcheck=0; public function __construct() { global $vbulletin; $this->vbObj = $vbulletin; $this->init = 1; if ($this->vbObj == null) $this->vbOnullcheck=1; return $this->vbObj; } function getStatus( $query ) { print ( "<br>Init = $this->init<br>vbOnull = $this->vbOnullchec$ $result = $this->vbObj->db->fetch_array( $this->vbObj->db->quer$ return strip_tags( $result['status'] ); } So why does this Code:
global $vbulletin; $this->vbObj = $vbulletin; |
#18
|
|||
|
|||
Ok... I missed that you updated to php5. There are a couple options ill leave you with.
I can rewrite a portion of it, and discard the built in vbulletin queries (the global object). I cannot reproduce the error, I would need some form of shell access to your site (i dont expect this, but i admit im curious on the error, would need vi class_recruit.php edit access lol). and a test page to work with. In order to get a $vbulletin object to instance, you need to include EXAMPLE.recruitStatus.php in the CMPS as a module. On the page (VBCMPS page) you are displaying this on you can set Portal Output Global Variables : vbulletin (with out the $). oh now that i think about you could try. Code:
$this->vbObj = clone $vbulletin; or $this->vbObj =& $vbulletin; but I have a feeling its not a constructor issue but just global $vbulletin is not instantiating the object. And that, sadly I don't think I can troubleshoot with out being able to reproduce it. (I am by no means a vb expert) Be happy to fix it and just use the mysql_xxx stuff if you like.. I'd be interested to know if the 3 ppl that clicked install had this issue and never bothered to come back or if it worked. |
#19
|
|||
|
|||
I'm having similar issues.
I have PHP5 Line 19 of class_recruit.php (didn't save the error) Line 19 of EXAMPLE.edit_recruit.php (Fatal error: Call to a member function on a non-object modules/EXAMPLE.edit_recruit.php |
#20
|
|||
|
|||
typo on line 19 of EXAMPLE.edit_recruit.php
the offending line is Code:
$class->getStatus('Druid'); Code:
$data->getStatus( 'Druid' ); Code:
private $vbObj; Code:
var $vbObj; |
#21
|
|||
|
|||
Also, this part of the SQL is giving me errors (the red part):
CREATE TABLE `recruitment` ( `Class` varchar(15) NOT NULL default '', `Status` varchar(15) NOT NULL default '', PRIMARY KEY (`Class`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 I removed it and it went in fine. I am reinstalling the rest right now to see how it works. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|