The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Side Blocks
How can I get in the sideblock using something like:
PHP Code:
|
#2
|
||||
|
||||
You would need to write a php block and put in the code to output what you want.
|
#3
|
||||
|
||||
Do you know where can I find a sample or something I can reference from?
|
#4
|
||||
|
||||
There are a few blocks modifications in the mods forums. So, go download a couple of those and check out the code.
|
#5
|
||||
|
||||
I've searched but didn't locate any, can you point me to one plz!
|
#6
|
||||
|
||||
|
#7
|
||||
|
||||
I know how to add the content in the sideblocks but I don't know how to get the vbulletin var to get the content there, if I just put {vb:raw post.username} to show the person's username it show just {vb:raw post.username} it doesn't render the actual username.
|
#8
|
||||
|
||||
First off, you need to define the variable $post to use it in the block.
But, besides that, variables are not html. You would need to create a PHP block to output a variable and there is an example there on how to do output in a php block: Code:
$my_output = 'Hello, world.'; return $my_output; Code:
$my_output = '<p>Hello '. vB::$vbulletin->userinfo[username].'</p>'; return $my_output; |
#9
|
||||
|
||||
Do I need to put anything for the template used?
I tried that code and even the sample code that is there in the ACP, nothing in the template used area and the block didn't appear! Thanks! |
#10
|
||||
|
||||
You need a template for it to use. Just leave that as default block_html
http://www.vbulletin.com/forum/showt...10#post2105310 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|