Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on May 18, 2006, 07:42:31 PM

Title: Registered Links
Post by: SMFHacks.com Team on May 18, 2006, 07:42:31 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=342)



Registered Links

By vbgamer45 (http://custom.simplemachines.org/mods/index.php?action=profile;u=24876)


Compatibility
Works with both SMF 2.1.X and SMF 2.0.x and SMF 1.1.x

Description
Allows you to stop guests from viewing links. Informs the guest to register or login.


New in version 3.0
Redid how the mod works completely.
Better hiding of links
Improved method of installation to fix mod compatibility issues.

Support Links
SMF Package Parser (http://sleepycode.com/PackageParser/)
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)
Title: Re: Registered Links
Post by: Skipdawg on May 18, 2006, 09:30:56 PM
It this added to the permissions or what?
Title: Re: Registered Links
Post by: vbgamer45 on May 18, 2006, 09:33:55 PM
No permissions just turns post links off for guests in posts. Informs them to register or login to view the links.
Title: Re: Registered Links
Post by: Skipdawg on May 18, 2006, 09:59:33 PM
kewlness sounds good  ;)
Title: Re: Registered Links
Post by: Skipdawg on May 19, 2006, 02:52:22 AM
Also note folks this affects the links in your signature line as well.
Title: Re: Registered Links
Post by: Vinspire on May 19, 2006, 12:44:51 PM
This mods sound good but if there is a screenshot of how this mods look like would be great  ;D ;D ;D :D
Title: Re: Registered Links
Post by: fiver on May 19, 2006, 12:55:43 PM
Hi vbgamer45,

Thanks for the fabulous mod. It will help prevent leaking of pagerank.

One suggestion, perhaps better to differentiate the message in red, in bracket and in a single line? For example:

The website you are looking for is [Please login or register to view this link.]
Title: Re: Registered Links
Post by: fiver on May 19, 2006, 12:58:57 PM
Hi Vinspire,

You can take a look here:
http://www.fivearts.net/index.php/topic,115.msg793.html#msg793
http://www.fivearts.net/index.php/topic,163.msg1039.html#msg1039


;D
Title: Re: Registered Links
Post by: vbgamer45 on May 19, 2006, 03:52:40 PM
Hmm if you want I could put rel="nofollow" on the links as well.
Title: Re: Registered Links
Post by: CeZa on May 19, 2006, 06:34:37 PM
wery good
thanks vbgamer45  ;)
Title: Re: Registered Links
Post by: fiver on May 19, 2006, 11:32:23 PM
Hi vbgamer45,

1. I thought Google will be guest and so it can't see the link. Therefore pagerank will not leak. I hope the logic is correct. But looking at the source code, it shows the URL within the div tags. Probably because there is still no href tag means there is no need to and no where to insert "nofollow"?

2. Would you put in your mod my suggestion for using red color, bracket and single line? If not, would you mind showing me where to make the changes in the package before installing it?

Thanks again for the great mod!

;)
Title: Re: Registered Links
Post by: vbgamer45 on May 19, 2006, 11:38:37 PM
I was thinking about maybe either putting a border around the registered links text or I can change the color to red or another color.
I would really like to stand out a little more so people actually notice they are missing the links.
Title: Re: Registered Links
Post by: Vinspire on May 20, 2006, 06:41:27 AM
Quote from: fivearts on May 19, 2006, 12:58:57 PM
Hi Vinspire,

You can take a look here:
http://www.fivearts.net/index.php/topic,115.msg793.html#msg793
http://www.fivearts.net/index.php/topic,163.msg1039.html#msg1039

;D

Nice site 5arts. I've check out ur site and set it as a bookmark but i still dont understand the Registered Links part ... Didn't notice any difference.
Title: Re: Registered Links
Post by: fiver on May 20, 2006, 07:26:00 AM
Hi Vinspire,

Glad you like my website.  :D

In the first demo, as a Guest you see this:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is You are not allowed to view links.
Register or Login"

When you login, as a Member you see the original post:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is www.hayhouse.com."

That is why I suggested to vbgamer45 to put the message in red, bracket and a single line so that it will stand out for the Guest to see:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is [Please Login or Register to view this link]"
Title: Re: Registered Links
Post by: Vinspire on May 20, 2006, 01:06:29 PM
Quote from: fivearts on May 20, 2006, 07:26:00 AM
Hi Vinspire,

Glad you like my website.  :D

In the first demo, as a Guest you see this:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is You are not allowed to view links.
Register or Login"

When you login, as a Member you see the original post:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is www.hayhouse.com."

That is why I suggested to vbgamer45 to put the message in red, bracket and a single line so that it will stand out for the Guest to see:

"... really am not sure whether it is availble in ebook  but you can check out on their site which is [Please Login or Register to view this link]"

Oh kewl. Now i got it :)
Title: Re: Registered Links
Post by: profile on May 23, 2006, 10:24:47 AM
which file and section do I need to edit to make the login/registration portion stand out?

feature request: option to enable/disable links for email address on post (mailto?)

Title: Re: Registered Links
Post by: vbgamer45 on May 23, 2006, 10:52:11 AM
You would need to edit subs.php but it would be easier to unistall and just edit the modfile reglinks.php and then reinstall.
Title: Re: Registered Links
Post by: profile on May 23, 2006, 08:27:49 PM
When I download reglinks.zip, there are three files: package-info.xml, ReadMe.txt and reglinks.xml

Sorry, where is reglinks.php located?
Title: Re: Registered Links
Post by: vbgamer45 on May 23, 2006, 08:49:53 PM
sorry meant reglinks.xml
Title: Re: Registered Links
Post by: profile on May 23, 2006, 10:00:12 PM
Two issues:

1- After I uninstalled, I tried to view as guest, but no links are visible.  Does that mean that it didn't uninstall cleanly?

2- I decided to install the package again, but when I applied the mod, it gives me the following error:

Execute Modification     ./Themes/default/languages/Modifications.english.php     Test successful
Execute Modification    ./Sources/Subs.php    Test failed

Please help.
Title: Re: Registered Links
Post by: vbgamer45 on May 23, 2006, 10:04:19 PM
Seems like you need to replace subs.php with the backup. Did you get any unistall errors?
Title: Re: Registered Links
Post by: aussieholden on May 24, 2006, 06:20:16 AM
QuoteTwo issues:

1- After I uninstalled, I tried to view as guest, but no links are visible.  Does that mean that it didn't uninstall cleanly?

2- I decided to install the package again, but when I applied the mod, it gives me the following error:

Execute Modification     ./Themes/default/languages/Modifications.english.php     Test successful
Execute Modification    ./Sources/Subs.php    Test failed

Please help.

I have the same problem but It has affected the links in the forums as they don't load the url typed instead loads a new blank window.
Title: Re: Registered Links
Post by: profile on May 24, 2006, 07:19:38 AM
Quote from: vbgamer45 on May 23, 2006, 10:04:19 PM
Seems like you need to replace subs.php with the backup. Did you get any unistall errors?

Is the subs.php backup the one named subs.php~?  If it is, it didn't seem to help.  There were no uninstall errors.
Title: Re: Registered Links
Post by: aussieholden on May 24, 2006, 08:36:57 AM
QuoteExecute Modification     ./Themes/default/languages/Modifications.english.php     Test successful
Execute Modification    ./Sources/Subs.php    Test failed

I got this with both Install and Uninstall like it wasn't RC2 compatable. ??
Title: Re: Registered Links
Post by: qtime on May 25, 2006, 03:30:43 AM
Thx it took some time to understand, but it it´s a great way to attract more registrated members to my board!!!
thank you very much for this mod.

Some nice features will be
visible for some boards and also usefull for different membercategories.
Title: Re: Registered Links
Post by: Gobo on May 25, 2006, 03:59:25 AM
oh thank u so much!!

this is great mod - i have been wanting this one for ages and ages and even asked a few times - thank u so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :'( (tears of joy)
Title: Re: Registered Links
Post by: aussieholden on May 26, 2006, 02:34:32 AM
Can I get some help here please members are getting irate that they can't click on other members weblinks in post's.
Title: Re: Registered Links
Post by: Skipdawg on May 26, 2006, 02:48:10 AM
Would it be to difficult to tweak it to where it would ignore links in the signature?
Title: Re: Registered Links
Post by: vbgamer45 on May 26, 2006, 11:38:19 AM
Quote from: aussieholden on May 26, 2006, 02:34:32 AM
Can I get some help here please members are getting irate that they can't click on other members weblinks in post's.
If you have no other mods. You can just download smf 1.1 rc2 and upload subs.php. Otherwise open reglinks.xml find the code for subs.php and update your subs.php with the orginal code.
Title: Re: Registered Links
Post by: husmen73 (Gulhin) on May 26, 2006, 12:24:14 PM
Super mod ;)

Thanks vbgamer45.
Title: Re: Registered Links
Post by: profile on May 26, 2006, 05:03:03 PM
Since I'm not a coder, I would like to ask if it's possible and how hard it would be to use it for all links (ftp link, email link, image link), not just hyperlink.
Title: Re: Registered Links
Post by: vbgamer45 on May 26, 2006, 08:53:05 PM
Not that hard just not sure how I would package that.

Title: Re: Registered Links
Post by: aussieholden on May 27, 2006, 04:04:00 AM
QuoteIf you have no other mods. You can just download smf 1.1 rc2 and upload subs.php. Otherwise open reglinks.xml find the code for subs.php and update your subs.php with the orginal code.

Got me lost on reglinks.xml were is this file.

I have a few mods installed.
Title: Re: Registered Links
Post by: Gobo on May 27, 2006, 07:24:24 AM
ok a few problems are arising

1. Signature links are disabled as well

2. If I place a link in the "user license agreement" to "forum rules" it gets disabled as well

>> I have my user license agreement like this:

By Registering An account on this site you agree to abide by the FORUM RULES <-----thats a link

But it dissapears if viewing as a guest

Apart from that its an awesome mod and I LOVE IT

Thank u so much
Title: Re: Registered Links
Post by: ivo2296 on June 05, 2006, 11:33:48 AM
Sounds very attractive but I'm using smf 1.0.7 - anything about it?
Title: Re: Registered Links
Post by: sysengr on June 22, 2006, 01:12:41 PM
I really need to get this mod off my web site.  Does anyone have anything specific on how to remove this mod cleanly and properly?

BTW:  This Mod does work fantastic and does exactly what it says.  It just needs an off button.

Vbgamer just sent me the answer I needed..  Thank you!!!

-=-=-=-
No option to turn it off.
If it just fails on modifications.english.php then you can saftely unistall it else you need to unistall it manually.
-=-=-=-
Title: Re: Registered Links
Post by: sysengr on June 22, 2006, 01:46:23 PM
My only error was the one about english, and I unstalled it.

Now SMF is not showing any links at all, (even as the Admin and logged in).  If you click modify a message, you can see the links, but they do not show up inthe saved forum display at all.  If you place the link in a [URL] it always goes to about:blank now.  I am dead in the water. 

Can anyone assist please?
Title: Re: Registered Links
Post by: sysengr on June 22, 2006, 01:59:19 PM
Nevermind...

I went ahead and also replaced my Subs.php file in my sources directory and all seems to be well.
Title: Re: Registered Links
Post by: Techdomain on June 25, 2006, 11:06:05 PM
I am having big problems with this... it has made all my links disappear, to guests and admin.

either that, or they redirect to the originating page, which is useless...

any help/thoughts would be good.
Title: Re: Registered Links
Post by: Badboy on June 26, 2006, 10:08:07 AM
Great mod vbgamer45...

I modified mod for ftp, email, flash and img...

And there was a problem with uninstall because of xml and i changed into mod file...

And make some changes to translate it simple

package-info.xml
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">

<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>vbgamer45:RegLinks</id>
<name>Registered Links</name>
<type>modification</type>
<version>1.0</version>

<install for="1.1 RC2">
<readme>ReadMe.txt</readme>
<modification type="file" format="boardmod">reglinks.mod</modification>
</install>

<uninstall for="1.1 RC2">
<modification format="boardmod" type="file" reverse="true">reglinks.mod</modification>
</uninstall>

</package-info>


reglinks.mod
<id>
vbgamer45:RegLinks
</id>

<version>
1.0
</version>

<author>
vbgamer45
</author>

<mod info>
vbgamer45
</mod info>

<edit file>
$languagedir/Modifications.english.php
</edit file>
<search for>
?>
</search for>
<add before>
//BEGIN Reg Links Text Strings
$txt['no_view_links'] = 'You are not allowed to view links.';
$txt['no_view_view'] = 'To view links';
$txt['no_view_register'] = 'Register';
$txt['no_view_or'] = 'or';
$txt['no_view_login'] = 'Login';
//END Reg Links Text Strings
</add before>

<edit file>
$sourcedir/Subs.php
</edit file>
<search for>
array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
</search for>
<replace>
array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a><div style="visibility:hidden">' : '<a href="$1">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' :  ' ($1)',
),
</replace>

<search for>
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
</search for>
<replace>
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),
</replace>
<search for>
array(
'tag' => 'ftp',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'ftp',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
</search for>
<replace>
array(
'tag' => 'ftp',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'ftp',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),
</replace>
<search for>
array(
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1">$1</a>',
// !!! Should this respect guest_hideContacts?
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'email',
'type' => 'unparsed_equals',
'before' => '<a href="mailto:$1">',
'after' => '</a>',
// !!! Should this respect guest_hideContacts?
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
</search for>
<replace>
array(
'tag' => 'email',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<a href="mailto:$1">$1</a>',
// !!! Should this respect guest_hideContacts?
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'email',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a><div style="visibility:hidden">' : '<a href="mailto:$1">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
// !!! Should this respect guest_hideContacts?
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),
</replace>
<search for>
array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),
</search for>
<replace>
array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => $user_info['is_guest'] ?  '' : '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => $user_info['is_guest'] ?  '' : '($1)',
),
</replace>
<search for>
array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),
</search for>
<replace>
array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '' . $txt['no_view_view'] . '&nbsp;<a href="' . $scripturl . '?action=register">' . $txt['no_view_register'] . '</a>&nbsp;' . $txt['no_view_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['no_view_login'] . '</a>' : ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => $user_info['is_guest'] ?  '' : '<a href="$1" target="_blank">$1</a>',
),
</replace>
Title: Re: Registered Links
Post by: bugsmi0 on July 21, 2006, 04:29:24 AM
what do you mean by turn post links off, is this the link to the post itself ? or are you refering to if someone  adds a URL link inside a post,  I was thinking this could prevent guest from viewing any link period, posts, topics, recent posts, etc
Title: Re: Registered Links
Post by: qtime on August 23, 2006, 01:05:46 PM
Any changes to get this great mod for SMF RC1.3?
Title: Re: Registered Links
Post by: vbgamer45 on August 23, 2006, 01:12:01 PM
Haven't tried yet. I will check it out later tonight.
Title: Re: Registered Links
Post by: vbgamer45 on August 23, 2006, 04:44:21 PM
Ok finished it ported to SMF 1.1 RC3
Title: Re: Registered Links
Post by: qtime on August 24, 2006, 12:10:41 AM
thx for the fast recoding :D
Title: Re: Registered Links
Post by: fledgling on August 24, 2006, 11:14:24 PM
I have a big problem with this mod right now.. help!. I installed your version 1.0 to SMF 1.1 RC3. I installed it before you made the changes to make it work with RC3. Anyways. I installed this mod, worked fine. Then I uninstalled it. Now links are not visible to anyone, registered or non-registered. When I go to edit a post with a link, I can see the link in the edit box but when the message is posted, the links are still hidden to everyone, including me the administrator. How do I fix this? Here's a thread in my board, virtually every post (except the first one) as at least one link to a photo album that's not visible now. http://www.unofficial-barcelo-maya.com/forum/index.php?topic=2619.0

thanks.
Title: Re: Registered Links
Post by: vbgamer45 on August 25, 2006, 09:20:13 AM
I think you need to reinstall a copy of your rc3 files. Check which files the mod edits and then just replace those.
Title: Re: Registered Links
Post by: fledgling on August 25, 2006, 10:20:14 AM
Ok, doable. Just so I don't replace two much, and since I'm brand new at this. Can you confirm that the only two files changed in this mod are Modifications.english.php and sourcedir/Subs.php?

I'll have to look and see where to find those. Thanks.
Title: Re: Registered Links
Post by: vbgamer45 on August 25, 2006, 10:25:01 AM
I am pretty sure subs.php is the file that causes the trouble.
Title: Re: Registered Links
Post by: fledgling on August 25, 2006, 10:45:20 AM
So I think I'm looking for

Quote<add><![CDATA[array(
            'tag' => 'iurl',
            'type' => 'unparsed_content',
            'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1">$1</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
         ),
         array(
            'tag' => 'iurl',
            'type' => 'unparsed_equals',
            'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1">',
            'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (substr($data, 0, 1) == \'#\')
                  $data = \'#post_\' . substr($data, 1);'),
            'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
            'disabled_after' => $user_info['is_guest'] ?  '' :  ' ($1)',
         ),]]></add>
and
Quote<add><![CDATA[         array(
            'tag' => 'url',
            'type' => 'unparsed_content',
            'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1" target="_blank">$1</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
         ),
         array(
            'tag' => 'url',
            'type' => 'unparsed_equals',
            'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
            'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
            'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
            'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
         ),]]></add>
and deleting those? Or is there more to it? I had problems with a subs file before and I don't want to replace it, caused a world of troubles, I'd rather edit the file. Thanks for your help so far.
Title: Re: Registered Links
Post by: vbgamer45 on August 25, 2006, 10:49:44 AM
I wouldn't delete that. I would use the old code before the <add> and use that code to replace it.
Title: Re: Registered Links
Post by: fledgling on August 25, 2006, 10:59:59 AM
ah. i see. Ok, I'll try it when i get home tonight and let you know how it goes.
Title: Re: Registered Links
Post by: vbgamer45 on August 25, 2006, 10:55:52 PM
I found out was causing the unistall problem. Seems that there is a bug in the package manager when unistalling bbc mods.
Title: Re: Registered Links
Post by: fledgling on August 25, 2006, 11:31:08 PM
cuz I wasn't able to resolve it by finding that code. I replaced it with an old version of my subs file, so now links are showing, but I can't manage my ads  >:( and I'm afraid to uninstall and reinstall my ad management mod.

Title: Re: Registered Links
Post by: qtime on August 26, 2006, 01:04:49 AM
just try it, your ad text will not be deleted.
I think your sub.php needs the modification of the add mod
but you can also add the code of the add mod manually to your sub.php file
<operation>
   <search position="before"><![CDATA[   loadLanguage('Admin');]]></search>
<add><![CDATA[   
loadLanguage('Ads');]]></add>
</operation>

<operation>
   <search position="before"><![CDATA[            'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',]]></search>
<add><![CDATA[
            'edit_addmod' => '<a href="' . $scripturl . '?action=admod">' . $txt['ad_management'] . '</a>',]]></add>
</operation>
</file>
Title: Re: Registered Links
Post by: fledgling on August 26, 2006, 01:16:13 AM
forgive me..

So I would put all that code.. exactly where? Before or after what?
Title: Re: Registered Links
Post by: qtime on August 26, 2006, 01:18:42 AM
plz hang on, I will copy and paste it from my own sub.php file
Title: Re: Registered Links
Post by: qtime on August 26, 2006, 01:45:24 AM
Your file should like this:
search for // Set up the administration sections.
// Set up the administration sections.
function adminIndex($area)
{
   global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $settings;

search for // Load the language and templates....
   // Load the language and templates....
   loadLanguage('Admin');   
loadLanguage('Ads');
   loadTemplate('Admin');

   // Admin area 'Configuration'.
   if (allowedTo('admin_forum'))
   {
      $context['admin_areas']['config'] = array(
         'title' => $txt[428],
         'areas' => array(
            'edit_mods_settings' => '<a href="' . $scripturl . '?action=featuresettings">' . $txt['modSettings_title'] . '</a>',
            'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',
            'edit_theme_settings' => '<a href="' . $scripturl . '?action=theme;sa=settings;th=' . $settings['theme_id'] . ';sesc=' . $sc . '">' . $txt['theme_current_settings'] . '</a>',
            'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',
            'edit_addmod' => '<a href="' . $scripturl . '?action=admod">' . $txt['ad_management'] . '</a>',
         )
      );
   }
Title: Re: Registered Links
Post by: 1milehi on August 26, 2006, 05:37:43 AM
i hope i'm not double posting about this but i am getting many error messages and need to know how to fix this.  i installed the mod but now it is generating this undefined index error message for lines 1345, 1351, 1607 and 1613.

guests are supposed to see:  "You are not allowed to view links" but that message is not showing up.  all they see is the "Register or Login" message.

i went to the subs.php file and located the "$txt['no_view_links'], but i do not know what to add or change to correct the errors.

please help.

thanks~
Title: Re: Registered Links
Post by: vbgamer45 on August 26, 2006, 09:17:39 AM
Check modifications.english and see if $txt['no_view_links'] is defined.
Title: Re: Registered Links
Post by: Gobo on August 26, 2006, 09:37:18 AM
hey any chance of extending the capabilities of this mod to do the following:

- Members cant post links unless they have X number of posts (can be enabled or disabled via admin panel)
Title: Re: Registered Links
Post by: vbgamer45 on August 26, 2006, 09:43:39 AM
Quote from: akulion on August 26, 2006, 09:37:18 AM
hey any chance of extending the capabilities of this mod to do the following:

- Members cant post links unless they have X number of posts (can be enabled or disabled via admin panel)
That's a little tricky to do it was kind of tough to get it to work for quests since it edits the bcc code and it just one big array of bbc info you can't really stick other code in between.
Title: Re: Registered Links
Post by: leoedin on August 26, 2006, 09:57:06 AM
Hi

I am trying to uninstall this, but it shows an error in the uninstall procedure:

1.     Execute Modification     .\Themes\default/languages/Modifications.english.php     Test failed

The other part works.

Title: Re: Registered Links
Post by: vbgamer45 on August 26, 2006, 09:59:21 AM
Don't worry about that part. It is a known problem with all mods that install to Modifications.english.php
Title: Re: Registered Links
Post by: leoedin on August 26, 2006, 10:18:33 AM
so if I click continue will it be OK?
Title: Re: Registered Links
Post by: leoedin on August 26, 2006, 10:48:44 AM
I clicked the "Uninstall" link, and now every link points to the page its on (eg /index.php?topic=xxx)

the link text appears fine when its modified, but when the link is parsed, it doesn't work...
Title: Re: Registered Links
Post by: vbgamer45 on August 26, 2006, 10:49:30 AM
Replace subs.php with the orginal subs.php.

BBC mods do  not uninstall correctly.
Title: Re: Registered Links
Post by: 1milehi on August 26, 2006, 03:32:14 PM
Quote from: vbgamer45 on August 26, 2006, 09:17:39 AM
Check modifications.english and see if $txt['no_view_links'] is defined.

the only thing in my mod.english.php file is this:

Quote<?php
// Version: 1.1 RC2; Modifications

?>
Title: Re: Registered Links
Post by: vbgamer45 on August 26, 2006, 03:46:08 PM
That's the problem then you need to enter to this into the file
Quote
//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings

before ?>

Title: Re: Registered Links
Post by: 1milehi on August 26, 2006, 05:04:47 PM
thank you very much!  :D
Title: Re: Registered Links
Post by: danifs on September 29, 2006, 12:41:55 PM
Hi guys!

i have merge

http://www.simplemachines.org/community/index.php?topic=88363.msg623867#msg623867
with
http://www.simplemachines.org/community/index.php?topic=88363.msg583336#msg583336

Now, the message shows in only one bold red line. I added support for http,ftp,mailto,image links and flash links. Look the screenshot

[img=http://img101.imageshack.us/img101/6135/reglinksuw7.th.png] (http://img101.imageshack.us/my.php?image=reglinksuw7.png)

As you can see i also added spanish support :-)

Thks to Badboy for the modification and vbgamer45 for the script.

Hope this would be useful for anyone.

Download here: http://rapidshare.de/files/34884688/reglinksME.zip.html

PD: sorry for my english

Title: Re: Registered Links
Post by: fiver on October 06, 2006, 01:15:15 AM
Hi danifs,

I now have my links giving different/correct notices like this:
[Register or Login to view this email address.]
[Register or Login to view this ftp link.]
[Register or Login to view this flash.]
[Register or Login to view this image.]
[Register or Login to view this link.]

Here are the codes I modified

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_email'] = ' to view this email address.';
$txt['no_view_ftp'] = ' to view this ftp link.';
$txt['no_view_flash'] = ' to view this flash.';
$txt['no_view_img'] = ' to view this image.';
$txt['no_view_link'] = ' to view this link.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>


The code change in Subs.php for Email will be
<search position="replace"><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1">$1</a>',
]]></search>
<add><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? '<span style="color: red">[<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' . $txt['no_view_email'] . ']</span>' : '<a href="mailto:$1">$1</a>',
]]></add>


I guess I should use style.css instead of inline style="color: red"... maybe another day. :P
Title: Re: Registered Links
Post by: URPG on November 01, 2006, 05:05:13 AM
*waiting for a better looking and RC3 version*
Title: Re: Registered Links
Post by: Gobo on November 01, 2006, 05:18:07 AM
Quote from: URPG on November 01, 2006, 05:05:13 AM
*waiting for a better looking and RC3 version*

from what i can tell it already works with RC3 - visit the mod page (http://mods.simplemachines.org/index.php?mod=342) and see it says RC3
Title: Re: Registered Links
Post by: salazarboy on November 03, 2006, 01:13:48 PM
Is there any way to make this mod work with version 1.0.9?
Title: Re: Registered Links
Post by: Pedja on November 30, 2006, 11:33:47 AM
A suggestion:

Instead of long message, mod should display short text like <login for link> and make it link which leads to detailed explanation why link is not available.

If link contains text, like in [ url=link]text[/url ], then, original text should be shown but link routed to an explaantion that link is not available and why.
Title: Re: Registered Links
Post by: Greek on December 17, 2006, 03:51:27 PM
What changes I have to do in last version for 1.1, in order the color of message to look like this?
http://www.simplemachines.org/community/index.php?topic=88363.msg755892#msg755892
Thanks
Title: Re: Registered Links
Post by: mgaidia on December 17, 2006, 04:59:21 PM
Quote from: fivearts on October 06, 2006, 01:15:15 AM
Hi danifs,

I now have my links giving different/correct notices like this:
[Register or Login to view this email address.]
[Register or Login to view this ftp link.]
[Register or Login to view this flash.]
[Register or Login to view this image.]
[Register or Login to view this link.]

Here are the codes I modified

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_email'] = ' to view this email address.';
$txt['no_view_ftp'] = ' to view this ftp link.';
$txt['no_view_flash'] = ' to view this flash.';
$txt['no_view_img'] = ' to view this image.';
$txt['no_view_link'] = ' to view this link.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>


The code change in Subs.php for Email will be
<search position="replace"><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1">$1</a>',
]]></search>
<add><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? '<span style="color: red">[<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' . $txt['no_view_email'] . ']</span>' : '<a href="mailto:$1">$1</a>',
]]></add>


I guess I should use style.css instead of inline style="color: red"... maybe another day. :P

Thanks!
I hope mod admin will integrate this in the next version :)
Title: Re: Registered Links
Post by: Greek on December 18, 2006, 05:04:33 AM
Quote from: Greek on December 17, 2006, 03:51:27 PM
What changes I have to do in last version for 1.1, in order the color of message to look like this?
http://www.simplemachines.org/community/index.php?topic=88363.msg755892#msg755892
Thanks

This is the original file that works with SMF 1.1 Final.
Any idea to how to do it to look like the above text in color?
Any help is appreciated  :)

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>vbgamer45:RegLinks</id>
<version>1.0</version>
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),]]></search>
<add><![CDATA[array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' :  ' ($1)',
),]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),]]></search>
<add><![CDATA[ array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),]]></add>
</operation>
</file>
</modification>
Title: Re: Registered Links
Post by: Greek on December 28, 2006, 10:48:34 AM
No one? :(
Title: Re: Registered Links
Post by: URPG on January 22, 2007, 06:45:02 AM
I'd like to have this for TP and SMF 1.1.1 but... it seems they gave up?
Title: Re: Registered Links
Post by: babjusi on January 22, 2007, 07:24:51 AM
Quote from: URPG on January 22, 2007, 06:45:02 AM
I'd like to have this for TP and SMF 1.1.1 but... it seems they gave up?

I got this mod running with SMF 1.1.1 and TP v0.9.7 and it works fine.
Cool mod by the way, vbgamer45
Title: Re: Registered Links
Post by: Shonick on January 22, 2007, 05:59:09 PM
how can I control this mod,If I want guest to see the link, but I don't want to uninstall this mod, how could I do that?
Title: Re: Registered Links
Post by: vbgamer45 on January 22, 2007, 06:28:17 PM
You would have to unistall the mod to do that.
Title: Re: Registered Links
Post by: Shonick on January 22, 2007, 06:34:44 PM
But I have many mods and I could not uninstall it?
Title: Re: Registered Links
Post by: vbgamer45 on January 22, 2007, 06:37:06 PM
Then you manually have to unistall it.
Title: Re: Registered Links
Post by: Shonick on January 22, 2007, 06:39:25 PM
could you tell me how to do it.thanks
Title: Re: Registered Links
Post by: joh87swe on January 31, 2007, 07:41:38 PM
In whish file can I translate "register or login" ?
Thx for the mod, perfect for me ^^
Title: Re: Registered Links
Post by: joh87swe on February 01, 2007, 03:02:29 AM
I arrived by my self.
But is it possible that this mod is applied just for one board? It would be greater if it hide links for guests only in one certain board of my forum.
Thx in advance!
Title: Re: Registered Links
Post by: vbgamer45 on February 01, 2007, 09:22:31 AM
Quote from: joh87swe on February 01, 2007, 03:02:29 AM
I arrived by my self.
But is it possible that this mod is applied just for one board? It would be greater if it hide links for guests only in one certain board of my forum.
Thx in advance!
Currently that is not posssible.
Title: Re: Registered Links
Post by: babjusi on February 01, 2007, 09:32:16 AM
I have to say that this mod is very useful. I have a couple of boards that I want to guests to see their contents but not the links, and thanks to this mod I now can
Title: Re: Registered Links
Post by: erkanisanmaz on February 04, 2007, 11:12:41 AM
thanks
http://www.sosyalbilgiler.biz
Title: Re: Registered Links
Post by: matasanos on February 12, 2007, 04:20:02 PM
it doesnt work with 1.1.2.
when i try to install it ...
it says...not defined installation actions..or something like that
Title: Re: Registered Links
Post by: vbgamer45 on February 12, 2007, 04:25:35 PM
Not updated for 1.1.2 yet. Waiting for mod site to add 1.1.2 support.
Title: Re: Registered Links
Post by: matasanos on February 12, 2007, 04:29:08 PM
o thanks vbgamer
i love your work

can you attach it here?

thanks
Title: Re: Registered Links
Post by: vbgamer45 on February 12, 2007, 05:06:19 PM
Mod updated for 1.1.2
Title: Re: Registered Links
Post by: URPG on February 13, 2007, 06:18:37 AM
That was quick, thanks!
Title: Re: Registered Links
Post by: perplexed on February 13, 2007, 07:00:31 AM
cool, this looks good.  Now I just have to fit it in with all the other mods I want lol
Title: Re: Registered Links
Post by: matasanos on February 13, 2007, 09:09:40 AM
it doesnt work for me trouhgt the Packages manager

can someone say me how to do it manually?

thanks
Title: Re: Registered Links
Post by: matasanos on February 13, 2007, 10:07:52 AM
ok
i do it
thanks
and translate the two words

thanks
Title: Re: Registered Links
Post by: Mayhem30 on February 20, 2007, 03:46:18 AM
Can anyone modify this so it will only hide the links within posts only?

I have paypal and know how to use it  :D
Title: Re: Registered Links
Post by: babjusi on February 20, 2007, 06:55:01 PM
There is a mod for what you are looking for, u can download it HERE (http://custom.simplemachines.org/mods/index.php?mod=118)
Title: Re: Registered Links
Post by: Mayhem30 on February 20, 2007, 08:23:37 PM
That's not quite what I was looking for.

I am willing to pay if someone can modify this to only work within posts.
Title: Re: Registered Links
Post by: babjusi on February 20, 2007, 08:24:51 PM
Why don''t you make a request here:

http://www.simplemachines.org/community/index.php?board=3.0
Title: Re: Registered Links
Post by: Mayhem30 on February 20, 2007, 09:40:54 PM
Thank you, I will do that.
Title: Re: Registered Links
Post by: URPG on February 21, 2007, 08:20:50 AM
Are you guys sure it is working with 1.1.2.? I tried to install it on 1.1.2. and TP.971 and got a

"The package you are trying to download or install is either corrupt or not compatible with this version of SMF." error.

Package was downloaded from simplemachines.org mod page
Title: Re: Registered Links
Post by: Hendricius on March 11, 2007, 01:03:05 PM
Yes same with me. Please fix this! Thanks!
Title: Re: Registered Links
Post by: Hendricius on March 12, 2007, 07:12:47 PM
No one can help ? :]
Title: Re: Registered Links
Post by: URPG on March 18, 2007, 07:02:22 AM
:-(
Title: Re: Registered Links
Post by: djpaddystudio7 on March 20, 2007, 11:38:36 AM
yup it dosent work for 1.1.2 . please update it . it is a wonderful mod to have .
Title: Re: Registered Links
Post by: babjusi on March 20, 2007, 04:53:07 PM
It should work with 1.1.2, I had a look at the mod info and there it said: Compatible With: 1.1 RC2, 1.1 RC3, 1.1, 1.1.1, 1.1.2  
Title: Re: Registered Links
Post by: djpaddystudio7 on March 21, 2007, 12:56:04 AM
but the package manager says it is not compatible with this version(1.1.2) of smf.
if it can be done manualy then plz tell me how to do it  
Title: Re: Registered Links
Post by: Hendricius on March 23, 2007, 09:13:25 AM
I did it manually. The porblem is, now vevery Guest recieves an error when entering the Forum. Well it is not seen but my Logs are growing by 5000 Pages a day hehe.
Title: Re: Registered Links
Post by: jaankaash on March 24, 2007, 05:07:08 AM
PLz explain how i install it plz i m new in smf
Title: Re: Registered Links
Post by: matasanos on March 24, 2007, 02:15:56 PM
i installed it some time ago in my smf 1.1.2 manually

open the xml and see the changes.......all you need to do is said there
Title: Re: Registered Links
Post by: vbgamer45 on March 24, 2007, 02:30:26 PM
Hmm seems I forgot to update the package-info.xml for 1.1.2
File updated should install for SMF 1.1.2 now.
Title: Re: Registered Links
Post by: dDOTr2 on March 27, 2007, 06:29:19 AM
great mod. going to install this on my 1.1.2 board. thanks 
Title: Re: Registered Links
Post by: Photoshocker on April 01, 2007, 01:52:59 PM
Is there any way to hide also the [IMG] tags?
Title: Re: Registered Links
Post by: joh87swe on April 02, 2007, 02:01:40 PM
Is it possible to only have this mod for a certain board in my forum?
Title: Re: Registered Links
Post by: vbgamer45 on April 02, 2007, 07:36:05 PM
No it affects all bbc code links everywhere.
Title: Re: Registered Links
Post by: Bithunter on April 23, 2007, 12:28:59 PM
I need to hide links only in posts, not in news, signatures, etc.
It´s possible?
Title: Re: Registered Links
Post by: vbgamer45 on April 23, 2007, 07:49:38 PM
Currently not possible it does all links.
Title: Re: Registered Links
Post by: texasflats on May 03, 2007, 06:20:16 PM
Is it possible to make this work for images? (fingers crossed)
Title: Re: Registered Links
Post by: vbgamer45 on May 03, 2007, 07:56:26 PM
Would require code.
Title: Re: Registered Links
Post by: bodyboard_jerez on May 26, 2007, 12:52:58 PM
Quote from: texasflats on May 03, 2007, 06:20:16 PM
Is it possible to make this work for images? (fingers crossed)

Of course... Please, check it here:

http://www.simplemachines.org/community/index.php?topic=164286.0

See you !!
Title: Re: Registered Links
Post by: Xiphi on May 28, 2007, 05:53:43 AM
how can i remove this "loging or register".
Title: Re: Registered Links
Post by: babjusi on May 29, 2007, 04:46:20 AM
Quote from: Xiphi on May 28, 2007, 05:53:43 AM
how can i remove this "loging or register".

Why would you want to remove them? I think those 2 words are the whole point of the mod
Title: Re: Registered Links
Post by: Xiphi on June 02, 2007, 12:15:10 PM
Quote from: babjusi on May 29, 2007, 04:46:20 AM
Quote from: Xiphi on May 28, 2007, 05:53:43 AM
how can i remove this "loging or register".
Why would you want to remove them? I think those 2 words are the whole point of the mod
because these are in the 2nd line and a <br/> after that, turns the whole message to chaos.
Title: Re: Registered Links
Post by: AllMassive on June 26, 2007, 08:42:06 AM
Could you tweak this plugin to be 'more multilang' ?

You do most of the Changes  to the Subs.php - including the 'Register'+'Login', so its pretty hard to apply it to Multilang-Forums.

Could you use some Variables instead ?
Title: Re: Registered Links
Post by: vbgamer45 on June 26, 2007, 08:55:22 AM
In this case I would recommend just editing the mod directly and changing the text to another language.
Title: Re: Registered Links
Post by: L'AltroWeb on June 27, 2007, 12:42:19 AM
Quote from: Xiphi on June 02, 2007, 12:15:10 PM
Quote from: babjusi on May 29, 2007, 04:46:20 AM
Quote from: Xiphi on May 28, 2007, 05:53:43 AM
how can i remove this "loging or register".
Why would you want to remove them? I think those 2 words are the whole point of the mod
because these are in the 2nd line and a <br/> after that, turns the whole message to chaos.
Edit Subs.php and find: (4 time)
? $txt['no_view_links'] . "\n" . '
now modify to:
? $txt['no_view_links'] . "&nbsp;" . '
to view on single line ;)
-
I have instead another small problem,
if i have a link like this
test www.google.it ok
i see test *You are not allowed to view links* Register or Login ok
Instead if i have test http://www.google.it ok
i see:
test
*You are not allowed to view links* Register or Login
ok
how i can fix this small bug?
Another (very noob) questions:
I have modify
Login or register with <font color="#FF0000">Login</font> ecc...
How i can set a blue color for $txt['no_view_links'] ???
See this post for example
http://darkwolf.altervista.org/forum/index.php?topic=27.msg98#msg98  ;)
Thanks  :) (and sorry for my bad english  :-[ )
Title: Re: Registered Links
Post by: AllMassive on July 01, 2007, 05:53:11 PM
Quote from: vbgamer45 on June 26, 2007, 08:55:22 AM
In this case I would recommend just editing the mod directly and changing the text to another language.

Sure - but this only works for one language.
I do have more on my Board  :'(
Title: Re: Registered Links
Post by: johny000 on July 11, 2007, 12:42:55 AM
hello evreyone
i nstall  Registered Links mod is Nice But i'm looking For if
there is any way to Registered Links only the ed2k links not all the links ?

can  any one help plezzz
Title: Re: Registered Links
Post by: johny000 on July 12, 2007, 01:47:10 PM
hello guys i need help

I'm using smf 1.1.3
i nstall Registered Links & it disable all the links .
so Uninstall
but is still telling me You are not allowed to view links.
Register or Login

How do i take this thing of pleas help

i have all this mods
Mod Name Version
1. Youtube Field by Alan S 1.0 [ Uninstall ] [ List Files ] [ Delete ]
2. Youtube Field by Alan S 1.0 [ Uninstall ] [ List Files ] [ Delete ]
3. YouTube BBC Tag (XHTML Compliant) 1.0 [ Uninstall ] [ List Files ] [ Delete ]
4. ed2k links support 2.4 [ Uninstall ] [ List Files ] [ Delete ]
5. YouTube BBC Tag (XHTML Compliant) 1.2 [ Uninstall ] [ List Files ] [ Delete ]
6. SMF Shoutbox 1.16 [ Uninstall ] [ List Files ] [ Delete ]
7. BBC-Google for SMF 1.1.2 (ver. 2.5.2) 2.5.2 [ Uninstall ] [ List Files ] [ Delete ]
8. Use [color] Tags in Mod 1.0 [ Uninstall ] [ List Files ] [ Delete ]
9. Color Bar 2.0 [ Uninstall ] [ List Files ] [ Delete ]
10. Member Color Link 2.0.0 [ Uninstall ] [ List Files ] [ Delete ]
11. AvatarSelect 1.1.2 [ Uninstall ] [ List Files ] [ Delete ]
12. Gravatar 0.1 [ Uninstall ] [ List Files ] [ Delete ]
13. Avatars at Index Mod 1.4 [ Uninstall ] [ List Files ] [ Delete ]
14. Country Flags 1.0.1 [ Uninstall ] [ List Files ] [ Delete ]
15. Enhanced Quick Reply TBA [ Uninstall ] [ List Files ] [ Delete ]
16. Registered Links 1.0 [ Apply Mod ] [ List Files ] [ Delete ]
17. cbi, 1.0 1.0 [ Uninstall ] [ List Files ] [ Delete ]
18. User Control Panel By Alan S 1.1 [ Uninstall ] [ List Files ] [ Delete ]
19. Increase/Decrease Postbox Size 1.0 [ Uninstall ] [ List Files ] [ Delete ]

pleas help
Title: Re: Registered Links
Post by: johny000 on August 04, 2007, 01:23:30 AM
hello can any one tell me what shod i do
Title: Re: Registered Links
Post by: TrueSatan on August 04, 2007, 07:43:29 AM
It would appear that your uninstallation of this mod may have been incomplete. Please reverse the process of a manual installation editing your files as needed to fully remove the mod.

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)


Title: Re: Registered Links
Post by: RAV TUX on August 12, 2007, 07:32:25 AM
Help I need help removing this mod completely......great mod it does what it does when you want it....but now I can't stop it....I removed it and it is still doing the same thing...please help I read this whole thread and feel like my eyes are going to pop out of my head now.....I have been up all night....can someone please tell me in very simple terms how to get this mod completely off my forum....please help
Title: Re: Registered Links
Post by: TrueSatan on August 12, 2007, 11:42:10 AM
 My posting immediately above your last one does exactly what you ask...follow the links for the information you require.
Title: Re: Registered Links
Post by: elnayfi on November 09, 2007, 03:21:55 AM
i'm facing some errors on my joomla main page, the mod works fine in the forum but it shows me these errors on the main page when a new user or an user wants to login
my site (http://www.freemenclan.com/sity/)
thanks in advance
Notice: Undefined index: no_view_links in /home/freemenc/public_html/forums/Sources/Subs.php on line 1313

Notice: Undefined index: no_view_links in /home/freemenc/public_html/forums/Sources/Subs.php on line 1319

Notice: Undefined index: no_view_links in /home/freemenc/public_html/forums/Sources/Subs.php on line 1575

Notice: Undefined index: no_view_links in /home/freemenc/public_html/forums/Sources/Subs.php on line 1581
Title: Re: Registered Links
Post by: vbgamer45 on November 16, 2007, 12:51:55 AM
Ah I get its a missing text string

Open  themes/default/language/modifications.english.php
Add this code

//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings

Repeat for every themes/default/language/modifications.*.php
Title: Re: Registered Links
Post by: U1NO on November 19, 2007, 08:32:37 PM
hi, i'm trying to use this mod in smf 1.1.4 and it's not working. Is it working on this version or (if not) is there something similar to this?? thanks
Title: Re: Registered Links
Post by: SONSiVRi on November 20, 2007, 10:49:23 AM
Quote from: Gobo on August 26, 2006, 09:37:18 AM
hey any chance of extending the capabilities of this mod to do the following:

- Members cant post links unless they have X number of posts (can be enabled or disabled via admin panel)

I have done it, I mixed up this code: http://www.simplemachines.org/community/index.php?topic=25533.msg200724#msg200724
I check post based group membership of user in order to do it.

Just change $user_info['is_guest']

with this (8 occurrences)
$user_info['is_guest'] || in_array(4, $user_info['groups'])
4 is the group ID that you will restrict.
Title: Re: Registered Links
Post by: SONSiVRi on November 20, 2007, 10:49:58 AM
Quote from: ususariopin on November 19, 2007, 08:32:37 PM
hi, i'm trying to use this mod in smf 1.1.4 and it's not working. Is it working on this version or (if not) is there something similar to this?? thanks

Its working on 1.1.4, where you get the error?
Title: Re: Registered Links
Post by: U1NO on November 20, 2007, 05:02:03 PM
It doesn't let me apply it and when I try to upload the plugin it doesn't say that it was successfully applied. (I'm not using the default theme) If there's another plugin i could try please tell me. Thanks
Title: Re: Registered Links
Post by: TrueSatan on November 20, 2007, 05:41:03 PM
Firstly are you installing the mod via the SMF Package Manager...simply uploading to your server will not install into SMF? Secondly almost no mods install into custom themes automatically...and anything bar the SMF default theme is a custom theme...you have to manually install mods into custom themes.

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
Title: Re: Registered Links
Post by: U1NO on November 20, 2007, 07:39:56 PM
Thank you for the advice, now i'm doing the manual installation, but in this case i have to add the code without replacing anything, right?

  <version>1.0</version>
- <file name="$languagedir/Modifications.english.php" error="fatal">
- <operation error="fatal">
- <search position="after" regexp="false" whitespace="exact">
- <![CDATA[ ?>
  ]]>
  </search>
- <add>
- <![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings   

after doing this i have to upload the plugin to my server manually or using the smf upload manager?? and after that what is next??  ::)
Title: Re: Registered Links
Post by: U1NO on November 20, 2007, 10:22:40 PM
OK! Thank you very much, finally i could install it  ;)
Is it possible to add the restriction to the [ code]  [/ code] tags too??
Title: Re: Registered Links
Post by: SONSiVRi on November 21, 2007, 12:55:33 PM
Quote from: ususariopin on November 20, 2007, 10:22:40 PM
OK! Thank you very much, finally i could install it  ;)
Is it possible to add the restriction to the [ code]  [/ code] tags too??

nope you cant.
Forum engine will block even user signature, link between (code) tag...
It wont block if notation is like h**p:// hxxp://
Title: Re: Registered Links
Post by: U1NO on November 21, 2007, 04:08:12 PM
One more thing... how can i put the text in red color??  :-\
Title: Re: Registered Links
Post by: U1NO on November 22, 2007, 12:25:04 PM
anyone???
Title: Re: Registered Links
Post by: SONSiVRi on November 23, 2007, 04:23:27 AM
Quote from: ususariopin on November 21, 2007, 04:08:12 PM
One more thing... how can i put the text in red color??  :-\

$txt['no_view_links'] = '<span style="color: red;">You are not allowed to view links, check the Announcements Board</span>';
Title: Re: Registered Links
Post by: U1NO on November 23, 2007, 09:24:49 AM
thank you very much  ;) /(where should i put the code??) // have you noticed that when an URL is under code tags the plugin doesn't work on those links? Or it's not working only to me?
Title: Re: Registered Links
Post by: SONSiVRi on November 24, 2007, 08:30:00 AM
Quote from: ususariopin on November 23, 2007, 09:24:49 AM
thank you very much  ;) /(where should i put the code??) // have you noticed that when an URL is under code tags the plugin doesn't work on those links? Or it's not working only to me?

./Themes/default/languages/Modifications.english.php

$txt['no_view_links'] = '<span style="color: red;">You are not allowed to view links, check the Announcements Board</span>';


and I noticed URL's arent blocking in CODE tag. I remember I saw its blocked but it seems I am wrong.
Title: Registered Links with Permission
Post by: SONSiVRi on November 24, 2007, 10:19:52 AM
I have modified this Mod according to Permission Based control.
I added Global Board Permission as it seems in attached image (ss1.jpg)
If you use Local Permissions for Boards you can allow viewing of links board by board.
Default value is nobody can see any links, you need to turn on for allowed membergroups.

Before install this one you need to uninstall prior version of this mod.

These files will be modified (0777 CHMOD)

./Themes/default/languages/Modifications.english.php
./Themes/default/languages/ManagePermissions.english.php
./Themes/default/languages/Errors.english.php
./Sources/Subs.php
./Sources/ManagePermissions.php


Listing of http notation releated to URL blocking is attached image  (ss2.jpg)

Mod file is attacked name is "reglinks_2.zip"

"vbgamer45" if you implement this changes into your original mod please include my name also as I entered in this mod.
Title: Re: Registered Links
Post by: Mr_Z on November 29, 2007, 05:52:28 PM
Hi is there anyway to disable this for signatures?

Thanks
Title: Re: Registered Links
Post by: SONSiVRi on December 07, 2007, 02:08:58 PM
Quote from: Mr_Z on November 29, 2007, 05:52:28 PM
Hi is there anyway to disable this for signatures?
Thanks

I am done it.
Signature and post contents are differently checking by the "users permission".
If user isnt allowed to view links, only "post" content blocking not "signature" "personal message" ....

Its a little bit problematic. I changed the BBC code parsing mechanism and I am not sure its secure. So I cant post it till I am sure of it.
Title: Re: Registered Links
Post by: scorpion92 on January 31, 2008, 11:27:38 AM
   
As installed?

Greetings.
Title: Re: Registered Links
Post by: john34516 on February 03, 2008, 03:44:30 AM
i want to hide code tag from guests

is that possible??
Title: Re: Registered Links
Post by: vbgamer45 on February 03, 2008, 09:56:17 PM
Not with this mod.
Title: Re: Registered Links
Post by: foxdie on March 24, 2008, 10:12:57 PM
hi, it say on the download page its compatible with 1.1.4 too but when i try to install it from the admin cp from the forum it gives me this error:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


along with these Install Actions result:

1.     Execute Modification     reglinks.xml     Modification parse error
2.    Execute Modification    -    Modification parse error

i have no idea what this means, i am thinking its not for v1.1.4 but i dont know

can anyone help?
Title: Re: Registered Links
Post by: vbgamer45 on March 24, 2008, 10:26:15 PM
It works for 1.1.4
You will need to do a manual install
Upload the package to http://www.smfhacks.com/smf-package-parser.html and follow the instructions.
Title: Re: Registered Links
Post by: foxdie on March 25, 2008, 10:23:04 AM
okay ive did what it said on that page, changing the codes with the ones neccessary and upload the php files overwriting the original ones...but i have this error now:

Parse error: syntax error, unexpected T_IF, expecting ')' in /www/freebiehost.net/f/o/x/foxdie/htdocs/forum/Sources/Subs.php on line 1599


when i chack that line in Subs.php this is whats there:



   (line 1598)   // This is mainly for the bbc manager, so it's easy to add tags above.  Custom BBC should be added above this line.
   (line 1599)   if ($message === false)



i dont understand why "if ($message === false)" code giving an error
Title: Re: Registered Links
Post by: foxdie on March 25, 2008, 10:49:48 AM
well, i forgot to mention, it gave me this error first:

Parse error: syntax error, unexpected ';', expecting ')' in /www/freebiehost.net/f/o/x/foxdie/htdocs/forum/Sources/Subs.php on line 1596


so i edited that line and deleted the ";" from there...(its the last line):


array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Uye</a>&nbsp;olun&nbsp;veya&nbsp;<a href="' . $scripturl . '?action=login">Giris</a>&nbsp;yapin' : '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Uye</a>&nbsp;olun&nbsp;veya&nbsp;<a href="' . $scripturl . '?action=login">Giris</a>&nbsp;yapin<div style="visibility:hidden">' : '<a href="$1" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),
array(
'tag' => 'u',
'before' => '<span style="text-decoration: underline;">',
'after' => '</span>',
),
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),
);




after that it gave me the error in my previous post

Title: Re: Registered Links
Post by: foxdie on March 27, 2008, 10:04:27 AM
no ones gonna help?
Title: Re: Registered Links
Post by: foxdie on March 27, 2008, 08:46:28 PM
wow, all those posts but none cares to check this thread out and help..
Title: Re: Registered Links
Post by: foxdie on April 26, 2008, 01:48:06 AM
Quote from: Gobo on August 26, 2006, 09:37:18 AM
hey any chance of extending the capabilities of this mod to do the following:

- Members cant post links unless they have X number of posts (can be enabled or disabled via admin panel)

just for the record, i am also looking for something like this too
Title: Re: Registered Links
Post by: holly.celeb.fan on April 26, 2008, 04:42:33 AM
Nice mod working fine..
Title: Re: Registered Links
Post by: 123kid on April 27, 2008, 07:30:47 PM
Mod works really great thanks for this :) but its not hiding BB CODES for guest :(

Is there a MOD to hide BB CODES for guest [ CODE ]  [ /CODE ]

TIA!!!
Title: Re: Registered Links
Post by: foxdie on April 27, 2008, 09:46:35 PM
i think you should add something like this to Subs.php


array( 'tag' => 'code', 'type' => 'unparsed_content', 'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1">$1</a>', 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), ), array( 'tag' => 'icode', 'type' => 'unparsed_equals', 'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1">', 'after' => $user_info['is_guest'] ? '</div>' : '</a>', 'validate' => create_function('&$tag, &$data, $disabled', ' if (substr($data, 0, 1) == \'#\') $data = \'#post_\' . substr($data, 1);'), 'disallow_children' => array('email', 'ftp', 'url', 'iurl', 'code'), 'disabled_after' => $user_info['is_guest'] ? '' : ' ($1)', ),



notice the
array (
'tag' => 'code',
'type' => 'unparsed_content',

and the

array('email', 'ftp', 'url', 'iurl', 'code')

in the code above

im thinking that might work i dunno
so dont do anything yet til someone who knows how to do it replies

for me, i just wanna see if i got it right or not :)
Title: Re: Registered Links
Post by: hoo on April 27, 2008, 10:00:38 PM
where exactly write in this mod to change 'REGISTER' to 'Please register'(colored in green,bold, and font verdana), and also want change the same 'LOGIN' to Please login'.
Title: Re: Registered Links
Post by: foxdie on April 27, 2008, 10:12:19 PM
its in Subs.php

and you can use this to change color,font, whatever:


<span style="color: green;"> </span>


Title: Re: Registered Links
Post by: hoo on April 27, 2008, 10:34:17 PM
tell me where exactly add this to change view of this text, cause 'Login' i see 4 positions......
Title: Re: Registered Links
Post by: foxdie on April 29, 2008, 06:07:44 AM
thats right, you change all 4 of em
Title: Re: Registered Links
Post by: ALEJO on April 30, 2008, 01:51:01 PM
can u update this to 2.0 plz? thx
Title: Re: Registered Links
Post by: vbgamer45 on April 30, 2008, 08:21:59 PM
Waiting for SMF 2.0 to release then will update the mods.
Title: Re: Registered Links
Post by: Ikhsan4488 on May 01, 2008, 02:59:15 PM
can i use this mod for smf 1.1.5?
Title: Re: Registered Links
Post by: KameL on May 29, 2008, 09:20:18 PM
Hi, i just installed this mod, and it works great... but i want to hide all the ED2K (eMule) links too. There's a way to do this?
Thanks
Title: Re: Registered Links
Post by: OblivionMage on June 01, 2008, 05:57:55 PM
I get this when I try to uninstall;
   Type     Action     Description
1.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed
2.    Execute Modification    ./Sources/Subs.php    Test successful

1.1.5 Mystic Jade theme
Title: Re: Registered Links
Post by: KameL on June 02, 2008, 10:40:42 AM
Quote from: KameL on May 29, 2008, 09:20:18 PM
Hi, i just installed this mod, and it works great... but i want to hide all the ED2K (eMule) links too. There's a way to do this?
Thanks
Please, Someone can help me with that? I really need it :(
Title: Re: Registered Links
Post by: searchgr on June 16, 2008, 05:19:47 AM
Quote from: OblivionMage on June 01, 2008, 05:57:55 PM
I get this when I try to uninstall;
   Type     Action     Description
1.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed
2.    Execute Modification    ./Sources/Subs.php    Test successful

1.1.5 Mystic Jade theme

Same error here. Can someone help?
Title: Re: Registered Links
Post by: searchgr on June 20, 2008, 10:55:40 AM
Quote from: leoedin on August 26, 2006, 09:57:06 AM
Hi

I am trying to uninstall this, but it shows an error in the uninstall procedure:

1.     Execute Modification     .\Themes\default/languages/Modifications.english.php     Test failed

The other part works.



This guy had the same problem here: http://www.simplemachines.org/community/index.php?topic=88363.msg699784#msg699784

I don't understand how he had solved it.
Title: Re: Registered Links
Post by: vbgamer45 on June 21, 2008, 11:53:24 AM
You can just add the entires manually to that file

Or find ?> inside the file and make sure it is on its own line.
Title: Re: Registered Links
Post by: searchgr on June 21, 2008, 01:12:07 PM
This is what i don't understand.

Why i have to add these entries? I want to uninstall the mod, not to install it.

//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings

Title: Re: Registered Links
Post by: vbgamer45 on June 21, 2008, 01:36:59 PM
Then just uninstall the mod and remove those entires from that file manually.
Title: Re: Registered Links
Post by: searchgr on June 21, 2008, 01:46:26 PM
ok, thanks, i will try.
Title: Re: Registered Links
Post by: xstocler on July 08, 2008, 02:41:29 PM
Hello,

I am using in my MOD's forum 2.

Images Registered - 2.1
Registered Links - 1.0

I would like to release the blocking of links and images in just 1 (one) topic.

How can I do that?
Title: Re: Registered Links
Post by: runebergen on August 04, 2008, 08:31:33 PM


Anyone figured out a way to make it work ONLY for posts?

And not at siggs, profile pages and so on...

Would love it, if it only where for posts  :)
Title: Re: Registered Links
Post by: SONSiVRi on August 05, 2008, 04:26:04 PM
Quote from: runebergen on August 04, 2008, 08:31:33 PM


Anyone figured out a way to make it work ONLY for posts?

And not at siggs, profile pages and so on...

Would love it, if it only where for posts  :)

I remember I have done this, its was working on my forum.
I am not blocking links anymore so I cant remember it.
If you need badly, I can check the codes.
Title: Re: Registered Links
Post by: runebergen on August 05, 2008, 06:16:25 PM
Quote from: SONSiVRi on August 05, 2008, 04:26:04 PM
Quote from: runebergen on August 04, 2008, 08:31:33 PM


Anyone figured out a way to make it work ONLY for posts?

And not at siggs, profile pages and so on...

Would love it, if it only where for posts  :)

I remember I have done this, its was working on my forum.
I am not blocking links anymore so I cant remember it.
If you need badly, I can check the codes.

Would love to see the code if you have a chance :)
Title: Re: Registered Links
Post by: SONSiVRi on August 06, 2008, 06:35:27 PM
Quote from: runebergen on August 05, 2008, 06:16:25 PM
Would love to see the code if you have a chance :)

Here is 3 changed files report.
Its easy to understand what I did.
I also implemented codes in subs.php cause of increasing speed (for prevents second time arrays creating and etc...)
Title: Re: Registered Links
Post by: runebergen on August 06, 2008, 07:53:37 PM

Thanks a lot  :D :D

Really nice of you...

I'll look into how you solved....

:)
Title: Re: Registered Links
Post by: SONSiVRi on August 07, 2008, 03:15:40 AM
Please gimme feedback, maybe I ripped incomplete codes.
Title: Re: Registered Links
Post by: KameL on August 07, 2008, 06:05:26 AM
There is a way to bind the ED2K links for the guest using this mod?
Title: Re: Registered Links
Post by: TaX on September 15, 2008, 11:55:45 PM
HHHiii buddy!!!!  :D I install them in my smf 1.1.6 and works amazing!!!!!! :) Thanx's very much!!!  O:)
I'm having a question in mind (X i have a few images(Thumbnail) linked to Imageshack (Real size) for example  >:( but they say forbidden for guest (Register or login) I wanna know if you can please know a way for change this!? :) Maybe modyfing the mod or something like that!? :D Thanx's you VERY much in advance
Title: Re: Registered Links
Post by: SONSiVRi on September 17, 2008, 07:05:21 AM
It was long time ago and I dont remember correctly, but I believe you can disable for IMG tags and your guests can view imageshack links. Check my attached reports file 5 posts above, it may helped.
Title: Re: Registered Links
Post by: baijianpeng on September 29, 2008, 09:30:49 AM
I tested this Mod today on SMF 1.1.6, it worked well.

But I have two suggestions:

1. Please move the Register and Login text and their link to the Language file, so that we can translate these words and put custom Links. Because sometimes when my SMF was bridged into Joomla!, the Register and Login links may change, not the same as your preset ones.

2. Put the warning/informing text generated by this Mod in a box with dashed border and special background color, I mean, seperate/distinguish it from the original post texts, so the visitor will understand that is a system message, not part of the post.

Thanks.
Title: Re: Registered Links
Post by: SONSiVRi on September 29, 2008, 06:14:52 PM
Quote from: baijianpeng on September 29, 2008, 09:30:49 AM
I tested this Mod today on SMF 1.1.6, it worked well.

But I have two suggestions:

1. Please move the Register and Login text and their link to the Language file, so that we can translate these words and put custom Links. Because sometimes when my SMF was bridged into Joomla!, the Register and Login links may change, not the same as your preset ones.

2. Put the warning/informing text generated by this Mod in a box with dashed border and special background color, I mean, seperate/distinguish it from the original post texts, so the visitor will understand that is a system message, not part of the post.

Thanks.

First one isn't already running like you offered?
I checked original mod file and there is $txt['no_view_links'] entry located in "$languagedir/Modifications.english.php".is doint what you said.
Am I missing something?
Title: Re: Registered Links
Post by: baijianpeng on September 29, 2008, 06:50:14 PM
To SONSiVRi :

Did you find the word Register and Login was not coded to be inserted into the language file in the original Mod file? This is my point. I want to also translate the Register and Login word, and I want to define them with different links.
Title: Re: Registered Links
Post by: SONSiVRi on September 30, 2008, 11:02:00 AM
Quote from: baijianpeng on September 29, 2008, 06:50:14 PM
To SONSiVRi :

Did you find the word Register and Login was not coded to be inserted into the language file in the original Mod file? This is my point. I want to also translate the Register and Login word, and I want to define them with different links.

I claim "words" are already moved into language file. At least my mod is. Maybe I changed downloaded mod file and Its not original anymore.
Title: Re: Registered Links
Post by: baijianpeng on September 30, 2008, 07:39:33 PM
Yes, you may hacked that yourself. I checked the Mod file which was downloaded yestoday, those Words is not preset to appear in the language file.

Could please allow me to share your hacked file?

Thanks.
Title: Re: Registered Links
Post by: chaky! on October 01, 2008, 03:12:08 PM
Hi,

first at all, my english sucks...

vbgamer45,  can you tell me how use de registerd links and TrimUrl togheter? becuase them edit the same part of code on the file Subs.php...

please helpme...

Thxz
Title: Re: Registered Links
Post by: Frozt on October 07, 2008, 01:02:47 PM
If possible add a conditional so if the links are urls that link to other part of my site and another 2 specific sites the guest can see the link without login?

Im rebuilding all my site and forum to upload to other hosting, my site is dedicated to guides about an open source project and support about it in spanish, and have the forum in a subdomain, and the site in the domain with articles, guides and news, and users of the forum and me post urls of the articles of my site and the site of the open source project, so I would like that this links appear for guest

I think that with a condicional in the code of subs.php could be but I dont know how to do it.

if this is possible this will help me a lot and sure to others that need something like this. I want this mod for prevent users that register only for post urls of his sites and some of they post urls that I dont want be posted in my forum
Title: Re: Registered Links
Post by: Frozt on October 07, 2008, 01:51:20 PM
Another question  :)

I like the format that appear at the start of the topic:

[Please Login or Register to view this link]

Im trying to modify the code for have the same format, I try with the next changes but Im not sure if are correct:



First I add the translation to the language files, I divide it in 3 parts:

$txt['no_view_links01'] = '<span style="color: red;">[Please </span>';
$txt['no_view_links02'] = '<span style="color: red;"> or </span>';
$txt['no_view_links03'] = '<span style="color: red;"> to view this link]</span>';


The lines that change the mod in Subs.php, and before I do the changes:


line 1310 'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1">$1</a>',

line 1316 'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1">',
line 1317 'after' => $user_info['is_guest'] ?  '</div>' : '</a>',


line 1572 'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1" target="_blank">$1</a>',


line 1578 'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
line 1579 'after' => $user_info['is_guest'] ?  '</div>' : '</a>',


First I did the change for have all in one line that said Dark-Wolf in:
http://www.simplemachines.org/community/index.php?topic=88363.msg1140507#msg1140507

replacing the:

"\n"

by:

"&nbsp;"



then the change that I do is:

line 1310 'content' => $user_info['is_guest'] ? $txt['no_view_links01'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;' . $txt['no_view_links02'] . '&nbsp;<a href="' . $scripturl . '?action=login">Login</a>&nbsp;' . $txt['no_view_links03'] . '' : '<a href="$1">$1</a>',

line 1316 'before' => $user_info['is_guest'] ? $txt['no_view_links01'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;' . $txt['no_view_links02'] . '&nbsp;<a href="' . $scripturl . '?action=login">Login</a>&nbsp;' . $txt['no_view_links03'] . '<div style="visibility:hidden">' : '<a href="$1">',
line 1317 'after' => $user_info['is_guest'] ?  '</div>' : '</a>',


line 1572 'content' => $user_info['is_guest'] ? $txt['no_view_links01'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;' . $txt['no_view_links02'] . '&nbsp;<a href="' . $scripturl . '?action=login">Login</a>&nbsp;' . $txt['no_view_links03'] . '' : '<a href="$1" target="_blank">$1</a>',


line 1578 'before' => $user_info['is_guest'] ? $txt['no_view_links01'] . "&nbsp;" . '<a href="' . $scripturl . '?action=register">Register</a>&nbsp;' . $txt['no_view_links02'] . '&nbsp;<a href="' . $scripturl . '?action=login">Login</a>&nbsp;' . $txt['no_view_links03'] . '<div style="visibility:hidden">' : '<a href="$1" target="_blank">',
line 1579 'after' => $user_info['is_guest'] ?  '</div>' : '</a>',


Title: Re: Registered Links
Post by: chifliiiii on October 07, 2008, 02:48:26 PM
I would love to have this mod on my beta forum. IT will be a release for this version?
Title: Re: Registered Links
Post by: Melfina on November 04, 2008, 06:17:00 PM
Quote from: chifliiiii on October 07, 2008, 02:48:26 PM
I would love to have this mod on my beta forum. IT will be a release for this version?

I installed it on a SMF 2 beta 4 forum manually with no problem, it wouldn't install through the packages admin panel though.

I'm trying to make it not to hide links to my own site, should be something like this, but I'm unsure about the URL variable, can't use $1 there:
'before' => $user_info['is_guest'] && !preg_match("/myurl/",$1) ...

Hope it hasn't been answered yet, checked the other post pages but didn't find anything.
Title: Re: Registered Links
Post by: fyndler on November 15, 2008, 10:05:35 PM
Really nice one really needed it

To bad people can see links in the code tag :(
Title: Re: Registered Links
Post by: Nibogo on November 25, 2008, 08:04:43 PM
Quote from: chifliiiii on October 07, 2008, 02:48:26 PM
I would love to have this mod on my beta forum. IT will be a release for this version?

With the package manager you will have problems with the Subs.php edit , but try the manuall edit searching for iurl

Tested and works great
Title: Re: Registered Links
Post by: hellboy78 on December 06, 2008, 05:58:48 AM
Quote from: fivearts on October 06, 2006, 01:15:15 AM
Hi danifs,

I now have my links giving different/correct notices like this:
[Register or Login to view this email address.]
[Register or Login to view this ftp link.]
[Register or Login to view this flash.]
[Register or Login to view this image.]
[Register or Login to view this link.]

Here are the codes I modified

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_email'] = ' to view this email address.';
$txt['no_view_ftp'] = ' to view this ftp link.';
$txt['no_view_flash'] = ' to view this flash.';
$txt['no_view_img'] = ' to view this image.';
$txt['no_view_link'] = ' to view this link.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>


The code change in Subs.php for Email will be
<search position="replace"><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => '<a href="mailto:$1">$1</a>',
]]></search>
<add><![CDATA[
'tag' => 'email',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? '<span style="color: red">[<a href="' . $scripturl . '?action=register">Register</a>&nbsp;or&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' . $txt['no_view_email'] . ']</span>' : '<a href="mailto:$1">$1</a>',
]]></add>


I guess I should use style.css instead of inline style="color: red"... maybe another day. :P

could you please tell me which php modify?
Title: Re: Registered Links
Post by: SONSiVRi on December 06, 2008, 12:57:07 PM
"hellboy78"
There are 2 files to modify and its written as above of area.
First one is: $languagedir/Modifications.english.php
Second one: $sourcedir/Subs.php
Title: Re: Registered Links
Post by: hellboy78 on December 06, 2008, 01:25:06 PM
this is my modification.english

<?php
// Version: 1.1; Modifications

//horrible stuff
$txt['rw_copy']= 'Black To The Future &copy; 2008, <a href="mailto:[email protected]">Runic Warrior</a>';
$txt['legend'] = 'Legend';

?>
Title: Re: Registered Links
Post by: hellboy78 on December 06, 2008, 01:27:11 PM
and subs it's too big to be posted,

so, where to put modifications?
Title: Re: Registered Links
Post by: SONSiVRi on December 06, 2008, 06:57:03 PM
Quote from: hellboy78 on December 06, 2008, 01:27:11 PM
and subs it's too big to be posted,

so, where to put modifications?

Those codes you quoted from "fivearts" are goes in install.xml or name is something like that (defined in package-info.xml). You don't directly edit php files, mod-installer will do it. This means you just have to edit mod file, and install it from beginning (uninstall first, if you have running).
Title: Re: Registered Links
Post by: hellboy78 on December 08, 2008, 04:12:28 PM
I see

thank you for information,

looks too complicate for me, any chance to have it ready with changes?

ty
Title: Re: Registered Links
Post by: SONSiVRi on December 10, 2008, 03:15:19 PM
Quote from: hellboy78 on December 08, 2008, 04:12:28 PM
I see

thank you for information,

looks too complicate for me, any chance to have it ready with changes?

ty

I am too busy these days, it may time to get learned these things.
Title: Re: Registered Links
Post by: Fussilet on January 04, 2009, 02:41:30 PM
perfect mod bro...
congrats and thanks
Title: Re: Registered Links
Post by: musicus on January 07, 2009, 01:48:49 AM
When givw a new version for smf 2

Thank you for the mod
Title: Re: Registered Links
Post by: #Serseri on January 15, 2009, 12:17:05 PM
Can i use this mod for smf 2.0?
Title: Re: Registered Links
Post by: vbgamer45 on January 15, 2009, 08:12:52 PM
Yes it can once 2.0 goes final
Title: Re: Registered Links
Post by: Fiidell on January 20, 2009, 10:47:59 AM
Pls how do I install it? I have downlaoded the zip file and dont know what to to next :( Thanks
Title: Re: Registered Links
Post by: musicus on January 20, 2009, 11:36:07 AM
Quote from: vbgamer45 on January 15, 2009, 08:12:52 PM
Yes it can once 2.0 goes final

I have try du install in smf 2, but it comes the requester, their is nothing to install
Title: Re: Registered Links
Post by: vbgamer45 on January 22, 2009, 11:02:30 PM
Does not yet support SMF 2.0
Title: Re: Registered Links
Post by: musicus on January 23, 2009, 05:59:40 AM
Quote from: vbgamer45 on January 22, 2009, 11:02:30 PM
Does not yet support SMF 2.0

Please, make it, that workes in 2.0 :D
Title: Re: Registered Links
Post by: vbgamer45 on January 23, 2009, 08:40:17 AM
I will once SMF 2.0 final is released most likely a couple months
Title: Re: Registered Links
Post by: candidosa2 on January 26, 2009, 08:53:57 PM
when have time please update other linguage

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'Voc&ecirc;  n&atilde;o tem permiss&atilde;o para ver links.';
//END Reg Links Text Strings portuguese by Candidosa2
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'Voc&ecirc;  n&atilde;o tem permiss&atilde;o para ver links.';
//END Reg Links Text Strings portuguese by Candidosa2
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'Voc&ecirc;  n&atilde;o tem permiss&atilde;o para ver links.';
//END Reg Links Text Strings brazilian by Candidosa2
]]></add>
</operation>
</file>
Title: Re: Registered Links
Post by: Amendoim on March 06, 2009, 08:59:32 AM
 Hello

In this mod, I'd like to know how to do the links are only visible to registered but in code ..
Ie the normal links, such as www.google.com, leaving visible to all, including visitors ..
The links that are in code [code! [/ Code!

These are locked to visitors, and made available to ..

Thank you!
Title: Re: Registered Links
Post by: Amendoim on March 07, 2009, 09:24:43 AM
Help please :(
Title: Re: Registered Links
Post by: Amendoim on March 10, 2009, 08:25:57 PM
everbody help :'(
Title: Re: Registered Links
Post by: Amendoim on March 12, 2009, 07:37:10 PM
Help :'(
Title: Re: Registered Links
Post by: zagrom on March 12, 2009, 07:43:45 PM
^^^ Are you running a custom theme?
Title: Re: Registered Links
Post by: Amendoim on March 12, 2009, 07:45:05 PM
no..

Are running the theme diliber MC multicolor..

Title: Re: Registered Links
Post by: zagrom on March 12, 2009, 07:46:41 PM
You may require a manual install, what ver. (1.1.8)?
Title: Re: Registered Links
Post by: Amendoim on March 12, 2009, 08:01:55 PM
That is not ..

I install the mod, just wanted to know, for the mod to work so the links in the block [CODE [/ CODE ..

The rest of the links, regular links, emails, hyper links etc. .. the type www.google.com
wanted to let without visible to visitors etc. ..

So between the [code that is not wanted, the type

Link to visitor restricted [/ code]

Thank you!
Title: Re: Registered Links
Post by: SONSiVRi on March 26, 2009, 04:44:59 PM
Quote from: Amendoim on March 12, 2009, 08:01:55 PM
That is not ..

I install the mod, just wanted to know, for the mod to work so the links in the block [CODE [/ CODE ..

The rest of the links, regular links, emails, hyper links etc. .. the type www.google.com
wanted to let without visible to visitors etc. ..

So between the [code that is not wanted, the type

Link to visitor restricted [/ code]

Thank you!


This mod doesn't block links in between code tags.
ie: [code]www.google.com[/code] cannot be controlled by this mod.
It's about parse mechanism of SMF engine, you may hard code it yourself.
Title: Re: Registered Links
Post by: MaXiForum.cz on March 31, 2009, 03:57:56 AM
Registered CODE
Make my friend Jaa(c) :o

File Edits:
./Themes/default/languages/index.english-utf8.php

Find:
$txt['quote'] = 'Quote';

Add After:
// Registered code
$txt['smula_hoste'] = "Hello,";
$txt['smula_hoste_reg'] = '&nbsp;only the <a href="' . $scripturl . '?action=login">logged</a> users can see the characters hidden in CODE. <br /> If you are not registered, you can do it <a href="' . $scripturl . '?action=register">THERE</a>.';
// Registered code



File Edits:
./Themes/default/languages/index.czech-utf8.php

Find:
$txt['quote'] = 'Citace';

Add After:
// Registered code
$txt['smula_hoste'] = "Dobrý den,";
$txt['smula_hoste_reg'] = '&nbsp;pouze <a href="' . $scripturl . '?action=login">přihlášení</a> uživatelé mohou vidět znaky ukryté v CODE. <br />Pokud nejste ještě zaregistrováni, toto můžete zcela zdarma a bez závazků provést <a href="' . $scripturl . '?action=register">ZDE</a>.';
// Registered code



./Sources/Subs.php

Find:
'tag' => 'code',
'type' => 'unparsed_content',
'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;

if (!isset($disabled[\'code\']))
{
$php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
{



Replace With:
'tag' => 'code',
'type' => 'unparsed_content',

// Registered code

'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;
if (!isset($disabled[\'code\']))
{
$php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
{



Quote from: vbgamer45 on January 22, 2009, 11:02:30 PM
Does not yet support SMF 2.0

For SMF 2.0 RC1  ;)
Title: Re: Registered Links
Post by: Amendoim on March 31, 2009, 04:32:41 AM
My version is 1.1.8 will it work?

use portuguese version, the file "index.english-utf8.php" I am so in my forum "index.english.php"

I tried to find the "
Quote$ txt [ 'quote'] = 'Quote',
'find the man but could not find anything = /


Help plz

Thank you!
Title: Re: Registered Links
Post by: MaXiForum.cz on March 31, 2009, 02:24:13 PM
2 Amendoim, put it anywhere to index.english-utf8.php or index.english.php" ;)
Title: Re: Registered Links
Post by: Realinfo on March 31, 2009, 10:55:32 PM
2.   Execute Modification   .\Sources/Subs.php   Test failed

Help..............
Title: Re: Registered Links
Post by: SONSiVRi on April 01, 2009, 03:17:29 AM
Quote from: Realinfo on March 31, 2009, 10:55:32 PM
2.   Execute Modification   .\Sources/Subs.php   Test failed

Help..............

The answer is: bla bla bla bla....
What kind of help are you waiting with that given knowledge. Nobody of here is wizard or magician :) You should supply some valuable tips that can make people help you. I hope you have enough ability to supply those tips at least.
Title: Re: Registered Links
Post by: blanix on April 16, 2009, 07:20:02 PM
Quote from: Realinfo on March 31, 2009, 10:55:32 PM
2.   Execute Modification   .\Sources/Subs.php   Test failed

Help..............

here the same with 1.1.8 oO

its a error with sub on install ..
Title: Re: Registered Links
Post by: vbgamer45 on April 16, 2009, 07:52:14 PM
Attach your subs.php
Title: Re: Registered Links
Post by: blanix on April 16, 2009, 08:54:31 PM
i have found the problem, different sub from another mod ..

it works, but ..

www.google.com .. works fine

and

http://www.youtube.com/watch?v=Q7ilp5z-e9A .. don't work

EDIT:
LOL, ok, my fault ^^

i think i need this mod for youtube bbc  :-X
Title: Re: Registered Links
Post by: baduong on May 06, 2009, 01:29:40 AM
Registered Links for SMF 2.0 RC1 


I just edit a few seats of this mod to support in 2.0 RC1
Add features:
- Real hide link
- Exclude some boards
- Hide content of BBC [.code]


./Themes/default/languages/Modifications.english.php
Find:
?>

Add Before:


//Begin Reg Links
//Button link for [url]
$txt['no_view_links'] = '<span style="color:#F00; font-weight:bold;">[<button style="color:#F00; font-weight:bold;" onclick="javascript:location.href=\'' . $scripturl . '?action=login\'" title="Login to view this link"> Login ... </button> to view this link]&nbsp;</span>';
//Text link for [url]
$txt['no_view_links2'] = '<span style="color: #F30; font-weight:bold;">[<a style="color: #F30; font-weight:bold; text-decoration:underline;" href="'. $scripturl . '?action=login" title="Login to view this link">Login to view this link...</a>]</span>';
//Text link for [code]
$txt['no_view_links3'] = '<p style="color: #F30; font-weight:bold;">[<a style="color: #F30; font-weight:bold; text-decoration:underline;" href="'. $scripturl . '?action=login" title="Login to view this code">Login to view this code...</a>]</p>';
//END Reg Links Text Strings


   
./Sources/Subs.php

Find: Line 904

// Sift out the bbc for a performance improvement.


Add Before: Note: replace id1,id2 with boardid , or empty array()

//disable_guest_view_links, exclude board id in array(id1,id2,...)
$context['disable_guest_view_links'] = false;
if (isset($context['current_board']))
{
if($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2.....))) //replace id with board id
{
$context['disable_guest_view_links'] = true;
}
}


Find:
Line 1242

array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => '<a href="$1" class="bbc_link">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


Replace With:

array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => $context['disable_guest_view_links']  ? $txt['no_view_links'] : '<a href="$1" class="bbc_link">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => $context['disable_guest_view_links']  ? $txt['no_view_links'] : '<a href="$1" class="bbc_link">',
'after' => $context['disable_guest_view_links']  ? '' : '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' =>  $context['disable_guest_view_links']  ? '' : ' ($1)',
),


Find: Line 1503

array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),



Replace With:

array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $context['disable_guest_view_links']  ? $txt['no_view_links'] : '<a href="$1" class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $context['disable_guest_view_links']  ? $txt['no_view_links'] : '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => $context['disable_guest_view_links']  ? '' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $context['disable_guest_view_links']  ? '' : ' ($1)',
),


Find:
Line 2295

$message = substr($message, 0, $pos) . $code . substr($message, $pos2 + ($quoted == false ? 1 : 7));
$pos += strlen($code) - 1;


Add After:


//hide links from guest
if( $context['disable_guest_view_links']  && in_array($tag['tag'],array('url','iurl')))
{
$pos3 = strpos($message, '[/' . $tag['tag'] . ']', $pos + 1 );

$message = substr($message, 0, $pos + 1) . substr($message, $pos3 );
}


Add support hide in [code][/code] :
Find: Line 1056

'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',


Replace With:

'content' => $context['disable_guest_view_links']  ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['no_view_links3']. '</code>' : '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',


Find: Line 1096

'content' => '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',


Replace With:

'content' => $context['disable_guest_view_links']  ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['no_view_links3']. '</code>' : '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',



Tested and Demo on my forum: http://www.it-hui.com/index.php/topic,280.new.html

Title: Re: Registered Links
Post by: vbgamer45 on May 06, 2009, 09:05:51 AM
Nice additions!
Title: Re: Registered Links
Post by: khanje on June 26, 2009, 10:20:57 PM
hi i install the reglinks , install success but not work properly see the picture. plzz help me ..my version forum is 1.1.9 and i used this file ...........

Title: Re: Registered Links
Post by: vbgamer45 on June 26, 2009, 10:21:19 PM
What part doesn't work?
Title: Re: Registered Links
Post by: MaXiForum.cz on June 27, 2009, 01:24:22 AM
khanje this is registered LINKS no CODE...
Title: Re: Registered Links
Post by: faraway on July 11, 2009, 06:28:38 AM
Quote from: blanix on April 16, 2009, 08:54:31 PM
i have found the problem, different sub from another mod ..

it works, but ..

www.google.com .. works fine

and

http://www.youtube.com/watch?v=Q7ilp5z-e9A .. don't work

EDIT:
LOL, ok, my fault ^^

i think i need this mod for youtube bbc  :-X

Can you link the mod that does not hide www.google.com link with "Registred links"
or what have you done to put this to work pls?

ty
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 19, 2009, 11:33:37 AM
Updated!

Added support for SMF 2.0
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: MaXiForum.cz on July 19, 2009, 12:12:43 PM
Quote from: vbgamer45 on July 19, 2009, 11:33:37 AM
Updated!

Added support for SMF 2.0

Nice vbgamer45
And registered CODE?  ;D :P

Our SMF 1.1.10 version:
http://www.maxiforum.cz/index.php/topic,60288.msg237560.html#msg237560 (http://www.maxiforum.cz/index.php/topic,60288.msg237560.html#msg237560)
SMF 2.0
http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945 (http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945)

;)
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: Shark-Time on August 13, 2009, 06:33:53 AM
Quote from: MaxiPes on June 27, 2009, 01:24:22 AM
khanje this is registered LINKS no CODE...

can it work work for the code too.. what changes i have to do to make it work with the code too..
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 13, 2009, 08:42:21 AM
Check above someone posted code for it to work for code tags too
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: esttecb on August 29, 2009, 10:19:50 AM
Just a little ''bug''... links are not being hidden in index.php?action=printpage;topic=

Thanks and take care
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: tienf on September 23, 2009, 10:20:56 AM
I need your help, vbgamer45  ;)

I don't want to hide links which are my website, for example my website is www.tienf.com, so dont hide any links from my website like http://www.tienf.com/tin-tuc-thuong-mai-dien-tu/paypal-chap-nhan-ngan-hang-viet-nam-hoan-toan-la-su-that/ or http://www.tienf.com/tin-tuc-thuong-mai-dien-tu/tin-nong-paypal-se-chap-nhan-viet-nam-tu-14102009/.

Isn't it easy to make change in code to get it ? Please help me
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 23, 2009, 07:41:59 PM
No easy way to do that.
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: tienf on September 23, 2009, 09:52:35 PM
Oh, yes ofcourse it't not easily to be done  :D, but have any way to do it  VB?
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 23, 2009, 10:03:10 PM
Not really not very good regular expressions and how to exclude a url
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: tienf on September 24, 2009, 03:39:32 AM
Yes, in case I can define a regular expression, where I put it in VB ?
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: softtouch on September 24, 2009, 06:48:55 AM
Is it possible to use this mod for groups too?
I mean, I have a beta tester board of development projects, and only a special group can access this board at the moment. Gust and other member cannot access.
What would be good if everybody could access it, but only member of the beta group can see the links... I guess there's no way to do that, or is there?
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 24, 2009, 08:27:20 AM
I might be possible but would require a good amount of work to do. Would need to create an interface to select groups, then figure how to code it to show for some groups and not others.
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: diamanda on October 03, 2009, 03:16:47 AM
If I want that this modification only appears in a specific forum: what can i do?
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 03, 2009, 10:02:51 AM
Does not support this feature at this time.
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: manuxel on October 12, 2009, 12:25:25 AM
This is a great mod, i love it, thank u so much, but one detail, how do i avoid it to hide the links in the signatures?????

PLEEEEASE HELP ME

PD: sorry, bad english...
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 12, 2009, 10:37:58 PM
It should handle all links everywhere  I think ti does.
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: Drivin and Cryin on October 28, 2009, 08:38:35 PM
I'm running  2.0 RC1.2, and on the mod page it says it works with it.  I'm not using the default theme though and it wont install, so i wanted to install it manually.  The problem is that i get an error when trying to parse it for this version. 

Are these instructions located anywhere else since the parse function here does not work:
http://custom.simplemachines.org/mods/index.php?mod=342
Title: Re: Registered Links (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 28, 2009, 08:53:24 PM
Try this one
http://resourcez.biz/PackageParser/index.php
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on November 08, 2009, 08:46:53 PM
Updated now with SMF 2.0 RC2 support.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: the_shadow on November 10, 2009, 11:24:51 AM
doesn't work on link that are in code tag

there's some way do do that?

thnkx
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on November 10, 2009, 12:38:48 PM
I think there was an example couple pages back that did that.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Dzen on November 25, 2009, 07:56:18 PM
It doesn't work somehow for me. Installed with no probs. Shows a green lamp in mods. But doesn't hide even simple links like www.google.com.

I use smf 1.1.10, default theme and a language pack. Any ideas?

Thanks.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on November 25, 2009, 08:06:06 PM
Have you been able to get other mods to work?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Dzen on November 26, 2009, 04:32:45 AM
Yes, I have. Though had problems with installing some. Can this actually be connected with the language pack I'm using cause you seem to take english file here

<file name="$languagedir/Modifications.english.php">
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on November 26, 2009, 12:17:16 PM
Mod does not use the language packs yet. Looks like it failed to install on your forum though
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: the_shadow on November 29, 2009, 08:03:49 PM
someone meke tihs work on [ code] tag?

what file i'ad to modify?

thnkx
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on November 29, 2009, 08:09:03 PM
Someone posted in this thread a couple pages back
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: the_shadow on November 30, 2009, 07:13:55 PM
i'ad got a blank page!!! can someone add this on my subs.php... with the [ code] tag support???

thnkx guys
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: -=[Vyorel]=- on December 06, 2009, 06:31:51 AM
God job. Very nice mod.

Romanian language:

<file name="$languagedir/Modifications.romanian.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'Nu poti vedea link-urile.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.romanian-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
//Begin Reg Links
$txt['no_view_links'] = 'Nu poti vedea link-urile.';
//END Reg Links Text Strings
]]></add>
</operation>
</file>
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: MaXiForum.cz on December 06, 2009, 06:39:33 AM
Quote from: the_shadow on November 30, 2009, 07:13:55 PM
i'ad got a blank page!!! can someone add this on my subs.php... with the [ code] tag support???

thnkx guys

Try it ;)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Rippler on December 08, 2009, 03:44:25 AM
Can someone let me know which part of code to edit to customize the message? I get PHP parse errors.

For now, i've managed to diaplay this message, how does it look to you guys? Pls give comments...

http://www.(link hidden) [Please register/login to view this link. Thanks] Register or Login


Thanks  :)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 08, 2009, 09:05:14 AM
All the code is inside Sources/Subs.php check out the modsite if you need manual install steps
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: SinnerSaint on December 11, 2009, 11:15:00 AM
I was able to install this mod successfully and all live links are now hidden to guests. However, I also wanted to hide links embedded under the CODE tag so I followed  MaXiForum.cz's instructions here:

http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945

Everything went well and now guests cannot see CODED links. In the frontend, the modification of  MaXiForum.cz went very well and did its job. However, when I checked my Forum Error Log, I found out that every page load of my forum generates hundreds of the following error messages:

http://www.forumname.com/forum/index.php
8: Undefined index: code
File: /home/forumname/public_html/forum/Sources/Subs.php
Line: 1128


OR

http://www.forumname.com/forum/index.php?action=profile;u=25583;sa=showPosts
Apply Filter: Only show the errors with the same message
8: Undefined index: code_select
File: /home/forumname/public_html/forum/Sources/Subs.php
Line: 1128


OR

http://www.forumname.com/forum/index.php?action=profile;u=10048
Apply Filter: Only show the errors with the same message
8: Undefined index: code_select
File: /home/forumname/public_html/forum/Sources/Subs.php
Line: 1128


Can you please check what's causing this? Line 1128 is where I inserted MaXiForum.cz's instructions, which I am posting below:

'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',

By the way, I am using SMF 1.1.11.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 11, 2009, 11:16:45 AM
That's not part of registered links mod but
You are missing the language entries in your modifications.english.php for
$txt['code']
and
$txt['code_select']
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: SinnerSaint on December 11, 2009, 11:24:03 AM
Thanks for the quick response vbgamer45. What values for $txt['code'] and $txt['code_select'] should I add to my modifications.english.php file?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 11, 2009, 11:38:56 AM
Not sure check if that mod said anything but probably be some message saying code is disabled to guests
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: SinnerSaint on December 11, 2009, 12:24:16 PM
MaXiForum.cz, after applying your modification and following vbgamer45's advice above, the word Code: does not appear anymore and also the table enclosing the coded links is gone. However, after adding $txt['code'] and $txt['code_select'] to my modifications.english.php file, the error logs went out.  Can you please recheck your codes for subs.php and see if there's something wrong with it?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: the_shadow on December 11, 2009, 08:03:51 PM
Quote from: MaXiForum.cz on December 06, 2009, 06:39:33 AM
Quote from: the_shadow on November 30, 2009, 07:13:55 PM
i'ad got a blank page!!! can someone add this on my subs.php... with the [ code] tag support???

thnkx guys

Try it ;)


thnkx but the links betwin de code tag doesn't work!!!! :S
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 06:55:58 PM
hi, i installed the mod manually.. but there is a problem.. the message "You are not allowed to view links. Register or Login" doesn't appear.. i see only empty messages, you can see in the attachment :( can you help me please...
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 07:02:33 PM
You need to copy the text from Modifications.english.php to themes/default/languages/modifications.yourlanguage.php
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 07:04:23 PM
Quote from: vbgamer45 on December 13, 2009, 07:02:33 PM
You need to copy the text from Modifications.english.php to themes/default/languages/modifications.yourlanguage.php

i've already done this... btu still no texts..
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 07:05:55 PM
Repeat for also your custom theme as well
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 07:06:56 PM
Quote from: vbgamer45 on December 13, 2009, 07:05:55 PM
Repeat for also your custom theme as well

but i use default theme.. only css and images are edited...
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 07:13:13 PM
Ok try copying it to your modifications.yourlanguage-utf8.php
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 07:16:03 PM
Quote from: vbgamer45 on December 13, 2009, 07:13:13 PM
Ok try copying it to your modifications.yourlanguage-utf8.php

my site language is turkish.. but there is no file such modification.turkish-utf8.php.. i dont use utf8..
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 07:19:38 PM
If you are using RC2 you need to clear the cache folder too otherwise it won't show
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 07:22:28 PM
when i do that, i receive "Template Parse Error!"  :-[
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 13, 2009, 07:26:54 PM
Now I am confused don't know what else to do
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: underfire on December 13, 2009, 07:27:41 PM
and i can not roll back this :( i still get this error :(
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: EuroHack on December 15, 2009, 03:09:50 PM
No funciona en la Version 1.1.11

----------------- ENG ----------------

It does not work in Version 1.1.11
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 15, 2009, 03:21:11 PM
It works to 1.1.1 make sure you are using english as your language
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: EuroHack on December 16, 2009, 11:51:44 AM
Y como lo hactivo para que pida el registro, lo estoy probando en local y al entrar sin estar logeado el link se visualiza. Lo e probado en ingles para tampoco.

-------- ENG -------------
And as hactivists to ask for the record, I'm testing locally and be logged in without the link is displayed. The e-tested for English either.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: EuroHack on December 17, 2009, 08:31:52 AM
fails because it fails to medificar a.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: EuroHack on December 23, 2009, 10:41:30 AM
Error en la Instalación del Paquete
3. Executar Modificación ./Sources/Subs.php Prueba fallida

-------------------- ENG ------------------------------

Error in Package Installation
3. Execute Modification. / Sources / Subs.php Failed Test
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on December 23, 2009, 11:57:30 PM
Installs fine on my 1.1.11 board. You will need to do a manual install follow the directions on the mod site for the package.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Mixnetwork on January 06, 2010, 01:47:21 PM
Hi

I tried to install this mod but with the install check I get a failure for the "subs.php"

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.



Execute Modification  ./Sources/Subs.php  Test failed

So I tried to do it manually, but he can not find the Lines which I should look for by manual installation in the Subs.php.

I really would like to use this mod but now i am a bit  :-\

My SMF Version is 1.1.11

These mods are installed
1.     Ad Managment      2.3.1
2.    Aeva Media    1.0 Alpha 2
3.    iframe BBC Tag by Metal13
4.    SimplePortal    2.3.1
5.    Custom Profile Field Mod
6.    Country Flags
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Amendoim on January 07, 2010, 04:49:06 PM
To Update this Code to 2.0 RC2? :
Its very important :(

// Registered code 'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',    

REGISTER CODE: http://www.simplemachines.org/community/index.php?topic=88363.220

Tanks       
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Amendoim on January 09, 2010, 07:10:14 PM
Well I displays need a beefy video .. someone can make me Update register file link to the version that the CODE MaXiForum.cz available? update to version 2.0 RC2?
She is in the RC1 and this time I used in 1.1.8 ..

Thank you so much because already tested and does not, the code appears as if I did not have anything: S
But I think that is something of the language yet, when I put the default language forum in english, it appears correctly??

leave attached the file Subs.php ..
You are on the line;

'content' => $ user_info [ 'is_guest']? '<div class="codeheader">'. $ txt [ 'code']. ': </ Div> <code>'. $ txt [ 'smula_hoste']. $ txt [ 'smula_hoste_reg']. '</ code>': '<div class="codeheader">'. $ txt [ 'code']. ': <a Href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">'. $ txt [ 'code_select']. '</ a> </ div> <code> $ 1 </ code >',[/ code]

Thanks
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Amendoim on January 14, 2010, 08:13:28 PM
Help my probl Plz..

Is very Important :/
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on January 14, 2010, 08:15:43 PM
That doesn't look like it is part of the reg links mod but something with hiding code tags
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Amendoim on January 15, 2010, 01:45:48 PM
Would not be possible to make you a mod that could Escoda so the link in code?
It was really important, to version 2.0 RC2 ..

I am very grateful, and many people also,

Thanks
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on January 15, 2010, 02:00:26 PM
I might do as another mod or something
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Amendoim on January 15, 2010, 04:02:20 PM
Quote from: vbgamer45 on January 15, 2010, 02:00:26 PM
I might do as another mod or something

I am very grateful Bgamer, if possible you can do this?
A Mod compatible to version 2.0 RC2, many people will find necessary, including me before anoxic, but not anymore because I use version 2.0 RC2 ..

Thanks in advance ..
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on January 15, 2010, 04:51:22 PM
Maybe in the future not now though
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: the_shadow on January 18, 2010, 01:55:41 PM
this just work whit links betwin ???

if does't work someone can tell me what to do to make it work? thnkx @ all
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on January 18, 2010, 07:23:39 PM
Not sure what you are asking?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: CMO on January 20, 2010, 03:19:13 AM
Found the issue with this. For some reason my 1.11 version of SMF have some extra text in the Subs.php
Anyway I've edited the reglinks.xml to reflect this extra text that is causing my Subs.php to fail and everything is working fine now.

Attached is the edited version of Registered Link to reflect these changes I've mention.

If you would like to thank me. I'm looking for incoming links to my newly created forum for
Singapore Contest & Sales at www[dot]cmo[dot]sg
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Dr3amstor on February 11, 2010, 10:28:44 AM
Every time I try to install this Mod a problem comes up, even if do ti manually:

Error in Package Installation

Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
3. Execute Modification ./Sources/Subs.php Test failed


How can I trough this?

Sorted, I used CMO tip and worked, thank you CMO.

Attached is the edited version of Registered Link to reflect these changes I've mention.

Regards
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 11, 2010, 10:50:50 AM
Glad you got it working
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 12, 2010, 08:22:16 AM
Hi people! Does anybody know how can i remove those "jumps" (</br>)?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg13.imageshack.us%2Fimg13%2F5517%2Fregisteredlinks.png&hash=3bdce275cd4ad2297fe41a177a2cff10508e519f)

That's my Subs.php:
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . '</a>' : '<a href="$1" class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . '</a><div style="visibility:hidden">' : '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


I appreciate your help. Sorry about my rudimentary english  ;D




Another question: Why the post title and date is out of alignment? If i see the thread with a registered user, the title shows correctly =/
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 12, 2010, 09:50:28 AM
I would post this question in the general support forum for a better response this topic is for the Registered Links mod
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 12, 2010, 10:01:45 AM
The problem only occurs with the mod installed vbgamer45. If i uninstall the mod, the forum works perfect.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 12, 2010, 10:15:34 AM
I don't think it's this mod.

To be safe copy the text from themes/default/languages/modifications.english.php
To
themes/default/languages/modifications.yourlanguage.php

To be safe if you use smf 2.0 clear cache under forum maintenance
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 13, 2010, 08:21:27 AM
OK, i'll search help in another place. Thanks anyway.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: luismanson on February 15, 2010, 12:30:09 PM
 vbgamer45 is it possible to allow some domain links, or maybe add an unhide bbcode? i have a news item with an internal link and if im guest i cant see :(
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 15, 2010, 12:40:18 PM
Not possible currently
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Phat^Trance on February 18, 2010, 08:05:45 PM
just installed this mod on my 1.1.11 and it doesnt work. any ideas why? http://forum.dailymobile.se/index.php/topic,18074.0.html
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 18, 2010, 08:49:12 PM
Make sure you have it translated under themes/default/modifications.english.php
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Phat^Trance on February 18, 2010, 08:55:46 PM
Quote from: vbgamer45 on February 18, 2010, 08:49:12 PM
Make sure you have it translated under themes/default/modifications.english.php

this is what i get when i install the plugin. must i manually edit the sub.php file?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 18, 2010, 08:56:29 PM
In that case yes you would since the mod is looking for code and it appears it has been changed.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Phat^Trance on February 18, 2010, 09:06:11 PM
thx it works now, even tho the register or login link are a bit off from the text :)

http://forum.dailymobile.se/index.php/topic,18074.0.html
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 19, 2010, 07:59:09 AM
Quote from: Phat^Trance on February 18, 2010, 09:06:11 PM
thx it works now, even tho the register or login link are a bit off from the text :)

http://forum.dailymobile.se/index.php/topic,18074.0.html
You have the same problem as me:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg707.imageshack.us%2Fimg707%2F8218%2Fsmfregisteredproblem.png&hash=c8af393a521f41763729a3040c14484014f6ef2b)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg222.imageshack.us%2Fimg222%2F5517%2Fregisteredlinks.png&hash=9af42dc0539e4db2afb019367c0b4cfc7ed58ea3)

I'm sure that if you see the topic logged, the align problem with topic tittle dissapear  :-\
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 19, 2010, 09:03:07 AM
That looks like a separate issue than this mod.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 19, 2010, 11:31:56 AM
¿Are you kidding me? I've tried on a fresh SMF 1.1.11 install. See the result yourself:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg404.imageshack.us%2Fimg404%2F3384%2Fregistereddefaultforum.png&hash=a211491192801ba365e19265f9df09a2dc6c9f23)

I think that problem it's on manual "Subs.php" edit: http://custom.simplemachines.org/mods/index.php?action=parse;mod=342;attach=127225;smf_version=1.1.1
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 19, 2010, 11:54:38 AM
The top part is not part of this mod. Check your translation for the bottom square. otherwise I think it is another mod.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 19, 2010, 12:00:10 PM
¿What part of "fresh" install don't you understand? The forum doesn't have any type of modification. ONLY your mod is installed on it.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 19, 2010, 12:01:20 PM
OK uninstall the mod I don't think it is working for you.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: matiaz on February 19, 2010, 12:09:50 PM
Quote from: vbgamer45 on February 19, 2010, 12:01:20 PM
OK uninstall the mod I don't think it is working for you.
Me and Phat^Trance (http://www.simplemachines.org/community/index.php?action=profile;u=186710).

Thanks for your usefull help. I'll apreciate it

::) ::) ::)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Bugo on February 19, 2010, 03:25:05 PM
Russian text:

//Begin Reg Links
$txt['no_view_links'] = 'Вам не разрешено просматривать ссылки<br/>';
$txt['txt_reg_links_register'] = ' Зарегистрируйтесь';
$txt['txt_reg_links_login'] = 'войдите на форум';
$txt['txt_reg_links_or'] = 'или';
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 19, 2010, 03:26:00 PM
Thanks for translation!
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Tincho on February 20, 2010, 07:23:01 PM
If you don't want to find the error is different to say that this is our problem and than we have to uninstall the mod ok??

Quote from: vbgamer45 on February 12, 2010, 10:15:34 AM
I don't think it's this mod.

Look at this.

Sources/Subs.php (Original)


array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . '</a><div style="visibility:hidden;">' : '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


<div style="visibility:hidden;">


So, in the style is the problem. You have to change like this:


array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . '</a><div style="visibility:hidden;display:none;">' : '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),



With the fix: <div style="visibility:hidden;display:none;">



Is the mod vbgamer45. Remember that anybody is perfect man. ;) A good lesson for you. And for everybody.



Thank you francis (gr0n) from ventajaspremium.com  8)

Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 20, 2010, 07:27:37 PM
Thanks for fix!!!!!! And translation
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: gr0n on February 20, 2010, 07:39:57 PM
 ;)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 20, 2010, 07:44:31 PM
Thanks to Tincho released an update for registered links which could cause some spaces.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: gr0n on February 20, 2010, 08:06:55 PM
rewrited..

just display:none work.
but, i think this will be better:


array(
            'tag' => 'url',
            'type' => 'unparsed_equals',
            'before' => $user_info['is_guest'] ? $txt['no_view_links'] . '</a><!-- ' : '<a href="$1" class="bbc_link new_win" target="_blank">',
            'after' => $user_info['is_guest'] ?  ' -->' : '</a>',
            'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
            'disabled_after' => ' ($1)',
         ),


using comment tags, <!--space  &  space-->  (carefull spaces) , element will do not present  :)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: luismanson on February 24, 2010, 09:07:45 AM
Hi i made some code changes to make it look like the screenshot, and added spanish translation, vbgamer45 are you interested on merging them / can i post my version ?

Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 24, 2010, 12:37:10 PM
I like the graphic post it sure. and the translation maybe add it as an option
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: luismanson on February 24, 2010, 12:52:37 PM
Quote from: vbgamer45 on February 24, 2010, 12:37:10 PM
I like the graphic post it sure. and the translation maybe add it as an option

here you go...

//attachment removed -  found a bug, all links shows as "$2"   :|
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: irtiza104 on February 25, 2010, 03:01:57 PM
This is a great mod, so thank you for this.

i have tried it earlier, but i want to make only the "external links" invisible to the guests. is it possible? how?

Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on February 25, 2010, 03:27:50 PM
Not possible currently.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: akbora on March 09, 2010, 02:40:48 PM
1. Update RC3
2. Board and board different can be hidden link. For example Links in A Board are free, links in B board are hidden... Is it possible? Please

Thanks.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on March 09, 2010, 02:41:50 PM
Having issues getting it updated to RC3 not working right at the moment.
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Nibogo on March 12, 2010, 09:15:12 AM
spanish_latin, spanish_es, spanish_es-utf and spanish_latin-utf8


//Begin Reg Links
$txt['no_view_links'] = 'No tienes permiso para ver enlaces.';
$txt['txt_reg_links_register'] = 'Registrate';
$txt['txt_reg_links_login'] = 'Ingresa';
$txt['txt_reg_links_or'] = '&oacute;';

//END Reg Links Text Strings


PD: You should use $txt['register'], $txt['login'] and $txt['or'] these strings are in SMF by default
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: kosaic on March 14, 2010, 03:09:47 PM
Quote from: vbgamer45 on March 09, 2010, 02:41:50 PM
Having issues getting it updated to RC3 not working right at the moment.

Any news on RC3 support? This is one of my favorite mods :)
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: vbgamer45 on March 14, 2010, 03:10:19 PM
Can't get it work sadly :(
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: kosaic on March 14, 2010, 03:14:02 PM
well crapola :)

are you going to keep trying or have you given up ?
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Eclipse16V on March 15, 2010, 02:15:58 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: abdull@h on March 15, 2010, 07:35:57 AM
Quote from: Eclipse16V on March 15, 2010, 02:15:58 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Oskarlover on March 22, 2010, 08:29:53 PM
Quote from: vbgamer45 on March 14, 2010, 03:10:19 PM
Can't get it work sadly :(


Don't Give Up!!!

We all need it!
Title: Re: Registered Links (SMF 2.0 RC2 Support Added!)
Post by: Nibogo on March 22, 2010, 08:40:32 PM
Quote from: Arantor on March 22, 2010, 08:36:50 PM
I'm still not entirely sure why this is considered so urgent for many users. No need of it on any of the forums I've run.

It's a pretty used mod and it's pretty urgent for a lot of forums, because they want to get new users hidding the links. I use this mod and it's one of the first mod that I install
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on March 22, 2010, 10:02:24 PM
Updated for SMF 2.0 RC3!
Found the issue had a bug in my xml.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Nibogo on March 22, 2010, 10:07:16 PM
It's working great vb, thanks

But you forget to include the spanish translation for UTF-8 languages, spanish_latin-utf8 and spanish_es-utf8
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on March 22, 2010, 10:10:32 PM
I don't utf8 is needed for Spanish like English just there for waste of space.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Nibogo on March 22, 2010, 10:18:44 PM
Quote from: vbgamer45 on March 22, 2010, 10:10:32 PM
I don't utf8 is needed for Spanish like English just there for waste of space.

Well that is a pretty bad idea like me a lot of people only have installed spanish_latin-utf8 and this mods aren't translated if you add only spanish_latin translation but is ok is your mod :)
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Phat^Trance on March 23, 2010, 06:41:00 AM
is it possible to deactivate this plugin on some boards? there is one sub-forum that i want the guest to be able to view the links but i cannot find any permission that makes this possible
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: khera on March 23, 2010, 09:32:52 AM
i facing some errors

1.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
   2.   Execute Modification   ./Themes/default/languages/Modifications.english-utf8.php   Skipping file
   3.   Execute Modification   ./Themes/default/languages/Modifications.spanish_es.php   Skipping file
   4.   Execute Modification   ./Themes/default/languages/Modifications.spanish_latin.php   Skipping file
   5.   Execute Modification   ./Sources/Subs.php   Test failed
      1.   Replace   ./Sources/Subs.php   Test failed
      2.   Replace   ./Sources/Subs.php   Test failed


Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: khera on March 23, 2010, 09:37:35 AM
2.0 RC3
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: khera on March 23, 2010, 09:47:46 AM
check my all mods
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: khera on March 23, 2010, 09:55:15 AM
thanks bro u solve my problem thank u rock
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: kosaic on March 23, 2010, 10:28:48 AM
Thanks vbgamer45 ! Works perfectly in 2.0 RC3 ...

For those who want it, I edited (a little ugly, but works fine) the reglinks2rc3.xml install file (for RC3 only). It is attached. Just drop this in the zip file, in place of the one that is there, and install away :)

It will show the links as follows:

[ Please Register or Login to view links  ]

Cheers,
K
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: khera on March 30, 2010, 11:34:50 PM
hi frends i restore my backup but 1 agian facing errors



1.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
2.   Execute Modification   ./Themes/default/languages/Modifications.english-utf8.php   Skipping file
3.   Execute Modification   ./Themes/default/languages/Modifications.spanish_es.php   Skipping file
4.   Execute Modification   ./Themes/default/languages/Modifications.spanish_latin.php   Skipping file
5.   Execute Modification   ./Sources/Subs.php   Test failed
1.   Replace   ./Sources/Subs.php   Test failed
2.   Replace   ./Sources/Subs.php   Test failed
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: irtiza104 on April 06, 2010, 02:09:10 PM
I want to let the guests see internal links, but i want to block external links. Can you please add this feature. otherwise i will not be able to use this helpful (and can be more helpful) mod.  :'(
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on April 06, 2010, 02:29:52 PM
Difficult for me to add maybe one day
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: josipo on April 13, 2010, 08:56:30 AM
anyone know a way so a guest can view maybe 5 pages of links and then has to register to see em?
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Fredecardoso on April 23, 2010, 04:43:46 PM
Eu tenho o mesmo problema do membro: Khera ...

Please Help me!
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: snyperthugs on May 01, 2010, 06:17:40 AM
I cant get this to work. When I try to install it by uploading the zip. It says error on Sub.php.   And when I installed it manually it worked... but didnt work right. It made the links disappear but It did NOT replace the links with "Register or Login".... what can be going wrong? 

And I currently have..
Custom Action Mod
AddThis Social Bookmarks
Ad Mod
.. Installed...

Any help will be GREATLY appreciated, Thanks
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on May 01, 2010, 10:47:02 AM
Sounds like a language file issue make sure it's copied to modifications.* files

And clear the cache in SMF 2.0 under forum maintenance
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: snyperthugs on May 01, 2010, 11:57:38 PM
Quote from: snyperthugs on May 01, 2010, 06:17:40 AM
I cant get this to work. When I try to install it by uploading the zip. It says error on Sub.php.   And when I installed it manually it worked... but didnt work right. It made the links disappear but It did NOT replace the links with "Register or Login".... what can be going wrong? 

And I currently have..
Custom Action Mod
AddThis Social Bookmarks
Ad Mod
.. Installed...

Any help will be GREATLY appreciated, Thanks



I somehow got it to work. I just reinstalled it again and it now works
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on May 02, 2010, 12:56:28 AM
Glad you got it working
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: ripystys on May 02, 2010, 04:10:23 AM
German translation:



//Begin Reg Links
$txt['no_view_links'] = 'G&auml;ste haben keinen Zugang zu Links. Bitte ';
$txt['txt_reg_links_register'] = 'registrieren';
$txt['txt_reg_links_login'] = 'einloggen';
$txt['txt_reg_links_or'] = 'oder';
//END Reg Links Text Strings



Regards,
ripystys 8)
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on May 02, 2010, 10:11:23 AM
Thank you for the translation
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: rudeboy1991 on May 06, 2010, 11:38:03 AM
Hi, with the package uploader, it gives me an error with this mod, so i have to do it manually, (i have followed instructions of the parse por 1.1.11) but everytime i touch the subs.php i get a "parse error".

Can i leave my subs php for you to look at it here?

http://www.megaupload.com/?d=YBQE0VFJ
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: CommanderMadi on May 31, 2010, 08:04:16 AM
Would you please make the link hidden in that format: [Please Login or Register to view this link]"

It would be much better, as the default one looks like a content of the post itself.

I will be very very grateful
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on May 31, 2010, 08:12:10 AM
You can probably edit the language file modifications in modifications.english.php to do that.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: CommanderMadi on May 31, 2010, 08:41:33 AM
can I attach it for you and you edit it?  O:) :)
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on May 31, 2010, 08:59:48 AM
No
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: CommanderMadi on May 31, 2010, 09:01:43 AM
Ok, Thanks for the Support!
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Saved0ne on June 04, 2010, 05:46:30 AM
Quote from: Arantor on March 23, 2010, 09:51:23 AM
Probably the Show Local URLs mod.

My test failed on subs as well... but i dont have the show local urls mod, any suggestions?
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on June 04, 2010, 10:44:11 AM
I would try installing it manually maybe you can see what happened
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: scenerip2k on June 25, 2010, 06:28:03 PM
how about coded links? would be something cool when you have a coded links like [ code] [/ code] you cant view it unless you login or register? just an idea?
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on June 25, 2010, 06:45:16 PM
Nice idea maybe one day
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: mariusfv on July 06, 2010, 06:54:43 AM
Nice mod ... i have few questions :
1.Block links if links are in this BBCode format :
[url=http://www_the_url]View my girfriend[/url]  ?
2.Block internal and external links too ?
3.Block links only on forum ? ...if is used a portal and have few pages is possible to block here the links too ?
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on July 06, 2010, 12:23:44 PM
It should block links anywhere.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: mariusfv on July 16, 2010, 02:33:03 PM
It a nice mod but must have improvement: Admin can add  exception links (like internal links, youtube links and imageshack, postimage where images hosted are 99% linked back).

& My last posts (deleted by me) where I was have problems with Subs.php, I was ask for help on smf 1.1 help board and a good man help me to work but tell me that :

" the code in original file and what is trying to do is way different, i'll try to manage it , but you must tell this to author that code is different in file to what he is trying to search in file "  you can see HERE (http://www.simplemachines.org/community/index.php?topic=390251.msg2698900#msg2698900) . SMF 1.1.11

But as long as the mod hide images linked, hide internal links (hide my site copyright too...all internal links) hide image gallery linked to post etc didn't help me.
I hope when you have time to add improvement with exception links.
Have a nice day !


Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: NaYa on July 19, 2010, 04:50:56 AM
i installed this on my smf 2.0 RC3 forum.SIMPLEPORTAL also installed.
But still there is no difference..........

still guests can see links........
no erorr during installation
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Grim Line on August 01, 2010, 01:12:18 PM
I installed and it worked fine, but i've decided to uninstall but i get test failed in;

./Themes/default/languages/Modifications.english.php

What would i have to do?  :-\
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 01, 2010, 09:55:05 PM
You can ignore it. That occurs if you have more than one mod installed at a time.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: Grim Line on August 02, 2010, 07:37:48 AM
Thanks will do.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: _pi on August 09, 2010, 02:30:33 PM
i am sorry to ask, but i found no good answer while reading the whole topic.
how to exclude signatures from being parsed?

Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 09, 2010, 02:49:55 PM
No way to do that.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: _pi on August 09, 2010, 06:41:42 PM
Quote from: vbgamer45 on August 09, 2010, 02:49:55 PM
No way to do that.

i modified parse_bbc to accept an extra argument, because dealing with signature comes from load.php

    $profile['signature'] = parse_bbc($profile['signature'], true, 'sig' . $profile['ID_MEMBER'],true,1);

but i found no way so far to establish that extra variable.

from load.php i pass value 1. in subs.php i catch that as variable $not.
but what i currently don't understand is how to build in $not in the url/iurl parsing condition.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 09, 2010, 07:07:05 PM
Yeah I don't know much about bbcodes myself so not sure
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: _pi on August 09, 2010, 07:49:15 PM
well, by passing a value from load.php we can tell parse_bbcode that its about signature.

now the question is how to ignore other settings when it comes to parsing $message.

if from load message, then use another condition as from display.php
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: computel on August 17, 2010, 12:27:22 AM
Running version 2.02 on SMF 1.1.11 and I'm getting these errors

[16-Aug-2010 22:22:59] PHP Notice:  Undefined index:  no_view_links in /home/canadian/public_html/smf/Sources/Subs.php on line 1340
[16-Aug-2010 22:22:59] PHP Notice:  Undefined index:  no_view_links in /home/canadian/public_html/smf/Sources/Subs.php on line 1350
[16-Aug-2010 22:22:59] PHP Notice:  Undefined index:  no_view_links in /home/canadian/public_html/smf/Sources/Subs.php on line 1628


How do I fix this?
I think wap users are the ones causing this problem.

I would really like to uninstall it and install the newer version but the uninstall is not there as it's a old version

Please help.

thanks
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 17, 2010, 12:30:14 AM
Looks like a missing language string from modifications.english.php or the wap language file needs reg links text strings added to it.
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: computel on August 17, 2010, 12:33:33 AM
how do I do this as I have no clue how to do this and I don't have a wap file as far as I know.

Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: computel on August 17, 2010, 12:35:58 AM
when is the package-parser going to be up so I can remove this as it's creating a big error log file.

Thanks
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 17, 2010, 02:11:49 PM
On the modsite or external site? If modsite not aware of any errors
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: computel on August 17, 2010, 02:15:39 PM
here

http://www.smfhacks.com/smf-package-parser.html
Title: Re: Registered Links (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on August 17, 2010, 02:39:18 PM
Yeah I disabled that one a while back. Use google search to find another package parser
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 04, 2010, 12:41:30 PM
New release I consider this a must have update!

New in version 3.0
Redid how the mod works completely.
Better hideing of links
Improved method of installation to fix mod compatibility issues.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: Oya on September 04, 2010, 12:56:03 PM
great update thanks had trouble installing it before and the other mod i found was too complicated for me
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 04, 2010, 01:01:36 PM
Glad you enjoy it! Yeah found a way easier way and works a lot better too!
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: thecapo_10 on September 08, 2010, 02:54:31 PM
who hidden only rapidshare, megaupload links?? no every links  ???

Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 08, 2010, 02:58:26 PM
All links are hidden.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: thecapo_10 on September 08, 2010, 03:44:25 PM
I only hidden links from rapidshare and megaupload.... no every links,  is it possible? thanks for answer me
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 08, 2010, 03:46:56 PM
Possible but you would have to code it.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: azhriel on September 23, 2010, 05:14:50 AM
Is the new version hide the links inside the code tags?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 23, 2010, 08:07:45 AM
It should hide links anywhere inside in a post
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: MaXiForum.cz on September 23, 2010, 09:40:19 AM
Quote from: azhriel on September 23, 2010, 05:14:50 AM
Is the new version hide the links inside the code tags?

http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945  ::)
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: jaisi on September 23, 2010, 11:34:42 AM
Quote from: MaXiForum.cz on September 23, 2010, 09:40:19 AM
Quote from: azhriel on September 23, 2010, 05:14:50 AM
Is the new version hide the links inside the code tags?

http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945  ::)

this code work for r3 are only r2 please help me i'am using R3 Version
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: MaXiForum.cz on September 23, 2010, 02:45:43 PM
It is almost the same :)
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: PietvWdV on September 30, 2010, 08:54:44 AM
Hi

I have used an older version of this mod on my forum when I was still on SMF2.0RC2

We had some trouble with the host, out forum was causing a lot of server load, and we eventualy fixed this by installing RC3, and removing all mods.
We were sure that one or more mods were causing this.

Registered links was however, only one of a few mods we had.

The forum is very big and busy, almost 10000 members, hundreds of posts per day, tens of thousands of pageviews per day.

I was reasonably sure that another mod was causing the load on the server and the database, but a freind of mine who also runs an SMF forum told me that Reg Links may also have been the culprit, and that it was, in his words ,"a mayor resource hog"

I have downloaded the new version, but, before I install it, I wanted to ask the creators if this mod will have such a big impact. I realy like this mod and would like to continue to use it, and I am not sure that it is such a resource hog, so I would appreciate some advice and information from guys who would know.

Does this mod have a big impact on the server's processing? Is it advisable to unleash it on a big busy forum?

If it is an urban rumour that this mod eats resouces, then this is the time to bust it, or not.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on September 30, 2010, 10:42:30 AM
It shouldn't have a big impact at all. Just scans links in posts if you are a guest.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: Blade_Runner on October 23, 2010, 12:13:12 PM
This is a great mod. Good Work! Works perfectly. I have a question.
If there a reason why e-mails are left out from the mod?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on October 23, 2010, 02:17:02 PM
It only works on data that is passed though the parse_bbc function
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: Apllicmz on November 05, 2010, 05:07:27 PM
Portuguese
Update

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
    <operation>
        <search position="end"></search>
        <add><![CDATA[
//Begin Reg Links translate candidosa2 for smfpt
$txt['no_view_links'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para ver os links.';
$txt['txt_reg_links_register'] = 'Regista-se';
$txt['txt_reg_links_login'] = 'Entrar';
$txt['txt_reg_links_or'] = 'ou';

//END Reg Links Text Strings   
]]></add>
    </operation>
</file>

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
    <operation>
        <search position="end"></search>
        <add><![CDATA[
//Begin Reg Links translate candidosa2 for smfpt
$txt['no_view_links'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para ver os links.';
$txt['txt_reg_links_register'] = 'Regista-se';
$txt['txt_reg_links_login'] = 'Entrar';
$txt['txt_reg_links_or'] = 'ou';

//END Reg Links Text Strings   
]]></add>
    </operation>
</file>
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on November 05, 2010, 05:08:45 PM
Thank you for the translation
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: thecapo_10 on November 19, 2010, 06:45:19 PM
Hi how implement the modification http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945 in mod download and password? http://www.simplemachines.org/community/index.php?topic=310172.0 Its Possible... O:)


array(
'tag' => 'download',
'before' => '><table><tr><td>',
'after' => '</td></tr></table>',
'block_level' => true,
),
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on November 19, 2010, 06:49:26 PM
This mod just checks for any link inside a parsebbc call.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: iPhoneDestek on November 22, 2010, 05:46:51 AM
Is it possible to see in the permit guests to theme the pictures in this modification.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on November 22, 2010, 10:30:35 AM
This mod just handles links at this time.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: Neo_TE on November 24, 2010, 08:29:24 AM
I tried this mod in a test installation.

This mod blocks links in signature and also the custom copyright which was made using the mod in the following link.

http://custom.simplemachines.org/mods/index.php?mod=1317
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on November 24, 2010, 10:45:45 AM
Yes this mod will change all links.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: SinnerSaint on December 05, 2010, 09:09:01 AM
Thanks for this nice mod vbgamer45.

After reading this post http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945 and editing my php files, I was able to run this mod in my SMF 2.0 RC3 test forum. However, upon checking my error logs, I found these:

   Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 000.000.000.000 
     Reverse chronological order of list Today at 05:51:14 AM
Apply Filter: Only show the error messages of this session 23251d3a10c68f236261e5c6f09947d3
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://www.forumname.com/forum/index.php?topic=2.0
Apply Filter: Only show the errors with the same message
8: Undefined index: smula_hoste_reg
Apply Filter: Only show the errors from this file
File: /forum/Sources/Subs.php
Line: 1067

Are there any available instructions for allowing this mod to hide the links under the CODE tag? It's pretty much useless on my live forum because we require all links to be coded.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on December 05, 2010, 10:09:32 AM
The new version will not touch code tags at all it specifically looks for links only.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: SinnerSaint on December 05, 2010, 12:42:55 PM
Any particular reason why coded links are not included in this mod? Based on my experience, most forums are requiring download links to be coded.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: vbgamer45 on December 05, 2010, 02:04:41 PM
It just goes by any link that is of <a href="">title</a> format and that is how it is handled.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC3 Support Added!)
Post by: SinnerSaint on December 09, 2010, 02:12:34 PM
Thanks for the clarification. Now I understand how your mod works.

I also understand that since the modification of MaXiForum.cz from page 12 (http://www.simplemachines.org/community/index.php?topic=88363.msg1997945#msg1997945) is not part of your mod, you are not obliged to resolve any issues related to it. However, I will be really grateful if you or anyone else can at least take a look at the error message I'm getting at my logs. Everything is working perfectly on my part - all hyperlinks are now hidden from guests and also the CODED links are hidden as well. The only issue I've seen is this pair or error messages:

http://www.forumname.com/forum/index.php?/topic,2.msg3/topicseen.html
8: Undefined index: smula_hoste_reg
File: /forumname.com/forum/Sources/Subs.php
Line: 1064

http://www.forumname.com/forum/index.php?/topic,2.msg3/topicseen.html
8: Undefined index: smula_hoste
File: /forumname.com/forum/Sources/Subs.php
Line: 1064


Only the following files were modified by the post of MaXiForum.cz:
./Themes/default/languages/index.english.php
./Sources/Subs.php

From my understanding, the smula_hoste and smula_hoste_reg variables were already declared in the index.english.php file by the following edits:

// Registered code
$txt['smula_hoste'] = "Hello,";
$txt['smula_hoste_reg'] = '&nbsp;only the <a href="' . $scripturl . '?action=login">logged</a> users can see the characters hidden in CODE. <br /> If you are not registered, you can do it <a href="' . $scripturl . '?action=register">THERE</a>.';
// Registered code


Can you please advise where else should I declare the variables/values in order to eliminate the errors in my logs?

By the way, line # 1064 of Subs.php is the only portion modified by MaXiForum.cz and it contains the following:

'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: SinnerSaint on December 10, 2010, 06:03:55 AM
Just an update, the errors found in my log were due to the old PHP files that were still cached by APC. After clearing SMF's cache and APC, all of the errors went away.

For those who are interested to implement Registered Links to coded links as well, here are the edits I made. The instructions provided by MaXiForum.cz already works but the layout is messed up in SMF 2.0 RC3, so I decided to remove the login and register hyperlinks instead.

File Edits:
./Themes/default/languages/index.english.php

Find:

$txt['quote'] = 'Quote';

Add After:

// Registered code
$txt['smula_hoste'] = "Hello,";
$txt['smula_hoste_reg'] = '&nbsp;only registered users can see the characters hidden in CODE. <br /> If you are not yet registered, please do so now or log in.';
// Registered code


File Edits:
./Sources/Subs.php

Find:

            'tag' => 'code',
            'type' => 'unparsed_content',
            'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
            // !!! Maybe this can be simplified?
            'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
               global $context;

               if (!isset($disabled[\'code\']))
               {
                  $php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

                  for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
                  {


Replace With:

            'tag' => 'code',
            'type' => 'unparsed_content',
           
            // Registered code
           
            'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
            // !!! Maybe this can be simplified?
            'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
               global $context;
               if (!isset($disabled[\'code\']))
               {
                  $php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

                  for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
                  {

Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: DanteOz on January 03, 2011, 05:05:52 PM
Pls make the display text be enclosed with [] eg [you are not allowed to view links, register or login] so as to prevent it from mixing with other message, thnx
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on January 03, 2011, 05:13:35 PM
You can edit the modifications.english.php file to do that.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: DanteOz on January 10, 2011, 02:21:06 AM
Thanks, pls at what line?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on January 10, 2011, 12:17:46 PM
I don't know it depends search the whole file
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Jeet Chowdhury on January 27, 2011, 04:36:56 PM
it also hide share this topic icons.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Jeet Chowdhury on January 27, 2011, 05:01:16 PM
it also hiding link if that in forum news.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Jeet Chowdhury on January 28, 2011, 03:02:38 AM
how to temporary disable this mod.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Jeet Chowdhury on February 13, 2011, 12:26:40 PM
Quote from: SinnerSaint on December 10, 2010, 06:03:55 AM
Just an update, the errors found in my log were due to the old PHP files that were still cached by APC. After clearing SMF's cache and APC, all of the errors went away.

For those who are interested to implement Registered Links to coded links as well, here are the edits I made. The instructions provided by MaXiForum.cz already works but the layout is messed up in SMF 2.0 RC3, so I decided to remove the login and register hyperlinks instead.

File Edits:
./Themes/default/languages/index.english.php

Find:

$txt['quote'] = 'Quote';

Add After:

// Registered code
$txt['smula_hoste'] = "Hello,";
$txt['smula_hoste_reg'] = '&nbsp;only registered users can see the characters hidden in CODE. <br /> If you are not yet registered, please do so now or log in.';
// Registered code


File Edits:
./Sources/Subs.php

Find:

            'tag' => 'code',
            'type' => 'unparsed_content',
            'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
            // !!! Maybe this can be simplified?
            'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
               global $context;

               if (!isset($disabled[\'code\']))
               {
                  $php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

                  for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
                  {


Replace With:

            'tag' => 'code',
            'type' => 'unparsed_content',
           
            // Registered code
           
            'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' :  '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
            // !!! Maybe this can be simplified?
            'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
               global $context;
               if (!isset($disabled[\'code\']))
               {
                  $php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

                  for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
                  {




this method workig before but after i update security patch it working but not showing code in box. what could be the problem.


the code is og:

'tag' => 'code',
'type' => 'unparsed_content',
'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;

if (!isset($disabled[\'code\']))
{
$php_parts = preg_split(\'~(&lt;\?php|\?&gt;)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);

for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
{
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: NyYaNkEeFaN95 on March 12, 2011, 04:37:23 PM
Hey, i installed this mod that block links from ebing viewed as a guest and when i uninstalled it the mod still works.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on March 12, 2011, 08:05:25 PM
Likely it did not uninstall follow the manual install steps and remove all the code that the mod added.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: NyYaNkEeFaN95 on March 12, 2011, 10:04:45 PM
Stupid question were can i find these steps
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on March 12, 2011, 10:09:43 PM
Should on the modsite page for this mod
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Groovy™ on April 14, 2011, 07:27:10 PM
Mode does not work when the link in code Tag :(
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on April 14, 2011, 10:31:15 PM
Yes only handles links outside of tags
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: Groovy™ on April 15, 2011, 06:11:44 AM
whether there is a chance that this mode change, to work with the code tag?

thanks
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on April 15, 2011, 08:29:42 AM
It would probably be a seperate mod. I changed how this mod works so it doesn't go by the bbc parser anymore.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: 4x4buxcommunity on April 23, 2011, 06:21:39 AM
I need help.

I tried this mod and it was working well in my forum. My forum is new so I want to share some stuff using social bookmarking & sharing. I have uninstalled this mod but still I can see "You are not allowed to view links. Register or Login"

Please guide me how I can fix this problem.

forum : 4x4bux.org

Thanks.


Title: Re: Registered Links New Version 3.0! (SMF 2.0 RC4 Support Added!)
Post by: vbgamer45 on April 23, 2011, 09:08:36 AM
Get the manually uninstall instructions from the mod site for this mod then edit the files manually.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: datoneer on June 16, 2011, 07:56:02 AM
I have smf 2.0 version. This mod doesn't work at all

I still see the links.

Cannot view links. Please login or register...

But links is not hidden!
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 16, 2011, 08:44:53 AM
Can you post a link to a page/topic that you can see the links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: datoneer on June 16, 2011, 08:53:18 AM
sure!

http://forum-st.net/index.php?topic=60.0
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 16, 2011, 09:10:40 AM
Issue is you have the text in the code tag. Which isn't a link so it won't filter it out.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: datoneer on June 16, 2011, 09:24:09 AM
How can i make it to work. This is very important to me. Please!
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 16, 2011, 09:25:17 AM
5 or six posts up
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: admiral888 on June 19, 2011, 03:35:44 PM
this mod is reallly useful.  makes it easy to get visitors register to the forums but how can we stop this mod not to hide the links in "in welcome email", "in private messages" and no where else rather than inside the posts such as news section etc.

thank you
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 19, 2011, 06:11:57 PM
That is tricky currently it checks for links anywhere but I could add a check to just do it on topic or category pages.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on June 27, 2011, 04:34:32 PM
vbgamer45, is it possible to limit the functions of this mod so that BBCodes that use URL's are omitted. For instance, I have a BBCode that when applied, links to another website, i.e. [wiki]Something[/wiki]. The "something" links to wikipedia, but I don't want this mod to conflict with this. What could I do to the IF statement so that it omits the BBCode [wiki].

Please Help
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 27, 2011, 04:36:10 PM
Quote from: shuban on June 27, 2011, 04:34:32 PM
vbgamer45, is it possible to limit the functions of this mod so that BBCodes that use URL's are omitted. For instance, I have a BBCode that when applied, links to another website, i.e. [wiki]Something[/wiki]. The "something" links to wikipedia, but I don't want this mod to conflict with this. What could I do to the IF statement so that it omits the BBCode [wiki].

Please Help
Not easily I had an older version that just focused on the url tags but that did not work correctly in hiding all links so changing to rewriting all links in the post display.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on June 27, 2011, 05:03:25 PM
Quote from: vbgamer45 on June 27, 2011, 04:36:10 PM
Quote from: shuban on June 27, 2011, 04:34:32 PM
vbgamer45, is it possible to limit the functions of this mod so that BBCodes that use URL's are omitted. For instance, I have a BBCode that when applied, links to another website, i.e. [wiki]Something[/wiki]. The "something" links to wikipedia, but I don't want this mod to conflict with this. What could I do to the IF statement so that it omits the BBCode [wiki].

Please Help
Not easily I had an older version that just focused on the url tags but that did not work correctly in hiding all links so changing to rewriting all links in the post display.

vbgamer45, could you show me your previous one, perhaps I could get an idea of what you did and try to mimic it. I'm using 1.1.14. Otherwise, I will have to uninstall this mod, which i've used for over a year!
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on June 27, 2011, 05:18:38 PM
Here's how my code currently looks like:

// Registered Links
if ($user_info['is_guest'] && $context['current_board'] != '38')
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on June 27, 2011, 06:46:47 PM
Old version attached
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on June 27, 2011, 10:12:50 PM
Quote from: vbgamer45 on June 27, 2011, 06:46:47 PM
Old version attached

Thank you!
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: eric1234 on July 06, 2011, 11:21:51 AM
Links

The links in the can still been seen by the guest >.< how to solve this?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 06, 2011, 12:10:48 PM
Does not work in code tags
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: eric1234 on July 06, 2011, 01:50:56 PM
Then what shall i do? As most of my user posted links was in code tag >.<
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: eric1234 on July 16, 2011, 03:30:44 PM
So there is no way it can work for code tag??  :'(
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 16, 2011, 03:46:04 PM
Not at this time
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: jonathan1980tr on September 06, 2011, 07:45:18 AM
Is it only for hiding links? Can i also hide pictures using this mod?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 06, 2011, 09:33:38 AM
Only hides links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: cosmicxxx on September 23, 2011, 01:54:22 PM
how to exlude a specific board from this mod?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 23, 2011, 03:30:13 PM
You would need to modify the code to check for the $_REQUEST['board']
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Oskarlover on December 01, 2011, 05:31:21 PM
Quote from: vbgamer45 on September 06, 2011, 09:33:38 AM
Only hides links

For some reason is also hiding images.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on December 01, 2011, 06:04:14 PM
It will hide image links.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: meowchee on December 16, 2011, 11:15:53 PM
it hides all my upload picture, I uninstall it (version 3.0)  link shows up back to normal, but picture on post still hiding for guests, how can I completely uninstall and what code do I need to edit ? thanks
my site diytcm.com
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vladok on December 18, 2011, 03:14:59 AM
if ($user_info['is_guest'] && $context['current_board'] != '38')
(See Reply #466 )
shuban
How do I change this part to work with five or six boards?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on December 18, 2011, 09:53:49 AM
Simple way keep adding to the statment such as

if ($user_info['is_guest'] && $context['current_board'] != '1' && $context['current_board'] != '2' && $context['current_board'] != '3' && $context['current_board'] != '4')
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: meowchee on December 18, 2011, 11:16:49 AM
I had try all day long to find the way to completely uninstall to get back my picture viewable for guest, but still not working,please help me what code should I reedit it? thank you so much.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: meowchee on December 18, 2011, 12:52:14 PM
nvmd ,I found it
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: fullmoonya on January 16, 2012, 11:38:43 PM
hi sir vbgamer, i would like to remove the effect of reglink in signature. how could i turn it off in the signatures? i just want only to effect it on the members posts.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on January 16, 2012, 11:49:44 PM
No easy way to do it currently since this mod calls from the parsebbc function
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vladok on February 04, 2012, 03:14:06 PM
how to add a condition does not hide the links to your own website?
Title: Re: Registered Links
Post by: Earthsurf.tk on May 02, 2012, 10:20:33 AM
Quote from: vbgamer45 on May 18, 2006, 09:33:55 PM
No permissions just turns post links off for guests in posts. Informs them to register or login to view the links.

pls i dnt understand. How should i do it
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Robert. on May 02, 2012, 10:24:25 AM
I'm sorry but I'm afraid mods won't work on createaforum. :( I'd suggest installing SMF by following this tutorial:
Installing SMF (http://wiki.simplemachines.org/smf/Installing) :)
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Abhay Trivedi on May 04, 2012, 11:04:33 AM
hey vbgamer45
i want a help
i just want this mod to work in the topics and not everywhere
like if  i add a link to the news in my forum then that links also hides up but i don't want that
any solution?? :(
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: SMFHacks.com Team on May 04, 2012, 11:11:42 AM
No solution this mod adds it everywhere.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Abhay Trivedi on July 05, 2012, 12:18:52 AM
Hey VB gamer
How to uninstall this mod completely??
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on July 05, 2012, 12:40:09 AM
Just use the package manager to uninstall and should be set.
If not get manual install instructions from mod site and just reverse it
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: drfun on September 25, 2012, 03:49:18 PM
Is there a way to restrict the mod from hiding link on ADK portal home. it seems to hide adverts with links from quest.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on September 25, 2012, 06:49:17 PM
No there is not it does all links everywhere
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: techguy on November 09, 2012, 12:18:35 PM
Hi all,

I am new to DMF and Php stuff.
I am impressed by this module, but can it be modified a bit.

Instead of giving the register or login option, can we use an option to like us on Facebook, do that users can see the links after they like us on FB
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on November 09, 2012, 01:19:55 PM
Not easy to do since you have to check with facebook if that person has liked you or not.
Title: Re: Registered Links
Post by: techguy on November 10, 2012, 01:37:15 AM
I have installed Facebook with open graph mod
So I think that there will be some sort of thing which we can do to check facebook insight
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Jack_40k on January 17, 2013, 09:36:13 AM
Can you please add support for portals/ads? It would be really useful if guests could be blocked from viewing relevant links - and be exposed to ads and facebook links etc.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on January 17, 2013, 09:50:06 AM
It won't work on ads. But takes anything in the ouptput buffer and attempts to rewrite it.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: drfun on February 14, 2013, 11:23:47 AM
Is there a way i can manually uninstall this Registered Links, i tried uninstalling it using the package manager and i encountered an error during a test  uninstalling of this package.
the error was found in
Quote
Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed
1.              Replace     ./Themes/default/languages/Modifications.english.php    Test failed

is there a way i can uninstall it manually.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on February 14, 2013, 11:24:40 AM
That error is safe to ignore Will not affect your site. But you can later remove the text strings added to that file from reg links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: drfun on February 14, 2013, 11:58:41 AM
thanks i have just uninstall it,
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on August 02, 2013, 10:10:30 PM
Did the mod author ever end up coding it where it excludes links originating from the forum's URL? :-\
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 02, 2013, 10:23:45 PM
No.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on August 03, 2013, 11:59:12 AM
Quote from: vbgamer45 on August 02, 2013, 10:23:45 PM
No.

Don't mean to be rude, but for an expert coder, shouldn't this be a relatively easy task?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 04, 2013, 10:40:31 AM
Maybe still would take me probably an hour of work which I do not have time for.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Biology Forums on August 23, 2013, 12:32:39 AM
Quote from: vbgamer45 on August 04, 2013, 10:40:31 AM
Maybe still would take me probably an hour of work which I do not have time for.

I found a way around it.

find:

if ($user_info['is_guest'])
{


add:



$myurl = 'YOUR URL HERE, for example url.com';

if(strpos($message,$myurl) == false)


This should effectively show the urls if there is url.com in $message. Only problem is, it will now show all the links in that message if there are other links with different urls. Still a good compromise.

Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Arantor on August 23, 2013, 07:23:23 AM
Or not even close, in fact. You're not using strpos correctly.

strpos will return false if it wasn't found. It will return 0 if it was found at the start of the string you're testing for which using == will match to false.

The test should be !== false. Right now it's checking that url.com isn't present or it's the very start of the message.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: fatyhxd41 on August 31, 2013, 10:06:51 AM
I installed this mod but it isn't working. Still showing links to visitors.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 31, 2013, 10:47:39 AM
Check that it made it the code its to the SMF files
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: melwynjensen on November 09, 2013, 12:55:32 PM
I have uninstalled the  Registered Links mod from my website www.infomaniac.co.in (http://www.infomaniac.co.in) being the site is new but the problem is, it still shows up the "You are not allowed to view links. Register or Login" for Guests. Why is that?

Is there any code changes necessary to come out of it? Can you please help me in this?

Hope I will get a reply soon.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on November 09, 2013, 05:17:28 PM
Get the manual code install instructions from http://mods.simplemachines.org/index.php?mod=342
And reverse the changes
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: melwynjensen on November 10, 2013, 11:39:47 AM
Thanks a lot vbgamer45 :) Very less code change so able to get it done!

Removing the below piece of code from Sub.php under sources folder did the trick.

      // Registered Links
      if ($user_info['is_guest'])
      {
         $message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
      }

      // End Registered Links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: GamePersia on February 07, 2014, 12:51:14 AM
how to modify it ??...like add a image instead of the text ??
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on February 07, 2014, 09:44:17 AM
Edit the code added to subs.php and modify the html it injects.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: GamePersia on February 07, 2014, 09:59:00 AM
Quote from: vbgamer45 on February 07, 2014, 09:44:17 AM
Edit the code added to subs.php and modify the html it injects.
am i have to edit this :
Quote// Registered Links
      if ($user_info['is_guest'])
      {
         $message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
      }

      // End Registered Links
If yes,..then please tell in detail,..that where to add image ??
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on February 07, 2014, 05:29:27 PM
That code right there yes replace with image tag  instead of
$txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>'
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: desai_amogh on March 05, 2014, 04:42:44 AM
Can this also block attachments and ask guests to register or login to view them ??
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on March 05, 2014, 08:33:20 AM
No just links
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: desai_amogh on March 18, 2014, 08:22:53 AM
How can I block attachment for guests on 2.0.7 ??
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on March 18, 2014, 08:46:09 AM
That is done with SMF permissions.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: -Captain Ghost- on August 11, 2014, 01:07:44 PM
Hello,
First of all thanks for this great mod no problem with it's functionality but still is there any way to use a image instead of text for hiding link.

Thanks
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on August 11, 2014, 01:08:21 PM
Possibly I think you will need to edit the code/text string to use html image instead of text.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: -Captain Ghost- on August 11, 2014, 01:16:14 PM
Quote from: vbgamer45 on August 11, 2014, 01:08:21 PM
Possibly I think you will need to edit the code/text string to use html image instead of text.
I don't know how to do this can you help me

Thanks
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: -Captain Ghost- on August 12, 2014, 09:01:36 AM
Quote from: vbgamer45 on August 11, 2014, 01:08:21 PM
Possibly I think you will need to edit the code/text string to use html image instead of text.
Sorry for replying again but I am struggling with how to add image in place of text.
I don't even have 1% knowledge of doing this.

Sorry if I have irritated you.

Thanks
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Rumpa on October 06, 2014, 06:01:27 PM
if I code the link using code tag then this mod did not work
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on October 06, 2014, 06:11:58 PM
Yes code tags is a different mod check my mod site/page for link i have one that hides code tags
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Reason 7 Fan on February 02, 2015, 12:31:17 PM
Is the only way to turn this off, to uninstall it? I can't find this in my features and options. The only answer I see is from 2006 and it seems link the person install it.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on February 02, 2015, 01:13:02 PM
Yes that is the only way.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Reason 7 Fan on February 02, 2015, 01:28:05 PM
thanks
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: 420Connect.co.uk on February 18, 2015, 06:51:15 AM
Hey,

I've just realised, whilst I uninstalled it a while go - links are still effected by the mod..

could you help "really" removing it :X
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on February 18, 2015, 09:18:22 AM
Upload the package to http://www.smfhacks.com/smf-package-parser.html then undo all the edits it makes on those files.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: 420Connect.co.uk on February 18, 2015, 09:57:56 AM
Quote from: vbgamer45 on February 18, 2015, 09:18:22 AM
Upload the package to http://www.smfhacks.com/smf-package-parser.html then undo all the edits it makes on those files.

(https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fi302.photobucket.com%2Falbums%2Fnn103%2Fi_am_deeply_in_love%2Fsmileys%2Fsmiley-blowing-kisses.gif&f=1)
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: smap on March 05, 2015, 02:41:01 AM
I needed to exclude some boards and I'm using version 3.0, so based on the mods exposed here - http://www.simplemachines.org/community/index.php?topic=88363.msg2046161#msg2046161 - I did the following changes


On the file /Sources/Subs.php

Change this


// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links


By this


// Registered Links, exclude board id in array(id1,id2,...)
if (isset($context['current_board']))
{
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
}


PS: I only read till page 13 of this topic, maybe on some other page of the current 27 someone also did something like this, I honestly don't know.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on March 05, 2015, 07:01:06 AM
Nice change. So it only affects some boards and only works on boards itself! Didn't know about the $context['current_board'] variable available on the board when viewing the topic handy.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: MESWEB on April 12, 2015, 03:57:42 AM
If we go to ?area=showposts url then we see links not hide. Can You fix this?
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: vbgamer45 on April 12, 2015, 06:15:40 PM
Maybe strange that it won't do it there.
Title: Re: SMF Links and Registered Links
Post by: Jim88 on September 29, 2015, 12:03:33 AM
I installed SMF Links and now I just installed Registered links.  The Registered links works on the posts on my forum but not on the SMF Link boxes that I have links listed in.  I would prefer it if it just worked on the SMF Links and not the other way around. 

Right now all a guest has to do is click on the links tab at the top and open any link that is listed there. 

Is there a way to change this?

thanks,

Jim
Title: Re: Registered Links
Post by: vbgamer45 on September 29, 2015, 12:12:48 AM
Not easily no. Currently only works in areas where the parser analyzes the code.
Title: Re: Registered Links
Post by: Jim88 on September 29, 2015, 02:03:18 AM
That's ok.  I changed the permissions for SMF Links and got the result I was after. 

Admin / Permissions / General Permissions / Guests / Modify / SMF Links View links page: uncheck box

Thanks for the fast reply.
Title: Re: Registered Links
Post by: vbgamer45 on September 29, 2015, 06:25:34 PM
Glad you have it working.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: BillLeeDee on May 01, 2016, 05:04:39 PM
Quote from: smap on March 05, 2015, 02:41:01 AM
I needed to exclude some boards and I'm using version 3.0, so based on the mods exposed here - http://www.simplemachines.org/community/index.php?topic=88363.msg2046161#msg2046161 - I did the following changes


On the file /Sources/Subs.php

Change this


// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links


By this


// Registered Links, exclude board id in array(id1,id2,...)
if (isset($context['current_board']))
{
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
}


PS: I only read till page 13 of this topic, maybe on some other page of the current 27 someone also did something like this, I honestly don't know.

I hope somebody might be able to lend a hand. I recently used this modification and it works a treat. I would, however, like to change the user_info to add one of my member groups used for probationary members to prevent people from joining to simply glean the links that are meant for long standing and vetted users. If somebody with a little better understanding of how to accomplish this can put their eye on this and figure it out I would be most appreciative.

Thanks in advance.
Title: Re: Registered Links
Post by: Kindred on May 01, 2016, 07:44:11 PM
&& should be ||
Title: Re: Registered Links
Post by: BillLeeDee on May 05, 2016, 10:18:39 PM
Quote from: Kindred on May 01, 2016, 07:44:11 PM
&& should be ||

I haven't tried that yet as it seems to be working at the moment.

The cited code above does allow one to exclude a board from the mod, and it works great. I need to add the ability to make the mod work on a specific membergroup to keep newbies from joining only for the reason of gleaming the obscured links. My own personal coding ability is limited so if somebody has a suggested way to add this feature I would be most grateful. Thanks in advance.
Title: Re: Registered Links
Post by: -Rock Lee- on May 06, 2016, 12:14:32 PM
@vbgamer45 Very good indeed modification have used it in several forums I had to do some things ... there are many layers or simply leave the translation equally if someone wants in Latin Spanish.

Modifications.spanish_latin.php
//Begin Reg Links
$txt['no_view_links'] = 'No tienes permiso para ver enlaces.';
$txt['txt_reg_links_register'] = 'Registrate';
$txt['txt_reg_links_login'] = 'Inicia sesi&oacute;n';
$txt['txt_reg_links_or'] = 'o';
//END Reg Links Text Strings


and Modifications.spanish_latin-utf8.php
//Begin Reg Links
$txt['no_view_links'] = 'No tienes permiso para ver enlaces.';
$txt['txt_reg_links_register'] = 'Registrate';
$txt['txt_reg_links_login'] = 'Inicia sesión';
$txt['txt_reg_links_or'] = 'o';
//END Reg Links Text Strings


Regards!
Title: Re: Registered Links
Post by: vbgamer45 on May 06, 2016, 12:45:48 PM
Thanks for the translation!
Title: Re: Registered Links
Post by: BillLeeDee on May 07, 2016, 03:26:37 PM
In this code:

// Registered Links, exclude board id in array(id1,id2,...)
if (isset($context['current_board']))
{
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
}


If I substitute this line:
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...

with this one:
if (in_array(14, $user_info['groups']))

I can get the desired result with excluding a membergroup from showing links (group is for probationary members). I'm unable to get both lines to co-exist together, either a line is ignored or it crashes PHP (as stated previous, I'm a rookie coder).

If somebody would be kind enough to show me how to get both conditional lines to co-exist and be acted upon for their respective conditions I'd be most grateful.
Title: Re: Registered Links
Post by: BillLeeDee on May 10, 2016, 08:20:30 PM
Really? Not one person can even give me a hint on how to do this? Boy, this is disappointing.
Title: Re: Registered Links
Post by: BillLeeDee on May 13, 2016, 03:10:36 PM
Never mind, I paid somebody to code this for me and they got it working in 5 minutes.
Title: Re: Registered Links New Version 3.0! (SMF 2.0 Support Added!)
Post by: Terra_Cresta on July 09, 2016, 07:40:18 AM
Quote from: vbgamer45 on October 06, 2014, 06:11:58 PM
Yes code tags is a different mod check my mod site/page for link i have one that hides code tags
I've tried to find the mod to hide links within code tags without success. Is it still available?
Title: Re: Registered Links
Post by: justinguru on September 25, 2016, 02:40:38 AM
Please help.. I just uninstalled it from my forum but it's till activated how do I remove it completely http://www.infogurus.net
Title: Re: Registered Links
Post by: vbgamer45 on September 25, 2016, 10:08:37 AM
Upload the mod to http://www.smfhacks.com/smf-package-parser.html
To get the manually uninstall options
Title: Re: Registered Links
Post by: engrz on March 09, 2017, 02:27:12 AM
Hello

Im unable to remove this mod, as it is not working for me on smf 2.0.13. im getting error (attachment)
Title: Re: Registered Links
Post by: Kindred on March 09, 2017, 06:49:27 AM
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Registered Links
Post by: engrz on March 09, 2017, 06:04:40 PM
Quote from: Kindred on March 09, 2017, 06:49:27 AM
http://wiki.simplemachines.org/smf/Error_in_mod_installation

This is the error in mod uninstallation
Title: Re: Registered Links
Post by: vbgamer45 on March 09, 2017, 06:07:47 PM
Proceed with uninstall that is common with language files.
Title: Re: Registered Links
Post by: Kindred on March 09, 2017, 08:14:35 PM
Besides..  if you actually READ the link, you might note that the same applies to errors during installation and uninstallation
Title: Re: Registered Links
Post by: engrz on March 13, 2017, 07:16:32 AM
Quote from: Kindred on March 09, 2017, 08:14:35 PM
Besides..  if you actually READ the link, you might note that the same applies to errors during installation and uninstallation

I read the link and un-installed this mod... thank you bro.
Title: Re: Registered Links
Post by: MULITRI on March 18, 2017, 01:54:44 PM
Just to let you all know, i have just installed it into a fully moded v2.0.13 forum, and installation was perfect.

I had not errors before install it in Modifications.ebglish.php, but surely if i try to unistall it now, after i have traslated the texts to a different language, it will gives error in that file as it wasn't the original texts.

Nice Mod to encourage visitors to register. Good job, Thanks.
Title: Re: Registered Links
Post by: engrz on March 27, 2017, 12:36:16 AM
i have installed this mod in my forum, the installation was successful but the problem is, it is not working with attachments, it is only working with the links in news section.

on news links it says to login or registered, but in attachment the attachment is view able, i want to hide attachments to encourage people to register.

what is the solution?
Title: Re: Registered Links
Post by: vbgamer45 on March 27, 2017, 01:12:33 AM
It does not hide attachments. Attachments you can hide with permissions in SMF
Only links in posts and parse_bbc areas.
Title: Re: Registered Links
Post by: engrz on March 27, 2017, 01:26:30 AM
Quote from: vbgamer45 on March 27, 2017, 01:12:33 AM
It does not hide attachments. Attachments you can hide with permissions in SMF
Only links in posts and parse_bbc areas.

Is there any mod to hide attachment and suggest guest to register to see attachment?
Title: Re: Registered Links
Post by: vbgamer45 on March 27, 2017, 08:36:18 AM
no
Title: Re: Registered Links
Post by: felizycontento on November 29, 2017, 12:32:52 PM
I cannot uninstall it¡¡

I am runing smf 2.0.15 and I cannot make it stop working.

The mod uninstall without problems, but it keeps avoiding non registered user from seen the links.

It is a good option at the begining of a forum, but when you have enough users it does not help with SEO.

Is there a way at least of make it stop working?

Thanks
Title: Re: Registered Links
Post by: -Rock Lee- on November 29, 2017, 01:06:22 PM
Quote from: felizycontento on November 29, 2017, 12:32:52 PM
I cannot uninstall it¡¡

I am runing smf 2.0.15 and I cannot make it stop working.

The mod uninstall without problems, but it keeps avoiding non registered user from seen the links.

It is a good option at the begining of a forum, but when you have enough users it does not help with SEO.

Is there a way at least of make it stop working?

Thanks

If I can uninstall it, you must look at the code of the mod to be able to manually remove it, it is to apply the inverse when installing manually. I hope to explain my English is not all good ...


Regards!
Title: Re: Registered Links
Post by: vbgamer45 on November 29, 2017, 06:05:24 PM
Yes and you can use this tool to find the edits
https://www.smfhacks.com/smf-package-parser.html
Title: Re: Registered Links
Post by: felizycontento on December 03, 2017, 03:37:42 PM
Quote from: vbgamer45 on November 29, 2017, 06:05:24 PM
Yes and you can use this tool to find the edits
https://www.smfhacks.com/smf-package-parser.html

According to this tool, what it does is quite simple. It writes the following in the sources/subs.php file:

// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=join">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links


And this is not present in my subs.php file after uninstall

I cleared the cache, but it keeps not showing the links.

Any help welcome
Title: Re: Registered Links
Post by: vbgamer45 on December 03, 2017, 05:10:15 PM
Strange I would check if you other mods installed? that could cause that issue.
Title: Re: Registered Links
Post by: felizycontento on December 03, 2017, 05:47:10 PM
I have other plugin but no idea wich could cause this. There is only one i dont know waht is it about. It is called "new hooks o.4.1"

The rest are things like shoutbox, tapatalk, theme changer, recaptcha, optimus
Title: Re: Registered Links
Post by: vbgamer45 on December 03, 2017, 05:56:20 PM
Could be tapatalk or optmius
Title: Re: Registered Links
Post by: felizycontento on December 03, 2017, 06:19:30 PM
Quote from: vbgamer45 on December 03, 2017, 05:56:20 PM
Could be tapatalk or optmius

Both uninstalled and keeps not working

You can see it at https://acspain.es (https://acspain.es)
Title: Re: Registered Links
Post by: felizycontento on December 19, 2017, 03:37:36 PM
Ok, found the problem. Hope it could help someone

When instaling, this mod search for "// Cache the output if it took some time..." and adds its content before.

To uninstal the mod, it search for:

// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=join">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links
// Cache the output if it took some time...


But this is not the only plugin searching for "// Cache the output if it took some time..." and been installed there. So another mod has been inserted between the  "// End registered links." and "// Cache the output if it took some time..."

So he cannot find the text I have entered as code.

It is easy to repair for the creator. Just remove the // cache.... in the search string for uninstalling.
Title: Re: Registered Links
Post by: Arantor on December 19, 2017, 03:39:25 PM
That's not possible; the uninstall routine is part of SMF and simply says 'reverse the install instruction'. There's no way to fix this in SMF's current design.
Title: Re: Registered Links
Post by: felizycontento on December 19, 2017, 03:42:22 PM
Quote from: Arantor on December 19, 2017, 03:39:25 PM
That's not possible; the uninstall routine is part of SMF and simply says 'reverse the install instruction'. There's no way to fix this in SMF's current design.

Sorry, I thought the creator of the mod could writte an uninstall routine.
Title: Re: Registered Links
Post by: Arantor on December 19, 2017, 04:08:55 PM
Not reliably. It's a fundamental problem that ALL SMF mods that do file edits face, not just this one.
Title: Re: Registered Links
Post by: naijacrux on January 17, 2018, 03:06:29 PM
Quote from: felizycontento on November 29, 2017, 12:32:52 PM
I cannot uninstall it¡¡

I am runing smf 2.0.15 and I cannot make it stop working.

The mod uninstall without problems, but it keeps avoiding non registered user from seen the links.

It is a good option at the begining of a forum, but when you have enough users it does not help with SEO.

Is there a way at least of make it stop working?

Thanks

this is what to do...go to subs.php

the problem is once installed and uninstall or upgrade smf, the reglinks files will still be in subs,php meaning it doesnt uninstall especially for those who upgrade,unistall might show successful in smf package unstaller but files remains in subs,php, so after uninstalling from package manager on smf,just login to your cpanel , check sources, subs.php, look for this below and delete it. hope this helps. Please subscribe to my youtube if my post helps. thank https://www.youtube.com/channel/UCoqi_GflcGVL0Q10-YCwqvg





      // Registered Links
      if ($user_info['is_guest'])
      {
         $message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
      }

      // End Registered Links

Title: Re: Registered Links
Post by: vbgamer45 on January 17, 2018, 03:14:59 PM
You can also just reverse the manual install insutrctions that is my normal tip
I have a package parser at https://www.smfhacks.com/smf-package-parser.html
Title: Re: Registered Links
Post by: Jsizizzle on January 20, 2018, 06:27:32 PM
Hello, I tired to uninstall this mod and got a warning and 2 failed messages.  Can someone help me as I'd now like guests to see all links?
Title: Re: Registered Links
Post by: vbgamer45 on January 20, 2018, 06:44:31 PM
Upload the mod to https://www.smfhacks.com/smf-package-parser.html then reverse all the edits.
Title: Re: Registered Links
Post by: Jsizizzle on January 20, 2018, 08:48:34 PM
I have no idea what to do with the link you have me. Can you please explain what I need to do in order to reverse the edits?
Title: Re: Registered Links
Post by: vbgamer45 on January 20, 2018, 09:04:27 PM
Just upload to that site and see what files it edits then manually change them in the files.
Title: Re: Registered Links
Post by: -Rock Lee- on February 12, 2018, 07:28:00 PM
Quote from: Jsizizzle on January 20, 2018, 06:27:32 PM
Hello, I tired to uninstall this mod and got a warning and 2 failed messages.  Can someone help me as I'd now like guests to see all links?

That happens when a certain line is not found to be able to do the installation, you must manually modify the file where the error marks you and then install it. In this way it should be working without major problems or in any case adapt it to the theme needs ...


Regards!
Title: Re: Registered Links
Post by: SirLouen on July 09, 2018, 09:13:57 AM
There is any pro mod for this? Something that could manage more things, for example, selecting which URLs should not be hidden for guests.
Take care, because this mod is a SEO killer because it also affects to internal linking in posts... (not only benefits the idea of deleting external links)
Title: Re: Registered Links
Post by: vbgamer45 on July 09, 2018, 09:17:14 AM
There is not.
Title: Re: Registered Links
Post by: SirLouen on July 15, 2018, 09:34:04 AM
Have you published this in Github? I might consider looking for ways to extend this because as I said, as it is currently this plugin has an awesome functionality, but at the same time is a serious SEO killer.
Title: Re: Registered Links
Post by: vbgamer45 on July 15, 2018, 09:39:24 AM
Not at at this time. You can make changes and post here and I can review.
Title: Re: Registered Links
Post by: SMFHacks.com Team on February 13, 2019, 09:54:53 PM
Added install support for 2.1 RC1
Title: Re: Registered Links
Post by: dodos26 on January 03, 2020, 08:23:05 AM
Hey, Good Broother! You can add a remove hides for "select" on code tag?
Title: Re: Registered Links
Post by: vbgamer45 on January 03, 2020, 09:10:32 AM
Not part of this mod. I think there was another mod that did that.
Title: Re: Registered Links
Post by: dodos26 on January 03, 2020, 11:39:29 AM
But why don't you want to add this improvement? Because of this, users who see the code cannot select it.
Title: Re: Registered Links
Post by: vbgamer45 on January 03, 2020, 11:41:12 AM
Trying to keep the mod as simple as possible. Any link should be marked as such. More features cause more issues.
Title: Re: Registered Links
Post by: sirfpsycho on January 09, 2020, 11:34:46 PM
I am using smf 2.0.15 and Registered Links mod 3.0

In simpleportal shoutbox, most of the time error shows:
You are not allowed to view links

While already logged in. As an Admin still I face this issue. After 5-10 minutes I can see links in shoutbox automatically. After few minutes again error shows. How can I fix?
Title: Re: Registered Links
Post by: vbgamer45 on January 10, 2020, 08:10:16 AM
It might be a caching issue causing old data to show up and reappeear at times.
Title: Re: Registered Links
Post by: sirfpsycho on January 11, 2020, 10:11:43 PM
so how to fix it bro?
Title: Re: Registered Links
Post by: vbgamer45 on January 12, 2020, 04:52:20 AM
It would probably be on simple portals end/disable SMF caching levels
Not ideal but that is what happens when data is cached. It should be cached by membergroup level if data changes.
Title: Re: Registered Links
Post by: Shades. on September 19, 2021, 12:15:57 AM
Just letting you know the register link in this mod needs to be updated to action=signup instead of action=register for 2.1RC4 ;)
Title: Re: Registered Links
Post by: vbgamer45 on September 19, 2021, 12:28:01 AM
thanks for the headsup!
Title: Re: Registered Links
Post by: vbgamer45 on September 19, 2021, 12:32:02 AM
Update!
Now supports SMF 2.1 RC4 and uses signup action instead of register