
chien wrote:Here's what you need
Step 1.
Place this in the "BBCode usage" textarea.Step 2.Code: Select all
[hideurl={URL}]{SIMPLETEXT}[/hideurl]
Place this in the "HTML " textarea.And now when you have that BBCode you can hide Links From Guest.Code: Select all
<a href="{URL}" id="guest" name="guest">{SIMPLETEXT}</a> <span name="guest" id="guest"> </span> <script> var lks = document.links; for(i=0; i<lks.length;i++){ if(lks[i].href.indexOf('mode=register')!=-1) { document.getElementsByTagName('A').guest.style.display="none"; document.getElementsByTagName('SPAN').guest.innerHTML="You must be a registered user to see links."; } else{ document.getElementsByTagName('A').guest.style.visibility="visible"; }} </script>
exampleLogged in user will see the linkCode: Select all
[hideurl=http://yahoo.com]Yahoo[/hideurl]
Guests will see this message "You must be a registered user to see links"
manic2 wrote:You can do it with a custom BBCode:-chien wrote:Here's what you need
Step 1.
Place this in the "BBCode usage" textarea.Step 2.Code: Select all
[hideurl={URL}]{SIMPLETEXT}[/hideurl]
Place this in the "HTML " textarea.And now when you have that BBCode you can hide Links From Guest.Code: Select all
<a href="{URL}" id="guest" name="guest">{SIMPLETEXT}</a> <span name="guest" id="guest"> </span> <script> var lks = document.links; for(i=0; i<lks.length;i++){ if(lks[i].href.indexOf('mode=register')!=-1) { document.getElementsByTagName('A').guest.style.display="none"; document.getElementsByTagName('SPAN').guest.innerHTML="You must be a registered user to see links."; } else{ document.getElementsByTagName('A').guest.style.visibility="visible"; }} </script>
exampleLogged in user will see the linkCode: Select all
[hideurl=http://yahoo.com]Yahoo[/hideurl]
Guests will see this message "You must be a registered user to see links"
Hi, Artuurins.Artuurins wrote:Is there any mod wich can do it ?
robra wrote:Hi, Artuurins.Artuurins wrote:Is there any mod wich can do it ?
You can hide automatically links and URL's for guest with the "Hide links for guest v 1.0.3" MOD, in page http://www.mssti.com/phpbb3/viewtopic.php?f=31&t=335, without to use the BBcode "Hide" to each message.
If you want hide e-mail address for guest too, then, you are will need to do some changes in code, on link upstairs. See how can you do that in page http://www.mssti.com/phpbb3/viewtopic.php?f=94&t=1331.
Only users registered could see the links, urls and e-mails address.
[ ]s.
Hi, Lana105.Lana105 wrote:
Your MOD is quite hard to understand for the beginners...
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="./contrib/modx.prosilver.en.xsl"?>
<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header>
<license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
<title lang="en"><![CDATA[MSSTI Hide links for guest]]></title>
<description lang="en"><![CDATA[This MOD change your posted links with a warning text, for guest.]]></description>
<author-notes lang="en"><![CDATA[
I found it and it looks like thisFind
Tip: This may be a partial find and not the whole line.
Add afterCode: Select all
$user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);
Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select all
// MOD : MSSTI Hide links - Start if ($user->data['user_id'] == ANONYMOUS) { $user_cache[$poster_id]['sig'] = hide_link($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], 'sig', 0, 0, $row['post_id']); } // MOD : MSSTI Hide links - End
Code: Select all
// End signature parsing, only if needed
if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed']))
{
$user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);
if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
{
$bbcode->bbcode_second_pass($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield']);
}
$user_cache[$poster_id]['sig'] = bbcode_nl2br($user_cache[$poster_id]['sig']);
$user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']);
$user_cache[$poster_id]['sig_parsed'] = true;
}
Code: Select all
{
$user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);