can someone pleae make a mod like this.

Started by Mr. Pirate, October 10, 2009, 02:11:30 PM

Previous topic - Next topic

Mr. Pirate

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

ɔɔɔɔɔɔuɥoɾ

that just requires a little change on the code tag to stop guests seeing it


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Mr. Pirate


ɔɔɔɔɔɔuɥoɾ



SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Mr. Pirate


Mr. Pirate

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???

ɔɔɔɔɔɔuɥoɾ

Did you check it as a guest by logging off 1st (I know it sounds dumb, but its an easy mistake to make)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Mr. Pirate

yeah but it didnt work im going to try one more solution then ill come back to see if it worked

Mr. Pirate

YES IT WORKED

thank you for the help, I really appreciate it.

Advertisement: