Hello :( ..
i want a feature ( mod , code ) for hiding the code blocks from the guests ..
example i want to hide
this
from guests
PLEASE HELP
Try this mod http://custom.simplemachines.org/mods/index.php?mod=756
It's for 1.1.4 but maybe still working for 1.1.10
its not worth it .. i have 10000+ topics already .. i want to hide them too .. i want all code blocks to be hidden automatically
You want to hide a whole board or individual topics ?
only the code blocks inside a topic . not full post
are you taking about the php codes or BBC codes, ?? ( [code][/code] ) ??
yea yea bhaii ..
i want to hide all existing and new posting content inside code blocks made using code tags from guests and show them "Hidden Content You Need To Login or Register To See The Hidden Content"
Example
Hide
this
and show
Hidden Content You Need To Login or Register To See The Hidden Content
http://custom.simplemachines.org/mods/index.php?mod=118
That should do it.
noo Flamer .. what about my existing 40000+ topics with code blocks ? i want every exist code blocks to be hidden automatically tooo
In 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.
Arantor Thanks Big Bro but 1 problem .. can we show the users after hiding the code block
"Hidden Content You Need To Login or Register To See The Hidden Content" ???
*sigh*
In 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 Content You Need To Login or Register To See The Hidden Content";
After the second one:
if($context["user"]["is_guest"]) $data[0] = "Hidden Content You Need To Login or Register To See The Hidden Content";
ahhh please make it bold and red and please link the login and register text to login and register page :D thanks
*sigh* *sigh*
In 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 = "<span style=\"font-weight:bold; color:red;">Hidden Content You Need To Login or Register To See The Hidden Content</span>";
After the second one:
if($context["user"]["is_guest"]) $data[0] = "<span style=\"font-weight:bold; color:red;">Hidden Content You Need To Login or Register To See The Hidden Content</span>";
I will not provide any further support on this matter, however, as a personal choice.
Quote from: Rohan_ on September 12, 2009, 02:02:52 PM
ahhh please make it bold and red and please link the login and register text to login and register page :D thanks
See reply 13. It has the changes in bold and red.
i also aksed to link the login and register text to login and register page. .. Thanks a ton Arantor .. really appreciate it
I'm sure you're capable of doing that.
As I said, I am not going to provide further support.
Parse error: syntax error, unexpected T_STRING in /home/vhosts/www.site.com/Sources/Subs.php(1206) : runtime-created function on line 4
Parse error: syntax error, unexpected T_STRING in /home/vhosts/www.site.com/Sources/Subs.php(1277) : runtime-created function on line 4
My fault, I'll admit that.
color:red;"> should have been color:red;\">
ohh yeah fine .. so now for guests its done .. they see text in a code block now .. finally can u give me a code to add the links ?
Quote from: Arantor on September 12, 2009, 02:08:18 PM
I'm sure you're capable of doing that.
As I said, I am not going to provide further support.
" Please "
arantor its a 5 second work for you .. please help me .. can't a big bro help a younger if he requests ?
<a href="link">title</a>
:D
I do not provide support for warez sites as a personal decision. Having had my own material presented ripped off and presented on such sites before, I have no tolerance for it personally.
Quote from: S-Ace on September 12, 2009, 02:49:46 PM
<a href="link">title</a>
:D
bro soumik .. i tried it already but i got a parse error of T_STRING
Hey .. i have a mod for download bb codes .. i also want to hide its content .. this mod uses this code
'tag' => 'down',
'before' => '<table border="0" cellspacing="0" cellpadding="0" width="'.$modSettings['download_width'].'"><tr><td height="39" colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td width="113" background="'.$settings['default_theme_url'].'/images/down1.gif" height="39" title="'.$txt['bbcode_downloadlinks'].'"> </td><td background="'.$settings['default_theme_url'].'/images/down2.gif"> </td><td width="48" background="'.$settings['default_theme_url'].'/images/down3.gif" height="39" > </td></tr></table></td></tr><tr><td bgcolor="#C0DDFF" width="10"> </td><td bgcolor="#C0DDFF"><table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #007FD8" bgcolor="#FFFFFF"><tr><td style="font-family: Arial; font-size: 12px; color: #707070; text-align: center"><p style="margin: 5px">',
'after' => '</td></tr></table></td><td bgcolor="#C0DDFF" width="10"> </td></tr><tr><td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td background="'.$settings['default_theme_url'].'/images/down4.gif" height="11" width="11"><img border="0" src="'.$settings['default_theme_url'].'/images/space.gif" alt="sharedownload.org" width="1" height="1"></td><td bgcolor="#C0DDFF" height="11"><img border="0" src="'.$settings['default_theme_url'].'/images/space.gif" width="1" height="1"></td><td background="'.$settings['default_theme_url'].'/images/down5.gif" height="11" width="11"><img border="0" src="'.$settings['default_theme_url'].'/images/space.gif" width="1" height="1"></td></tr></table></td></tr></table><!-- 120509-->',
'block_level' => true,
now please please last time please tell me where do i add a code to hide its content
As ever any changes to modifications should be referred to the mod's own page. We cannot provide support on mods in the main support board.
That said, I'm sure you're a smart guy, look at the changes I described and see how you might apply that to your new tag.
i tried to add the code .. but i didn't got success .. i fail sometime in somethings .. so please arantor help me in this tag and we will mark this topic solved :)
Quote from: Arantor on September 12, 2009, 02:53:14 PM
I do not provide support for warez sites as a personal decision. Having had my own material presented ripped off and presented on such sites before, I have no tolerance for it personally.
I agree (and sympathize) with Arantor, so I remain silent here as well.
I'm sure other forums will be able to help you, or possibly other members.
Hello i have http://custom.simplemachines.org/mods/index.php?mod=342
This mod is cool but i have one quetion
when user put link in "url" and "quote" mod works but when put in "code" no :( how fix this?
Because the mod wasn't written to support code, follow the instructions earlier in this thread which explains how to make it work on code tags too.