cerca
Codice: Seleziona tutto
// Output page
page_header($user->lang['INDEX']);
Codice: Seleziona tutto
if ($config['sidebar_enable'] && $user->data['user_sidebar'])
{
include($phpbb_root_path . 'includes/functions_sidebar.' . $phpEx);
sidebar_display();
}
cerca
Codice: Seleziona tutto
<!-- INCLUDE permission_mask.html -->
Codice: Seleziona tutto
<!-- ELSEIF S_SIDEBAR -->
<!-- INCLUDE acp_users_sidebar.html -->
cerca
Codice: Seleziona tutto
// Additional tables
Codice: Seleziona tutto
define('SIDEBAR_TABLE', $table_prefix . 'sidebar');
define('SIDEBAR_CONFIG_TABLE', $table_prefix . 'sidebar_config');
cerca
Codice: Seleziona tutto
}
// Assign general variables
Codice: Seleziona tutto
//BEGIN phpBB Sidebar
case 'sidebar':
$user->add_lang('mods/sidebar');
$data = array(
'user_sidebar' => request_var('user_sidebar', (bool) $user_row['user_sidebar']),
'user_sidebar_modules' => request_var('user_sidebar_modules', $user_row['user_sidebar_modules']),
);
if ($submit)
{
$error = array();
if (!check_form_key($form_name))
{
$error[] = 'FORM_INVALID';
}
if (!sizeof($error))
{
$sql_ary = array(
'user_sidebar' => $data['user_sidebar'],
'user_sidebar_modules' => $data['user_sidebar_modules'],
);
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE user_id = $user_id";
$db->sql_query($sql);
trigger_error($user->lang['USER_PREFS_UPDATED'] . adm_back_link($this->u_action . '&u=' . $user_id));
}
// Replace "error" strings with their real, localised form
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
/**
* load modules from sidebar
*/
$sql = 'SELECT group_id
FROM ' . USER_GROUP_TABLE . "
WHERE user_id = " . $user_row['user_id'];
$result = $db->sql_query($sql);
$user_group = array();
while ($row = $db->sql_fetchrow($result))
{
$user_group[] = $row['group_id'];
}
$db->sql_freeresult($result);
$sql = 'SELECT id, sidebar_name, active, sidebar_group
FROM ' . SIDEBAR_TABLE . '
WHERE active = 1
ORDER BY id ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$sidebar_name = $row['sidebar_name'];
$sidebar_group = explode(',', $row['sidebar_group']);
if ($row['sidebar_group'] == 0 || array_intersect($sidebar_group, $user_group))
{
if (!class_exists($sidebar_name))
{
include($phpbb_root_path . '/includes/sidebar/' . $row['sidebar_name'] . '.' . $phpEx);
}
if (!class_exists($sidebar_name))
{
trigger_error(sprintf($user->lang['CLASS_NOT_FOUND'], $sidebar_name, $row['sidebar_name']), E_USER_ERROR);
}
$module = new $sidebar_name();
/**
* start loading the necessary data
*/
$user->add_lang('mods/sidebar/' . $module->module_file);
$modules[$module->module_file] = array('sidebar_name' => $row['sidebar_name'], 'enabled' => $row['active'], 'lang' => $module->module_name, 'id' => $row['id']);
}
}
$db->sql_freeresult($result);
$count = 1;
if (!empty($modules))
{
foreach($modules as $key => $current_module)
{
$template->assign_block_vars('modules_row', array(
'NAME' => $user->lang[$current_module['lang']],
'NAME_EXPLAIN' => $user->lang[$current_module['lang'] . '_EXPLAIN'],
'MODULE_ID' => $current_module['id'],
));
$count++;
}
}
$template->assign_vars(array(
'S_SIDEBAR' => true,
'S_DISPLAY_SIDEBAR' => $data['user_sidebar'],
'USER_SIDEBAR_MODULES' => $data['user_sidebar_modules'],
));
break;
// END phpBB Sidebar
cerca
Codice: Seleziona tutto
'attach' => array('title' => 'ACP_USER_ATTACH', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
Codice: Seleziona tutto
'sidebar' => array('title' => 'ACP_USER_SIDEBAR', 'auth' => 'acl_a_user', 'display' => false, 'cat' => array('ACP_CAT_USERS')),
cerca
Codice: Seleziona tutto
?>
Codice: Seleziona tutto
// BEGIN phpBB Sidebar
$lang = array_merge($lang, array(
'UCP_SIDEBAR' => 'Edit sidebar options',
));
// END phpBB Sidebar
cerca
Codice: Seleziona tutto
?>
Codice: Seleziona tutto
// BEGIN phpBB Sidebar
$lang = array_merge($lang, array(
'ACP_USER_SIDEBAR' => 'Sidebar',
));
// END phpBB Sidebar
cerca
Codice: Seleziona tutto
<!-- INCLUDE forumlist_body.html -->
Codice: Seleziona tutto
<!-- IF S_DISPLAY_SIDEBAR -->
<div class="sidebar-at-right use-sidebar" id="main">
<a id="hide" class="sidebar-button use-sidebar"></a>
<a id="show" class="sidebar-button use-sidebar"></a>
<div id="sidebar">
<!-- BEGIN sidebar -->
<div id="sidebar-{sidebar.SIDEBAR_ID}" class="sidebar-block forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="sidebar_title">
{sidebar.SIDEBAR_TITLE}
</div>
<div class="sidebar-content" style="display: <!-- IF sidebar.IS_COLLAPSED -->none<!-- ELSE -->block<!-- ENDIF -->;">
{sidebar.SIDEBAR_MODULE}
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END sidebar -->
</div>
<div id="forumslist">
<!-- ENDIF -->
<!-- INCLUDE forumlist_body.html -->
<!-- IF S_DISPLAY_SIDEBAR -->
</div>
</div>
<br style="clear: both;">
<!-- ENDIF -->
cerca
Codice: Seleziona tutto
<div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group
Codice: Seleziona tutto
<!-- IF S_DISPLAY_SIDEBAR --><br /><!--/ ** If you remove this expect no support from me ** /--><a href="http://www.modsteam.tk/">phpBB Sidebar</a><!-- ENDIF -->
cerca
Codice: Seleziona tutto
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
Codice: Seleziona tutto
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.sidebar.js"></script>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function($) {
$('.sidebar-block').collapsableSidebar({
active: {SIDEBAR_ALLOW_COLLAPSE},
cookiename: '{S_COOKIE_NAME}',
cookiesettings: '{A_COOKIE_SETTINGS}'
});
});
// ]]>
</script>
cerca
Codice: Seleziona tutto
@import url("colours.css");
Codice: Seleziona tutto
@import url("sidebar.css");
Codice: Seleziona tutto
install_sidebar.php