MyBB Central
CODE content hidden to guests - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Mybb 1.6x Series Topics (http://www.mybbcentral.com/forum-34.html)
+--- Forum: Mybb 1.6x Official Central Plugins and Hacks (http://www.mybbcentral.com/forum-35.html)
+---- Forum: Requests and Suggestions (http://www.mybbcentral.com/forum-28.html)
+---- Thread: CODE content hidden to guests (/thread-1487.html)



CODE content hidden to guests - noc123 - Aug 04, 2008

Hi. Is there any possibility to make a plugin that CODE content will be hidden to guests?


RE: CODE content hidden to guests - LeX- - Aug 04, 2008

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";
        } 



RE: CODE content hidden to guests - noc123 - Aug 04, 2008

LeX, thanks a lot. Works perfect.