The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[code] tag for registrered members only
Hey there, doing this:
Template: bbcode_code Code:
<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px">$vbphrase['code']:</div> <pre class="alt2" dir="ltr" style=" margin: 0px; padding: $stylevar[cellpadding]px; border: 1px inset; width: $stylevar[codeblockwidth]; height: {$blockheight}px; text-align: left; overflow: auto"><if condition="$show['guest']">Please sign up<else />$code</if></pre> </div> |
#2
|
||||
|
||||
Have you tried taking out the quotes around guest?
Code:
<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px">$vbphrase['code']:</div> <pre class="alt2" dir="ltr" style=" margin: 0px; padding: $stylevar[cellpadding]px; border: 1px inset; width: $stylevar[codeblockwidth]; height: {$blockheight}px; text-align: left; overflow: auto"><if condition="$show[guest]">Please sign up<else />$code</if></pre> </div> |
#3
|
||||
|
||||
Posts are (usually) cached - and therefore, all BB code is translated into HTML on the first view of the post (and on subsequent cache refreshes). Turn off post caching (will increase load on your server).
|
#4
|
||||
|
||||
TigerC10: No, it doesn't work.
Dismounted: Where do I disable post caching? I have tried to set up this: admincp -> vb options -> server settings & optimization options -> Cached Posts Lifespan .. to 0. But it doesn't work. Viewing my thread as guest it still show the code. Anyway, then.. how would I go to edit it in order to be viewed also when post caching is on? |
#5
|
||||
|
||||
Quote:
That's tricky (get it? ). I have not actually looked into it, but it would probably require some sort of doing the "Code" BB code replacement last minute, and disabling the parsing of it beforehand. |
#6
|
||||
|
||||
Mhh, maybe I should try to edit this part of code in includes/functions.php?
PHP Code:
|
#7
|
||||
|
||||
No, that is not what I am talking about. Look at the end of class_bbcode.php.
|
#8
|
||||
|
||||
Then you mean this?
PHP Code:
|
#9
|
||||
|
||||
.
|
#10
|
||||
|
||||
I would like to use the [code], [php] and [html] standard tags.
Anyway, I have just found this one: http://www.vbhackers.com/f76/hide-code-usergroups-5884/. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|