News:

Wondering if this will always be free?  See why free is better.

Main Menu

Registered Links

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

Previous topic - Next topic

vbgamer45

Not easily no. Currently only works in areas where the parser analyzes the code.
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

Jim88

That's ok.  I changed the permissions for SMF Links and got the result I was after. 

Admin / Permissions / General Permissions / Guests / Modify / SMF Links View links page: uncheck box

Thanks for the fast reply.

vbgamer45

Glad you have it working.
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

BillLeeDee

Quote from: smap on March 05, 2015, 02:41:01 AM
I needed to exclude some boards and I'm using version 3.0, so based on the mods exposed here - http://www.simplemachines.org/community/index.php?topic=88363.msg2046161#msg2046161 - I did the following changes


On the file /Sources/Subs.php

Change this


// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links


By this


// Registered Links, exclude board id in array(id1,id2,...)
if (isset($context['current_board']))
{
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
}


PS: I only read till page 13 of this topic, maybe on some other page of the current 27 someone also did something like this, I honestly don't know.

I hope somebody might be able to lend a hand. I recently used this modification and it works a treat. I would, however, like to change the user_info to add one of my member groups used for probationary members to prevent people from joining to simply glean the links that are meant for long standing and vetted users. If somebody with a little better understanding of how to accomplish this can put their eye on this and figure it out I would be most appreciative.

Thanks in advance.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

BillLeeDee

Quote from: Kindred on May 01, 2016, 07:44:11 PM
&& should be ||

I haven't tried that yet as it seems to be working at the moment.

The cited code above does allow one to exclude a board from the mod, and it works great. I need to add the ability to make the mod work on a specific membergroup to keep newbies from joining only for the reason of gleaming the obscured links. My own personal coding ability is limited so if somebody has a suggested way to add this feature I would be most grateful. Thanks in advance.

-Rock Lee-

@vbgamer45 Very good indeed modification have used it in several forums I had to do some things ... there are many layers or simply leave the translation equally if someone wants in Latin Spanish.

Modifications.spanish_latin.php
//Begin Reg Links
$txt['no_view_links'] = 'No tienes permiso para ver enlaces.';
$txt['txt_reg_links_register'] = 'Registrate';
$txt['txt_reg_links_login'] = 'Inicia sesi&oacute;n';
$txt['txt_reg_links_or'] = 'o';
//END Reg Links Text Strings


and Modifications.spanish_latin-utf8.php
//Begin Reg Links
$txt['no_view_links'] = 'No tienes permiso para ver enlaces.';
$txt['txt_reg_links_register'] = 'Registrate';
$txt['txt_reg_links_login'] = 'Inicia sesión';
$txt['txt_reg_links_or'] = 'o';
//END Reg Links Text Strings


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

vbgamer45

Thanks for the translation!
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

BillLeeDee

In this code:

// Registered Links, exclude board id in array(id1,id2,...)
if (isset($context['current_board']))
{
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
}


If I substitute this line:
if ($user_info['is_guest'] && !in_array((int)$context['current_board'],array(id1,id2,...))) //replace id with board id1,id2,...

with this one:
if (in_array(14, $user_info['groups']))

I can get the desired result with excluding a membergroup from showing links (group is for probationary members). I'm unable to get both lines to co-exist together, either a line is ignored or it crashes PHP (as stated previous, I'm a rookie coder).

If somebody would be kind enough to show me how to get both conditional lines to co-exist and be acted upon for their respective conditions I'd be most grateful.

BillLeeDee

Really? Not one person can even give me a hint on how to do this? Boy, this is disappointing.

BillLeeDee

Never mind, I paid somebody to code this for me and they got it working in 5 minutes.

Terra_Cresta

Quote from: vbgamer45 on October 06, 2014, 06:11:58 PM
Yes code tags is a different mod check my mod site/page for link i have one that hides code tags
I've tried to find the mod to hide links within code tags without success. Is it still available?

justinguru

Please help.. I just uninstalled it from my forum but it's till activated how do I remove it completely hxxp:www.infogurus.net [nonactive]

vbgamer45

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

engrz

Hello

Im unable to remove this mod, as it is not working for me on smf 2.0.13. im getting error (attachment)

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

engrz


vbgamer45

Proceed with uninstall that is common with language files.
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

Kindred

Besides..  if you actually READ the link, you might note that the same applies to errors during installation and uninstallation
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

engrz

Quote from: Kindred on March 09, 2017, 08:14:35 PM
Besides..  if you actually READ the link, you might note that the same applies to errors during installation and uninstallation

I read the link and un-installed this mod... thank you bro.

Advertisement: