The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with Forum Blocks
How Can I Make A User Register To View A Forum Block just one block not all
am using htmll code in the block is there any code should i insert ? thank you |
#2
|
|||
|
|||
First copy the template block_html to another name, and edit your forum block and enter your new template name as "Template to Use" (at the bottom). Set the "Cache Time" to 0.
If you want the block to disappear completely, then add <vb:if condition="$bbuserinfo[userid] != 0">...</vb:if> around the existing code of your new template. If instead you want to show something else to guests, I think you could replace {vb:raw content} with Code:
<vb:if condition="$bbuserinfo[userid] != 0"> {vb:raw content} <vb:else /> Guest Message </vb:if> |
#3
|
|||
|
|||
Quote:
thank you kh99 for your help |
#4
|
|||
|
|||
Glad you got it working, but I'm curious about how you did it. Were you using a php block, or did you put the template tags in your html?
|
#5
|
|||
|
|||
Quote:
Sorry For The Delay kh99 Using Php And Html Original Code:
<li> <div class="block smaller"> <div class="blocksubhead"> <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a> <span class="blocktitle">{vb:raw blockinfo.title}</span> </div> <div class="widget_content blockbody floatcontainer"> <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow"> {vb:raw content} </div> </div> </div> <div class="underblock"></div> </li> Modified Code:
<li> <div class="block smaller"> <div class="blocksubhead"> <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a> <span class="blocktitle">{vb:raw blockinfo.title}</span> </div> <div class="widget_content blockbody floatcontainer"> <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow"> <vb:if condition="$bbuserinfo[userid] != 0"> {vb:raw content} <vb:else /> To View Our Blocks You Need To Register <a href="register.php">Click Here to Register</a> </vb:if> </div> </div> </div> <div class="underblock"></div> </li> Modified the Block_html in vb Styles |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|