Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Jan 2016, 19:42
RobLeonard's Avatar
RobLeonard RobLeonard is offline
 
Join Date: Oct 2014
How to show the users total "thanks" in header template

Hi there,

I have the "Post Thank You Hack" installed and set up on my forum.
http://www.vbulletin.org/forum/showthread.php?t=165673

I am using a custom theme I have created and I'm stuck on displaying the user's total thanks received within the 'header' template. A screenshot of the box is here:



I've not really done too much modification in terms of php, and have only really developed themes and used the code that vBulletin provides as standard.

Any help would be appreciated.

Many thanks,
Robbie
Reply With Quote
  #2  
Old 13 Jan 2016, 19:54
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
I would first take a look at the $vbulletin->userinfo array to see if that datum is already part of the array. Otherwise, you will likely have to create a plugin, with an SQL query, to compute it.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #3  
Old 13 Jan 2016, 20:08
RobLeonard's Avatar
RobLeonard RobLeonard is offline
 
Join Date: Oct 2014
Originally Posted by MarkFL View Post
I would first take a look at the $vbulletin->userinfo array to see if that datum is already part of the array. Otherwise, you will likely have to create a plugin, with an SQL query, to compute it.
Where am I looking for this? (Complete newbie when it comes to this type of thing in vBulletin)
__________________
Many Thanks,
Robbie P.
Reply With Quote
  #4  
Old 13 Jan 2016, 20:19
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Follow:

AdminCP -> Plugins & Products -> Add New Plugin

And then complete the resulting form as follows:

Product: vBulletin

Hook Location: forumhome_complete

Title: Test

Execution Order: 5

Plugin PHP Code:


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

Plugin is Active: Yes

Click "Save and Reload", and then go to your forum and look at the home page...you should get a screen full of data. Copy/Paste that data here so I can look at it, and then go back to your AdminCP and set:

Plugin is Active: No

Click "Save".

Once you post that data, I will be able to see if a user's total number of likes is already stared in that array, and we can go from there.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #5  
Old 13 Jan 2016, 20:38
RobLeonard's Avatar
RobLeonard RobLeonard is offline
 
Join Date: Oct 2014
Hi,

Thank you for that - From that I was able to locate the correct code to place. Which, for anyone else who is curious/interested, is the following code:

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

Thank you for your help,
__________________
Many Thanks,
Robbie P.
Reply With Quote
  #6  
Old 13 Jan 2016, 20:40
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
From the image you posted in your first post, that appears to be a interesting style, this is vB3?

Would you mind providing a link to your site?
Reply With Quote
  #7  
Old 13 Jan 2016, 20:41
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by RobLeonard View Post
Hi,

Thank you for that - From that I was able to locate the correct code to place. Which, for anyone else who is curious/interested, is the following code:

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

Thank you for your help,
Good deal! And thank you for being conscientious and courteous enough to post your finding for others in the future.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #8  
Old 13 Jan 2016, 20:50
RobLeonard's Avatar
RobLeonard RobLeonard is offline
 
Join Date: Oct 2014
Originally Posted by Max Taxable View Post
From the image you posted in your first post, that appears to be a interesting style, this is vB3?

Would you mind providing a link to your site?
I'd share a link, but the theme isn't publically visible yet as we're under development - If you want, you can drop me a private message and I can send some screenshots over to you

Originally Posted by MarkFL View Post
Good deal! And thank you for being conscientious and courteous enough to post your finding for others in the future.
I appreciate your help, I'm just not the type of person that wants to be spoonfed the whole way - I like a challenge and at a last resort will I ask for help. Your post helped a great deal!
__________________
Many Thanks,
Robbie P.
Reply With Quote
  #9  
Old 13 Jan 2016, 21:06
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by RobLeonard View Post
I'd share a link, but the theme isn't publically visible yet as we're under development - If you want, you can drop me a private message and I can send some screenshots over to you
That would be cool but would really rather have a link when you have it, via PM as well if you want.
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 03:06.

Layout Options | Width: Wide Color: