[cleanup/tabs] Remove unnecessary tabbing in portal files
This commit is contained in:
@@ -89,7 +89,7 @@ function bbfontstyle(bbopen, bbclose)
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//The new position for the cursor after adding the bbcode
|
||||
var caret_pos = getCaretPosition(textarea).start;
|
||||
var new_pos = caret_pos + bbopen.length;
|
||||
@@ -123,7 +123,7 @@ function bbfontstyle(bbopen, bbclose)
|
||||
function insert_text(text, spaces, popup)
|
||||
{
|
||||
var textarea;
|
||||
|
||||
|
||||
if (!popup)
|
||||
{
|
||||
textarea = document.getElementById(text_name);
|
||||
@@ -136,7 +136,7 @@ function insert_text(text, spaces, popup)
|
||||
{
|
||||
text = ' ' + text + ' ';
|
||||
}
|
||||
|
||||
|
||||
if (!isNaN(textarea.selectionStart))
|
||||
{
|
||||
var sel_start = textarea.selectionStart;
|
||||
@@ -270,7 +270,7 @@ function split_lines(text)
|
||||
do
|
||||
{
|
||||
var splitAt = line.indexOf(' ', 80);
|
||||
|
||||
|
||||
if (splitAt == -1)
|
||||
{
|
||||
splitLines[j] = line;
|
||||
@@ -358,7 +358,7 @@ function colorPalette(dir, width, height)
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
|
||||
|
||||
for (b = 0; b < 5; b++)
|
||||
{
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
@@ -398,7 +398,7 @@ function caretPosition()
|
||||
function getCaretPosition(txtarea)
|
||||
{
|
||||
var caretPos = new caretPosition();
|
||||
|
||||
|
||||
// simple Gecko/Opera way
|
||||
if(txtarea.selectionStart || txtarea.selectionStart == 0)
|
||||
{
|
||||
@@ -408,23 +408,23 @@ function getCaretPosition(txtarea)
|
||||
// dirty and slow IE way
|
||||
else if(document.selection)
|
||||
{
|
||||
|
||||
|
||||
// get current selection
|
||||
var range = document.selection.createRange();
|
||||
|
||||
// a new selection of the whole textarea
|
||||
var range_all = document.body.createTextRange();
|
||||
range_all.moveToElementText(txtarea);
|
||||
|
||||
|
||||
// calculate selection start point by moving beginning of range_all to beginning of range
|
||||
var sel_start;
|
||||
for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
|
||||
{
|
||||
range_all.moveStart('character', 1);
|
||||
}
|
||||
|
||||
|
||||
txtarea.sel_start = sel_start;
|
||||
|
||||
|
||||
// we ignore the end value for IE, this is already dirty enough and we don't need it
|
||||
caretPos.start = txtarea.sel_start;
|
||||
caretPos.end = txtarea.sel_start;
|
||||
|
||||
@@ -151,7 +151,7 @@ var help_line = {
|
||||
{
|
||||
dE('colour_palette', 1);
|
||||
}
|
||||
|
||||
|
||||
if (e.style.display == 'block')
|
||||
{
|
||||
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
|
||||
|
||||
@@ -151,7 +151,7 @@ var help_line = {
|
||||
{
|
||||
dE('colour_palette', 1);
|
||||
}
|
||||
|
||||
|
||||
if (e.style.display == 'block')
|
||||
{
|
||||
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
|
||||
|
||||
@@ -24,7 +24,7 @@ class acp_portal
|
||||
{
|
||||
global $db, $user, $cache, $template, $display_vars;
|
||||
global $config, $phpbb_root_path, $portal_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
|
||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||
$portal_root_path = PORTAL_ROOT_PATH;
|
||||
if (!function_exists('column_string_const'))
|
||||
@@ -36,7 +36,7 @@ class acp_portal
|
||||
{
|
||||
include($phpbb_root_path . $portal_root_path . 'includes/functions_version_check.' . $phpEx);
|
||||
}
|
||||
|
||||
|
||||
if(!function_exists('obtain_portal_config'))
|
||||
{
|
||||
include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx);
|
||||
@@ -112,11 +112,11 @@ class acp_portal
|
||||
'MODULE_ENABLED' => ($module_data['module_status']) ? true : false,
|
||||
'MODULE_SHOW_IMAGE' => (in_array(column_num_string($module_data['module_column']), array('center', 'top', 'bottom'))) ? false : true,
|
||||
));
|
||||
|
||||
|
||||
if($module_data['module_classname'] != 'custom')
|
||||
{
|
||||
$groups_ary = explode(',', $module_data['module_group_ids']);
|
||||
|
||||
|
||||
// get group info from database and assign the block vars
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -132,7 +132,7 @@ class acp_portal
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
$template->assign_var('SHOW_MODULE_OPTIONS', true);
|
||||
}
|
||||
}
|
||||
@@ -158,10 +158,10 @@ class acp_portal
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
|
||||
|
||||
// Reset module
|
||||
$reset_module = request_var('module_reset', 0);
|
||||
|
||||
|
||||
if($reset_module)
|
||||
{
|
||||
if (confirm_box(true))
|
||||
@@ -179,16 +179,16 @@ class acp_portal
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$cache->destroy('config');
|
||||
$cache->destroy('portal_config');
|
||||
$portal_config = obtain_portal_config(); // we need to prevent duplicate entry errors
|
||||
$c_class->install($module_id);
|
||||
$cache->purge();
|
||||
|
||||
|
||||
// We need to return to the module config
|
||||
meta_refresh(3, reapply_sid($this->u_action . "&module_id=$module_id"));
|
||||
|
||||
|
||||
trigger_error($user->lang['MODULE_RESET_SUCCESS'] . adm_back_link($this->u_action . "&module_id=$module_id"));
|
||||
}
|
||||
else
|
||||
@@ -202,14 +202,14 @@ class acp_portal
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
||||
foreach ($display_vars['vars'] as $config_name => $null)
|
||||
{
|
||||
if ($submit && ((isset($null['type']) && $null['type'] == 'custom') || (isset($null['submit_type']) && $null['submit_type'] == 'custom')))
|
||||
{
|
||||
$func = array($c_class, $null['submit']);
|
||||
|
||||
|
||||
if(method_exists($c_class, $null['submit']))
|
||||
{
|
||||
$args = ($module_id != 0) ? array($config_name, $module_id) : $config_name;
|
||||
@@ -221,13 +221,12 @@ class acp_portal
|
||||
call_user_func_array($null['submit'], $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if(isset($null['type']) && $null['type'] == 'custom')
|
||||
{
|
||||
continue;
|
||||
@@ -246,7 +245,7 @@ class acp_portal
|
||||
$module_permission = request_var('permission-setting', array(0 => ''));
|
||||
$groups_ary = array();
|
||||
$img_error = '';
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -257,11 +256,10 @@ class acp_portal
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$module_permission = array_intersect($module_permission, $groups_ary);
|
||||
$module_permission = implode(',', $module_permission);
|
||||
|
||||
|
||||
|
||||
$sql_ary = array(
|
||||
'module_image_src' => request_var('module_image', ''),
|
||||
'module_image_width' => request_var('module_img_width', 0),
|
||||
@@ -269,12 +267,12 @@ class acp_portal
|
||||
'module_group_ids' => $module_permission,
|
||||
'module_status' => request_var('module_status', B3_MODULE_ENABLED),
|
||||
);
|
||||
|
||||
|
||||
if(!(isset($c_class->hide_name) && $c_class->hide_name == true))
|
||||
{
|
||||
$sql_ary['module_name'] = utf8_normalize_nfc(request_var('module_name', '', true));
|
||||
}
|
||||
|
||||
|
||||
// check if module image file actually exists
|
||||
$img_error = check_file_src($sql_ary['module_image_src'], '', $module_id, false);
|
||||
|
||||
@@ -316,7 +314,6 @@ class acp_portal
|
||||
|
||||
'U_ACTION' => $this->u_action . (($module_id) ? '&module_id=' . $module_id : ''),
|
||||
));
|
||||
|
||||
|
||||
// Output relevant page
|
||||
foreach ($display_vars['vars'] as $config_key => $vars)
|
||||
@@ -381,7 +378,7 @@ class acp_portal
|
||||
case 'modules':
|
||||
$action = request_var('action', '');
|
||||
$module_id = request_var('module_id', '');
|
||||
|
||||
|
||||
// Create an array of already installed modules
|
||||
$portal_modules = obtain_portal_modules();
|
||||
$installed_modules = $module_column = array();
|
||||
@@ -423,7 +420,7 @@ class acp_portal
|
||||
{
|
||||
trigger_error($user->lang['UNABLE_TO_MOVE_ROW'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('portal_modules');
|
||||
redirect($this->u_action); // redirect in order to get rid of excessive URL parameters
|
||||
}
|
||||
@@ -456,7 +453,7 @@ class acp_portal
|
||||
{
|
||||
trigger_error($user->lang['UNABLE_TO_MOVE_ROW'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('portal_modules');
|
||||
redirect($this->u_action); // redirect in order to get rid of excessive URL parameters
|
||||
}
|
||||
@@ -468,7 +465,7 @@ class acp_portal
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$module_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$class = 'portal_' . $module_data['module_classname'] . '_module';
|
||||
if (!class_exists($class))
|
||||
{
|
||||
@@ -479,7 +476,7 @@ class acp_portal
|
||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||
}
|
||||
$c_class = new $class();
|
||||
|
||||
|
||||
if ($module_data !== false)
|
||||
{
|
||||
if($c_class->columns & column_string_const(column_num_string($module_data['module_column'] + 1)))
|
||||
@@ -494,7 +491,7 @@ class acp_portal
|
||||
{
|
||||
// @todo: need an error handle here
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* moving only 1 column to the right means we will either end up in the right column
|
||||
* or in the center column. this is not possible when moving 2 columns to the right.
|
||||
@@ -523,7 +520,7 @@ class acp_portal
|
||||
$move_action = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order + 1
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
@@ -535,13 +532,13 @@ class acp_portal
|
||||
SET module_column = module_column + ' . $move_action . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order - 1
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) $module_data['module_column'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
// the module that needs to moved is in the last row
|
||||
if(!$updated)
|
||||
{
|
||||
@@ -551,7 +548,7 @@ class acp_portal
|
||||
AND module_column = ' . (int) ($module_data['module_column'] + $move_action);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = ' . (int) $new_order . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
@@ -562,7 +559,7 @@ class acp_portal
|
||||
{
|
||||
trigger_error($user->lang['UNABLE_TO_MOVE'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('portal_modules');
|
||||
redirect($this->u_action); // redirect in order to get rid of excessive URL parameters
|
||||
}
|
||||
@@ -574,7 +571,7 @@ class acp_portal
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$module_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$class = 'portal_' . $module_data['module_classname'] . '_module';
|
||||
if (!class_exists($class))
|
||||
{
|
||||
@@ -585,7 +582,7 @@ class acp_portal
|
||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||
}
|
||||
$c_class = new $class();
|
||||
|
||||
|
||||
if ($module_data !== false)
|
||||
{
|
||||
if($c_class->columns & column_string_const(column_num_string($module_data['module_column'] - 1)))
|
||||
@@ -600,7 +597,7 @@ class acp_portal
|
||||
{
|
||||
// @todo: need an error handle here (i.e. trigger_error())
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* moving only 1 column to the left means we will either end up in the left column
|
||||
* or in the center column. this is not possible when moving 2 columns to the left.
|
||||
@@ -641,13 +638,13 @@ class acp_portal
|
||||
SET module_column = module_column - ' . $move_action . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order - 1
|
||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . $module_data['module_column'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
// the module that needs to moved is in the last row
|
||||
if(!$updated)
|
||||
{
|
||||
@@ -657,7 +654,7 @@ class acp_portal
|
||||
AND module_column = ' . (int) ($module_data['module_column'] - $move_action);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = ' . $new_order . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
@@ -668,7 +665,7 @@ class acp_portal
|
||||
{
|
||||
trigger_error($user->lang['UNABLE_TO_MOVE'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('portal_modules');
|
||||
redirect($this->u_action); // redirect in order to get rid of excessive URL parameters
|
||||
}
|
||||
@@ -680,7 +677,7 @@ class acp_portal
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$module_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$directory = $phpbb_root_path . 'portal/modules/';
|
||||
|
||||
if ($module_data !== false)
|
||||
@@ -695,7 +692,7 @@ class acp_portal
|
||||
{
|
||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$c_class = new $class();
|
||||
@@ -710,7 +707,7 @@ class acp_portal
|
||||
WHERE module_column = ' . $module_data['module_column'] . '
|
||||
AND module_order > ' . $module_data['module_order'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$cache->purge(); // make sure we don't get errors after re-adding a module
|
||||
|
||||
trigger_error($user->lang['SUCCESS_DELETE'] . adm_back_link($this->u_action));
|
||||
@@ -731,7 +728,7 @@ class acp_portal
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('portal_modules');
|
||||
}
|
||||
|
||||
@@ -746,9 +743,9 @@ class acp_portal
|
||||
{
|
||||
$module_classname = request_var('module_classname', '');
|
||||
$class = 'portal_' . $module_classname . '_module';
|
||||
|
||||
|
||||
$column_string = column_num_string($add_column);
|
||||
|
||||
|
||||
// do we want to add the module to the side columns or to the center columns?
|
||||
if (in_array($column_string, array('left', 'right')))
|
||||
{
|
||||
@@ -770,13 +767,13 @@ class acp_portal
|
||||
$submit = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do not install if module already exists in that column
|
||||
if (!$submit && $module_classname != 'custom')
|
||||
{
|
||||
trigger_error($user->lang['MODULE_ADD_ONCE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
if (!class_exists($class))
|
||||
{
|
||||
include($directory . 'portal_' . $module_classname . '.' . $phpEx);
|
||||
@@ -813,7 +810,7 @@ class acp_portal
|
||||
$module_id = $db->sql_nextid();
|
||||
|
||||
$error = $c_class->install($module_id);
|
||||
|
||||
|
||||
$cache->purge(); // make sure we don't get errors after re-adding a module
|
||||
|
||||
// if something went wrong, handle the errors accordingly and undo the above query
|
||||
@@ -830,7 +827,7 @@ class acp_portal
|
||||
{
|
||||
$error_output = $error;
|
||||
}
|
||||
|
||||
|
||||
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE . ' WHERE module_id = ' . (int) $module_id;
|
||||
|
||||
trigger_error($error_output . adm_back_link($this->u_action));
|
||||
@@ -858,7 +855,7 @@ class acp_portal
|
||||
$class = str_replace(".$phpEx", '', $file) . '_module';
|
||||
$module_class = str_replace(array('portal_', ".$phpEx"), '', $file);
|
||||
$column_string = column_num_string($add_column);
|
||||
|
||||
|
||||
// do we want to add the module to the side columns or to the center columns?
|
||||
if ($module_class != 'custom')
|
||||
{
|
||||
@@ -883,7 +880,7 @@ class acp_portal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!class_exists($class))
|
||||
{
|
||||
include($directory . $file);
|
||||
@@ -935,7 +932,7 @@ class acp_portal
|
||||
$directory = $phpbb_root_path . 'portal/modules/';
|
||||
|
||||
$portal_modules = obtain_portal_modules();
|
||||
|
||||
|
||||
foreach($portal_modules as $row)
|
||||
{
|
||||
$class = 'portal_' . $row['module_classname'] . '_module';
|
||||
@@ -954,7 +951,7 @@ class acp_portal
|
||||
$user->add_lang('mods/portal/' . $c_class->language);
|
||||
}
|
||||
$template_column = column_num_string($row['module_column']);
|
||||
|
||||
|
||||
// find out of we can move modules to the left or right
|
||||
if(($c_class->columns & column_string_const(column_num_string($row['module_column'] + 1))) || ($c_class->columns & column_string_const(column_num_string($row['module_column'] + 2)) && $row['module_column'] != 2))
|
||||
{
|
||||
@@ -988,7 +985,7 @@ class acp_portal
|
||||
{
|
||||
$move_right = false;
|
||||
}
|
||||
|
||||
|
||||
if(($c_class->columns & column_string_const(column_num_string($row['module_column'] - 1))) || ($c_class->columns & column_string_const(column_num_string($row['module_column'] - 2)) && $row['module_column'] != 2))
|
||||
{
|
||||
/**
|
||||
@@ -1035,7 +1032,7 @@ class acp_portal
|
||||
'U_MOVE_LEFT' => ($move_left) ? $this->u_action . '&module_id=' . $row['module_id'] . '&action=move_left' : '',
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ICON_MOVE_LEFT' => '<img src="' . $phpbb_admin_path . 'images/icon_left.gif" alt="' . $user->lang['MOVE_LEFT'] . '" title="' . $user->lang['MOVE_LEFT'] . '" />',
|
||||
'ICON_MOVE_LEFT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_left_disabled.gif" alt="' . $user->lang['MOVE_LEFT'] . '" title="' . $user->lang['MOVE_LEFT'] . '" />',
|
||||
@@ -1058,9 +1055,9 @@ class acp_portal
|
||||
include($phpbb_root_path . 'portal/includes/functions_upload.' . $phpEx);
|
||||
// Default upload path is portal/upload/
|
||||
$upload_path = $phpbb_root_path . 'portal/upload/';
|
||||
|
||||
|
||||
$portal_upload = new portal_upload($upload_path, $this->u_action);
|
||||
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
}
|
||||
@@ -1071,7 +1068,7 @@ class acp_portal
|
||||
'U_UPLOAD' => $this->u_action,
|
||||
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
||||
));
|
||||
|
||||
|
||||
add_form_key('acp_portal_module_upload');
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
|
||||
@@ -103,7 +103,7 @@ $versions = array(
|
||||
'config_name' => array('VCHAR:255', ''),
|
||||
'config_value'=> array('MTEXT', ''),
|
||||
),
|
||||
|
||||
|
||||
'PRIMARY_KEY' => 'config_name',
|
||||
)),
|
||||
),
|
||||
@@ -124,14 +124,14 @@ $versions = array(
|
||||
array('acp', 'ACP_CAT_DOT_MODS', 'ACP_PORTAL'),
|
||||
|
||||
array('acp', 'ACP_PORTAL', array(
|
||||
|
||||
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_GENERAL_INFO',
|
||||
'module_mode' => 'config',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
array('acp', 'ACP_PORTAL', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_MODULES',
|
||||
@@ -139,7 +139,7 @@ $versions = array(
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
array('acp', 'ACP_PORTAL', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_UPLOAD',
|
||||
@@ -159,7 +159,7 @@ $versions = array(
|
||||
'2.0.0' => array(
|
||||
// no changes
|
||||
),
|
||||
|
||||
|
||||
'2.0.1' => array(
|
||||
// no changes ... purge caches anyways
|
||||
'cache_purge' => array(
|
||||
|
||||
@@ -37,7 +37,7 @@ $lang = array_merge($lang, array(
|
||||
// Portal Module
|
||||
'ACP_PORTAL_MODULES' => 'Portal Module',
|
||||
'ACP_PORTAL_MODULES_EXP' => 'Du kannst deine Portal Module hier verwalten. Falls du alle Module deaktivierst, dann deaktiviere bitte auch das Portal.',
|
||||
|
||||
|
||||
'MODULE_POS_TOP' => 'Oben',
|
||||
'MODULE_POS_LEFT' => 'Linke Spalte',
|
||||
'MODULE_POS_RIGHT' => 'Rechte Spalte',
|
||||
@@ -57,7 +57,7 @@ $lang = array_merge($lang, array(
|
||||
'DELETE_MODULE_CONFIRM' => 'Bist du sicher, dass du das Modul "%1$s" löschen möchtest?',
|
||||
'MODULE_RESET_SUCCESS' => 'Modul Einstellungen erfolgreich zurückgesetzt.',
|
||||
'MODULE_RESET_CONFIRM' => 'Bist du sicher, dass du die Einstellungen des Moduls "%1$s" zurücksetzen willst?',
|
||||
|
||||
|
||||
'MODULE_OPTIONS' => 'Modul Optionen',
|
||||
'MODULE_NAME' => 'Modul Name',
|
||||
'MODULE_NAME_EXP' => 'Gebe den Namen ein der für das Modul in der Modul Konfiguration angezeigt werden soll.',
|
||||
@@ -74,7 +74,7 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_STATUS' => 'Aktiviere Modul',
|
||||
'MODULE_ADD_ONCE' => 'Diese Modul kann nur ein Mal hinzugefügt werden.',
|
||||
'MODULE_IMAGE_ERROR' => 'Während dem Prüfen des Modul Bildes sind ein oder mehrere Fehler aufgetreten:',
|
||||
|
||||
|
||||
// general
|
||||
'ACP_PORTAL' => 'Portal',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'Allgemeine Einstellungen',
|
||||
@@ -97,7 +97,7 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_PHPBB_MENU_EXP' => 'Den phpBB Header auf dem Portal anzeigen.',
|
||||
'PORTAL_DISPLAY_JUMPBOX' => 'Zeige Jumpbox',
|
||||
'PORTAL_DISPLAY_JUMPBOX_EXP' => 'Die Jumpbox auf dem Portal anzeigen. Die Jumpbox wird nur angezeigt, wenn sie gleichzeitig in den Board-Funktionalitäten aktiviert ist.',
|
||||
|
||||
|
||||
'LINK_ADDED' => 'Der Link wurde erfolgreich eingetragen',
|
||||
'LINK_UPDATED' => 'Der Link wurde erfolgreich geändert',
|
||||
'LOG_PORTAL_LINK_ADDED' => '<strong>Portal-Einstellungen geändert</strong><br />» Link hinzu gefügt: %s ',
|
||||
@@ -106,7 +106,7 @@ $lang = array_merge($lang, array(
|
||||
'LOG_PORTAL_EVENT_ADDED' => '<strong>Portal-Einstellungen geändert</strong><br />» Termin eingetragen: %s ',
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Portal-Einstellungen geändert</strong><br />» Termin geändert: %s ',
|
||||
'LOG_PORTAL_EVENT_REMOVED' => '<strong>Portal-Einstellungen geändert</strong><br />» Termin gelöscht: %s ',
|
||||
|
||||
|
||||
// Upload Module
|
||||
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
|
||||
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
|
||||
@@ -124,14 +124,14 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MODULE_STATUS' => 'Status',
|
||||
'PORTAL_MODULE_SUCCESS' => 'Erfolgreich kopiert.',
|
||||
'PORTAL_MODULE_ERROR' => 'Datei exisitert schon oder konnte nicht kopiert werden.',
|
||||
|
||||
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Füge Basismodule hinzu',
|
||||
'PORTAL_BASIC_UNINSTALL' => 'Entferne Module von Datenbank',
|
||||
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_CONFIG' => '<strong>Portal-Einstellungen geändert</strong><br />» %s',
|
||||
|
||||
|
||||
/**
|
||||
* A copy of Handyman` s MOD version check, to view it on the gallery overview
|
||||
*/
|
||||
@@ -144,9 +144,9 @@ $lang = array_merge($lang, array(
|
||||
'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema',
|
||||
'UP_TO_DATE' => '%s ist aktuell',
|
||||
'VERSION_CHECK' => 'MOD Version Check',
|
||||
|
||||
|
||||
// Adding the permissions
|
||||
'acl_a_manage_portal' => array('lang' => 'Kann Portal-Einstellungen ändern', 'cat' => 'misc'),
|
||||
'acl_u_view_portal' => array('lang' => 'Kann das Portal sehen', 'cat' => 'misc'),
|
||||
|
||||
|
||||
));
|
||||
|
||||
@@ -47,7 +47,7 @@ $lang = array_merge($lang, array(
|
||||
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
|
||||
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
|
||||
'JUMP_TO_POST' => 'Rufe den Beitrag auf',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Einstellungen für Bekanntmachungen',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für die Bekanntmachungen ändern.',
|
||||
|
||||
@@ -35,7 +35,7 @@ $lang = array_merge($lang, array(
|
||||
'DOWNLOADS' => 'Downloads',
|
||||
'NO_ATTACHMENTS' => 'Keine Dateianhänge',
|
||||
'PORTAL_ATTACHMENTS' => 'Dateianhänge-Block',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS' => 'Einstellungen für Dateianhänge',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für Dateianhänge ändern.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'BIRTHDAYS_AHEAD' => 'In den nächsten %s Tagen',
|
||||
'NO_BIRTHDAYS_AHEAD' => 'In diesem Zeitraum hat kein Mitglied Geburtstag',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BIRTHDAYS_SETTINGS' => 'Einstellungen für den Geburtstage-Block',
|
||||
'ACP_PORTAL_BIRTHDAYS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für den Geburtstage-Block ändern.',
|
||||
|
||||
@@ -85,7 +85,7 @@ $lang = array_merge($lang, array(
|
||||
'12'=> 'Dezember',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CALENDAR' => 'Kalender Einstellungen',
|
||||
'ACP_PORTAL_CALENDAR_EXP' => 'Hier kannst du die Einstellungen für den Kalender ändern.',
|
||||
@@ -127,7 +127,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION' => 'Berechtigungen für die Veranstaltung',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION_EXP' => 'Wähle die Gruppen aus, denen es erlaubt sein soll die Veranstaltung zu sehen. Falls alle Benutzer die Veranstaltung sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
|
||||
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Öffne externe Veranstaltungsverknüpfungen in einem neuen Fenster',
|
||||
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Veranstaltung aktualisiert</strong><br />» %s',
|
||||
'LOG_PORTAL_EVENT_ADDED' => '<strong>Veranstaltung hinzugefügt</strong><br />» %s',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'CLOCK' => 'Uhr',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CLOCK_SETTINGS' => 'Uhr Einstellungen',
|
||||
'ACP_PORTAL_CLOCK_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für die Uhr ändern',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_CUSTOM' => 'Eigener Block',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CUSTOM_SETTINGS' => 'Custom Block Settings',
|
||||
'ACP_PORTAL_CUSTOM_SETTINGS_EXP' => 'Einstellungen für den eigenen Block',
|
||||
|
||||
@@ -55,7 +55,7 @@ $lang = array_merge($lang, array(
|
||||
'EUR' => 'Euro (EUR)',
|
||||
'MXN' => 'Mexikanische Pesos (MXN)',
|
||||
'ILS' => 'Neue Israelische Schekel (ILS)',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS' => 'Paypal Einstellungen',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS_EXP' => 'Hier kannst du die Paypal Einstellungen ändern.',
|
||||
|
||||
@@ -38,7 +38,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_FRIENDS' => 'Derzeit sind keine Freunde definiert',
|
||||
'NO_FRIENDS_OFFLINE' => 'Keine Freunde offline',
|
||||
'NO_FRIENDS_ONLINE' => 'Keine Freunde online',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS' => 'Einstellungen für den Freunde-Block',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für den Freunde-Block ändern.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_BOTS' => 'Letzte Bots',
|
||||
'LAST_VISITED_BOTS' => 'Die letzten Bots',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Einstellungen für Bot-Besuche',
|
||||
'ACP_PORTAL_BOTS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für Bot-Besuche ändern.',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_MEMBERS' => 'Neue Mitglieder',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS' => 'Einstellungen für neue Mitglieder',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für neue Mitglieder ändern.',
|
||||
|
||||
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_MODERATORS_P' => 'Keine Moderatoren',
|
||||
'NO_GROUPS_P' => 'Keine Gruppen',
|
||||
'ACP_PORTAL_LEADERS' => 'Das Team',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_LEADERS' => 'Team Block Einstellungen',
|
||||
'ACP_PORTAL_LEADERS_EXP' => 'Hier kannst Du den Team-Block anpassen',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_LINKS' => 'Links',
|
||||
'LINKS_NO_LINKS' => 'Keine Links vorhanden',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_LINKS' => 'Links-Einstellungen',
|
||||
'ACP_PORTAL_LINKS_EXP' => 'Einstellungen für die Links ändern.',
|
||||
@@ -49,7 +49,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_LINK_PERMISSION' => 'Link Berechtigungen',
|
||||
'ACP_PORTAL_LINK_PERMISSION_EXP'=> 'Wähle die Gruppen aus die berechtigt sein sollen den Link zu sehen. Falls alle Benutzer den Link sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab indem du <samp>STRG</samp> gedrückt hältst und klickst.',
|
||||
'ACP_PORTAL_LINKS_NEW_WINDOW' => 'Öffne externe Verknüpfungen in einem neuen Fenster',
|
||||
|
||||
|
||||
// Errors
|
||||
'NO_LINK_TITLE' => 'Du musst einen Titel für diesen Link angeben.',
|
||||
'NO_LINK_URL' => 'Du musst eine Link URL eingeben.',
|
||||
|
||||
@@ -41,7 +41,7 @@ $lang = array_merge($lang, array(
|
||||
'M_PRV' => 'Datenschutzrichtlinie',
|
||||
'M_SEARCH' => 'Suche',
|
||||
'MENU_NO_LINKS' => 'Keine Links',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_MENU' => 'Hauptmenü-Einstellungen',
|
||||
'ACP_PORTAL_MENU_LINK_SETTINGS' => 'Link Einstellungen',
|
||||
@@ -62,7 +62,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_MENU_PERMISSION' => 'Link Berechtigungen',
|
||||
'ACP_PORTAL_MENU_PERMISSION_EXP'=> 'Wähle die Gruppen aus die berechtigt sein sollen den Link zu sehen. Falls alle Benutzer den Link sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab indem du <samp>STRG</samp> gedrückt hältst und klickst.',
|
||||
'ACP_PORTAL_MENU_EXT_NEW_WINDOW'=> 'Öffne externe Verknüpfungen in einem neuen Fenster',
|
||||
|
||||
|
||||
// Errors
|
||||
'NO_LINK_TITLE' => 'Du musst einen Titel für diesen Link angeben.',
|
||||
'NO_LINK_URL' => 'Du musst eine Link URL eingeben.',
|
||||
|
||||
@@ -43,7 +43,7 @@ $lang = array_merge($lang, array(
|
||||
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
|
||||
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
|
||||
'JUMP_TO_POST' => 'Rufe den Beitrag auf',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_NEWS_SETTINGS' => 'Aktuelle Beiträge Einstellungen',
|
||||
'ACP_PORTAL_NEWS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für die aktuellen Beiträge ändern.',
|
||||
|
||||
@@ -37,7 +37,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_OPTIONS' => 'Diese Umfrage verfügt über keine Optionen.',
|
||||
'NO_POLL' => 'Derzeit gibt es keine aktuellen Umfragen',
|
||||
'RETURN_PORTAL' => '%sZurück zum Portal%s',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_POLLS_SETTINGS' => 'Einstellungen für Umfragen',
|
||||
'ACP_PORTAL_POLLS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für Umfragen ändern.',
|
||||
|
||||
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_RECENT_TOPIC' => 'Aktuelle Themen',
|
||||
'PORTAL_RECENT_ANN' => 'Aktuelle Bekanntmachungen',
|
||||
'PORTAL_RECENT_HOT_TOPIC' => 'Beliebte Themen',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_RECENT_SETTINGS' => 'Einstellungen für neueste Themen',
|
||||
'ACP_PORTAL_RECENT_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für die neuesten Themen ändern.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'TOPPOSTERS' => 'Top Poster',
|
||||
'TOPPOSTERS_CONFIG' => 'Einstellungen zu Top Poster',
|
||||
|
||||
|
||||
// ACP
|
||||
'NUM_TOPPOSTERS' => 'Anzahl der Top Poster',
|
||||
'NUM_TOPPOSTERS_EXP' => 'Gebe die Anzahl der Benutzer an, die im Top Poster Block angezeigt werden sollen.',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_WELCOME' => 'Willkommen',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_WELCOME_SETTINGS' => 'Einstellungen für die Willkommens-Nachricht',
|
||||
'ACP_PORTAL_WELCOME_MESSAGE_SHORT' => 'Die eingegebene Nachricht ist nicht lang genug.',
|
||||
|
||||
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
// Portal Modules
|
||||
'ACP_PORTAL_MODULES' => 'Portal Modules',
|
||||
'ACP_PORTAL_MODULES_EXP' => 'You can manage your portal modules here. If you turn off all modules, please also disable the Portal.',
|
||||
|
||||
|
||||
'MODULE_POS_TOP' => 'Top',
|
||||
'MODULE_POS_LEFT' => 'Left column',
|
||||
'MODULE_POS_RIGHT' => 'Right column',
|
||||
@@ -56,7 +56,7 @@ $lang = array_merge($lang, array(
|
||||
'DELETE_MODULE_CONFIRM' => 'Are you sure you wish to delete the module "%1$s"?',
|
||||
'MODULE_RESET_SUCCESS' => 'Successfully reset the module settings.',
|
||||
'MODULE_RESET_CONFIRM' => 'Are you sure you wish to reset the settings of the module "%1$s"?',
|
||||
|
||||
|
||||
'MODULE_OPTIONS' => 'Module options',
|
||||
'MODULE_NAME' => 'Module name',
|
||||
'MODULE_NAME_EXP' => 'Enter the name of the Module that should be displayed in the Module configuration.',
|
||||
@@ -96,7 +96,7 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_LEFT_COLUMN_WIDTH_EXP' => 'Change the width of the left column in pixels; recommended value is 180',
|
||||
'PORTAL_RIGHT_COLUMN_WIDTH' => 'Width of the right column',
|
||||
'PORTAL_RIGHT_COLUMN_WIDTH_EXP' => 'Change the width of the right column in pixels; recommended value is 180',
|
||||
|
||||
|
||||
'LINK_ADDED' => 'The link has been successfully added',
|
||||
'LINK_UPDATED' => 'The link has been successfully updated',
|
||||
'LOG_PORTAL_LINK_ADDED' => '<strong>Altered Portal settings</strong><br />» Link added: %s ',
|
||||
@@ -123,14 +123,14 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MODULE_STATUS' => 'Status',
|
||||
'PORTAL_MODULE_SUCCESS' => 'Success',
|
||||
'PORTAL_MODULE_ERROR' => 'Error',
|
||||
|
||||
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Adding basic set of modules',
|
||||
'PORTAL_BASIC_UNINSTALL' => 'Removing modules from database',
|
||||
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_CONFIG' => '<strong>Altered Portal settings</strong><br />» %s',
|
||||
|
||||
|
||||
/**
|
||||
* A copy of Handyman` s MOD version check, to view it on the portal overview
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ $lang = array_merge($lang, array(
|
||||
'RELEASE_ANNOUNCEMENT' => 'Annoucement Topic',
|
||||
'UP_TO_DATE' => '%s is up to date',
|
||||
'VERSION_CHECK' => 'MOD Version Check',
|
||||
|
||||
|
||||
// Adding the permissions
|
||||
'acl_a_manage_portal' => array('lang' => 'Can alter Portal settings', 'cat' => 'misc'),
|
||||
'acl_u_view_portal' => array('lang' => 'Can view the Portal', 'cat' => 'misc'),
|
||||
|
||||
@@ -47,7 +47,7 @@ $lang = array_merge($lang, array(
|
||||
'JUMP_NEWEST' => 'Jump to newest post',
|
||||
'JUMP_FIRST' => 'Jump to first post',
|
||||
'JUMP_TO_POST' => 'Jump to post',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Global announcements settings',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS_EXP' => 'This is where you customize the global announcements block.',
|
||||
|
||||
@@ -35,7 +35,7 @@ $lang = array_merge($lang, array(
|
||||
'DOWNLOADS' => 'Downloads',
|
||||
'NO_ATTACHMENTS' => 'No attachments',
|
||||
'PORTAL_ATTACHMENTS' => 'Attachments',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS' => 'Attachments settings',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS_EXP' => 'This is where you customize the attachments block.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'BIRTHDAYS_AHEAD' => 'In the next %s days',
|
||||
'NO_BIRTHDAYS_AHEAD' => 'No members have a birthday within this period of time.',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BIRTHDAYS_SETTINGS' => 'Birthdays Settings',
|
||||
'ACP_PORTAL_BIRTHDAYS_SETTINGS_EXP' => 'This is where you customize the birthday block.',
|
||||
|
||||
@@ -85,7 +85,7 @@ $lang = array_merge($lang, array(
|
||||
'12'=> 'December',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CALENDAR' => 'Calendar settings',
|
||||
'ACP_PORTAL_CALENDAR_EXP' => 'This is where you customize the calendar block.',
|
||||
@@ -127,8 +127,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION' => 'Event permissions',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION_EXP' => 'Select the groups that should be authorized to view the event. If you want all users to be able to view the event, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Open external event links in a new window',
|
||||
|
||||
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Updated Event</strong><br />» %s',
|
||||
'LOG_PORTAL_EVENT_ADDED' => '<strong>Added Event</strong><br />» %s',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'CLOCK' => 'Clock',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CLOCK_SETTINGS' => 'Clock Settings',
|
||||
'ACP_PORTAL_CLOCK_SETTINGS_EXP' => 'This is where you customize your clock',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_CUSTOM' => 'Custom Block',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_CUSTOM_SETTINGS' => 'Custom Block Settings',
|
||||
'ACP_PORTAL_CUSTOM_SETTINGS_EXP' => 'Here you can edit your custom block',
|
||||
|
||||
@@ -55,7 +55,7 @@ $lang = array_merge($lang, array(
|
||||
'EUR' => 'Euros (EUR)',
|
||||
'MXN' => 'Mexican Pesos (MXN)',
|
||||
'ILS' => 'Israeli New Shekels (ILS)',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS' => 'Paypal settings',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS_EXP' => 'This is where you customize the Paypal block.',
|
||||
|
||||
@@ -38,7 +38,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_FRIENDS' => 'No friends currently defined',
|
||||
'NO_FRIENDS_OFFLINE' => 'No friends offline',
|
||||
'NO_FRIENDS_ONLINE' => 'No friends online',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS' => 'Friends Settings',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS_EXP' => 'This is where you customize the friends block.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_BOTS' => 'Latest Bots',
|
||||
'LAST_VISITED_BOTS' => 'Last visited bots',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Visiting bots settings',
|
||||
'ACP_PORTAL_BOTS_SETTINGS_EXP' => 'This is where you customize the visiting bots block.',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_MEMBERS' => 'Newest members',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS' => 'Newest members settings',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS_EXP' => 'This is where you customize the newest members block.',
|
||||
|
||||
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_MODERATORS_P' => 'No Moderators',
|
||||
'NO_GROUPS_P' => 'No Groups',
|
||||
'ACP_PORTAL_LEADERS' => 'The Team',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_LEADERS' => 'Team Settings',
|
||||
'ACP_PORTAL_LEADERS_EXP' => 'This is where you customize the team block',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_LINKS' => 'Links',
|
||||
'LINKS_NO_LINKS' => 'No links',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_LINKS' => 'Link Settings',
|
||||
'ACP_PORTAL_LINKS_EXP' => 'Customize the links listed in the links block',
|
||||
@@ -49,7 +49,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_LINK_PERMISSION' => 'Link permissions',
|
||||
'ACP_PORTAL_LINK_PERMISSION_EXP'=> 'Select the groups that should be authorized to view the link. If you want all users to be able to view the link, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'ACP_PORTAL_LINKS_NEW_WINDOW' => 'Open external links in a new window',
|
||||
|
||||
|
||||
// Errors
|
||||
'NO_LINK_TITLE' => 'You must enter a title for this link.',
|
||||
'NO_LINK_URL' => 'You must enter a link URL.',
|
||||
|
||||
@@ -41,7 +41,7 @@ $lang = array_merge($lang, array(
|
||||
'M_PRV' => 'Privacy policy',
|
||||
'M_SEARCH' => 'Search',
|
||||
'MENU_NO_LINKS' => 'No links',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_MENU' => 'Menu settings',
|
||||
'ACP_PORTAL_MENU_LINK_SETTINGS' => 'Link Settings',
|
||||
@@ -62,7 +62,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_MENU_PERMISSION' => 'Link permissions',
|
||||
'ACP_PORTAL_MENU_PERMISSION_EXP'=> 'Select the groups that should be authorized to view the link. If you want all users to be able to view the link, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'ACP_PORTAL_MENU_EXT_NEW_WINDOW'=> 'Open external links in a new window',
|
||||
|
||||
|
||||
// Errors
|
||||
'NO_LINK_TITLE' => 'You must enter a title for this link.',
|
||||
'NO_LINK_URL' => 'You must enter a link URL.',
|
||||
|
||||
@@ -43,7 +43,7 @@ $lang = array_merge($lang, array(
|
||||
'JUMP_NEWEST' => 'Jump to newest post',
|
||||
'JUMP_FIRST' => 'Jump to first post',
|
||||
'JUMP_TO_POST' => 'Jump to post',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_NEWS_SETTINGS' => 'News settings',
|
||||
'ACP_PORTAL_NEWS_SETTINGS_EXP' => 'This is where you customize the news block.',
|
||||
|
||||
@@ -37,7 +37,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_OPTIONS' => 'This poll has no available options.',
|
||||
'NO_POLL' => 'No polls available',
|
||||
'RETURN_PORTAL' => '%sReturn to the portal%s',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_POLLS_SETTINGS' => 'Poll settings',
|
||||
'ACP_PORTAL_POLLS_SETTINGS_EXP' => 'This is where you customize the poll block.',
|
||||
|
||||
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_RECENT_TOPIC' => 'Recent topics',
|
||||
'PORTAL_RECENT_ANN' => 'Recent announcements',
|
||||
'PORTAL_RECENT_HOT_TOPIC' => 'Recent popular topics',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_RECENT_SETTINGS' => 'Recent topics settings',
|
||||
'ACP_PORTAL_RECENT_SETTINGS_EXP' => 'This is where you customize the recent topics block.',
|
||||
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'TOPPOSTERS' => 'Top Posters',
|
||||
'TOPPOSTERS_CONFIG' => 'Top Poster settings',
|
||||
|
||||
|
||||
// ACP
|
||||
'NUM_TOPPOSTERS' => 'Number of Top Posters',
|
||||
'NUM_TOPPOSTERS_EXP' => 'Enter how many users should be displayed in the top posters block.',
|
||||
|
||||
@@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_WELCOME' => 'Welcome Message',
|
||||
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_WELCOME_SETTINGS' => 'Welcome Message Settings',
|
||||
'ACP_PORTAL_WELCOME_MESSAGE_SHORT' => 'The message you entered is not long enough.',
|
||||
|
||||
@@ -65,7 +65,7 @@ foreach ($portal_modules as $row)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$class_name = 'portal_' . $row['module_classname'] . '_module';
|
||||
if (!class_exists($class_name))
|
||||
{
|
||||
@@ -77,7 +77,7 @@ foreach ($portal_modules as $row)
|
||||
}
|
||||
|
||||
$module = new $class_name();
|
||||
|
||||
|
||||
/**
|
||||
* Check for permissions before loading anything
|
||||
* the default group of a user always defines his/her permission (KISS)
|
||||
@@ -87,7 +87,7 @@ foreach ($portal_modules as $row)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ($module->language)
|
||||
{
|
||||
$user->add_lang('mods/portal/' . $module->language);
|
||||
|
||||
@@ -61,7 +61,7 @@ function set_portal_config($config_name, $config_value)
|
||||
}
|
||||
|
||||
$portal_config[$config_name] = $config_value;
|
||||
|
||||
|
||||
$cache->destroy('portal_config');
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ function get_sub_taged_string($message, $bbcode_uid, $length)
|
||||
{
|
||||
include($phpbb_root_path . 'includes/trim_message/trim_message.' . $phpEx);
|
||||
}
|
||||
|
||||
|
||||
if(!class_exists('phpbb_trim_message_bbcodes'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/trim_message/bbcodes.' . $phpEx);
|
||||
@@ -590,9 +590,9 @@ function sql_table_exists($table_name)
|
||||
function get_portal_tracking_info($fetch_news)
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
|
||||
$last_read = $topic_ids = $forum_ids = $tracking_info = $rev_forum_ids = array();
|
||||
|
||||
|
||||
/**
|
||||
* group everything by the forum IDs
|
||||
*/
|
||||
@@ -604,15 +604,15 @@ function get_portal_tracking_info($fetch_news)
|
||||
$forum_ids[] = $fetch_news[$i]['forum_id'];
|
||||
$rev_forum_ids[$fetch_news[$i]['topic_id']] = $fetch_news[$i]['forum_id']; // the other way round also helps
|
||||
}
|
||||
|
||||
|
||||
foreach ($tracking_info as $forum_id => $current_forum)
|
||||
{
|
||||
if ($config['load_db_lastread'] && $user->data['is_registered'])
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$mark_time = array();
|
||||
|
||||
|
||||
$sql = 'SELECT topic_id, mark_time
|
||||
FROM ' . TOPICS_TRACK_TABLE . "
|
||||
WHERE user_id = {$user->data['user_id']}
|
||||
@@ -703,7 +703,7 @@ function get_portal_tracking_info($fetch_news)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $last_read;
|
||||
}
|
||||
|
||||
@@ -720,24 +720,24 @@ function get_portal_tracking_info($fetch_news)
|
||||
function board3_basic_install($mode = 'install', $purge_modules = true, $u_action = '')
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix, $config;
|
||||
|
||||
|
||||
// Shouldn't happen but we should check this nonetheless
|
||||
if (!defined('PORTAL_MODULES_TABLE'))
|
||||
{
|
||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||
}
|
||||
|
||||
|
||||
if ($mode == 'install')
|
||||
{
|
||||
$directory = $phpbb_root_path . 'portal/modules/';
|
||||
|
||||
|
||||
if ($purge_modules)
|
||||
{
|
||||
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* this is a list of the basic modules that will be installed
|
||||
* module_name => array(module_column, module_order)
|
||||
@@ -753,7 +753,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
'portal_topposters' => array(1, 8),
|
||||
'portal_latest_members' => array(1, 9),
|
||||
'portal_link_us' => array(1, 10),
|
||||
|
||||
|
||||
// center column
|
||||
'portal_welcome' => array(2, 1),
|
||||
'portal_recent' => array(2, 2),
|
||||
@@ -761,7 +761,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
'portal_news' => array(2, 4),
|
||||
'portal_poll' => array(2, 5),
|
||||
'portal_whois_online' => array(2, 6),
|
||||
|
||||
|
||||
// right column
|
||||
'portal_user_menu' => array(3, 1),
|
||||
'portal_statistics' => array(3, 2),
|
||||
@@ -770,7 +770,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
'portal_latest_bots' => array(3, 5),
|
||||
'portal_links' => array(3, 6),
|
||||
);
|
||||
|
||||
|
||||
foreach ($modules_ary as $module_name => $module_data)
|
||||
{
|
||||
$class_name = $module_name . '_module';
|
||||
@@ -782,7 +782,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
{
|
||||
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
$c_class = new $class_name();
|
||||
|
||||
$sql_ary = array(
|
||||
@@ -801,7 +801,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
|
||||
$c_class->install($db->sql_nextid());
|
||||
}
|
||||
|
||||
|
||||
// Make sure we get rid of old data
|
||||
$cache->destroy('portal_modules');
|
||||
|
||||
@@ -824,28 +824,28 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE config_name ' . $db->sql_like_expression(utf8_clean_string('board3_') . $db->any_char) . '
|
||||
AND ' . $db->sql_in_set('config_name', $skip_entries, true);
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
return $user->lang['PORTAL_BASIC_UNINSTALL'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* check if the entered source file actually exists
|
||||
*/
|
||||
function check_file_src($value, $key, $module_id, $force_error = true)
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
|
||||
$error = '';
|
||||
|
||||
|
||||
// We check if the chosen file is present in all active styles
|
||||
$sql = 'SELECT st.theme_path
|
||||
FROM ' . STYLES_THEME_TABLE . ' st
|
||||
LEFT JOIN ' . STYLES_TABLE . ' s
|
||||
ON (st.theme_id = s.style_id)
|
||||
WHERE s.style_active = 1';
|
||||
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -855,7 +855,7 @@ function check_file_src($value, $key, $module_id, $force_error = true)
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
if (!empty($error))
|
||||
{
|
||||
if ($force_error)
|
||||
|
||||
@@ -22,7 +22,7 @@ class portal_upload
|
||||
*/
|
||||
private $upload_path;
|
||||
private $u_action;
|
||||
|
||||
|
||||
/*
|
||||
* constructor function
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ class portal_upload
|
||||
$this->upload_file();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* upload module zip
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ class portal_upload
|
||||
$upload = new fileupload();
|
||||
// Only allow ZIP files
|
||||
$upload->set_allowed_extensions(array('zip'));
|
||||
|
||||
|
||||
$file = $upload->form_upload('modupload');
|
||||
|
||||
// this is for module zips so don't allow anything else
|
||||
@@ -64,7 +64,7 @@ class portal_upload
|
||||
{
|
||||
$file->clean_filename('real');
|
||||
$file->move_file(str_replace($phpbb_root_path, '', $this->upload_path), true, true);
|
||||
|
||||
|
||||
if (!sizeof($file->error))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
|
||||
@@ -86,7 +86,7 @@ class portal_upload
|
||||
// We need to move that directory then
|
||||
$this->directory_move($mod_dir . '_tmp/' . $folder_contents[0], $this->upload_path . $folder_contents[0]);
|
||||
$new_mod_dir = $this->upload_path . $folder_contents[0];
|
||||
|
||||
|
||||
}
|
||||
else if (!is_dir($mod_dir))
|
||||
{
|
||||
@@ -96,24 +96,24 @@ class portal_upload
|
||||
}
|
||||
|
||||
$this->directory_delete($mod_dir . '_tmp/');
|
||||
|
||||
|
||||
// make sure we set $mod_dir to the correct folder after the above step
|
||||
$mod_dir = (isset($new_mod_dir)) ? $new_mod_dir : $mod_dir;
|
||||
|
||||
|
||||
// if we got until here set $actions['NEW_FILES']
|
||||
$actions['NEW_FILES'] = array();
|
||||
|
||||
|
||||
// Now we need to get the files inside the folders
|
||||
//$folder_contents = $this->cut_folder(scandir($mod_dir));
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($mod_dir)); // requires PHP 5
|
||||
|
||||
|
||||
foreach($iterator as $cur_file)
|
||||
{
|
||||
$cur_path = $cur_file->getPathname();
|
||||
$cur_path = str_replace('\\', '/', $cur_path); // we want unix-like paths
|
||||
$cur_path = str_replace($mod_dir . '/', '', $cur_path);
|
||||
$cut_pos = strpos($cur_path, '/');
|
||||
|
||||
|
||||
/*
|
||||
* We only copy files. The recursive iterator might grab paths depending on
|
||||
* the PHP version. This will trigger our error handle with trigger_error()
|
||||
@@ -123,7 +123,7 @@ class portal_upload
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Only allow files in adm, language, portal and styles folder and a license.txt
|
||||
if(!in_array(substr($cur_path, 0, $cut_pos), array('adm', 'language', 'portal', 'styles')) && $cur_file->getFilename() != 'license.txt')
|
||||
{
|
||||
@@ -164,7 +164,7 @@ class portal_upload
|
||||
'TARGET' => $target,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_MOD_SUCCESSBOX' => true,
|
||||
'MESSAGE' => $user->lang['MODULE_UPLOADED'],
|
||||
@@ -180,10 +180,10 @@ class portal_upload
|
||||
{
|
||||
trigger_error((sizeof($file->error) ? implode('<br />', $file->error) : $user->lang['MOD_UPLOAD_INIT_FAIL']) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['ACP_PORTAL_UPLOAD'],
|
||||
'L_TITLE_EXPLAIN' => '',
|
||||
@@ -195,7 +195,7 @@ class portal_upload
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Cuts the unneeded '.' and '..' from the folder content info scandir returns
|
||||
*
|
||||
@@ -205,19 +205,19 @@ class portal_upload
|
||||
{
|
||||
$cut_array = array('.', '..');
|
||||
$folder_content = array_diff($folder_content, $cut_array);
|
||||
|
||||
|
||||
return $folder_content;
|
||||
}
|
||||
|
||||
private function directory_move($src, $dest)
|
||||
{
|
||||
$src_contents = scandir($src);
|
||||
|
||||
|
||||
if (!is_dir($dest) && is_dir($src))
|
||||
{
|
||||
mkdir($dest . '/', 0755);
|
||||
}
|
||||
|
||||
|
||||
foreach ($src_contents as $src_entry)
|
||||
{
|
||||
if ($src_entry != '.' && $src_entry != '..')
|
||||
@@ -234,26 +234,26 @@ class portal_upload
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* the following functions are from the AutoMOD package
|
||||
* @copyright (c) 2008 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
||||
*/
|
||||
|
||||
|
||||
private function directory_delete($dir)
|
||||
{
|
||||
if (!file_exists($dir))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (!is_dir($dir) && is_file($dir))
|
||||
{
|
||||
phpbb_chmod($dir, CHMOD_ALL);
|
||||
return unlink($dir);
|
||||
}
|
||||
|
||||
|
||||
foreach (scandir($dir) as $item)
|
||||
{
|
||||
if ($item == '.' || $item == '..')
|
||||
@@ -269,10 +269,10 @@ class portal_upload
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return @rmdir($dir);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Moves files or complete directories
|
||||
*
|
||||
@@ -307,7 +307,7 @@ class portal_upload
|
||||
return sprintf($user->lang['MODULE_UPLOAD_MKDIR_FAILURE'], $dirname_check);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// leave a backup file if it already exists
|
||||
if(file_exists($to))
|
||||
{
|
||||
@@ -329,7 +329,7 @@ class portal_upload
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author Michal Nazarewicz (from the php manual)
|
||||
* Creates all non-existant directories in a path
|
||||
|
||||
@@ -81,7 +81,7 @@ class portal_announcements_module
|
||||
|
||||
$time = ($config['board3_announcements_day_' . $module_id] == 0) ? 0 : $config['board3_announcements_day_' . $module_id];
|
||||
$post_time = ($time == 0) ? '' : 'AND topic_time > ' . (time() - $time * 86400);
|
||||
|
||||
|
||||
$str_where = '';
|
||||
|
||||
if($permissions == true)
|
||||
@@ -92,7 +92,7 @@ class portal_announcements_module
|
||||
{
|
||||
$disallow_access = array();
|
||||
}
|
||||
|
||||
|
||||
if($config['board3_announcements_forum_exclude_' . $module_id] == true)
|
||||
{
|
||||
$disallow_access = array_merge($disallow_access, $forum_from);
|
||||
@@ -142,7 +142,7 @@ class portal_announcements_module
|
||||
$total_announcements = (int) $db->sql_fetchfield('num_topics');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
$topic_tracking_info = (get_portal_tracking_info($fetch_news));
|
||||
|
||||
if($announcement < 0)
|
||||
@@ -280,7 +280,7 @@ class portal_announcements_module
|
||||
// Show "read full" page
|
||||
{
|
||||
$i = $announcement;
|
||||
|
||||
|
||||
/**
|
||||
* redirect to portal page if the specified announcement does not exist
|
||||
* force #top anchor in order to get rid of the #a anchor
|
||||
@@ -305,7 +305,7 @@ class portal_announcements_module
|
||||
{
|
||||
$pagination = generate_portal_pagination(append_sid("{$phpbb_root_path}portal.$phpEx"), $total_announcements, $config['board3_number_of_announcements_' . $module_id], $start, 'announcements');
|
||||
}
|
||||
|
||||
|
||||
$template->assign_block_vars('announcements_center_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $config['allow_attachments']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'FORUM_NAME' => ($forum_id) ? $fetch_news[$i]['forum_name'] : '',
|
||||
@@ -409,7 +409,7 @@ class portal_announcements_module
|
||||
set_config('board3_announcements_archive_' . $module_id, 1);
|
||||
set_config('board3_announcements_permissions_' . $module_id, 1);
|
||||
set_config('board3_show_announcements_replies_views_' . $module_id, 1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -432,14 +432,14 @@ class portal_announcements_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Create forum select box
|
||||
public function select_forums($value, $key, $module_id)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config[$key]) && strlen($config[$key]) > 0)
|
||||
{
|
||||
@@ -456,18 +456,15 @@ class portal_announcements_module
|
||||
return $s_forum_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Store selected forums
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected forums
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class portal_attachments_module
|
||||
{
|
||||
$attach_forums_config = (strpos($config['board3_attachments_forum_ids_' . $module_id], ',') !== false) ? explode(',', $config['board3_attachments_forum_ids_' . $module_id]) : array($config['board3_attachments_forum_ids_' . $module_id]);
|
||||
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
|
||||
|
||||
|
||||
if($config['board3_attachments_forum_exclude_' . $module_id])
|
||||
{
|
||||
$forum_list = array_unique(array_diff($forum_list, $attach_forums_config));
|
||||
@@ -167,7 +167,7 @@ class portal_attachments_module
|
||||
{
|
||||
$attach_forums_config = (strpos($config['board3_attachments_forum_ids_' . $module_id], ',') !== false) ? explode(',', $config['board3_attachments_forum_ids_' . $module_id]) : array($config['board3_attachments_forum_ids_' . $module_id]);
|
||||
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
|
||||
|
||||
|
||||
if($config['board3_attachments_forum_exclude_' . $module_id])
|
||||
{
|
||||
$forum_list = array_unique(array_diff($forum_list, $attach_forums_config));
|
||||
@@ -297,29 +297,29 @@ class portal_attachments_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Create select box for attachment filetype
|
||||
public function select_filetype($value, $key, $module_id)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
|
||||
|
||||
// Get extensions
|
||||
$sql = 'SELECT *
|
||||
FROM ' . EXTENSIONS_TABLE . '
|
||||
ORDER BY extension ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$extensions[] = $row;
|
||||
}
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config['board3_attachments_filetype_' . $module_id]) && strlen($config['board3_attachments_filetype_' . $module_id]) > 0)
|
||||
{
|
||||
$selected = explode(',', $config['board3_attachments_filetype_' . $module_id]);
|
||||
}
|
||||
|
||||
|
||||
// Build options
|
||||
$ext_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
||||
foreach ($extensions as $id => $ext)
|
||||
@@ -327,31 +327,31 @@ class portal_attachments_module
|
||||
$ext_options .= '<option value="' . $ext['extension'] . '"' . ((in_array($ext['extension'], $selected)) ? ' selected="selected"' : '') . '>' . $ext['extension'] . '</option>';
|
||||
}
|
||||
$ext_options .= '</select>';
|
||||
|
||||
|
||||
return $ext_options;
|
||||
}
|
||||
|
||||
|
||||
// Store selected filetypes
|
||||
public function store_filetypes($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected extensions
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
|
||||
$filetypes = implode(',', $values);
|
||||
|
||||
|
||||
set_config('board3_attachments_filetype_' . $module_id, $filetypes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Create forum select box
|
||||
public function select_forums($value, $key)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config[$key]) && strlen($config[$key]) > 0)
|
||||
{
|
||||
@@ -368,18 +368,15 @@ class portal_attachments_module
|
||||
return $s_forum_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Store selected forums
|
||||
public function store_selected_forums($key)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected extensions
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,18 +46,18 @@ class portal_calendar_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_calendar_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
public $custom_acp_tpl = 'acp_portal_calendar';
|
||||
|
||||
|
||||
/**
|
||||
* additional variables
|
||||
*/
|
||||
private $mini_cal_fdow;
|
||||
|
||||
|
||||
/**
|
||||
* constants
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ class portal_calendar_module
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $phpbb_root_path, $phpEx, $db;
|
||||
|
||||
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
// 0 = Sunday first - 1 = Monday first. ;-)
|
||||
@@ -98,7 +98,7 @@ class portal_calendar_module
|
||||
$mini_cal_this_month = $this->dateMM;
|
||||
$mini_cal_this_day = $this->dateDD;
|
||||
$mini_cal_month_days = $this->daysMonth;
|
||||
|
||||
|
||||
// output our general calendar bits
|
||||
$down = $this->mini_cal_month - 1;
|
||||
$up = $this->mini_cal_month + 1;
|
||||
@@ -180,9 +180,9 @@ class portal_calendar_module
|
||||
$time_ary[$key] = $cur_event['start_time'];
|
||||
}
|
||||
array_multisort($time_ary, SORT_NUMERIC, $events);
|
||||
|
||||
|
||||
$groups_ary = get_user_groups();
|
||||
|
||||
|
||||
foreach($events as $key => $cur_event)
|
||||
{
|
||||
if(($cur_event['start_time'] + $user->timezone + $user->dst) >= $today_timestamp ||
|
||||
@@ -191,7 +191,7 @@ class portal_calendar_module
|
||||
{
|
||||
$cur_permissions = explode(',', $cur_event['permission']);
|
||||
$permission_check = array_intersect($groups_ary, $cur_permissions);
|
||||
|
||||
|
||||
if(!empty($permission_check) || $cur_event['permission'] == '')
|
||||
{
|
||||
// check if this is an external link
|
||||
@@ -275,7 +275,7 @@ class portal_calendar_module
|
||||
set_config('board3_display_events_' . $module_id, 0);
|
||||
set_config('board3_events_' . $module_id, '');
|
||||
set_config('board3_events_url_new_window_' . $module_id, 0);
|
||||
|
||||
|
||||
set_portal_config('board3_calendar_events_' . $module_id, '');
|
||||
return true;
|
||||
}
|
||||
@@ -283,13 +283,13 @@ class portal_calendar_module
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$del_config = array(
|
||||
'board3_calendar_events_' . $module_id,
|
||||
);
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
|
||||
|
||||
$db->sql_query($sql);
|
||||
|
||||
$del_config = array(
|
||||
@@ -305,11 +305,11 @@ class portal_calendar_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
public function manage_events($value, $key, $module_id)
|
||||
{
|
||||
global $db, $portal_config, $config, $template, $user, $phpEx, $phpbb_admin_path;
|
||||
|
||||
|
||||
$action = request_var('action', '');
|
||||
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||
$action = (isset($_POST['save'])) ? 'save' : $action;
|
||||
@@ -319,7 +319,7 @@ class portal_calendar_module
|
||||
$events = (strlen($portal_config['board3_calendar_events_' . $module_id]) >= 1) ? $this->utf_unserialize($portal_config['board3_calendar_events_' . $module_id]) : array();
|
||||
|
||||
$u_action = append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=portal&mode=config&module_id=' . $module_id);
|
||||
|
||||
|
||||
switch($action)
|
||||
{
|
||||
// Save changes
|
||||
@@ -339,7 +339,7 @@ class portal_calendar_module
|
||||
$event_url = request_var('event_url', ' ');
|
||||
$event_permission = request_var('permission-setting-calendar', array(0 => ''));
|
||||
$groups_ary = array();
|
||||
|
||||
|
||||
/*
|
||||
* parse the event time
|
||||
* first check for obvious errors, we don't want to waste server resources
|
||||
@@ -363,7 +363,7 @@ class portal_calendar_module
|
||||
$start_year = (int) substr($event_start_day, $second_start_hyphen + 1, $start_day_length - $second_start_hyphen);
|
||||
$start_hour = (int) substr($event_start_time, 0, $start_colon_pos);
|
||||
$start_minute = (int) substr($event_start_time, $start_colon_pos + 1, ($start_time_length - $start_colon_pos) - 1);
|
||||
|
||||
|
||||
if(!$event_all_day)
|
||||
{
|
||||
$first_end_hyphen = strpos($event_end_day, '-', 0);
|
||||
@@ -377,7 +377,7 @@ class portal_calendar_module
|
||||
$end_hour = (int) substr($event_end_time, 0, $end_colon_pos);
|
||||
$end_minute = (int) substr($event_end_time, $end_colon_pos + 1, ($end_time_length - $end_colon_pos) - 1);
|
||||
}
|
||||
|
||||
|
||||
// UNIX timestamps
|
||||
$start_time = gmmktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year) - $user->timezone - $user->dst;
|
||||
$end_time = (!$event_all_day) ? gmmktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year) - $user->timezone - $user->dst : '';
|
||||
@@ -390,7 +390,7 @@ class portal_calendar_module
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CALENDAR_EVENT_START_FIRST']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -401,7 +401,7 @@ class portal_calendar_module
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$event_permission = array_intersect($event_permission, $groups_ary);
|
||||
$event_permission = implode(',', $event_permission);
|
||||
|
||||
@@ -420,7 +420,7 @@ class portal_calendar_module
|
||||
if (isset($link_id) && $link_id < sizeof($events))
|
||||
{
|
||||
$message = $user->lang['EVENT_UPDATED'];
|
||||
|
||||
|
||||
$events[$link_id] = array(
|
||||
'title' => $event_title,
|
||||
'desc' => $event_desc,
|
||||
@@ -436,7 +436,7 @@ class portal_calendar_module
|
||||
else
|
||||
{
|
||||
$message = $user->lang['EVENT_ADDED'];
|
||||
|
||||
|
||||
$events[] = array(
|
||||
'title' => $event_title,
|
||||
'desc' => $event_desc,
|
||||
@@ -448,7 +448,7 @@ class portal_calendar_module
|
||||
);
|
||||
add_log('admin', 'LOG_PORTAL_EVENT_ADDED', $event_title);
|
||||
}
|
||||
|
||||
|
||||
// we sort the $events array by the start time
|
||||
foreach($events as $key => $cur_event)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ class portal_calendar_module
|
||||
// delete the selected link and reset the array numbering afterwards
|
||||
array_splice($events, $link_id, 1);
|
||||
$events = array_merge($events);
|
||||
|
||||
|
||||
$board3_events_array = serialize($events);
|
||||
set_portal_config('board3_calendar_events_' . $module_id, $board3_events_array);
|
||||
|
||||
@@ -496,7 +496,7 @@ class portal_calendar_module
|
||||
case 'edit':
|
||||
case 'add':
|
||||
$event_all_day = (isset($events[$link_id]['all_day']) && $events[$link_id]['all_day'] == true) ? true : false;
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'EVENT_TITLE' => (isset($events[$link_id]['title']) && $action != 'add') ? $events[$link_id]['title'] : '',
|
||||
'EVENT_DESC' => (isset($events[$link_id]['desc']) && $action != 'add') ? $events[$link_id]['desc'] : '',
|
||||
@@ -512,9 +512,9 @@ class portal_calendar_module
|
||||
|
||||
'S_EDIT' => true,
|
||||
));
|
||||
|
||||
|
||||
$groups_ary = (isset($events[$link_id]['permission'])) ? explode(',', $events[$link_id]['permission']) : array();
|
||||
|
||||
|
||||
// get group info from database and assign the block vars
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -534,13 +534,13 @@ class portal_calendar_module
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
for ($i = 0; $i < sizeof($events); $i++)
|
||||
{
|
||||
$event_all_day = ($events[$i]['all_day'] == true) ? true : false;
|
||||
$start_time_format = (!intval($user->format_date($events[$i]['start_time'], 'H')) && !intval($user->format_date($events[$i]['start_time'], 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
$end_time_format = (!intval($user->format_date($events[$i]['end_time'], 'H')) && !intval($user->format_date($events[$i]['end_time'], 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
|
||||
|
||||
$template->assign_block_vars('events', array(
|
||||
'EVENT_TITLE' => ($action != 'add') ? ((isset($user->lang[$events[$i]['title']])) ? $user->lang[$events[$i]['title']] : $events[$i]['title']) : '',
|
||||
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
|
||||
@@ -553,14 +553,14 @@ class portal_calendar_module
|
||||
'EVENT_ALL_DAY' => $event_all_day,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function update_events($key, $module_id)
|
||||
{
|
||||
$this->manage_events('', $key, $module_id);
|
||||
}
|
||||
|
||||
|
||||
private $dateYYY; // year in numeric format (YYYY)
|
||||
private $dateMM; // month in numeric format (MM)
|
||||
private $dateDD; // day in numeric format (DD)
|
||||
@@ -594,7 +594,7 @@ class portal_calendar_module
|
||||
$today_timestamp = time() + $user->timezone + $user->dst;
|
||||
$cur_month = date("n", $today_timestamp);
|
||||
$correct_month = $cur_month + $this->mini_cal_month;
|
||||
|
||||
|
||||
// move back or forth the correct number of years
|
||||
while ($correct_month < 1 || $correct_month > self::MONTHS_PER_YEAR)
|
||||
{
|
||||
@@ -607,7 +607,7 @@ class portal_calendar_module
|
||||
$correct_month = $correct_month - self::MONTHS_PER_YEAR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// fix incorrect months
|
||||
while (date("n", $this->stamp) != $correct_month)
|
||||
{
|
||||
@@ -626,7 +626,7 @@ class portal_calendar_module
|
||||
$this->ext_dateMM = date("F", $this->stamp);
|
||||
$this->dateDD = date("d", $this->stamp);
|
||||
$this->daysMonth = date("t", $this->stamp);
|
||||
|
||||
|
||||
for ($i=1; $i < $this->daysMonth + 1; $i++)
|
||||
{
|
||||
$this->makeTimestamp("$i $this->ext_dateMM $this->dateYYYY");
|
||||
@@ -638,14 +638,14 @@ class portal_calendar_module
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Unserialize links array
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* validate URLs and execute apppend_sid if necessary
|
||||
*/
|
||||
@@ -656,19 +656,19 @@ class portal_calendar_module
|
||||
$url = str_replace("\r\n", "\n", str_replace('\"', '"', trim($url)));
|
||||
$url = str_replace(' ', '%20', $url);
|
||||
$url = str_replace('&', '&', $url);
|
||||
|
||||
|
||||
// if there is no scheme, then add http schema
|
||||
if (!preg_match('#^[a-z][a-z\d+\-.]*:/{2}#i', $url))
|
||||
{
|
||||
$url = 'http://' . $url;
|
||||
}
|
||||
|
||||
|
||||
// Is this a link to somewhere inside this board? If so then run reapply_sid()
|
||||
if (strpos($url, generate_board_url()) !== false)
|
||||
{
|
||||
$url = reapply_sid($url);
|
||||
}
|
||||
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_custom_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_custom_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -74,7 +74,7 @@ class portal_custom_module
|
||||
{
|
||||
$assign_code = htmlspecialchars_decode($portal_config['board3_custom_' . $module_id . '_code'], ENT_QUOTES);
|
||||
}
|
||||
|
||||
|
||||
$title = (!empty($config['board3_custom_' . $module_id . '_title'])) ? ((isset($user->lang[$config['board3_custom_' . $module_id . '_title']])) ? $user->lang[$config['board3_custom_' . $module_id . '_title']] : $config['board3_custom_' . $module_id . '_title']) : $user->lang[$this->name];
|
||||
|
||||
if(!empty($assign_code))
|
||||
@@ -109,7 +109,7 @@ class portal_custom_module
|
||||
{
|
||||
$assign_code = htmlspecialchars_decode($portal_config['board3_custom_' . $module_id . '_code'], ENT_QUOTES);
|
||||
}
|
||||
|
||||
|
||||
$title = (!empty($config['board3_custom_' . $module_id . '_title'])) ? ((isset($user->lang[$config['board3_custom_' . $module_id . '_title']])) ? $user->lang[$config['board3_custom_' . $module_id . '_title']] : $config['board3_custom_' . $module_id . '_title']) : $user->lang[$this->name];
|
||||
|
||||
if(!empty($assign_code))
|
||||
@@ -159,7 +159,7 @@ class portal_custom_module
|
||||
);
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
|
||||
|
||||
$check = $db->sql_query($sql);
|
||||
|
||||
$del_config = array(
|
||||
@@ -174,19 +174,19 @@ class portal_custom_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return ((!$check) ? $check : $db->sql_query($sql)); // if something went wrong, make sure we are aware of the first query
|
||||
}
|
||||
|
||||
|
||||
public function manage_custom($value, $key, $module_id)
|
||||
{
|
||||
global $db, $portal_config, $config, $template, $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
||||
|
||||
|
||||
$action = (isset($_POST['reset'])) ? 'reset' : '';
|
||||
$action = (isset($_POST['submit'])) ? 'save' : $action;
|
||||
$action = (isset($_POST['preview'])) ? 'preview' : $action;
|
||||
|
||||
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
$u_action = append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=portal&mode=config&module_id=' . $module_id);
|
||||
|
||||
|
||||
switch($action)
|
||||
{
|
||||
// Save changes
|
||||
@@ -208,14 +208,13 @@ class portal_custom_module
|
||||
{
|
||||
generate_text_for_storage($custom_code, $uid, $bitfield, $flags, true, true, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first check for obvious errors, we don't want to waste server resources
|
||||
if(empty($custom_code))
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CUSTOM_CODE_SHORT']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -226,12 +225,12 @@ class portal_custom_module
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$custom_permission = array_intersect($custom_permission, $groups_ary);
|
||||
$custom_permission = implode(',', $custom_permission);
|
||||
|
||||
add_log('admin', 'LOG_PORTAL_CONFIG', $user->lang['PORTAL_CUSTOM'] . ' - ' . $config['board3_custom_' . $module_id . '_title']);
|
||||
|
||||
|
||||
// set_portal_config will take care of escaping the welcome message
|
||||
set_portal_config('board3_custom_' . $module_id . '_code', $custom_code);
|
||||
set_config('board3_custom_' . $module_id . '_bbcode', $custom_bbcode);
|
||||
@@ -244,7 +243,7 @@ class portal_custom_module
|
||||
//trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link(($module_id) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules') : $u_action));
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'preview':
|
||||
$custom_code = $text = utf8_normalize_nfc(request_var('custom_code', '', true));
|
||||
$custom_bbcode = request_var('custom_use_bbcode', 1); // default to BBCode
|
||||
@@ -252,13 +251,13 @@ class portal_custom_module
|
||||
$custom_title = utf8_normalize_nfc(request_var('module_name', ''));
|
||||
$custom_image_src = utf8_normalize_nfc(request_var('module_image', ''));
|
||||
$groups_ary = array();
|
||||
|
||||
|
||||
// first check for obvious errors, we don't want to waste server resources
|
||||
if(empty($custom_code))
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CUSTOM_CODE_SHORT']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
if (!class_exists('parse_message'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
@@ -270,19 +269,19 @@ class portal_custom_module
|
||||
$bitfield = (isset($config['board3_custom_' . $module_id . '_bitfield'])) ? $config['board3_custom_' . $module_id . '_bitfield'] : '';
|
||||
$options = OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS;
|
||||
generate_text_for_storage($text, $uid, $bitfield, $options, true, true, true);
|
||||
|
||||
|
||||
$text = generate_text_for_display($text, $uid, $bitfield, $options);
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = htmlspecialchars_decode($text, ENT_QUOTES);
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PREVIEW_TEXT' => $text,
|
||||
'S_PREVIEW' => true,
|
||||
));
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -293,7 +292,7 @@ class portal_custom_module
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$temp_permissions = array_intersect($custom_permission, $groups_ary);
|
||||
|
||||
// Edit or add menu item
|
||||
@@ -317,9 +316,9 @@ class portal_custom_module
|
||||
'S_BBCODE_ALLOWED' => true,
|
||||
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
||||
));
|
||||
|
||||
|
||||
$groups_ary = (isset($temp_permissions)) ? $temp_permissions : ((isset($config['board3_custom_' . $module_id . '_permission'])) ? explode(',', $config['board3_custom_' . $module_id . '_permission']) : array());
|
||||
|
||||
|
||||
// get group info from database and assign the block vars
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -334,12 +333,12 @@ class portal_custom_module
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
if(!function_exists('display_forums'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
|
||||
// Build custom bbcodes array
|
||||
display_custom_bbcodes();
|
||||
$user->add_lang('posting');
|
||||
@@ -347,7 +346,7 @@ class portal_custom_module
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function update_custom($key, $module_id)
|
||||
{
|
||||
$this->manage_custom('', $key, $module_id);
|
||||
|
||||
@@ -46,13 +46,13 @@ class portal_modulename_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = '';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
public $custom_acp_tpl = '';
|
||||
|
||||
|
||||
/**
|
||||
* hide module name in ACP configuration page
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ class portal_donation_module
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
|
||||
$template->assign_var('PAY_ACC_CENTER', $config['board3_pay_acc_' . $module_id]);
|
||||
|
||||
return 'donation_center.html';
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_forumlist_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_forumlist_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_latest_bots_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_latest_bots_module';
|
||||
|
||||
|
||||
/**
|
||||
* hide module name in ACP configuration page
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ class portal_latest_bots_module
|
||||
AND user_lastvisit > 0
|
||||
ORDER BY user_lastvisit DESC';
|
||||
$result = $db->sql_query_limit($sql, $config['board3_last_visited_bots_number_' . $module_id]);
|
||||
|
||||
|
||||
$show_module = false;
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
||||
@@ -50,7 +50,7 @@ class portal_leaders_module
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $auth, $db, $phpEx, $phpbb_root_path;
|
||||
|
||||
|
||||
// Display a listing of board admins, moderators
|
||||
$user->add_lang('groups');
|
||||
|
||||
@@ -164,7 +164,7 @@ class portal_leaders_module
|
||||
));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['group_name'] == 'ADMINISTRATORS')
|
||||
|
||||
@@ -46,13 +46,13 @@ class portal_links_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_links_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
public $custom_acp_tpl = 'acp_portal_links';
|
||||
|
||||
|
||||
/**
|
||||
* constants
|
||||
*/
|
||||
@@ -65,9 +65,9 @@ class portal_links_module
|
||||
|
||||
$links = array();
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
|
||||
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
||||
|
||||
|
||||
// get user's groups
|
||||
$groups_ary = get_user_groups();
|
||||
|
||||
@@ -82,10 +82,10 @@ class portal_links_module
|
||||
{
|
||||
$cur_url = $links[$i]['url'];
|
||||
}
|
||||
|
||||
|
||||
$cur_permissions = explode(',', $links[$i]['permission']);
|
||||
$permission_check = array_intersect($groups_ary, $cur_permissions);
|
||||
|
||||
|
||||
if(!empty($permission_check) || $links[$i]['permission'] == '')
|
||||
{
|
||||
$template->assign_block_vars('portallinks', array(
|
||||
@@ -119,29 +119,29 @@ class portal_links_module
|
||||
public function install($module_id)
|
||||
{
|
||||
global $phpbb_root_path, $db;
|
||||
|
||||
|
||||
$links = array();
|
||||
|
||||
|
||||
$links_titles = array(
|
||||
'Board3.de',
|
||||
'phpBB.com',
|
||||
);
|
||||
|
||||
|
||||
$links_types = array(
|
||||
self::LINK_EXT,
|
||||
self::LINK_EXT,
|
||||
);
|
||||
|
||||
|
||||
$links_urls = array(
|
||||
'http://www.board3.de/',
|
||||
'http://www.phpbb.com/',
|
||||
);
|
||||
|
||||
|
||||
$links_permissions = array(
|
||||
'',
|
||||
'',
|
||||
);
|
||||
|
||||
|
||||
foreach($links_urls as $i => $url)
|
||||
{
|
||||
$links[] = array(
|
||||
@@ -151,12 +151,12 @@ class portal_links_module
|
||||
'permission' => $links_permissions[$i],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_links_array_' . $module_id, $board3_menu_array);
|
||||
set_config('board3_links_' . $module_id, '');
|
||||
set_config('board3_links_url_new_window_' . $module_id, 0);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -169,9 +169,9 @@ class portal_links_module
|
||||
);
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
|
||||
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$del_config = array(
|
||||
'board3_links_' . $module_id,
|
||||
'board3_links_url_new_window_' . $module_id
|
||||
@@ -180,18 +180,18 @@ class portal_links_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Manage the menu links
|
||||
public function manage_links($value, $key, $module_id)
|
||||
{
|
||||
global $config, $phpbb_admin_path, $user, $phpEx, $db, $template;
|
||||
|
||||
|
||||
$action = request_var('action', '');
|
||||
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||
$action = (isset($_POST['save'])) ? 'save' : $action;
|
||||
$link_id = request_var('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
|
||||
$links = array();
|
||||
|
||||
$links = $this->utf_unserialize($portal_config['board3_links_array_' . $module_id]);
|
||||
@@ -213,7 +213,7 @@ class portal_links_module
|
||||
$link_url = str_replace('&', '&', $link_url);
|
||||
$link_permission = request_var('permission-setting-link', array(0 => ''));
|
||||
$groups_ary = array();
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -224,7 +224,7 @@ class portal_links_module
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$link_permissions = array_intersect($link_permission, $groups_ary);
|
||||
$link_permissions = implode(',', $link_permissions);
|
||||
|
||||
@@ -243,7 +243,7 @@ class portal_links_module
|
||||
if (isset($link_id) && $link_id < sizeof($links))
|
||||
{
|
||||
$message = $user->lang['LINK_UPDATED'];
|
||||
|
||||
|
||||
$links[$link_id] = array(
|
||||
'title' => $link_title,
|
||||
'url' => htmlspecialchars_decode($link_url),
|
||||
@@ -265,7 +265,7 @@ class portal_links_module
|
||||
);
|
||||
add_log('admin', 'LOG_PORTAL_LINK_ADDED', $link_title);
|
||||
}
|
||||
|
||||
|
||||
$board3_links_array = serialize($links);
|
||||
set_portal_config('board3_links_array_' . $module_id, $board3_links_array);
|
||||
|
||||
@@ -287,7 +287,7 @@ class portal_links_module
|
||||
// delete the selected link and reset the array numbering afterwards
|
||||
array_splice($links, $link_id, 1);
|
||||
$links = array_merge($links);
|
||||
|
||||
|
||||
$board3_links_array = serialize($links);
|
||||
set_portal_config('board3_links_array_' . $module_id, $board3_links_array);
|
||||
|
||||
@@ -332,7 +332,7 @@ class portal_links_module
|
||||
'type' => $links[$link_id]['type'],
|
||||
'permission' => $links[$link_id]['permission'],
|
||||
);
|
||||
|
||||
|
||||
// move the info of the links we replace in the order
|
||||
$links[$link_id] = array(
|
||||
'title' => $links[$switch_order_id]['title'],
|
||||
@@ -340,7 +340,7 @@ class portal_links_module
|
||||
'type' => $links[$switch_order_id]['type'],
|
||||
'permission' => $links[$switch_order_id]['permission'],
|
||||
);
|
||||
|
||||
|
||||
// insert the info of the moved link
|
||||
$links[$switch_order_id] = $cur_link;
|
||||
|
||||
@@ -362,9 +362,9 @@ class portal_links_module
|
||||
'S_EDIT' => true,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == self::LINK_INT) ? true : false,
|
||||
));
|
||||
|
||||
|
||||
$groups_ary = (isset($links[$link_id]['permission'])) ? explode(',', $links[$link_id]['permission']) : array();
|
||||
|
||||
|
||||
// get group info from database and assign the block vars
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -398,12 +398,12 @@ class portal_links_module
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function update_links($key, $module_id)
|
||||
{
|
||||
$this->manage_links('', $key, $module_id);
|
||||
}
|
||||
|
||||
|
||||
// Unserialize links array
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
|
||||
@@ -46,13 +46,13 @@ class portal_main_menu_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_main_menu_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
public $custom_acp_tpl = 'acp_portal_menu';
|
||||
|
||||
|
||||
/**
|
||||
* constants
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ class portal_main_menu_module
|
||||
|
||||
$links = array();
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
|
||||
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
||||
|
||||
// get user's groups
|
||||
@@ -92,10 +92,10 @@ class portal_main_menu_module
|
||||
{
|
||||
$cur_url = $links[$i]['url'];
|
||||
}
|
||||
|
||||
|
||||
$cur_permissions = explode(',', $links[$i]['permission']);
|
||||
$permission_check = array_intersect($groups_ary, $cur_permissions);
|
||||
|
||||
|
||||
if(!empty($permission_check) || $links[$i]['permission'] == '')
|
||||
{
|
||||
$template->assign_block_vars('portalmenu.links', array(
|
||||
@@ -129,19 +129,19 @@ class portal_main_menu_module
|
||||
public function install($module_id)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $db;
|
||||
|
||||
|
||||
// get the correct group IDs from the database
|
||||
$in_ary = array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA');
|
||||
|
||||
|
||||
$sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . ' WHERE ' . $db->sql_in_set('group_name', $in_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
while($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$groups_ary[$row['group_name']] = $row['group_id'];
|
||||
}
|
||||
|
||||
|
||||
$links = array();
|
||||
|
||||
|
||||
$links_titles = array(
|
||||
'M_CONTENT',
|
||||
'INDEX',
|
||||
@@ -155,7 +155,7 @@ class portal_main_menu_module
|
||||
'M_TERMS',
|
||||
'M_PRV',
|
||||
);
|
||||
|
||||
|
||||
$links_types = array(
|
||||
self::LINK_CAT,
|
||||
self::LINK_INT,
|
||||
@@ -169,7 +169,7 @@ class portal_main_menu_module
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
);
|
||||
|
||||
|
||||
$links_urls = array(
|
||||
'',
|
||||
'index.' . $phpEx,
|
||||
@@ -183,7 +183,7 @@ class portal_main_menu_module
|
||||
'ucp.' . $phpEx . '?mode=terms',
|
||||
'ucp.' . $phpEx . '?mode=privacy',
|
||||
);
|
||||
|
||||
|
||||
$links_permissions = array(
|
||||
'',
|
||||
'',
|
||||
@@ -197,7 +197,7 @@ class portal_main_menu_module
|
||||
'',
|
||||
'',
|
||||
);
|
||||
|
||||
|
||||
foreach($links_urls as $i => $url)
|
||||
{
|
||||
$links[] = array(
|
||||
@@ -207,12 +207,12 @@ class portal_main_menu_module
|
||||
'permission' => $links_permissions[$i],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_menu_array_' . $module_id, $board3_menu_array);
|
||||
set_config('board3_menu_' . $module_id, '');
|
||||
set_config('board3_menu_url_new_window_' . $module_id, 0);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -225,9 +225,9 @@ class portal_main_menu_module
|
||||
);
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
|
||||
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$del_config = array(
|
||||
'board3_menu_' . $module_id,
|
||||
'board3_menu_url_new_window_' . $module_id,
|
||||
@@ -236,18 +236,18 @@ class portal_main_menu_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Manage the menu links
|
||||
public function manage_links($value, $key, $module_id)
|
||||
{
|
||||
global $config, $phpbb_admin_path, $user, $phpEx, $db, $template;
|
||||
|
||||
|
||||
$action = request_var('action', '');
|
||||
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||
$action = (isset($_POST['save'])) ? 'save' : $action;
|
||||
$link_id = request_var('id', 99999999); // 0 will trigger unwanted behavior, therefore we set a number we should never reach
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
|
||||
$links = array();
|
||||
|
||||
$links = $this->utf_unserialize($portal_config['board3_menu_array_' . $module_id]);
|
||||
@@ -270,7 +270,7 @@ class portal_main_menu_module
|
||||
$link_url = str_replace('&', '&', $link_url);
|
||||
$link_permission = request_var('permission-setting-menu', array(0 => ''));
|
||||
$groups_ary = array();
|
||||
|
||||
|
||||
// get groups and check if the selected groups actually exist
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -281,7 +281,7 @@ class portal_main_menu_module
|
||||
$groups_ary[] = $row['group_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$link_permissions = array_intersect($link_permission, $groups_ary);
|
||||
$link_permissions = implode(',', $link_permissions);
|
||||
|
||||
@@ -300,7 +300,7 @@ class portal_main_menu_module
|
||||
if (isset($link_id) && $link_id < sizeof($links))
|
||||
{
|
||||
$message = $user->lang['LINK_UPDATED'];
|
||||
|
||||
|
||||
$links[$link_id] = array(
|
||||
'title' => $link_title,
|
||||
'url' => htmlspecialchars_decode($link_url),
|
||||
@@ -326,7 +326,7 @@ class portal_main_menu_module
|
||||
);
|
||||
add_log('admin', 'LOG_PORTAL_LINK_ADDED', $link_title);
|
||||
}
|
||||
|
||||
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_menu_array_' . $module_id, $board3_menu_array);
|
||||
|
||||
@@ -348,7 +348,7 @@ class portal_main_menu_module
|
||||
// delete the selected link and reset the array numbering afterwards
|
||||
array_splice($links, $link_id, 1);
|
||||
$links = array_merge($links);
|
||||
|
||||
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_menu_array_' . $module_id, $board3_menu_array);
|
||||
|
||||
@@ -393,7 +393,7 @@ class portal_main_menu_module
|
||||
'type' => $links[$link_id]['type'],
|
||||
'permission' => $links[$link_id]['permission'],
|
||||
);
|
||||
|
||||
|
||||
// move the info of the links we replace in the order
|
||||
$links[$link_id] = array(
|
||||
'title' => $links[$switch_order_id]['title'],
|
||||
@@ -401,7 +401,7 @@ class portal_main_menu_module
|
||||
'type' => $links[$switch_order_id]['type'],
|
||||
'permission' => $links[$switch_order_id]['permission'],
|
||||
);
|
||||
|
||||
|
||||
// insert the info of the moved link
|
||||
$links[$switch_order_id] = $cur_link;
|
||||
|
||||
@@ -424,9 +424,9 @@ class portal_main_menu_module
|
||||
'S_LINK_IS_CAT' => (!isset($links[$link_id]['type']) || $links[$link_id]['type'] == self::LINK_CAT) ? true : false,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == self::LINK_INT) ? true : false,
|
||||
));
|
||||
|
||||
|
||||
$groups_ary = (isset($links[$link_id]['permission'])) ? explode(',', $links[$link_id]['permission']) : array();
|
||||
|
||||
|
||||
// get group info from database and assign the block vars
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -462,12 +462,12 @@ class portal_main_menu_module
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function update_links($key, $module_id)
|
||||
{
|
||||
$this->manage_links('', $key, $module_id);
|
||||
}
|
||||
|
||||
|
||||
// Unserialize links array
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ class portal_news_module
|
||||
{
|
||||
$disallow_access = array();
|
||||
}
|
||||
|
||||
|
||||
if($config['board3_news_exclude_' . $module_id] == true)
|
||||
{
|
||||
$disallow_access = array_merge($disallow_access, $forum_from);
|
||||
@@ -134,7 +134,7 @@ class portal_news_module
|
||||
$total_news = (int) $db->sql_fetchfield('num_topics');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
$topic_tracking_info = get_portal_tracking_info($fetch_news);
|
||||
|
||||
if($news < 0)
|
||||
@@ -159,7 +159,7 @@ class portal_news_module
|
||||
$forum_id = $fetch_news[$i]['forum_id'];
|
||||
$topic_id = $fetch_news[$i]['topic_id'];
|
||||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||
|
||||
|
||||
$read_full_url = (isset($_GET['np'])) ? 'np='. $start . '&news=' . $i . '#n' . $i : 'news=' . $i . '#n' . $i;
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($fetch_news[$i]['forum_id']) ? $fetch_news[$i]['forum_id'] : $forum_id) . '&t=' . $topic_id);
|
||||
if ($config['board3_news_archive_' . $module_id])
|
||||
@@ -274,7 +274,7 @@ class portal_news_module
|
||||
$open_bracket = '[ ';
|
||||
$close_bracket = ' ]';
|
||||
$read_full = $user->lang['BACK'];
|
||||
|
||||
|
||||
$read_full_url = (isset($_GET['np'])) ? append_sid("{$phpbb_root_path}portal.$phpEx", "np=$start#n$i") : append_sid("{$phpbb_root_path}portal.$phpEx#n$i");
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($fetch_news[$i]['forum_id']) ? $fetch_news[$i]['forum_id'] : $forum_id) . '&t=' . $topic_id);
|
||||
if ($config['board3_news_archive_' . $module_id])
|
||||
@@ -412,14 +412,14 @@ class portal_news_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Create forum select box
|
||||
public function select_forums($value, $key, $module_id)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config[$key]) && strlen($config[$key]) > 0)
|
||||
{
|
||||
@@ -436,18 +436,18 @@ class portal_news_module
|
||||
return $s_forum_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Store selected forums
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected extensions
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_poll_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_poll_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -58,7 +58,7 @@ class portal_poll_module
|
||||
global $config, $template, $db, $user, $auth, $phpbb_root_path, $phpEx;
|
||||
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
|
||||
// check if we need to include the bbcode class
|
||||
if(!class_exists('bbcode'))
|
||||
{
|
||||
@@ -218,7 +218,7 @@ class portal_poll_module
|
||||
if($config['board3_poll_topic_id_' . $module_id] !== '')
|
||||
{
|
||||
$poll_forums_config = explode(',' ,$config['board3_poll_topic_id_' . $module_id]);
|
||||
|
||||
|
||||
if($config['board3_poll_exclude_id_' . $module_id])
|
||||
{
|
||||
$forum_list = array_unique(array_diff($forum_list, $poll_forums_config));
|
||||
@@ -439,7 +439,7 @@ class portal_poll_module
|
||||
global $config, $template, $db, $user, $auth, $phpbb_root_path, $phpEx;
|
||||
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
|
||||
// check if we need to include the bbcode class
|
||||
if(!class_exists('bbcode'))
|
||||
{
|
||||
@@ -599,7 +599,7 @@ class portal_poll_module
|
||||
if($config['board3_poll_topic_id_' . $module_id] !== '')
|
||||
{
|
||||
$poll_forums_config = explode(',' ,$config['board3_poll_topic_id_' . $module_id]);
|
||||
|
||||
|
||||
if($config['board3_poll_exclude_id_' . $module_id])
|
||||
{
|
||||
$forum_list = array_unique(array_diff($forum_list, $poll_forums_config));
|
||||
@@ -858,14 +858,14 @@ class portal_poll_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Create forum select box
|
||||
public function select_forums($value, $key, $module_id)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config[$key]) && strlen($config[$key]) > 0)
|
||||
{
|
||||
@@ -882,18 +882,18 @@ class portal_poll_module
|
||||
return $s_forum_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Store selected forums
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected forums
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_random_member_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_random_member_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_recent_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_recent_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -64,7 +64,7 @@ class portal_recent_module
|
||||
if ($config['board3_recent_forum_' . $module_id] > 0)
|
||||
{
|
||||
$exclude_forums = explode(',', $config['board3_recent_forum_' . $module_id]);
|
||||
|
||||
|
||||
$sql_where = ' AND ' . $db->sql_in_set('forum_id', array_map('intval', $exclude_forums), ($config['board3_recent_exclude_forums_' . $module_id]) ? true : false);
|
||||
}
|
||||
|
||||
@@ -210,14 +210,14 @@ class portal_recent_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// Create forum select box
|
||||
public function select_forums($value, $key, $module_id)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
|
||||
$selected = array();
|
||||
if(isset($config[$key]) && strlen($config[$key]) > 0)
|
||||
{
|
||||
@@ -234,18 +234,18 @@ class portal_recent_module
|
||||
return $s_forum_options;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Store selected forums
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
|
||||
// Get selected extensions
|
||||
$values = request_var($key, array(0 => ''));
|
||||
|
||||
|
||||
$news = implode(',', $values);
|
||||
|
||||
|
||||
set_config($key, $news);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_search_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_search_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_statistics_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_statistics_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -158,22 +158,22 @@ class portal_statistics_module
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Better function with only one query
|
||||
public function get_topics_count()
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
|
||||
$return_ary = array(
|
||||
POST_ANNOUNCE => 0,
|
||||
POST_STICKY => 0,
|
||||
);
|
||||
|
||||
|
||||
$sql_in = array(
|
||||
POST_ANNOUNCE,
|
||||
POST_STICKY,
|
||||
);
|
||||
|
||||
|
||||
$sql = 'SELECT DISTINCT(topic_id) AS topic_id, topic_type AS type
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_type', $sql_in, false);
|
||||
@@ -185,14 +185,14 @@ class portal_statistics_module
|
||||
case POST_ANNOUNCE:
|
||||
++$return_ary[POST_ANNOUNCE];
|
||||
break;
|
||||
|
||||
|
||||
case POST_STICKY:
|
||||
++$return_ary[POST_STICKY];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
return $return_ary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class portal_user_menu_module
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $auth, $db, $phpEx, $phpbb_root_path;
|
||||
|
||||
|
||||
if (!function_exists('display_forums'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
@@ -62,7 +62,7 @@ class portal_user_menu_module
|
||||
// + new posts since last visit & you post number
|
||||
//
|
||||
$ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true))));
|
||||
|
||||
|
||||
if ($auth->acl_get('m_approve'))
|
||||
{
|
||||
$m_approve_fid_ary = array(-1);
|
||||
@@ -88,7 +88,7 @@ class portal_user_menu_module
|
||||
$result = $db->sql_query($sql);
|
||||
$new_posts_count = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// unread posts
|
||||
$sql_where = 'AND t.topic_moved_id = 0
|
||||
' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_welcome_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_welcome_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -56,7 +56,7 @@ class portal_welcome_module
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template, $portal_config, $phpEx;
|
||||
|
||||
|
||||
// Generate text for display and assign template vars
|
||||
$uid = $config['board3_welcome_message_uid_' . $module_id];
|
||||
$bitfield = $config['board3_welcome_message_bitfield_' . $module_id];
|
||||
@@ -102,7 +102,7 @@ class portal_welcome_module
|
||||
);
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
|
||||
|
||||
$check = $db->sql_query($sql);
|
||||
|
||||
$del_config = array(
|
||||
@@ -114,19 +114,19 @@ class portal_welcome_module
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return ((!$check) ? $check : $db->sql_query($sql)); // if something went wrong, make sure we are aware of the first query
|
||||
}
|
||||
|
||||
|
||||
public function manage_welcome($value, $key, $module_id)
|
||||
{
|
||||
global $db, $portal_config, $config, $template, $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
||||
|
||||
|
||||
$action = (isset($_POST['reset'])) ? 'reset' : '';
|
||||
$action = (isset($_POST['submit'])) ? 'save' : $action;
|
||||
$action = (isset($_POST['preview'])) ? 'preview' : $action;
|
||||
|
||||
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
$u_action = append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=portal&mode=config&module_id=' . $module_id);
|
||||
|
||||
|
||||
switch($action)
|
||||
{
|
||||
// Save changes
|
||||
@@ -140,22 +140,21 @@ class portal_welcome_module
|
||||
$uid = $bitfield = $flags = '';
|
||||
$options = 7;
|
||||
generate_text_for_storage($welcome_message, $uid, $bitfield, $flags, true, true, true);
|
||||
|
||||
|
||||
|
||||
// first check for obvious errors, we don't want to waste server resources
|
||||
if(empty($welcome_message))
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_WELCOME_MESSAGE_SHORT']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
add_log('admin', 'LOG_PORTAL_CONFIG', $user->lang['PORTAL_WELCOME']);
|
||||
|
||||
|
||||
// set_portal_config will take care of escaping the welcome message
|
||||
set_portal_config('board3_welcome_message_' . $module_id, $welcome_message);
|
||||
set_config('board3_welcome_message_uid_' . $module_id, $uid);
|
||||
set_config('board3_welcome_message_bitfield_' . $module_id, $bitfield);
|
||||
break;
|
||||
|
||||
|
||||
case 'preview':
|
||||
$welcome_message = $text = utf8_normalize_nfc(request_var('welcome_message', '', true));
|
||||
|
||||
@@ -169,9 +168,9 @@ class portal_welcome_module
|
||||
$bitfield = (isset($config['board3_welcome_message_bitfield_' . $module_id])) ? $config['board3_welcome_message_bitfield_' . $module_id] : '';
|
||||
$options = OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS;
|
||||
generate_text_for_storage($text, $uid, $bitfield, $options, true, true, true);
|
||||
|
||||
|
||||
$text = generate_text_for_display($text, $uid, $bitfield, $options);
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PREVIEW_TEXT' => $text,
|
||||
'S_PREVIEW' => true,
|
||||
@@ -184,7 +183,7 @@ class portal_welcome_module
|
||||
{
|
||||
$welcome_message = generate_text_for_edit($portal_config['board3_welcome_message_' . $module_id], $config['board3_welcome_message_uid_' . $module_id], '');
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'WELCOME_MESSAGE' => (is_array($welcome_message)) ? $welcome_message['text'] : $welcome_message,
|
||||
//'U_BACK' => $u_action,
|
||||
@@ -197,12 +196,12 @@ class portal_welcome_module
|
||||
'S_BBCODE_ALLOWED' => true,
|
||||
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
||||
));
|
||||
|
||||
|
||||
if(!function_exists('display_forums'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
|
||||
// Build custom bbcodes array
|
||||
display_custom_bbcodes();
|
||||
$user->add_lang('posting');
|
||||
@@ -210,7 +209,7 @@ class portal_welcome_module
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function update_welcome($key, $module_id)
|
||||
{
|
||||
$this->manage_welcome('', $key, $module_id);
|
||||
|
||||
@@ -46,7 +46,7 @@ class portal_whois_online_module
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = 'portal_whois_online_module';
|
||||
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
@@ -99,12 +99,12 @@ class portal_whois_online_module
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$legend = implode(', ', $legend);
|
||||
|
||||
|
||||
$template->assign_var('PORTAL_LEGEND', $legend);
|
||||
|
||||
return 'whois_online_center.html';
|
||||
}
|
||||
|
||||
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $auth, $db, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="menutitle" style="font: bold 12px 'Trebuchet MS','Lucida Grande',Arial,sans-serif; text-decoration: underline;">{L_UPCOMING_EVENTS}:</div>
|
||||
<ul class="portal-events">
|
||||
<!-- BEGIN upcoming_events -->
|
||||
|
||||
|
||||
<li class="row">
|
||||
<dl class="icon">
|
||||
<dt style="width: 100%; padding-left: 0px; padding-bottom: 5px;">
|
||||
@@ -76,7 +76,7 @@
|
||||
</dt>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- BEGINELSE -->
|
||||
<li class="calendar-info"><span style="float:left;" class="gensmall"><strong>{L_NO_UPCOMING_EVENTS}</strong></span><br /></li>
|
||||
<!-- END upcoming_events -->
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="content">
|
||||
<h2>{poll.POLL_QUESTION}</h2>
|
||||
<p class="author">{poll.L_POLL_LENGTH}<!-- IF poll.S_CAN_VOTE and poll.L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF poll.S_CAN_VOTE -->{poll.L_MAX_VOTES}<!-- ENDIF --></p>
|
||||
|
||||
|
||||
<fieldset class="polls">
|
||||
<!-- IF poll.S_POLL_HAS_OPTIONS -->
|
||||
<!-- BEGIN poll_option -->
|
||||
@@ -21,28 +21,28 @@
|
||||
<!-- ELSE -->
|
||||
{L_NO_OPTIONS}
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF poll.S_DISPLAY_RESULTS -->
|
||||
<dl>
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><p style="font-size:1.0em;">{L_TOTAL_VOTES} : {poll.TOTAL_VOTES}</p></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF poll.S_CAN_VOTE -->
|
||||
<dl style="border-top: none;">
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF not poll.S_DISPLAY_RESULTS -->
|
||||
<dl style="border-top: none;">
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><p style="font-size:1.0em;"><a href="{poll.U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></p></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<dl style="border-top: none;">
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><p style="font-size:1.0em;"><a href="{poll.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a></p></dd>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="content">
|
||||
<h2>{poll_side.POLL_QUESTION}</h2>
|
||||
<p class="author" style="width: 100%">{poll_side.L_POLL_LENGTH}<!-- IF poll_side.S_CAN_VOTE and poll_side.L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF poll_side.S_CAN_VOTE -->{poll_side.L_MAX_VOTES}<!-- ENDIF --></p>
|
||||
|
||||
|
||||
<fieldset class="polls">
|
||||
<!-- IF poll_side.S_POLL_HAS_OPTIONS -->
|
||||
<!-- BEGIN poll_option -->
|
||||
@@ -20,25 +20,25 @@
|
||||
<!-- ELSE -->
|
||||
{L_NO_OPTIONS}
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF poll_side.S_DISPLAY_RESULTS -->
|
||||
<dl>
|
||||
<dd class="resultbar"><p style="font-size:1.0em;">{L_TOTAL_VOTES} : {poll_side.TOTAL_VOTES}</p></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF poll_side.S_CAN_VOTE -->
|
||||
<dl style="border-top: none;">
|
||||
<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF not poll_side.S_DISPLAY_RESULTS -->
|
||||
<dl style="border-top: none;">
|
||||
<dd class="resultbar"><p style="font-size:1.0em;"><a href="{poll_side.U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></p></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<dl style="border-top: none;">
|
||||
<dd class="resultbar"><p style="font-size:1.0em;"><a href="{poll_side.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a></p></dd>
|
||||
</dl>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{L_ST_TOP_ANNS} <strong>{B3_ANNOUNCE_COUNT}</strong><br />
|
||||
{L_ST_TOP_STICKYS} <strong>{B3_STICKY_COUNT}</strong><br />
|
||||
{L_ST_TOT_ATTACH} <strong>{B3_TOTAL_ATTACH}</strong><br />
|
||||
|
||||
|
||||
<hr class="dashed" />
|
||||
{B3_TOPICS_PER_DAY}<br />
|
||||
{B3_POSTS_PER_DAY}<br />
|
||||
@@ -14,7 +14,7 @@
|
||||
{B3_POSTS_PER_USER}<br />
|
||||
{B3_POSTS_PER_TOPIC}<br />
|
||||
<hr class="dashed" />
|
||||
|
||||
|
||||
{B3_TOTAL_USERS}<br />
|
||||
{B3_NEWEST_USER}
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
@@ -17,7 +17,7 @@
|
||||
</tr>
|
||||
<tr class="row<!-- IF announcements_center_row.S_ROW_COUNT is odd -->1<!-- ELSE -->2<!-- ENDIF -->">
|
||||
<td style="padding:5px 5px 5px 5px;">
|
||||
|
||||
|
||||
<span class="gensmall" style="float: left;">{L_POSTED} {L_POST_BY_AUTHOR}: {announcements_center_row.POSTER_FULL} » {announcements_center_row.TIME}</span>
|
||||
<span class="gensmall" style="float: right;">
|
||||
<!-- IF announcements_center_row.FORUM_NAME -->
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
<!-- IF poll.S_CAN_VOTE -->{S_HIDDEN_FIELDS}
|
||||
|
||||
|
||||
</form><!-- ENDIF -->
|
||||
<!-- END poll -->
|
||||
<!-- ELSE -->
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
<!-- IF poll_side.S_CAN_VOTE -->{S_HIDDEN_FIELDS}
|
||||
|
||||
|
||||
</form><!-- ENDIF -->
|
||||
<!-- END poll -->
|
||||
<!-- ELSE -->
|
||||
|
||||
Reference in New Issue
Block a user