News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Look But No Read

Started by Deprecated, August 17, 2008, 08:55:53 PM

Previous topic - Next topic

Asshandler

Hey Dep, this mod works wonderfully, but I have a question.

Is there any way to get it to ignore a specific forum?

The reason I ask is I'd like for this to be active on all regular boards, but on our customer service forum, I wouldn't mind letting guests read/write in there, ya know, in case they have trouble registering or soemthing.
The only thing necessary for the triumph of evil is for good men to do nothing.

Deprecated

I'm not sure why you can't do that. You can pick any mix of boards or categories to apply it to. Just don't enter the board number that you want to allow guests access.  If you have the whole category blocked, just unblock the category and block individual boards except the ones you want to allow guest access. That's the way it is supposed to work.

@rturo

I know that bots are in the guest group, BUT, as some mods let us know when is a guest and when is a bot, can you make that difference also so bots are allowed to read the topics??


[nofollow]

Deprecated

No, you have to treat bots and guests exactly the same or you will be violating Google's TOS among others.

@rturo

Ohhh I didn't know that.

Well thx


[nofollow]

fyndler

Very nice mod just a quick question

Categories to deny guest reading:     
Boards to deny guest reading:

So if i make one category like General Discussion the guest will se it but they cant acces it ?

Thanks

Deprecated

The SMF default setup General Discussion is a board, not a category.

If you set LBNR to make that board protected, guests will be able to read the topic titles, but they will have to log in or register to read the posts themselves.

fyndler

Ok ok hehe then i understand thansk :P

Deprecated

I too found SMF's nomenclature hard at first. I had to learn what they meant, quick, so as to be able to communicate it to others...

Boards. Categories. Post-bit. All the in-crowd jargon. ;)

manlung

Does this mod works on 1.0.6?
_I installed on a 1.0.6 but cant find it on control panel

Asshandler

Quote from: Deprecated on October 17, 2008, 06:19:41 PM
I'm not sure why you can't do that. You can pick any mix of boards or categories to apply it to. Just don't enter the board number that you want to allow guests access.  If you have the whole category blocked, just unblock the category and block individual boards except the ones you want to allow guest access. That's the way it is supposed to work.

ok, you were right, that worked fine.

I've set it up so that Guests can view topics within our customer serrvice board, as well as reply to any topics they want to in there.

However....

Guests are unable to post without first providing a name, email and verification of an image it seems.

Even if I input a name and anemail, it still says

"The letters you typed don't match the letters that were shown in the picture. "

Even though there is no picture anywhere.  lol

Any ideas?
The only thing necessary for the triumph of evil is for good men to do nothing.

Deprecated

@manlung:

Sorry, I know nothing of SMF versions other that 1.1.5 and 1.1.6. You should not be running any version earlier than the current 1.1.6 which has fixed some security concerns.

@AH:

I'm sorry I don't know about your anti-spam settings. I doubt my mod is related but I could be wrong.

manlung


Deprecated

Quote from: manlung on October 29, 2008, 12:51:07 PM
Does this mod works on 1.0.6?
_I installed on a 1.0.6 but cant find it on control panel
Quote from: manlung on October 29, 2008, 09:47:09 PM
sorry I mean 1.1.6

Admin -> Configuration -> Features and Options => Look But No Read

(see screen shot in OP of this topic)

Perhaps you have theme issues?

El Brujo

#154
Hi, I can't install this mod because I get this error message:

2.     Execute Modification     ./Sources/ModSettings.php     Test failed

As you recommed I didn't continued with the installation. I attach the ModSettings.php file so you can take a look at it. I would appreciate your help.

Thanks in advance

EDIT: I have solved it, I uninstalled previous mods, installed then LBNR without any error and then reinstalled the other mods and everything worked fine

sombra

im triying to uninstalla this mod but its giving me an error


!!
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


Uninstall Actions "Look But No Read":
Installing this package will perform the following actions:
      Type    Action    Description
*    1.    Execute Modification    ./index.php    Test failed
      1.    Replace    ./index.php    Test failed
      2.    Replace    ./index.php    Test successful
*    2.    Execute Modification    ./Sources/Admin.php    Test failed
      1.    Replace    ./Sources/Admin.php    Test failed
*    3.    Execute Modification    ./Sources/ManageSettings.php    Test failed
      1.    Replace    ./Sources/ManageSettings.php    Test failed
      2.    Add Before    ./Sources/ManageSettings.php    Test successful
      3.    Replace    ./Sources/ManageSettings.php    Test failed
*    4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful

can i preceed of what can i do

tuguex

What i need to put in the

Enable guest browsing control:     
   Categories to deny guest reading:    
   Boards to deny guest reading:


To have this mod working in entire forum?
I trie in the category the number "1", but doesn't work

LaughOften

I have 1.1.7 and I tried to install this mod and I get this:


1. Execute Modification ./index.php Test successful
2. Execute Modification ./Sources/ModSettings.php Test failed
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful

I have the following mods installed:

1. SMF 1.0.14 / 1.1.6 Update 1.0   [ List Files ] [ Delete ] 
2. SMFShop 3.0   [ Uninstall ] [ List Files ] [ Delete ] 
3. The Rules 1.08   [ Uninstall ] [ List Files ] [ Delete ] 
4. simplemp 3.1   [ Uninstall ] [ List Files ] [ Delete ] 
5. Registered Links 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
6. Hide Signatures for Guest 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
7. JPG Thumbnails 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
8. Remove SMF Logo 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
9. Contact Page 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
10. SMF Staff Page 1.6   [ Uninstall ] [ List Files ] [ Delete ] 
11. Disable Right click 2.1   [ Uninstall ] [ List Files ] [ Delete ] 
12. Global Headers Footers 1.4.1   [ Uninstall ] [ List Files ] [ Delete ] 
13. Hide SMF Version 1.0.3a   [ Uninstall ] [ List Files ] [ Delete ] 
14. Avatar Under Membergroups Rank 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
15. Add PM Info To Header (v1.1) 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
16. Links Managment 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
17. Mod Hide Post 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
18. Order Stickied Topics 1.01   [ Uninstall ] [ List Files ] [ Delete ] 
19. SMF Classifieds 1.2.12   [ Uninstall ] [ List Files ] [ Delete ] 
20. Blog Community (for 1.1.x) 2.0.2   [ Uninstall ] [ List Files ] [ Delete ] 
21. Welcome Topic Mod 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
22. unboldnews 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
23. Custom Copyright 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
24. SMF Trader System 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
25. Advanced Login Form 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
26. Favicon 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
27. Enhanced Profile 1.1.5   [ Uninstall ] [ List Files ] [ Delete ] 
28. Hide Info Center From Guests 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
29. Custom Profile Field Mod 3.19   [ Uninstall ] [ List Files ] [ Delete ] 
30. SMF 1.0.15 / 1.1.7 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
31. SMF 1.0.15 / 1.1.7 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
32. Look But No Read 1.2  [ Apply Mod ] [ List Files ] [ Delete ] 

Here is my Sources/ModSettings.php file:

<?php/*********************************************************************************** ModSettings.php                                                                 ************************************************************************************* SMF: Simple Machines Forum                                                      ** Open-Source Project Inspired by Zef Hemel ([email protected])                    ** =============================================================================== ** Software Version:           SMF 1.1                                             ** Software by:                Simple Machines (http://www.simplemachines.org)     ** Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) **           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             ** Support, News, Updates at:  http://www.simplemachines.org                       ************************************************************************************* This program is free software; you may redistribute it and/or modify it under   ** the terms of the provided license as published by Simple Machines LLC.          **                                                                                 ** This program is distributed in the hope that it is and will be useful, but      ** WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    ** or FITNESS FOR A PARTICULAR PURPOSE.                                            **                                                                                 ** See the "license.txt" file for details of the Simple Machines license.          ** The latest version can always be found at http://www.simplemachines.org.        ***********************************************************************************/if (!defined('SMF')) die('Hacking attempt...');/* This file is here to make it easier for installed mods to have settings and options.  It uses the following functions: void ModifyFeatureSettings() // !!! void ModifyFeatureSettings2() // !!! void ModifyBasicSettings() // !!! void ModifyLayoutSettings() // !!! void ModifyKarmaSettings() // !!! Adding new settings to the $modSettings array: ---------------------------------------------------------------------------// !!!*//* Adding options to one of the setting screens isn't hard.  The basic format for a checkbox is: array('check', 'nameInModSettingsAndSQL'),   And for a text box: array('text', 'nameInModSettingsAndSQL')   (NOTE: You have to add an entry for this at the bottom!)   In these cases, it will look for $txt['nameInModSettingsAndSQL'] as the description,   and $helptxt['nameInModSettingsAndSQL'] as the help popup description. Here's a quick explanation of how to add a new item: * A text input box.  For textual values. ie. array('text', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', &$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), * A text input box.  For numerical values. ie. array('int', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', &$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), * A text input box.  For floating point values. ie. array('float', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', &$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'),         * A large text input box. Used for textual values spanning multiple lines. ie. array('large_text', 'nameInModSettingsAndSQL', 'OptionalNumberOfRows', &$txt['OptionalDescriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), * A check box.  Either one or zero. (boolean) ie. array('check', 'nameInModSettingsAndSQL', null, &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), * A selection box.  Used for the selection of something from a list. ie. array('select', 'nameInModSettingsAndSQL', array('valueForSQL' => &$txt['displayedValue']), &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), Note that just saying array('first', 'second') will put 0 in the SQL for 'first'. * A password input box. Used for passwords, no less! ie. array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth', &$txt['descriptionOfTheOption'], 'OptionalReferenceToHelpAdmin'), For each option: type (see above), variable name, size/possible values, description, helptext. OR make type 'rule' for an empty string for a horizontal rule. OR make type 'heading' with a string for a titled section. */// This function passes control through to the relevant tab.function ModifyFeatureSettings(){ global $context, $txt, $scripturl, $modSettings, $sourcedir; // You need to be an admin to edit settings! isAllowedTo('admin_forum'); // All the admin bar, to make it right. adminIndex('edit_mods_settings'); loadLanguage('Help'); loadLanguage('ModSettings'); // Will need the utility functions from here. require_once($sourcedir . '/ManageServer.php'); $context['page_title'] = $txt['modSettings_title']; $context['sub_template'] = 'show_settings'; $subActions = array( 'basic' => 'ModifyBasicSettings', 'multiplayer' => 'ModifymultiplayerSettings', 'multiplayer' => 'ModifymultiplayerSettings', 'layout' => 'ModifyLayoutSettings', 'rules' => 'ModifyRulesSettings', 'karma' => 'ModifyKarmaSettings', 'profile' => 'ModifyProfileSettings', ); // By default do the basic settings. $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic'; $context['sub_action'] = $_REQUEST['sa']; loadLanguage('CustomProfile'); // Load up all the tabs... $context['admin_tabs'] = array( 'title' => &$txt['modSettings_title'], 'help' => 'modsettings', 'description' => $txt['smf3'], 'tabs' => array( 'Multiplayer' => array( 'title' => $txt['ModifymultiplayerSettings'], 'href' => $scripturl . '?action=featuresettings;sa=multiplayer;sesc=' . $context['session_id'], ), 'basic' => array( 'title' => $txt['mods_cat_features'], 'href' => $scripturl . '?action=featuresettings;sa=basic;sesc=' . $context['session_id'], ), 'layout' => array( 'title' => $txt['mods_cat_layout'], 'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'], ), 'profile' => array( 'title' => $txt['cp_cpfields'], 'href' => $scripturl . '?action=featuresettings;sa=profile;sesc=' . $context['session_id'], ), 'rules' => array( 'title' => $txt['mods_cat_rules'], 'href' => $scripturl . '?action=featuresettings;sa=rules;sesc=' . $context['session_id'], ), 'karma' => array( 'title' => $txt['smf293'], 'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'], 'is_last' => true, ), ), ); // Select the right tab based on the sub action. if (isset($context['admin_tabs']['tabs'][$context['sub_action']])) $context['admin_tabs']['tabs'][$context['sub_action']]['is_selected'] = true; // Call the right function for this sub-acton. $subActions[$_REQUEST['sa']]();}// This function basically just redirects to the right save function.function ModifyFeatureSettings2(){ global $context, $txt, $scripturl, $modSettings, $sourcedir; isAllowedTo('admin_forum'); loadLanguage('ModSettings'); // Quick session check... checkSession(); require_once($sourcedir . '/ManageServer.php'); $subActions = array( 'basic' => 'ModifyBasicSettings', 'layout' => 'ModifyLayoutSettings', 'rules' => 'ModifyRulesSettings', 'karma' => 'ModifyKarmaSettings', 'profile' => 'ModifyProfileSettings', ); // Default to core (I assume) $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic'; // Actually call the saving function. $subActions[$_REQUEST['sa']]();}function ModifyBasicSettings(){ global $txt, $scripturl, $context, $settings, $sc, $modSettings; $config_vars = array( // Big Options... polls, sticky, bbc.... array('select', 'pollMode', array(&$txt['smf34'], &$txt['smf32'], &$txt['smf33'])), '', // Basic stuff, user languages, titles, flash, permissions... array('check', 'allow_guestAccess'), array('check', 'userLanguage'), array('check', 'allow_editDisplayName'), array('check', 'allow_hideOnline'), array('check', 'allow_hideEmail'), array('check', 'guest_hideContacts'), array('check', 'titlesEnable'), array('check', 'enable_buddylist'), array('text', 'default_personalText'), array('int', 'max_signatureLength'), '', // Disable Right Click by: www.mundo-se.com array('check', 'arrange_nrcg'), '',// Hide Signature for Guest by: www.mundo-se.com array('check', 'arrange_hsfg'), '',// Stats, compression, cookies.... server type stuff. array('text', 'time_format'), array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')), array('float', 'time_offset'), array('int', 'failed_login_threshold'), array('int', 'lastActive'), array('check', 'trackStats'), array('check', 'hitStats'), array('check', 'enableErrorLogging'), array('check', 'securityDisable'), array('check', 'hideVersion'), '', // Reactive on email, and approve on delete array('check', 'send_validation_onChange'), array('check', 'approveAccountDeletion'), '', // Option-ish things... miscellaneous sorta. array('check', 'allow_disableAnnounce'), array('check', 'disallow_sendBody'), array('check', 'modlog_enabled'), array('check', 'queryless_urls'), '', // Width/Height image reduction. array('int', 'max_image_width'), array('int', 'max_image_height'), '', // Reporting of personal messages? array('check', 'enableReportPM'), ); // Saving? if (isset($_GET['save'])) { // Fix PM settings. $_POST['pm_spam_settings'] = (int) $_POST['max_pm_recipients'] . ',' . (int) $_POST['pm_posts_verification'] . ',' . (int) $_POST['pm_posts_per_hour']; $save_vars = $config_vars; $save_vars[] = array('text', 'pm_spam_settings'); saveDBSettings($save_vars); writeLog(); redirectexit('action=featuresettings;sa=basic'); } // Hack for PM spam settings. list ($modSettings['max_pm_recipients'], $modSettings['pm_posts_verification'], $modSettings['pm_posts_per_hour']) = explode(',', $modSettings['pm_spam_settings']); $config_vars[] = array('int', 'max_pm_recipients'); $config_vars[] = array('int', 'pm_posts_verification'); $config_vars[] = array('int', 'pm_posts_per_hour'); $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=basic'; $context['settings_title'] = $txt['mods_cat_features']; prepareDBSettingContext($config_vars);} function ModifymultiplayerSettings(){ global $txt, $scripturl, $context, $settings, $sc; $config_vars = array( '', array('check', 'multiplayer_enabled'), '', array('check', 'Enable_Conquer_Antarctica'),            array('check', 'Enable_Texas_Hold_em_Poker'), array('check', 'Enable_Bunny_Wars'), array('check', 'Enable_Chess'), array('check', 'Enable_Checkers'), array('check', 'Enable_Match4'), array('check', 'Enable_Trouble'), array('check', 'Enable_Zodiac'), array('check', 'Enable_Triva'), array('check', 'Enable_Draw_my_Thing'),        array('check', 'Enable_Asteroids'),        array('check', 'Enable_Nonoba_Racing'), array('check', 'Enable_Platform_Racing_2'), array('check', 'Enable_Blockles'),        array('check', 'Enable_Dinglepop'), array('check', 'Enable_Fridge_magnets'), array('check', 'Enable_Castle_wars'), array('check', 'Enable_Pawn_Game'), array('check', 'Enable_Multi_Snake'),        array('check', 'Enable_Territory_Wars'), array('check', 'Enable_Dino_run'), ); // Saving? if (isset($_GET['save'])) { saveDBSettings($config_vars); redirectexit('action=featuresettings;sa=multiplayer'); loadUserSettings(); writeLog(); } $context['post_url'] = $scripturl . '?action=featuresettings;save;sa=multiplayer'; $context['settings_title'] = $txt['mp13']; prepareDBSettingContext($config_vars);}function ModifyLayoutSettings(){ global $txt, $scripturl, $context, $settings, $sc; $config_vars = array( // Compact pages? array('check', 'compactTopicPagesEnable'), array('int', 'compactTopicPagesContiguous', null, $txt['smf235'] . '<div class="smalltext">' . str_replace(' ', '&nbsp;', '"3" ' . $txt['smf236'] . ': <b>1 ... 4 [5] 6 ... 9</b>') . '<br />' . str_replace(' ', '&nbsp;', '"5" ' . $txt['smf236'] . ': <b>1 ... 3 4 [5] 6 7 ... 9</b>') . '</div>'), '', // Stuff that just is everywhere - today, search, online, etc. array('select', 'todayMod', array(&$txt['smf290'], &$txt['smf291'], &$txt['smf292'])), array('check', 'topbottomEnable'), array('check', 'onlineEnable'), array('check', 'enableVBStyleLogin'), '', // Pagination stuff. array('int', 'defaultMaxMembers'), '', // This is like debugging sorta. array('check', 'timeLoadPageEnable'), array('check', 'disableHostnameLookup'), '', // Who's online. array('check', 'who_enabled'), ); // Saving? if (isset($_GET['save'])) { saveDBSettings($config_vars); redirectexit('action=featuresettings;sa=layout'); loadUserSettings(); writeLog(); } $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=layout'; $context['settings_title'] = $txt['mods_cat_layout']; prepareDBSettingContext($config_vars);}function ModifyProfileSettings(){ global $sourcedir; require_once($sourcedir . '/CustomProfile.php'); CustomFieldSettings();}function ModifyKarmaSettings(){ global $txt, $scripturl, $context, $settings, $sc; $config_vars = array( // Karma - On or off? array('select', 'karmaMode', explode('|', $txt['smf64'])), '', // Who can do it.... and who is restricted by time limits? array('int', 'karmaMinPosts'), array('float', 'karmaWaitTime'), array('check', 'karmaTimeRestrictAdmins'), '', // What does it look like?  [smite]? array('text', 'karmaLabel'), array('text', 'karmaApplaudLabel'), array('text', 'karmaSmiteLabel'), ); // Saving? if (isset($_GET['save'])) { saveDBSettings($config_vars); redirectexit('action=featuresettings;sa=karma'); } $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=karma'; $context['settings_title'] = $txt['smf293']; prepareDBSettingContext($config_vars);}function ModifyRulesSettings(){ global $txt, $scripturl, $context, $settings, $sc; $config_vars = array( array('check', 'rules_enable_guest_access'), '', array('text', 'the_rules_display_name', '20'), array('large_text', 'the_rules_text', '12'), '', array('check', 'the_rules_enable_agreement'), array('text', 'the_rules_agreement_display_name'), '', array('check', 'the_rules_enable_additional'), array('text', 'the_rules_additional_display_name', '20'), array('large_text', 'the_rules_additional_text', '12'), ); if (isset($_GET['save'])) { checkSession(); saveDBSettings($config_vars); writeLog(); redirectexit('action=featuresettings;sa=rules'); } $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=rules'; $context['settings_title'] = $txt['rules_title']; prepareDBSettingContext($config_vars);}?>


Any help would be appreciated

Deprecated

Sombra, you need to proceed with a manual install.

Tuguex, just put all the categories in your category box: 1, 2, 3, 4, 5, 6...

LaughOften, 1.1.7 just came out and I have not had the opportunity to test my mods with it. I hope to perform that process over the next few or several days.

And please, do not quote entire files. Attach them instead. A file posted like you've done is totally useless since I use automated document comparison, and I need a file for that. And a cut 'n paste doesn't work. Anyway, I don't need your file right now. I need to go test my mods using 1.1.7.

LaughOften

Thank you for your response. This didn't work for me on 1.1.6 either. Same error.

I will remember to attach files in the future.

Thanks

Advertisement: