The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
commenting out $block_data[latestentries]
I'm working with member profiles... but I'm sure other templates use $blocks
I want to hide some of the blocks, like $blocks[vistors] etc. I don't see anything in the control panel to disable some of this stuff so I'm just hiding it in the templates, but I don't want to straight up delete it in case at some point I want to reintroduce the functionality. So I'm commenting out the code, but this doesn't work <!--$block_data[latestentries]--> Instead I need to do this <!--$--><!--block_data[latestentries]--> The $ sign needs to be commented separately. 1) Am I making a workflow mistake by commenting code rather than looking for another way to manage the blocks. 2) Is there a better way to hide the code in the template without deleting it (i.e. a different comment system). |
#2
|
|||
|
|||
Use the <vb:comment> </vb:comment> tags. In most cases it will work better.
When using the HTML comment tags, best practice is to leave a space in the tag. For example: <!-- $ --> |
#3
|
|||
|
|||
Isn't <vb:comment> </vb:comment> just for vbulletin 4 and higher?
|
#4
|
|||
|
|||
Two other methods I use.
1.) Use CSS and temporarily hide the block from the device using "display: none". Of course the HTML is still sent to the user. Use this for a temporary measure as you do not have to alter the template to accomplish it. 2.) I create a special user account called 'adminview', then instead of using <vb:comment>, I use a regular conditional on the 'adminview' user account. --------------- Added 06 Mar 2014 at 07:38 --------------- Oops! yep, sorry, I thought this was a VB4 question. |
#5
|
|||
|
|||
Thanks!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|