The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to show something in Member Profile Page?
Hello people,
I would like to be able to have certain text show under the "General Information" section of the About Me tab on a Member's Profile page for users who are in a certain usergroup and have this text only visible to the admin usergroup. How would I go about doing this? Do I need to create a plugin or can I just put something in a template? If so which template would it be? To clarify, I'd want something like: If in usergroup admin, then you can see this text, which only shows up on profile pages of users who are in usergroup "blah blah". Thank you so much for any help you can provide! |
#2
|
||||
|
||||
There is a template hook - profile_stats_last So, just write a plugin to add whatever you want to add and put it into that template_hook.
|
#3
|
||||
|
||||
Thank you for the help Lynne!
I'm afraid I am still a little lost as to how to do the code to show certain text for a certain user group only to a certain user group (admin). Thank you for any further help you can provide. |
#4
|
||||
|
||||
If you only want to show it to usergroup x:
PHP Code:
PHP Code:
|
Благодарность от: | ||
RedTurtle |
#5
|
||||
|
||||
Hi Lynne,
Thank you again for such a great response. I did just sit down and try to do this but I did have two more questions if you don't mind! 1) My version of vB (4.2.0 PL3) doesn't seem to have the hook profile_stats_last. Is there a way I can create this hook, or do I need to use a different one? 2) For the if (is_member_of($prepared_y)) } code here } section, I would like the "code here" to print out the usergroup of the user (whose profile page it is). So if I went to a moderator's profile page as the admin I would like it to say there "Usergroup: Moderator". I did search the forum and found a way to print the usergroup of the person viewing the page, but not sure how to print the usergroup of who the profile page belongs to. Thank you so much again for devoting your time to this. You have always been so helpful here to me and other beginners. |
#6
|
||||
|
||||
1) It is a template_hook in the memberinfo_block_statistics template:
HTML Code:
{vb:raw template_hook.profile_stats_last} 2) If it is the person's profile, then use the variable $prepared for it. |
#7
|
||||
|
||||
Thank you Lynne, that last answer did help quite a bit. I kept looking for a profile_stats_last as the hook location to run my custom plugin that I create. I see now that was incorrect.
Do you know which of the vBulletin hooks I do need to assign my custom plugin code to hook into? Thank you! |
#8
|
||||
|
||||
I don't know. You may want to look at the member.php page and see what plugin hooks are called in there and try those. Otherwise, if you go into debug mode, you will see a list of all the plugin hooks called on the page.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|