Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
World of Warcraft Class Recruitment Status module (db backend) Details »»
World of Warcraft Class Recruitment Status module (db backend)
Version: 1.01, by turnipofdoom turnipofdoom is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.4 Rating:
Released: 01-26-2007 Last Update: Never Installs: 23
DB Changes Template Edits
Additional Files  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-02-2007, 11:18 AM
turnipofdoom turnipofdoom is offline
 
Join Date: May 2004
Location: Connecticut
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahh right on, I will update the package tonight but to fix it change

Code:
private $vbObj;
to

Code:
var $vbObj;
private is not supported until php5..
Reply With Quote
  #13  
Old 02-02-2007, 04:17 PM
Xylo Xylo is offline
 
Join Date: Sep 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by turnipofdoom View Post
Ahh right on, I will update the package tonight but to fix it change

Code:
private $vbObj;
to

Code:
var $vbObj;
private is not supported until php5..
Upgraded to PHP 5.1.2. Tried it both ways and still get the same error.
Reply With Quote
  #14  
Old 02-02-2007, 04:44 PM
Xylo Xylo is offline
 
Join Date: Sep 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 02-02-2007, 05:57 PM
turnipofdoom turnipofdoom is offline
 
Join Date: May 2004
Location: Connecticut
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

right, ima dumbass __construct is only valid in php5...

change

Code:
function __construct()......

to

function recruit()
and that "should" solve the lack of compatability i coded into it ;p
Reply With Quote
  #16  
Old 02-02-2007, 06:18 PM
turnipofdoom turnipofdoom is offline
 
Join Date: May 2004
Location: Connecticut
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please click installed. <3
Reply With Quote
  #17  
Old 02-02-2007, 08:54 PM
Xylo Xylo is offline
 
Join Date: Sep 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by turnipofdoom View Post
right, ima dumbass __construct is only valid in php5...

change

Code:
function __construct()......

to

function recruit()
and that "should" solve the lack of compatability i coded into it ;p
BTW, see above. I upgraded to PHP 5.1.2. I confirmed the constructor is being called now by doing the following:

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'] );
        }
After recruitStatus.php does $class = new recruit() and then calls $class->getStatus(), Init prints out that it is indeed a 1. Changed the code again to
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'] );
        }
which confirms that vbObj is still null, even though the constructor is called.

So why does this
Code:
                        global $vbulletin;
                        $this->vbObj = $vbulletin;
give a null object? I'm not a vbcode expert so I'm really not sure.
Reply With Quote
  #18  
Old 02-02-2007, 10:54 PM
turnipofdoom turnipofdoom is offline
 
Join Date: May 2004
Location: Connecticut
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
in __construct()

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.
Reply With Quote
  #19  
Old 02-11-2007, 06:19 AM
NightPhoenix NightPhoenix is offline
 
Join Date: Sep 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 02-12-2007, 02:21 PM
turnipofdoom turnipofdoom is offline
 
Join Date: May 2004
Location: Connecticut
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

typo on line 19 of EXAMPLE.edit_recruit.php

the offending line is
Code:
$class->getStatus('Druid');
change it to

Code:
$data->getStatus( 'Druid' );
line 19 of class_recruit.php is
Code:
private $vbObj;
private is a php5 keyword, try changing it to
Code:
var $vbObj;
and see if that fixes it.
Reply With Quote
  #21  
Old 02-13-2007, 04:10 AM
NightPhoenix NightPhoenix is offline
 
Join Date: Sep 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 06:59 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.04529 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
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
  • (14)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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