vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=285989

Custom Variable in Postbit
by evenmonkeys
27 Jul 2012 05:17

I want to make a plugin, place a variable in it, and call it in "postbit_legacy". I can't figure out the plugin hook I use. I tried "postbit_display_start" but it didn't work. It actually broke my forum.

Any direction will be appreciated.

evenmonkeys 29 Jul 2012 04:38

Still trying to figure this out. -_-;

HMBeaty 29 Jul 2012 04:41

More information would be nice ;) For example.... what is the code you are trying to use? What do you mean it broke your forum? What exactly are you trying to do/accomplish?

evenmonkeys 29 Jul 2012 05:45

I made a table for a game on my forum. In that table is a score for each user. I want to display that score on the postbit. I can't figure it out.

Lynne 29 Jul 2012 18:53

So post the code you have written and let us see where you went wrong.

evenmonkeys 30 Jul 2012 05:55

Plugin: postbit_display_start

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Template
: postbit_legacy

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Gives this error
:
Fatal error: Call to a member function query() on a non-object in /forums/includes/class_postbit.php(265) : eval()'d code on line 86

Lynne 30 Jul 2012 16:59

I've always used postbit_display_complete for adding stuff to the postbit.

You may need to use $this->post instead of $post. Also, aren't you only getting one result? If so, use query_first. https://www.vbulletin.com/docs/html/...ards_sql_query

evenmonkeys 31 Jul 2012 03:25

Well, I guess what has me confused.. is that if I were to pull out everything in my plugin and change the entire thing to one line of code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will actually show that user's userid on each individual post. But once I throw the queries in there, it doesn't work for some reason.

How do I use the information I pull from the table if I do that? Right now, I would have something like:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Still getting the same error as I switch around my queries.

kh99 31 Jul 2012 11:44

Quote:

Originally Posted by evenmonkeys (Post 2352636)
Fatal error: Call to a member function query() on a non-object in /forums/includes/class_postbit.php(265) : eval()'d code on line 86

You probably need

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


at the beginning of your code.


All times are GMT. The time now is 20:08.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.