News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Registered Links

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

Previous topic - Next topic

vbgamer45

It shouldn't have a big impact at all. Just scans links in posts if you are a guest.
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


vbgamer45

It only works on data that is passed though the parse_bbc function
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

Apllicmz

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>



vbgamer45

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

thecapo_10

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

vbgamer45

This mod just checks for any link inside a parsebbc call.
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

iPhoneDestek

Is it possible to see in the permit guests to theme the pictures in this modification.


$$  Q u a l i t y    I n f o r m a t i o n    L i n e  for iPhone $$



<   M O D  |  T R A N S L A T O R  |  TO  |  TUR  |  A N D   |  G E R   >


vbgamer45

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

Neo_TE

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

vbgamer45

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

SinnerSaint

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

vbgamer45

The new version will not touch code tags at all it specifically looks for links only.
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

SinnerSaint

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

vbgamer45

It just goes by any link that is of <a href="">title</a> format and that is how it is handled.
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

SinnerSaint

#435
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>',
SinnerSaint

SinnerSaint

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++)
                  {

SinnerSaint

DanteOz

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

vbgamer45

You can edit the modifications.english.php file to do that.
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

DanteOz


Advertisement: