Advertisement:

Author Topic: Registered Links  (Read 224319 times)

Offline bugsmi0

  • Jr. Member
  • **
  • Posts: 196
Re: Registered Links
« Reply #40 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

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Registered Links
« Reply #41 on: August 23, 2006, 01:05:46 PM »
Any changes to get this great mod for SMF RC1.3?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #42 on: August 23, 2006, 01:12:01 PM »
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

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #43 on: August 23, 2006, 04:44:21 PM »
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

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Registered Links
« Reply #44 on: August 24, 2006, 12:10:41 AM »
thx for the fast recoding :D

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #45 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 [nofollow]

thanks.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #46 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.
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

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #47 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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #48 on: August 25, 2006, 10:25:01 AM »
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

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #49 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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #50 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.
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

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #51 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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #52 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.
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

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #53 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.


Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Registered Links
« Reply #54 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>

Offline fledgling

  • Semi-Newbie
  • *
  • Posts: 15
Re: Registered Links
« Reply #55 on: August 26, 2006, 01:16:13 AM »
forgive me..

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

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Registered Links
« Reply #56 on: August 26, 2006, 01:18:42 AM »
plz hang on, I will copy and paste it from my own sub.php file

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Registered Links
« Reply #57 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>',
         )
      );
   }

Offline 1milehi

  • Semi-Newbie
  • *
  • Posts: 49
Re: Registered Links
« Reply #58 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~

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,350
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Registered Links
« Reply #59 on: August 26, 2006, 09:17:39 AM »
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