PDA

View Full Version : Hide Text/URL from Unauthorized


dynamite
01-18-2004, 04:05 PM
I am looking for something that will allow me to hide certain parts of a post or automatically hide a URL from users who do not have sufficient priveldges. The only way I am able to currently do this is to put in an attachment and only allow those with proper authorization to download the attachment.
I wish it could be something like the license system used here where it just hides that particular part of the post and say you must be a X member level to be able to view this.
If there is already something like this, please point me in the right direction because I have tried every search combination I can think of, but am not finding what I want. Thanks!

Hialls
02-19-2004, 07:35 PM
Hmm well vbulletin.org uses this system to hide code from unlicenced users so its possible :P

Andreas
02-19-2004, 07:50 PM
Sure this is possible.

For example, if you want to hide PHP from guests you could do smth. like this:

In functions_bbcodeparse FIND

eval('$html = "' . fetch_template('bbcode_php') . '";');


ABOVE that ADD

global $bbuserinfo;
if (is_member_of($bbuserinfo, 1)) {
$code="<b>You are not allowed to view PHP-Code</b>";
}

assassingod
02-19-2004, 07:53 PM
Sure this is possible.

For example, if you want to hide PHP from guests you could do smth. like this:

In functions_bbcodeparse FIND

eval('$html = "' . fetch_template('bbcode_php') . '";');


ABOVE that ADD

global $bbuserinfo;
if (is_member_of($bbuserinfo, 1)) {
$code="<b>You are not allowed to view PHP-Code</b>";
}

I just did this but since I haven't asked Dean if I can release it (He was the original creator) you went and did it :p (A different way though)

Nice though, KirbyDE

Andreas
02-19-2004, 07:57 PM
Uups! Did't now this already existed, sorry.
Just wrote that myself ...

assassingod
02-19-2004, 07:58 PM
Well I just looked and Boofo had already released this - so we're both late hehe:)