diff --git a/root/adm/style/portal/acp_portal.js b/root/adm/style/portal/acp_portal.js
index 98949092..60cf5b5d 100644
--- a/root/adm/style/portal/acp_portal.js
+++ b/root/adm/style/portal/acp_portal.js
@@ -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;
@@ -107,8 +107,8 @@ function bbfontstyle(bbopen, bbclose)
// IE
else if (document.selection)
{
- var range = textarea.createTextRange();
- range.move("character", new_pos);
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
range.select();
storeCaret(textarea);
}
@@ -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('
');
}
-
+
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;
diff --git a/root/adm/style/portal/acp_portal_custom.html b/root/adm/style/portal/acp_portal_custom.html
index 3eba41e2..1fd3191e 100644
--- a/root/adm/style/portal/acp_portal_custom.html
+++ b/root/adm/style/portal/acp_portal_custom.html
@@ -151,7 +151,7 @@ var help_line = {
{
dE('colour_palette', 1);
}
-
+
if (e.style.display == 'block')
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
diff --git a/root/adm/style/portal/acp_portal_welcome.html b/root/adm/style/portal/acp_portal_welcome.html
index fe07db6d..4ceaf518 100644
--- a/root/adm/style/portal/acp_portal_welcome.html
+++ b/root/adm/style/portal/acp_portal_welcome.html
@@ -151,7 +151,7 @@ var help_line = {
{
dE('colour_palette', 1);
}
-
+
if (e.style.display == 'block')
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php
index 5c953b26..0bce16fd 100644
--- a/root/includes/acp/acp_portal.php
+++ b/root/includes/acp/acp_portal.php
@@ -128,11 +128,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 . '
@@ -148,7 +148,7 @@ class acp_portal
}
$this->db->sql_freeresult($result);
}
-
+
$this->template->assign_var('SHOW_MODULE_OPTIONS', true);
}
}
@@ -174,7 +174,7 @@ class acp_portal
{
$submit = false;
}
-
+
// Reset module
$reset_module = request_var('module_reset', 0);
@@ -188,8 +188,8 @@ class acp_portal
{
if ($submit && ((isset($null['type']) && $null['type'] == 'custom') || (isset($null['submit_type']) && $null['submit_type'] == 'custom')))
{
- $func = array($this->c_class, $null['submit']);
-
+ $func = array($c_class, $null['submit']);
+
if(method_exists($this->c_class, $null['submit']))
{
$args = ($module_id != 0) ? array($config_name, $module_id) : $config_name;
@@ -201,13 +201,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;
@@ -226,7 +225,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 . '
@@ -237,11 +236,10 @@ class acp_portal
$groups_ary[] = $row['group_id'];
}
$this->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),
@@ -249,12 +247,12 @@ class acp_portal
'module_group_ids' => $module_permission,
'module_status' => request_var('module_status', B3_MODULE_ENABLED),
);
-
+
if(!(isset($this->c_class->hide_name) && $this->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);
@@ -296,7 +294,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)
@@ -361,10 +358,10 @@ 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();
+ $portal_modules = obtain_portal_modules();
+ $installed_modules = $module_column = array();
foreach($portal_modules as $cur_module)
{
@@ -405,9 +402,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')))
{
@@ -429,13 +426,13 @@ class acp_portal
$submit = false;
}
}
-
+
// do not install if module already exists in that column
if (!$submit && $module_classname != 'custom')
{
trigger_error($this->user->lang['MODULE_ADD_ONCE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
-
+
if (!class_exists($class))
{
include($directory . 'portal_' . $module_classname . '.' . $this->php_ex);
@@ -472,7 +469,7 @@ class acp_portal
$module_id = $this->db->sql_nextid();
$error = $this->c_class->install($module_id);
-
+
$this->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
@@ -489,7 +486,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));
@@ -517,7 +514,7 @@ class acp_portal
$class = str_replace(".{$this->php_ex}", '', $file) . '_module';
$module_class = str_replace(array('portal_', ".{$this->php_ex}"), '', $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')
{
@@ -542,7 +539,7 @@ class acp_portal
}
}
}
-
+
if (!class_exists($class))
{
include($directory . $file);
@@ -594,7 +591,7 @@ class acp_portal
$directory = $this->phpbb_root_path . 'portal/modules/';
$portal_modules = obtain_portal_modules();
-
+
foreach($portal_modules as $row)
{
$class = 'portal_' . $row['module_classname'] . '_module';
@@ -613,7 +610,7 @@ class acp_portal
$this->user->add_lang('mods/portal/' . $this->c_class->language);
}
$template_column = column_num_string($row['module_column']);
-
+
// find out of we can move modules to the left or right
if(($this->c_class->columns & column_string_const(column_num_string($row['module_column'] + 1))) || ($this->c_class->columns & column_string_const(column_num_string($row['module_column'] + 2)) && $row['module_column'] != 2))
{
@@ -647,7 +644,7 @@ class acp_portal
{
$move_right = false;
}
-
+
if(($this->c_class->columns & column_string_const(column_num_string($row['module_column'] - 1))) || ($this->c_class->columns & column_string_const(column_num_string($row['module_column'] - 2)) && $row['module_column'] != 2))
{
/**
@@ -694,7 +691,7 @@ class acp_portal
'U_MOVE_LEFT' => ($move_left) ? $this->u_action . '&module_id=' . $row['module_id'] . '&action=move_left' : '',
));
}
-
+
$this->template->assign_vars(array(
'ICON_MOVE_LEFT' => '
',
'ICON_MOVE_LEFT_DISABLED' => '
',
@@ -717,9 +714,9 @@ class acp_portal
include($this->phpbb_root_path . 'portal/includes/functions_upload.' . $this->php_ex);
// Default upload path is portal/upload/
$upload_path = $this->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 = $this->user->lang['ACP_PORTAL_UPLOAD'];
}
@@ -730,7 +727,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';
diff --git a/root/install/index.php b/root/install/index.php
index 32162355..21be9fc4 100644
--- a/root/install/index.php
+++ b/root/install/index.php
@@ -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(
diff --git a/root/language/de/mods/info_acp_portal.php b/root/language/de/mods/info_acp_portal.php
index 864fb4e4..54eced0b 100644
--- a/root/language/de/mods/info_acp_portal.php
+++ b/root/language/de/mods/info_acp_portal.php
@@ -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',
@@ -58,7 +58,7 @@ $lang = array_merge($lang, array(
'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_NOT_EXISTS' => 'Das gewählte Modul existiert nicht.',
-
+
'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.',
@@ -75,7 +75,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',
@@ -98,7 +98,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' => 'Portal-Einstellungen geändert
» Link hinzu gefügt: %s ',
@@ -107,7 +107,7 @@ $lang = array_merge($lang, array(
'LOG_PORTAL_EVENT_ADDED' => 'Portal-Einstellungen geändert
» Termin eingetragen: %s ',
'LOG_PORTAL_EVENT_UPDATED' => 'Portal-Einstellungen geändert
» Termin geändert: %s ',
'LOG_PORTAL_EVENT_REMOVED' => 'Portal-Einstellungen geändert
» Termin gelöscht: %s ',
-
+
// Upload Module
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
@@ -125,14 +125,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' => 'Portal-Einstellungen geändert
» %s',
-
+
/**
* A copy of Handyman` s MOD version check, to view it on the gallery overview
*/
@@ -145,9 +145,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'),
-
+
));
diff --git a/root/language/de/mods/portal/portal_announcements_module.php b/root/language/de/mods/portal/portal_announcements_module.php
index 4506376a..ef6795ed 100644
--- a/root/language/de/mods/portal/portal_announcements_module.php
+++ b/root/language/de/mods/portal/portal_announcements_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_attachments_module.php b/root/language/de/mods/portal/portal_attachments_module.php
index a0e74ee0..92c4c129 100644
--- a/root/language/de/mods/portal/portal_attachments_module.php
+++ b/root/language/de/mods/portal/portal_attachments_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_birthday_list_module.php b/root/language/de/mods/portal/portal_birthday_list_module.php
index c0da3c63..d8ba5881 100644
--- a/root/language/de/mods/portal/portal_birthday_list_module.php
+++ b/root/language/de/mods/portal/portal_birthday_list_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_calendar_module.php b/root/language/de/mods/portal/portal_calendar_module.php
index 59bd79c4..61cd0fd6 100644
--- a/root/language/de/mods/portal/portal_calendar_module.php
+++ b/root/language/de/mods/portal/portal_calendar_module.php
@@ -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.
Wähle mehrere Gruppen aus/ab, indem du beim Klicken die Strg-Taste drückst.',
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Öffne externe Veranstaltungsverknüpfungen in einem neuen Fenster',
-
+
// Logs
'LOG_PORTAL_EVENT_UPDATED' => 'Veranstaltung aktualisiert
» %s',
'LOG_PORTAL_EVENT_ADDED' => 'Veranstaltung hinzugefügt
» %s',
diff --git a/root/language/de/mods/portal/portal_clock_module.php b/root/language/de/mods/portal/portal_clock_module.php
index 7e03cc0a..6af2e998 100644
--- a/root/language/de/mods/portal/portal_clock_module.php
+++ b/root/language/de/mods/portal/portal_clock_module.php
@@ -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',
diff --git a/root/language/de/mods/portal/portal_custom_module.php b/root/language/de/mods/portal/portal_custom_module.php
index e7027f3c..c250e26e 100644
--- a/root/language/de/mods/portal/portal_custom_module.php
+++ b/root/language/de/mods/portal/portal_custom_module.php
@@ -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',
diff --git a/root/language/de/mods/portal/portal_donation_module.php b/root/language/de/mods/portal/portal_donation_module.php
index a27ed888..6bd0f8ae 100644
--- a/root/language/de/mods/portal/portal_donation_module.php
+++ b/root/language/de/mods/portal/portal_donation_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_friends_module.php b/root/language/de/mods/portal/portal_friends_module.php
index ce41a251..1497d2c9 100644
--- a/root/language/de/mods/portal/portal_friends_module.php
+++ b/root/language/de/mods/portal/portal_friends_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_latest_bots_module.php b/root/language/de/mods/portal/portal_latest_bots_module.php
index 18f30a52..608be48a 100644
--- a/root/language/de/mods/portal/portal_latest_bots_module.php
+++ b/root/language/de/mods/portal/portal_latest_bots_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_latest_members_module.php b/root/language/de/mods/portal/portal_latest_members_module.php
index 36582895..78e4541f 100644
--- a/root/language/de/mods/portal/portal_latest_members_module.php
+++ b/root/language/de/mods/portal/portal_latest_members_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_leaders_module.php b/root/language/de/mods/portal/portal_leaders_module.php
index d643d214..6931831a 100644
--- a/root/language/de/mods/portal/portal_leaders_module.php
+++ b/root/language/de/mods/portal/portal_leaders_module.php
@@ -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',
diff --git a/root/language/de/mods/portal/portal_links_module.php b/root/language/de/mods/portal/portal_links_module.php
index 85ea13f1..36bb9576 100644
--- a/root/language/de/mods/portal/portal_links_module.php
+++ b/root/language/de/mods/portal/portal_links_module.php
@@ -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.
Wähle mehrere Gruppen aus/ab indem du STRG 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.',
diff --git a/root/language/de/mods/portal/portal_main_menu_module.php b/root/language/de/mods/portal/portal_main_menu_module.php
index 86ea4013..c6435b5c 100644
--- a/root/language/de/mods/portal/portal_main_menu_module.php
+++ b/root/language/de/mods/portal/portal_main_menu_module.php
@@ -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.
Wähle mehrere Gruppen aus/ab indem du STRG 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.',
diff --git a/root/language/de/mods/portal/portal_news_module.php b/root/language/de/mods/portal/portal_news_module.php
index 55abb9df..29634b3d 100644
--- a/root/language/de/mods/portal/portal_news_module.php
+++ b/root/language/de/mods/portal/portal_news_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_poll_module.php b/root/language/de/mods/portal/portal_poll_module.php
index 0157e19e..ec986a7b 100644
--- a/root/language/de/mods/portal/portal_poll_module.php
+++ b/root/language/de/mods/portal/portal_poll_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_recent_module.php b/root/language/de/mods/portal/portal_recent_module.php
index 9fe3db2e..c8e1499e 100644
--- a/root/language/de/mods/portal/portal_recent_module.php
+++ b/root/language/de/mods/portal/portal_recent_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_topposters_module.php b/root/language/de/mods/portal/portal_topposters_module.php
index 5907cf85..8f83629e 100644
--- a/root/language/de/mods/portal/portal_topposters_module.php
+++ b/root/language/de/mods/portal/portal_topposters_module.php
@@ -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.',
diff --git a/root/language/de/mods/portal/portal_welcome_module.php b/root/language/de/mods/portal/portal_welcome_module.php
index bc01c3d8..da8e4c05 100644
--- a/root/language/de/mods/portal/portal_welcome_module.php
+++ b/root/language/de/mods/portal/portal_welcome_module.php
@@ -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.',
diff --git a/root/language/en/mods/info_acp_portal.php b/root/language/en/mods/info_acp_portal.php
index ee57f3e1..02cdedd6 100755
--- a/root/language/en/mods/info_acp_portal.php
+++ b/root/language/en/mods/info_acp_portal.php
@@ -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',
@@ -57,7 +57,7 @@ $lang = array_merge($lang, array(
'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_NOT_EXISTS' => 'The selected module does not exist.',
-
+
'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.',
@@ -97,7 +97,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' => 'Altered Portal settings
» Link added: %s ',
@@ -124,14 +124,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' => 'Altered Portal settings
» %s',
-
+
/**
* A copy of Handyman` s MOD version check, to view it on the portal overview
*/
@@ -144,7 +144,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'),
diff --git a/root/language/en/mods/portal/portal_announcements_module.php b/root/language/en/mods/portal/portal_announcements_module.php
index 5fc68181..4ab2f010 100644
--- a/root/language/en/mods/portal/portal_announcements_module.php
+++ b/root/language/en/mods/portal/portal_announcements_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_attachments_module.php b/root/language/en/mods/portal/portal_attachments_module.php
index d4f97ded..2fabbf68 100644
--- a/root/language/en/mods/portal/portal_attachments_module.php
+++ b/root/language/en/mods/portal/portal_attachments_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_birthday_list_module.php b/root/language/en/mods/portal/portal_birthday_list_module.php
index d38f86db..16ecc2ca 100644
--- a/root/language/en/mods/portal/portal_birthday_list_module.php
+++ b/root/language/en/mods/portal/portal_birthday_list_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_calendar_module.php b/root/language/en/mods/portal/portal_calendar_module.php
index 4286814f..123f6b72 100644
--- a/root/language/en/mods/portal/portal_calendar_module.php
+++ b/root/language/en/mods/portal/portal_calendar_module.php
@@ -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.
Select/Deselect multiple groups by holding CTRL and clicking.',
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Open external event links in a new window',
-
-
+
// Logs
'LOG_PORTAL_EVENT_UPDATED' => 'Updated Event
» %s',
'LOG_PORTAL_EVENT_ADDED' => 'Added Event
» %s',
diff --git a/root/language/en/mods/portal/portal_clock_module.php b/root/language/en/mods/portal/portal_clock_module.php
index 05d403e8..136bbe17 100644
--- a/root/language/en/mods/portal/portal_clock_module.php
+++ b/root/language/en/mods/portal/portal_clock_module.php
@@ -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',
diff --git a/root/language/en/mods/portal/portal_custom_module.php b/root/language/en/mods/portal/portal_custom_module.php
index 47614fc6..1f075855 100644
--- a/root/language/en/mods/portal/portal_custom_module.php
+++ b/root/language/en/mods/portal/portal_custom_module.php
@@ -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',
diff --git a/root/language/en/mods/portal/portal_donation_module.php b/root/language/en/mods/portal/portal_donation_module.php
index 53fb823b..e65d2b48 100644
--- a/root/language/en/mods/portal/portal_donation_module.php
+++ b/root/language/en/mods/portal/portal_donation_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_friends_module.php b/root/language/en/mods/portal/portal_friends_module.php
index 94760b1b..91a60721 100644
--- a/root/language/en/mods/portal/portal_friends_module.php
+++ b/root/language/en/mods/portal/portal_friends_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_latest_bots_module.php b/root/language/en/mods/portal/portal_latest_bots_module.php
index fcf19071..4e3fd751 100644
--- a/root/language/en/mods/portal/portal_latest_bots_module.php
+++ b/root/language/en/mods/portal/portal_latest_bots_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_latest_members_module.php b/root/language/en/mods/portal/portal_latest_members_module.php
index 47749ecc..f27679d9 100644
--- a/root/language/en/mods/portal/portal_latest_members_module.php
+++ b/root/language/en/mods/portal/portal_latest_members_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_leaders_module.php b/root/language/en/mods/portal/portal_leaders_module.php
index 855b62bd..cfe62539 100644
--- a/root/language/en/mods/portal/portal_leaders_module.php
+++ b/root/language/en/mods/portal/portal_leaders_module.php
@@ -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',
diff --git a/root/language/en/mods/portal/portal_links_module.php b/root/language/en/mods/portal/portal_links_module.php
index 59701365..ece8153c 100644
--- a/root/language/en/mods/portal/portal_links_module.php
+++ b/root/language/en/mods/portal/portal_links_module.php
@@ -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.
Select/Deselect multiple groups by holding CTRL 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.',
diff --git a/root/language/en/mods/portal/portal_main_menu_module.php b/root/language/en/mods/portal/portal_main_menu_module.php
index b4b46026..bca32d5c 100644
--- a/root/language/en/mods/portal/portal_main_menu_module.php
+++ b/root/language/en/mods/portal/portal_main_menu_module.php
@@ -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.
Select/Deselect multiple groups by holding CTRL 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.',
diff --git a/root/language/en/mods/portal/portal_news_module.php b/root/language/en/mods/portal/portal_news_module.php
index f40c8333..3757b8a0 100644
--- a/root/language/en/mods/portal/portal_news_module.php
+++ b/root/language/en/mods/portal/portal_news_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_poll_module.php b/root/language/en/mods/portal/portal_poll_module.php
index 64600616..42934c0f 100644
--- a/root/language/en/mods/portal/portal_poll_module.php
+++ b/root/language/en/mods/portal/portal_poll_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_recent_module.php b/root/language/en/mods/portal/portal_recent_module.php
index 9b3bbf06..89c6cabd 100644
--- a/root/language/en/mods/portal/portal_recent_module.php
+++ b/root/language/en/mods/portal/portal_recent_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_topposters_module.php b/root/language/en/mods/portal/portal_topposters_module.php
index d813dd59..8033226b 100644
--- a/root/language/en/mods/portal/portal_topposters_module.php
+++ b/root/language/en/mods/portal/portal_topposters_module.php
@@ -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.',
diff --git a/root/language/en/mods/portal/portal_welcome_module.php b/root/language/en/mods/portal/portal_welcome_module.php
index b3b72fb5..b75dc6ff 100644
--- a/root/language/en/mods/portal/portal_welcome_module.php
+++ b/root/language/en/mods/portal/portal_welcome_module.php
@@ -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.',
diff --git a/root/portal.php b/root/portal.php
index f7e9c8c1..36b7a864 100755
--- a/root/portal.php
+++ b/root/portal.php
@@ -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);
diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php
index 796c0c26..dc9b31b9 100644
--- a/root/portal/includes/functions.php
+++ b/root/portal/includes/functions.php
@@ -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)
diff --git a/root/portal/includes/functions_upload.php b/root/portal/includes/functions_upload.php
index 2b2bc9c1..bc468a33 100755
--- a/root/portal/includes/functions_upload.php
+++ b/root/portal/includes/functions_upload.php
@@ -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, FilesystemIterator::SKIP_DOTS)); // 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, '/');
-
+
// 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')
{
@@ -154,7 +154,7 @@ class portal_upload
'TARGET' => $target,
));
}
-
+
$template->assign_vars(array(
'S_MOD_SUCCESSBOX' => true,
'MESSAGE' => $user->lang['MODULE_UPLOADED'],
@@ -170,10 +170,10 @@ class portal_upload
{
trigger_error((sizeof($file->error) ? implode('
', $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' => '',
@@ -185,7 +185,7 @@ class portal_upload
));
}
}
-
+
/**
* Cuts the unneeded '.' and '..' from the folder content info scandir returns
*
@@ -195,19 +195,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 != '..')
@@ -224,26 +224,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 == '..')
@@ -259,10 +259,10 @@ class portal_upload
}
}
}
-
+
return @rmdir($dir);
}
-
+
/**
* Moves files or complete directories
*
@@ -297,7 +297,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))
{
@@ -319,7 +319,7 @@ class portal_upload
return true;
}
-
+
/**
* @author Michal Nazarewicz (from the php manual)
* Creates all non-existant directories in a path
diff --git a/root/portal/modules/portal_announcements.php b/root/portal/modules/portal_announcements.php
index 954cc550..8aad224c 100644
--- a/root/portal/modules/portal_announcements.php
+++ b/root/portal/modules/portal_announcements.php
@@ -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
@@ -293,7 +293,7 @@ class portal_announcements_module
$forum_id = $fetch_news[$i]['forum_id'];
$topic_id = $fetch_news[$i]['topic_id'];
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
- $unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $user->lang['BACK'];
@@ -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);
-
}
}
diff --git a/root/portal/modules/portal_attachments.php b/root/portal/modules/portal_attachments.php
index bcb9fb5a..620160f5 100644
--- a/root/portal/modules/portal_attachments.php
+++ b/root/portal/modules/portal_attachments.php
@@ -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 = '';
-
+
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);
-
}
}
diff --git a/root/portal/modules/portal_calendar.php b/root/portal/modules/portal_calendar.php
index e2a965d1..a3d8706e 100644
--- a/root/portal/modules/portal_calendar.php
+++ b/root/portal/modules/portal_calendar.php
@@ -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;
@@ -142,7 +142,7 @@ class portal_calendar_module
$template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
'MINI_CAL_DAY' => ($mini_cal_count == 0) ? '' . $mini_cal_day . '' : $mini_cal_day)
- );
+ );
$i++;
}
// no day
@@ -150,7 +150,7 @@ class portal_calendar_module
{
$template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
'MINI_CAL_DAY' => ' ')
- );
+ );
}
// is this the last day of the week?
@@ -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;
}
}
diff --git a/root/portal/modules/portal_custom.php b/root/portal/modules/portal_custom.php
index e561aecc..d49629f4 100644
--- a/root/portal/modules/portal_custom.php
+++ b/root/portal/modules/portal_custom.php
@@ -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);
diff --git a/root/portal/modules/portal_default.php b/root/portal/modules/portal_default.php
index d82ca472..eb4fa244 100644
--- a/root/portal/modules/portal_default.php
+++ b/root/portal/modules/portal_default.php
@@ -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
*/
diff --git a/root/portal/modules/portal_donation.php b/root/portal/modules/portal_donation.php
index 7f85523f..b614f868 100644
--- a/root/portal/modules/portal_donation.php
+++ b/root/portal/modules/portal_donation.php
@@ -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';
diff --git a/root/portal/modules/portal_forumlist.php b/root/portal/modules/portal_forumlist.php
index ddb8fc10..f26322e0 100644
--- a/root/portal/modules/portal_forumlist.php
+++ b/root/portal/modules/portal_forumlist.php
@@ -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/"
diff --git a/root/portal/modules/portal_latest_bots.php b/root/portal/modules/portal_latest_bots.php
index a6b1835e..4a9e85df 100755
--- a/root/portal/modules/portal_latest_bots.php
+++ b/root/portal/modules/portal_latest_bots.php
@@ -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))
diff --git a/root/portal/modules/portal_leaders.php b/root/portal/modules/portal_leaders.php
index 15f99a34..207b3128 100644
--- a/root/portal/modules/portal_leaders.php
+++ b/root/portal/modules/portal_leaders.php
@@ -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')
diff --git a/root/portal/modules/portal_links.php b/root/portal/modules/portal_links.php
index 280995d8..2f51c376 100644
--- a/root/portal/modules/portal_links.php
+++ b/root/portal/modules/portal_links.php
@@ -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)
{
diff --git a/root/portal/modules/portal_main_menu.php b/root/portal/modules/portal_main_menu.php
index 103057eb..26ea2f95 100644
--- a/root/portal/modules/portal_main_menu.php
+++ b/root/portal/modules/portal_main_menu.php
@@ -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)
{
diff --git a/root/portal/modules/portal_news.php b/root/portal/modules/portal_news.php
index 4cc1088f..0102db4c 100644
--- a/root/portal/modules/portal_news.php
+++ b/root/portal/modules/portal_news.php
@@ -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);
-
+
}
}
diff --git a/root/portal/modules/portal_poll.php b/root/portal/modules/portal_poll.php
index d185a098..998d2b7e 100644
--- a/root/portal/modules/portal_poll.php
+++ b/root/portal/modules/portal_poll.php
@@ -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);
-
+
}
}
diff --git a/root/portal/modules/portal_random_member.php b/root/portal/modules/portal_random_member.php
index 0aa574b4..540b893a 100644
--- a/root/portal/modules/portal_random_member.php
+++ b/root/portal/modules/portal_random_member.php
@@ -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/"
diff --git a/root/portal/modules/portal_recent.php b/root/portal/modules/portal_recent.php
index 65d3dc2d..39bb57dc 100644
--- a/root/portal/modules/portal_recent.php
+++ b/root/portal/modules/portal_recent.php
@@ -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);
-
+
}
}
diff --git a/root/portal/modules/portal_search.php b/root/portal/modules/portal_search.php
index 1f4b9b43..65267e86 100644
--- a/root/portal/modules/portal_search.php
+++ b/root/portal/modules/portal_search.php
@@ -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/"
diff --git a/root/portal/modules/portal_statistics.php b/root/portal/modules/portal_statistics.php
index e4bdba18..3ed14e69 100644
--- a/root/portal/modules/portal_statistics.php
+++ b/root/portal/modules/portal_statistics.php
@@ -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;
}
}
diff --git a/root/portal/modules/portal_user_menu.php b/root/portal/modules/portal_user_menu.php
index 47d31f69..eed9c675 100644
--- a/root/portal/modules/portal_user_menu.php
+++ b/root/portal/modules/portal_user_menu.php
@@ -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) . '
diff --git a/root/portal/modules/portal_welcome.php b/root/portal/modules/portal_welcome.php
index 737cb134..7e55916d 100644
--- a/root/portal/modules/portal_welcome.php
+++ b/root/portal/modules/portal_welcome.php
@@ -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);
diff --git a/root/portal/modules/portal_whois_online.php b/root/portal/modules/portal_whois_online.php
index 569277d0..ce8de3c5 100644
--- a/root/portal/modules/portal_whois_online.php
+++ b/root/portal/modules/portal_whois_online.php
@@ -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;
diff --git a/root/styles/prosilver/template/portal/modules/calendar_side.html b/root/styles/prosilver/template/portal/modules/calendar_side.html
index 8bd5acf8..3b01c42a 100644
--- a/root/styles/prosilver/template/portal/modules/calendar_side.html
+++ b/root/styles/prosilver/template/portal/modules/calendar_side.html
@@ -61,7 +61,7 @@
|
-
+
{L_POSTED} {L_POST_BY_AUTHOR}: {announcements_center_row.POSTER_FULL} » {announcements_center_row.TIME}
diff --git a/root/styles/subsilver2/template/portal/modules/poll_center.html b/root/styles/subsilver2/template/portal/modules/poll_center.html
index 6e5c8e47..c1344f8e 100644
--- a/root/styles/subsilver2/template/portal/modules/poll_center.html
+++ b/root/styles/subsilver2/template/portal/modules/poll_center.html
@@ -62,7 +62,7 @@
{S_HIDDEN_FIELDS}
-
+
diff --git a/root/styles/subsilver2/template/portal/modules/poll_side.html b/root/styles/subsilver2/template/portal/modules/poll_side.html
index 78e96707..c6b51d24 100644
--- a/root/styles/subsilver2/template/portal/modules/poll_side.html
+++ b/root/styles/subsilver2/template/portal/modules/poll_side.html
@@ -62,7 +62,7 @@
{S_HIDDEN_FIELDS}
-
+
|