The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to add a block on member's profile?
Hello,
I need to add a new block on member's profiles, which template should I edit if I want my block to be above the friends block? thanks ! |
#2
|
||||
|
||||
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
I think it's the MEMBERINFO template, but try the tip above and you should see. |
#3
|
||||
|
||||
yes, it's the MEMBERINFO template, and inside that there's this:
PHP Code:
I remember when I used vB3.8.x I simply had to create a new template, I named it template_block_name and include in that list and done, but now It's different, it wont work if I do that. btw thanks for your help. |
#4
|
||||
|
||||
Use one of the template_hooks - that is what they are there for. You write a plugin, render your sidebar template and then assign the results to the $template_hook.
|
#5
|
||||
|
||||
That's exactly what I don't know how to do, would you mind explaining to me how to do this?
thanks ! |
#6
|
||||
|
||||
You need to render your template first and then assign it to the template_hook. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
Example from his tutorial: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|