Log in

View Full Version : Hack so Guests can't view [code] tags...


ShatterStudios
02-24-2007, 06:26 PM
I know it's around here somewhere, I just can't manage to find it.

Can someone link me or tell me how to set my forum up so guests can't view [code] tags.

Thank you.

Kirk Y
02-24-2007, 06:36 PM
Here's an old one from 3.0.x -- you could try asking someone to port it over to 3.5.x/3.6.x as I don't believe there are any others like it.

https://vborg.vbsupport.ru/showthread.php?t=59648&highlight=bbcode

ShatterStudios
02-24-2007, 06:38 PM
Here's an old one from 3.0.x -- you could try asking someone to port it over to 3.5.x/3.6.x as I don't believe there are any others like it.

https://vborg.vbsupport.ru/showthread.php?t=59648&highlight=bbcode
Well I know there's one for 3.6 because this forum uses it.

But thanks for finding that link, I'll try it out.

Kirk Y
02-24-2007, 06:42 PM
There are a lot of customizations that have been made to vB.org by the Coding Team -- but you'll find that a majority of them haven't been released to the public, unfortunately.

ShatterStudios
02-24-2007, 09:51 PM
There are a lot of customizations that have been made to vB.org by the Coding Team -- but you'll find that a majority of them haven't been released to the public, unfortunately.
Ah, alright.

Well if anyone else knows how to do this, please let me know.

Xplorer4x4
02-24-2007, 11:46 PM
I think there was a version for 3.5, more then likely it will work on 3.6

ShatterStudios
02-25-2007, 05:19 PM
I think there was a version for 3.5, more then likely it will work on 3.6
Could you possibly link it to me?

Thanks.

harmor19
02-25-2007, 05:49 PM
You can just edit the template in the ACP.

Kirk Y
02-25-2007, 05:57 PM
Oh true... I didn't think of that. Edit the BBCode "code" tag's template and use an if conditional.

<if condition="$bbuserinfo[userid] == '0'">Only Registered Members may view Code Tag Contents</if>

harmor19
02-25-2007, 06:01 PM
Oh true... I didn't think of that. Edit the BBCode "code" tag's template and use an if conditional.

<if condition="$bbuserinfo[userid] == '0'">Only Registered Members may view Code Tag Contents</if>

That won't exactly work. You'll need to use an <else /> tag.

Kirk Y
02-25-2007, 06:28 PM
Yeah, I was just giving the basic concept - an else statement is assumed.

ShatterStudios
02-25-2007, 10:04 PM
So can one of you show me the exact code I need to use and which code to replace? And where it's at.

harmor19
02-25-2007, 10:29 PM
So can one of you show me the exact code I need to use and which code to replace? And where it's at.
I'm not going to show you because you need to put in an effort first.

Kirk Y
02-25-2007, 10:31 PM
In bbcode_code and bbcode_code_printable find:
$code

Replace with:
<if condition="$bbuserinfo[userid] == '0'">Only Registered Users may view Code.
<else />$code</if>

Edit: Whoops... sorry Harmor, your post wasn't there when I posted. :p

ShatterStudios
02-25-2007, 10:37 PM
I'm not going to show you because you need to put in an effort first.
I'm sorry. I honestly know nothing about coding. My coder hasn't been online in about a week and I need this pretty bad.

In bbcode_code and bbcode_code_printable find:
$code

Replace with:
<if condition="$bbuserinfo[userid] == '0'">Only Registered Users may view Code.
<else />$code</if>

Edit: Whoops... sorry Harmor, your post wasn't there when I posted. :p
I tried that and it didn't work...

Even AcidBurner couldn't help and I gave him admin access. Anyone else care to help?

ShatterStudios
02-26-2007, 10:40 PM
Anyone else know what might be wrong? It's still not working.

Zia
02-28-2007, 04:18 PM
In bbcode_code and bbcode_code_printable find:
$code

Replace with:
<if condition="$bbuserinfo[userid] == '0'">Only Registered Users may view Code.
<else />$code</if>

Edit: Whoops... sorry Harmor, your post wasn't there when I posted. :p


ahha..using the same idea

[img] tag also can be hide from guest?
so guest cant see image?

Right?

AMG021
02-28-2007, 10:04 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=105160&highlight=hide+bbcode" target="_blank">https://vborg.vbsupport.ru/showt...ht=hide+bbcode</a>