Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jul 2012, 05:17
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
Custom Variable in Postbit

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.
Reply With Quote
  #2  
Old 29 Jul 2012, 04:38
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
Still trying to figure this out. -_-;
Reply With Quote
  #3  
Old 29 Jul 2012, 04:41
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
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?
Reply With Quote
  #4  
Old 29 Jul 2012, 05:45
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
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.
Reply With Quote
  #5  
Old 29 Jul 2012, 18:53
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
So post the code you have written and let us see where you went wrong.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 30 Jul 2012, 05:55
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
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
Reply With Quote
  #7  
Old 30 Jul 2012, 16:59
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 31 Jul 2012, 03:25
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
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.

Last edited by evenmonkeys; 31 Jul 2012 at 03:38.
Reply With Quote
  #9  
Old 31 Jul 2012, 11:44
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by evenmonkeys View Post
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 17:02.

Layout Options | Width: Wide Color: