News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Registered Links

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

Previous topic - Next topic

bugsmi0

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

qtime

Any changes to get this great mod for SMF RC1.3?

vbgamer45

Haven't tried yet. I will check it out later tonight.
Community Suite for SMF - Take your forum to the next level built for 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

vbgamer45

Ok finished it ported to SMF 1.1 RC3
Community Suite for SMF - Take your forum to the next level built for 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

qtime

thx for the fast recoding :D

fledgling

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 [nofollow]

thanks.

vbgamer45

I think you need to reinstall a copy of your rc3 files. Check which files the mod edits and then just replace those.
Community Suite for SMF - Take your forum to the next level built for 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

fledgling

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.

vbgamer45

I am pretty sure subs.php is the file that causes the trouble.
Community Suite for SMF - Take your forum to the next level built for 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

fledgling

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.

vbgamer45

I wouldn't delete that. I would use the old code before the <add> and use that code to replace it.
Community Suite for SMF - Take your forum to the next level built for 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

fledgling

ah. i see. Ok, I'll try it when i get home tonight and let you know how it goes.

vbgamer45

I found out was causing the unistall problem. Seems that there is a bug in the package manager when unistalling bbc mods.
Community Suite for SMF - Take your forum to the next level built for 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

fledgling

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.


qtime

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>

fledgling

forgive me..

So I would put all that code.. exactly where? Before or after what?

qtime

plz hang on, I will copy and paste it from my own sub.php file

qtime

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>',
         )
      );
   }

1milehi

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~

vbgamer45

Check modifications.english and see if $txt['no_view_links'] is defined.
Community Suite for SMF - Take your forum to the next level built for 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

Advertisement: