REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CODE content hidden to guests
#1
Hi. Is there any possibility to make a plugin that CODE content will be hidden to guests?
Reply
#2
A code change is 'easier' =P

Open ./inc/class_parser.php

Find
PHP Code:
    function mycode_parse_code($code$text_only=false)
    {
        global 
$lang

Change into
PHP Code:
    function mycode_parse_code($code$text_only=false)
    {
        global 
$mybb$lang;

        if(!
$mybb->user['uid'])
        {
            return 
"<div class=\"codeblock\">\n<div class=\"title\">".$lang->code."\n</div><div class=\"body\" dir=\"ltr\"><code><em>Content Hidden For Guests</code></div></div>\n";
        } 
Reply
#3
LeX, thanks a lot. Works perfect.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Using a Lock content until Shared code on MyCodes? VideoGameModder 2 1,530 Jun 15, 2012, 07:23 PM
Last Post: VideoGameModder
  Hidden username when sending warning through PM's. uzi 3 1,681 Sep 13, 2011, 11:42 AM
Last Post: Oliver Evans
  Need the repfuck code. Dubstep 4 1,593 Aug 15, 2011, 05:57 AM
Last Post: Dubstep
  [Request] Hide Links to Guests blazendevil2 6 4,373 Oct 27, 2010, 03:22 PM
Last Post: xomp
  Sign up notice for guests only.. Mikey 2 1,835 Aug 14, 2010, 09:35 AM
Last Post: alv4

Forum Jump:


Users browsing this thread: 1 Guest(s)