Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: Mr. Pirate on October 10, 2009, 02:11:30 PM

Title: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:11:30 PM
guests cant view anything in "code" tags they have to register to view, but they can view the rest of the post.

Example:

(http://i36.tinypic.com/126b9qf.png)

this would be really useful please can someone make a mod like this.

-Thank You
Title: Re: can someone pleae make a mod like this.
Post by: ɔɔɔɔɔɔuɥoɾ on October 10, 2009, 02:15:06 PM
that just requires a little change on the code tag to stop guests seeing it
Title: Re: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:17:00 PM
how can i do this?
Title: Re: can someone pleae make a mod like this.
Post by: ɔɔɔɔɔɔuɥoɾ on October 10, 2009, 02:18:08 PM
http://www.simplemachines.org/community/index.php?topic=335849.msg2255769#msg2255769

instructions on that link
Title: Re: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:19:13 PM
ok i will try it now
Title: Re: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:33:00 PM
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???
Title: Re: can someone pleae make a mod like this.
Post by: ɔɔɔɔɔɔuɥoɾ on October 10, 2009, 02:34:55 PM
Did you check it as a guest by logging off 1st (I know it sounds dumb, but its an easy mistake to make)
Title: Re: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:36:56 PM
yeah but it didnt work im going to try one more solution then ill come back to see if it worked
Title: Re: can someone pleae make a mod like this.
Post by: Mr. Pirate on October 10, 2009, 02:44:19 PM
YES IT WORKED

thank you for the help, I really appreciate it.