• 0
  • 0 RepliesReplies
  • 4331 ReadTimes Read
  • 0 PointsPoints

Topic: Instalacion Manualmente del MOD Look But No Read

Usuario: Gonza
Rango: Nuevo Usuario
Mensajes: 518
Points: 18
Mi web: www.dangergamers.com
Perfil: View Profile
Instalacion Manualmente del MOD Look But No Read
February 21, 2011 - 06:44 18:44
Instalacion Manualmente del mod Look But No Read

Vamos a index.php

Buscamos:
Code: [Select]
// Is the forum in maintenance mode? (doesn't apply to administrators.)
Agregar antes:
Code: [Select]
// pre-processing for Look But No Read (modification)
if (!empty($modSettings['categories_deny_guest_browsing']))
{
$categories_deny_guest_browsing = explode(",", preg_replace("/[^0-9,]/", "", $modSettings['categories_deny_guest_browsing']));
foreach ($categories_deny_guest_browsing as $key => $value) if ($value == "") unset($categories_deny_guest_browsing[$key]);
}
else $categories_deny_guest_browsing[] = '';
if (!empty($modSettings['boards_deny_guest_browsing']))
{
$boards_deny_guest_browsing = explode(",", preg_replace("/[^0-9,]/", "", $modSettings['boards_deny_guest_browsing']));
foreach ($boards_deny_guest_browsing as $key => $value) if ($value == "") unset($boards_deny_guest_browsing[$key]);
}
else $boards_deny_guest_browsing[] = '';

Busca:
Code: [Select]
elseif (empty($_REQUEST['action']))
Agregar Antes:
Code: [Select]
// category level processing for Look But No Read (modification)
elseif ($user_info['is_guest'] && !empty($modSettings['enable_guest_browsing_control']) && !empty($board_info['cat']['id']) && in_array($board_info['cat']['id'], $categories_deny_guest_browsing) && !empty($topic))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}
// board level processing for Look But No Read (modification)
elseif ($user_info['is_guest'] && !empty($modSettings['enable_guest_browsing_control']) && !empty($board_info['id']) && in_array($board_info['id'], $boards_deny_guest_browsing) && !empty($topic))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}

Vamos a sources/Admin.php

Busca:
Code: [Select]
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
Agregar Despues:
Code: [Select]
'lbnr' => array($txt['mods_cat_lbnr']),
Vamos a  sources/ManageSettings.php

Buscar:
Code: [Select]
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.
Agregar Despues:
Code: [Select]
'lbnr' => 'ModifyLbnrSettings',
Buscar:
Code: [Select]
?>
Agregar Antes:
Code: [Select]
function ModifyLbnrSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(

array('check', 'enable_guest_browsing_control'),
array('text', 'categories_deny_guest_browsing', '20'),
array('text', 'boards_deny_guest_browsing', '20'),
);

if ($return_config)
return $config_vars;

if (isset($_GET['save']))
{
checkSession();

saveDBSettings($config_vars);
writeLog();

redirectexit('action=admin;area=modsettings;sa=lbnr');
}

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=lbnr';
$context['settings_title'] = $txt['mods_cat_lbnr'];

prepareDBSettingContext($config_vars);
}

Buscar:
Code: [Select]
// This line is to help mod authors do a search/add after if you want to add something here. Keyword: FOOT TAPPING SUCKS!
Agregar Despues:
Code: [Select]
if(empty($_POST['categories_deny_guest_browsing'])) $_POST['categories_deny_guest_browsing'] = '';
if(empty($_POST['boards_deny_guest_browsing'])) $_POST['boards_deny_guest_browsing'] = '';


TuThemes/default/languages/Modifications.tuidioma.php

Buscar:
Code: [Select]
?>
Agregar antes:
Code: [Select]
$txt['lbnr'] = 'Look But No Read';
$txt['mods_cat_lbnr'] = 'Look But No Read';
$txt['boards_deny_guest_browsing'] = 'Boards to deny guest reading:';
$txt['categories_deny_guest_browsing'] = 'Categories to deny guest reading:';
$txt['enable_guest_browsing_control'] = 'Enable guest browsing control:';

You do not have permission to give points
point 0 Points

This topic did not receive points.

 

TAGS



top

Smfsimple.com es un sitio destinado a brindar un servicio de soporte y herramientas para foros realizados con el sistema de foros gratuito simplemachines.org. Contamos con un selecto equipo de desarrolladores y conocedores del sistema, sus foros estaran en buenas manos.
This site is not affiliated with or endorsed by Simple Machines