buenas!!
he instalado el pages mod en mi smf 2.0 RC1.2 y me gustaría q los botones q se crean en el menu superior al crear una pagina, estuviesen antes de "Salir/Ingresar/Registrarse" en vez de después, vamos q quiero q el botón de "Salir/Ingresar/Registrarse" sea siempre el último 8)
salu2
entra al index.template de tu theme, buscas el codigo que le corresponde, cortas y pegas antes de el boton salir.. toda esa parte esta bien comentado en el codigo, podras saber cual es..
salu2
en 2.0 RC1.2 los botones están en /sources/subs.php, ya he probado a mover lo q corresponde al pages mod para antes de "Salir", pero me dio error el foro. Este es el código:
// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($buttonData = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
),
),
),
'moderate' => array(
'title' => $txt['moderate'],
'href' => $scripturl . '?action=moderate',
'show' => $context['allow_moderation_center'],
'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl . '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']),
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'],
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'],
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
),
),
),
'noleidos' => array(
'title' => $txt['noleidos'],
'href' => 'http://solomininos.com/smf/index.php?action=unread;all;start=0',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
),
),
),
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
);
$load_menu_js = false;
// Pages Management -->
if(!empty($context['pages_mod']))
{
if (!empty($buttons['register'])) $buttons['register']['is_last'] = false;
if (!empty($buttons['logout'])) $buttons['logout']['is_last'] = false;
$page_count = count($context['pages_mod']);
foreach($context['pages_mod'] as $row)
{
$page_button = array(
'title' => $row['name'],
'href' => $scripturl . '?action=page;id='.$row['id'],
'show' => true,
'is_last' => !--$page_count,
);
$buttons['page_' . $row['id']] = $page_button;
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'page' && isset($_REQUEST['id']) && $_REQUEST['id'] == $row['id'])
$context['current_action'] = 'page_' . $row['id'];
}
}
// <-- Pages Management
salu2 y gracias por contestar ;)
no es posible agregar el codigo de ese mod dentro del menu de smf porque smf utiliza un array para mostrar el menu y este codigo tiene su propio array y la unica manera de mostrarlo es antes de despues del array de smf
en lo personal no te recomiendo ese mod, es muy burdo y agrega un espantoso copyright a tus paginas, hay otros mods disponibles, mejores:
http://custom.simplemachines.org/mods/index.php?mod=1347
http://custom.simplemachines.org/mods/index.php?mod=1477
cualquiera de esos mods si se pueden modificar de la forma en que tu lo deseas.
saludos!
el custom pages creo q no añade el botón al menu superior y el dozen pages solo deja crear un máximo de 13, corrígeme si me equivoco.
salu2
puedes utilizar el custom pages y despues agregar tus enlaces a el menu (este mod si lo permite hacer)
para agregar botones a 2.0 aqui hay un tutorial:
http://www.simplemachines.org/community/index.php?topic=293488.0
saludos!
Cuando siga creando o modificando las pages lo probaré ;)
salu2 y gracias