The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Thanks for the help, unfortunately every time I get one thing done something else is wrong.
Now it's telling me that the function name must be a string (on line 245). I researched that error code and found this... Quote:
Fatal error: Cannot use object of type vB_Database as array in /home/righscom/public_html/addons/projectfanboy/vb/member.php(463) : eval()'d code on line 245 But now that I look at it, I think that the parenthesis were right because even though it's part of the variable $db, it's still a sql query, right? I think it's saying that I can't use the variable $db and I have to use a string instead for that part? Anyway, I changed it back to parenthesis() and now I'm back to: Fatal error: Function name must be a string in /home/righscom/public_html/addons/projectfanboy/vb/member.php(463) : eval()'d code on line 245 I'll keep researching. --------------- Added [DATE]1262213487[/DATE] at [TIME]1262213487[/TIME] --------------- Ok, I was re-reading your post and I think I was misunderstanding something before and it helps me to talk it out on "paper" so to speak. Arrays look similar to variables. Arrays are basically variables that hold multiple other variables (aka an array of other variables). So, $db("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE userid = '$bbuserinfo[userid]' , AND title = 'Resume' ") is not a variable but actually an array that uses a SQL query to generate its results. But this is also an array, right? Code:
array( 'class' => 'resume', 'title' => 'Resume', 'hook_location' => 'profile_left_last' ) --------------- Added [DATE]1262215159[/DATE] at [TIME]1262215159[/TIME] --------------- Hmmm, I also found this... Quote:
--------------- Added [DATE]1262215901[/DATE] at [TIME]1262215901[/TIME] --------------- Ok, to see if this would work (it didn't but I'm trying to think outside the box ) I globalised $db and defined $resume as the sql query earlier in the code and then I defined $this->block_data['resume'] as $resume so the code looked like this. Code:
{ global $db; $resume = $db("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE userid = '$bbuserinfo[userid]' , AND title = 'Resume' "); } $blocklist = array_merge($blocklist, array( 'resume' => array( 'class' => 'resume', 'title' => 'Resume', 'hook_location' => 'profile_left_last' ) )); class vB_ProfileBlock_resume extends vB_ProfileBlock { var $template_name = 'memberinfo_block_resume'; function confirm_empty_wrap() { return false; } function confirm_display() { return ($this->block_data['resume'] != ''); } function prepare_output($id = '', $options = array()) { $this->block_data['resume'] = $resume; } } --------------- Added [DATE]1262224021[/DATE] at [TIME]1262224021[/TIME] --------------- Okay, here is the latest and greatest code for my plugin which seems to be working other than the fact that I don't think $bbuserinfo[userid] is parsing and so nothing shows up. But on a good note, I don't seem to be getting any errors anymore. Code:
{ global $db; $resume = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE userid = '$bbuserinfo[userid]' AND title = 'Resume' "); } $blocklist = array_merge($blocklist, array( 'resume' => array( 'class' => 'resume', 'title' => 'Resume', 'hook_location' => 'profile_left_last' ) )); class vB_ProfileBlock_resume extends vB_ProfileBlock { var $template_name = 'memberinfo_block_resume'; function confirm_empty_wrap() { return false; } function confirm_display() { return ($this->block_data['resume'] != ''); } function prepare_output($id = '', $options = array()) { $this->block_data['resume'] = $resume; } } Well son of a mazza frazzer.... Just to test it out, I changed out $bbuserinfo[userid] for '162' (my userid) and nothing still showed up. I really thought that would work.... --------------- Added [DATE]1262298398[/DATE] at [TIME]1262298398[/TIME] --------------- Kind of at a point where I'm a bit stumped. |
#12
|
||||
|
||||
Any ideas?
|
#13
|
||||
|
||||
I'm making headway!
Code:
$blocklist = array_merge($blocklist, array( 'resume' => array( 'class' => 'Resume', 'title' => 'Resume', 'hook_location' => 'profile_left_last' ) )); class vB_ProfileBlock_resume extends vB_ProfileBlock { var $template_name = 'memberinfo_block_resume'; function confirm_empty_wrap() { return false; } function confirm_display() { return ($this->block_data['resume'] != ''); } function prepare_output($id = '', $options = array()) { global $db; $results = $db->query_read("SELECT output FROM " . TABLE_PREFIX . "formresults WHERE userid = '$bbuserinfo[userid]' AND title = 'Resume' "); $this->block_data['resume'] = $results; } } Resource id #73 (the number changes with each member) is being generated in the tab's content portion. Still looking into this. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|