Registered Links

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

Previous topic - Next topic

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

Jeet Chowdhury


Jeet Chowdhury


Jeet Chowdhury


Jeet Chowdhury

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

NyYaNkEeFaN95

Hey, i installed this mod that block links from ebing viewed as a guest and when i uninstalled it the mod still works.

vbgamer45

Likely it did not uninstall follow the manual install steps and remove all the code that the mod added.
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

NyYaNkEeFaN95


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

Groovy™


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

Groovy™

whether there is a chance that this mode change, to work with the code tag?

thanks

vbgamer45

It would probably be a seperate mod. I changed how this mod works so it doesn't go by the bbc parser anymore.
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

4x4buxcommunity

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

Thanks.



vbgamer45

Get the manually uninstall instructions from the mod site for this mod then edit the files manually.
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

datoneer

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!

vbgamer45

Can you post a link to a page/topic that you can see the links
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

datoneer

sure!

http://forum-st.net/index.php?topic=60.0

vbgamer45

Issue is you have the text in the code tag. Which isn't a link so it won't filter it out.
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

datoneer

How can i make it to work. This is very important to me. Please!

Advertisement: