![]() |
Side Blocks
How can I get in the sideblock using something like:
PHP Code:
|
You would need to write a php block and put in the code to output what you want.
|
Do you know where can I find a sample or something I can reference from?
|
There are a few blocks modifications in the mods forums. So, go download a couple of those and check out the code.
|
I've searched but didn't locate any, can you point me to one plz!
|
|
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.
|
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.'; Code:
$my_output = '<p>Hello '. vB::$vbulletin->userinfo[username].'</p>'; |
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! |
You need a template for it to use. Just leave that as default block_html
http://www.vbulletin.com/forum/showt...10#post2105310 |
All times are GMT. The time now is 02:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|