News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Registered Links

Started by SMFHacks.com Team, May 18, 2006, 07:42:31 PM

Previous topic - Next topic

Gobo

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)

vbgamer45

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.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

leoedin

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.


vbgamer45

Don't worry about that part. It is a known problem with all mods that install to Modifications.english.php
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

leoedin

so if I click continue will it be OK?

leoedin

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...

vbgamer45

Replace subs.php with the orginal subs.php.

BBC mods do  not uninstall correctly.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

1milehi

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

?>

vbgamer45

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 ?>

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

1milehi


danifs

#70
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

hxxp:img101.imageshack.us/my.php?image=reglinksuw7.png [nonactive]

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: hxxp:rapidshare.de/files/34884688/reglinksME.zip.html [nonactive]

PD: sorry for my english


fiver

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

URPG

*waiting for a better looking and RC3 version*

Gobo

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 and see it says RC3

salazarboy

Is there any way to make this mod work with version 1.0.9?





Pedja

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.

Greek

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

mgaidia

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 :)

Greek

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>

Greek


Advertisement: