guests cant view anything in "code" tags they have to register to view, but they can view the rest of the post.
Example:
this would be really useful please can someone make a mod like this.
-Thank You
that just requires a little change on the code tag to stop guests seeing it
how can i do this?
http://www.simplemachines.org/community/index.php?topic=335849.msg2255769#msg2255769
instructions on that link
ok i will try it now
QuoteIn Subs.php, you'll see this block twice.
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;
After the first one just add:
if($context["user"]["is_guest"]) $data = "Hidden!!";
After the second one:
if($context["user"]["is_guest"]) $data[0] = "Hidden!!";
I will not be making this into a mod. Take a backup of Subs.php before applying.
i tried it but it doesnt work! WHY???
Did you check it as a guest by logging off 1st (I know it sounds dumb, but its an easy mistake to make)
yeah but it didnt work im going to try one more solution then ill come back to see if it worked
YES IT WORKED
thank you for the help, I really appreciate it.