A little bit of clean up
Fixed a few small XHTML validation errors Fixed incorrect language string Fixed empty latest bots block if no bot has visited the site
This commit is contained in:
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
</author>
|
</author>
|
||||||
</author-group>
|
</author-group>
|
||||||
|
|
||||||
<mod-version>2.0.0b1</mod-version>
|
<mod-version>2.0.0a1</mod-version>
|
||||||
|
|
||||||
<installation>
|
<installation>
|
||||||
<level>easy</level>
|
<level>easy</level>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
</author>
|
</author>
|
||||||
</author-group>
|
</author-group>
|
||||||
|
|
||||||
<mod-version>2.0.0b1</mod-version>
|
<mod-version>2.0.0a1</mod-version>
|
||||||
|
|
||||||
<installation>
|
<installation>
|
||||||
<level>easy</level>
|
<level>easy</level>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<header>
|
<header>
|
||||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||||
|
|
||||||
<title lang="en">board3 Portal - German Language Update for 2.0.0-a1</title>
|
<title lang="en">board3 Portal - German Language Update for 2.0.0a1</title>
|
||||||
<title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0-a1</title>
|
<title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0a1</title>
|
||||||
|
|
||||||
<description lang="en">Adds a portal to your forum.
|
<description lang="en">Adds a portal to your forum.
|
||||||
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
||||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
</author>
|
</author>
|
||||||
</author-group>
|
</author-group>
|
||||||
|
|
||||||
<mod-version>2.0.0b1</mod-version>
|
<mod-version>2.0.0a1</mod-version>
|
||||||
|
|
||||||
<installation>
|
<installation>
|
||||||
<level>easy</level>
|
<level>easy</level>
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
<header>
|
<header>
|
||||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||||
|
|
||||||
<title lang="en">board3 Portal - Update subsilver2 style for 2.0.0-a1</title>
|
<title lang="en">board3 Portal - Update subsilver2 style for 2.0.0a1</title>
|
||||||
<title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.0-a1</title>
|
<title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.0a1</title>
|
||||||
|
|
||||||
<description lang="en">Adds a portal to your forum.
|
<description lang="en">Adds a portal to your forum.
|
||||||
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
||||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
</author>
|
</author>
|
||||||
</author-group>
|
</author-group>
|
||||||
|
|
||||||
<mod-version>2.0.0b1</mod-version>
|
<mod-version>2.0.0a1</mod-version>
|
||||||
|
|
||||||
<installation>
|
<installation>
|
||||||
<level>easy</level>
|
<level>easy</level>
|
||||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
</author>
|
</author>
|
||||||
</author-group>
|
</author-group>
|
||||||
|
|
||||||
<mod-version>2.0.0b1</mod-version>
|
<mod-version>2.0.0a1</mod-version>
|
||||||
|
|
||||||
<installation>
|
<installation>
|
||||||
<level>easy</level>
|
<level>easy</level>
|
||||||
@@ -97,10 +97,10 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
|||||||
<link-group>
|
<link-group>
|
||||||
<link type="parent" lang="de" href="../../install.xml">Installations-Anleitung</link>
|
<link type="parent" lang="de" href="../../install.xml">Installations-Anleitung</link>
|
||||||
<link type="parent" lang="en" href="../../install.xml">Manual</link>
|
<link type="parent" lang="en" href="../../install.xml">Manual</link>
|
||||||
<link type="template" lang="en" href="contrib/subsilver2.xml">Update subsilver2 to Board3 Portal 2.0.0-a1</link>
|
<link type="template" lang="en" href="contrib/subsilver2.xml">Update subsilver2 to Board3 Portal 2.0.0a1</link>
|
||||||
<link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.0-a1</link>
|
<link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.0a1</link>
|
||||||
<link type="language" lang="en" href="contrib/subsilver2.xml">Update German language to Board3 Portal 2.0.0-a1</link>
|
<link type="language" lang="en" href="contrib/subsilver2.xml">Update German language to Board3 Portal 2.0.0a1</link>
|
||||||
<link type="language" lang="de" href="contrib/subsilver2.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0-a1</link>
|
<link type="language" lang="de" href="contrib/subsilver2.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0a1</link>
|
||||||
</link-group>
|
</link-group>
|
||||||
</header>
|
</header>
|
||||||
<action-group>
|
<action-group>
|
||||||
@@ -101,8 +101,8 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
|||||||
<link type="language" lang="de" href="contrib/de.xml">Anleitung für das deutsche Sprachpaket</link>
|
<link type="language" lang="de" href="contrib/de.xml">Anleitung für das deutsche Sprachpaket</link>
|
||||||
<link type="template" lang="en" href="contrib/subsilver2.xml">Manual for subsilver2</link>
|
<link type="template" lang="en" href="contrib/subsilver2.xml">Manual for subsilver2</link>
|
||||||
<link type="template" lang="de" href="contrib/subsilver2.xml">Anleitung für subsilver2</link>
|
<link type="template" lang="de" href="contrib/subsilver2.xml">Anleitung für subsilver2</link>
|
||||||
<link type="contrib" lang="en" href="contrib/update_106_to_200-a1/update.xml">Manual for Updating B3P 1.0.6 to 2.0.0-a1</link>
|
<link type="contrib" lang="en" href="contrib/update_106_to_200a1/update.xml">Manual for Updating B3P 1.0.6 to 2.0.0a1</link>
|
||||||
<link type="contrib" lang="de" href="contrib/update_106_to_200-a1/update.xml">Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0-a1</link>
|
<link type="contrib" lang="de" href="contrib/update_106_to_200a1/update.xml">Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0a1</link>
|
||||||
</link-group>
|
</link-group>
|
||||||
<history>
|
<history>
|
||||||
<entry>
|
<entry>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
<label for="permission-setting">{L_ACP_PORTAL_MENU_PERMISSION}:</label><br />
|
<label for="permission-setting-menu">{L_ACP_PORTAL_MENU_PERMISSION}:</label><br />
|
||||||
<span>{L_ACP_PORTAL_MENU_PERMISSION_EXP}</span>
|
<span>{L_ACP_PORTAL_MENU_PERMISSION_EXP}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|||||||
4
root/adm/style/portal/acp_portal_upload_module.html
Normal file → Executable file
4
root/adm/style/portal/acp_portal_upload_module.html
Normal file → Executable file
@@ -18,10 +18,12 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{L_MODULE_UPLOAD}</legend>
|
<legend>{L_MODULE_UPLOAD}</legend>
|
||||||
<dl>
|
<dl>
|
||||||
<p>{L_MODULE_UPLOAD_EXP}</p>
|
<dt>{L_MODULE_UPLOAD_EXP}</dt>
|
||||||
|
<dd>
|
||||||
<input type="file" name="modupload" id="modupload" value="" style="width:50%" />
|
<input type="file" name="modupload" id="modupload" value="" style="width:50%" />
|
||||||
{S_FORM_TOKEN}
|
{S_FORM_TOKEN}
|
||||||
<br /><br /><input type="submit" name="submit" value="{L_MODULE_UPLOAD_GO}" id="submit" class="button1" />
|
<br /><br /><input type="submit" name="submit" value="{L_MODULE_UPLOAD_GO}" id="submit" class="button1" />
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ $lang = array_merge($lang, array(
|
|||||||
// Upload Module
|
// Upload Module
|
||||||
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
|
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
|
||||||
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
|
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
|
||||||
'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst.',
|
'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst:',
|
||||||
'MODULE_UPLOAD_GO' => 'Hochladen',
|
'MODULE_UPLOAD_GO' => 'Hochladen',
|
||||||
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
|
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
|
||||||
'NO_AUTOMOD_INSTALLED' => 'Du hast AutoMOD nicht installiert, AutoMOD ist für dieses Feature aber zwingend erforderlich.',
|
'NO_AUTOMOD_INSTALLED' => 'Du hast AutoMOD nicht installiert, AutoMOD ist für dieses Feature aber zwingend erforderlich.',
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
|
|||||||
'POSTED_BY' => 'Autor',
|
'POSTED_BY' => 'Autor',
|
||||||
'COMMENTS' => 'Kommentare',
|
'COMMENTS' => 'Kommentare',
|
||||||
'VIEW_COMMENTS' => 'Kommentare anzeigen',
|
'VIEW_COMMENTS' => 'Kommentare anzeigen',
|
||||||
'POST_REPLY' => 'Kommentar schreiben',
|
'PORTAL_POST_REPLY' => 'Kommentar schreiben',
|
||||||
'TOPIC_VIEWS' => 'Zugriffe',
|
'TOPIC_VIEWS' => 'Zugriffe',
|
||||||
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
|
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
|
||||||
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
|
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
|
||||||
|
|||||||
2
root/language/en/mods/info_acp_portal.php
Normal file → Executable file
2
root/language/en/mods/info_acp_portal.php
Normal file → Executable file
@@ -103,7 +103,7 @@ $lang = array_merge($lang, array(
|
|||||||
// Upload Module
|
// Upload Module
|
||||||
'ACP_PORTAL_UPLOAD' => 'Upload module',
|
'ACP_PORTAL_UPLOAD' => 'Upload module',
|
||||||
'MODULE_UPLOAD' => 'Upload a module',
|
'MODULE_UPLOAD' => 'Upload a module',
|
||||||
'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload.',
|
'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload:',
|
||||||
'MODULE_UPLOAD_GO' => 'Upload',
|
'MODULE_UPLOAD_GO' => 'Upload',
|
||||||
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
|
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
|
||||||
'NO_AUTOMOD_INSTALLED' => 'You don’t have AutoMOD installed, but AutoMOD is required for this module.',
|
'NO_AUTOMOD_INSTALLED' => 'You don’t have AutoMOD installed, but AutoMOD is required for this module.',
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
|
|||||||
'POSTED_BY' => 'Poster',
|
'POSTED_BY' => 'Poster',
|
||||||
'COMMENTS' => 'Comments',
|
'COMMENTS' => 'Comments',
|
||||||
'VIEW_COMMENTS' => 'View comments',
|
'VIEW_COMMENTS' => 'View comments',
|
||||||
'POST_REPLY' => 'Write comments',
|
'PORTAL_POST_REPLY' => 'Write comments',
|
||||||
'TOPIC_VIEWS' => 'Views',
|
'TOPIC_VIEWS' => 'Views',
|
||||||
'JUMP_NEWEST' => 'Jump to newest post',
|
'JUMP_NEWEST' => 'Jump to newest post',
|
||||||
'JUMP_FIRST' => 'Jump to first post',
|
'JUMP_FIRST' => 'Jump to first post',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ $lang = array_merge($lang, array(
|
|||||||
'POSTED_BY' => 'Poster',
|
'POSTED_BY' => 'Poster',
|
||||||
'COMMENTS' => 'Comments',
|
'COMMENTS' => 'Comments',
|
||||||
'VIEW_COMMENTS' => 'View comments',
|
'VIEW_COMMENTS' => 'View comments',
|
||||||
'POST_REPLY' => 'Write comments',
|
'PORTAL_POST_REPLY' => 'Write comments',
|
||||||
'TOPIC_VIEWS' => 'Views',
|
'TOPIC_VIEWS' => 'Views',
|
||||||
'JUMP_NEWEST' => 'Jump to newest post',
|
'JUMP_NEWEST' => 'Jump to newest post',
|
||||||
'JUMP_FIRST' => 'Jump to first post',
|
'JUMP_FIRST' => 'Jump to first post',
|
||||||
|
|||||||
54
root/portal.php
Normal file → Executable file
54
root/portal.php
Normal file → Executable file
@@ -14,35 +14,38 @@ define('IN_PHPBB', true);
|
|||||||
define('IN_PORTAL', true);
|
define('IN_PORTAL', true);
|
||||||
|
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||||
|
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
include($phpbb_root_path . 'common.' . $phpEx);
|
include($phpbb_root_path . 'common.' . $phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||||
$portal_root_path = PORTAL_ROOT_PATH;
|
$portal_root_path = PORTAL_ROOT_PATH;
|
||||||
include($phpbb_root_path . $portal_root_path . 'includes/functions_modules.' . $phpEx);
|
include($phpbb_root_path . $portal_root_path . 'includes/functions_modules.' . $phpEx);
|
||||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
|
||||||
include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx);
|
include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx);
|
||||||
//include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
|
||||||
|
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->session_begin();
|
$user->session_begin();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup('mods/portal');
|
$user->setup('mods/portal');
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Make sure we do an isset first,
|
* Make sure we do an isset first,
|
||||||
* else we will get errors if someone uninstalls the portal and forgets to remove portal.php
|
* else we will get errors if someone uninstalls the portal and forgets to remove portal.php
|
||||||
*/
|
*/
|
||||||
if (!isset($config['board3_enable']) || !$config['board3_enable'] || !$auth->acl_get('u_view_portal'))
|
if (!isset($config['board3_enable']) || !$config['board3_enable'] || !$auth->acl_get('u_view_portal'))
|
||||||
{
|
{
|
||||||
redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
|
redirect(append_sid($phpbb_root_path . 'index.' . $phpEx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get initial data
|
||||||
|
*/
|
||||||
$portal_config = obtain_portal_config();
|
$portal_config = obtain_portal_config();
|
||||||
|
$portal_modules = obtain_portal_modules();
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* set up column_count array
|
* set up column_count array
|
||||||
|
* with this we can hide unneeded parts of the portal
|
||||||
*/
|
*/
|
||||||
$module_count = array(
|
$module_count = array(
|
||||||
'total' => 0,
|
'total' => 0,
|
||||||
@@ -53,9 +56,10 @@ $module_count = array(
|
|||||||
'bottom' => 0,
|
'bottom' => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
$portal_modules = obtain_portal_modules();
|
/**
|
||||||
|
* start assigning block vars
|
||||||
foreach($portal_modules as $row)
|
*/
|
||||||
|
foreach ($portal_modules as $row)
|
||||||
{
|
{
|
||||||
$class_name = 'portal_' . $row['module_classname'] . '_module';
|
$class_name = 'portal_' . $row['module_classname'] . '_module';
|
||||||
if (!class_exists($class_name))
|
if (!class_exists($class_name))
|
||||||
@@ -67,12 +71,14 @@ foreach($portal_modules as $row)
|
|||||||
trigger_error(sprintf($user->lang['CLASS_NOT_FOUND'], $class_name, 'portal_' . $row['module_classname']), E_USER_ERROR);
|
trigger_error(sprintf($user->lang['CLASS_NOT_FOUND'], $class_name, 'portal_' . $row['module_classname']), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$module = new $class_name();
|
$module = new $class_name();
|
||||||
|
|
||||||
// Check for permissions before loading anything
|
/**
|
||||||
|
* Check for permissions before loading anything
|
||||||
|
* the default group of a user always defines his/her permission (KISS)
|
||||||
|
*/
|
||||||
$group_ary = (!empty($row['module_group_ids'])) ? explode(',', $row['module_group_ids']) : '';
|
$group_ary = (!empty($row['module_group_ids'])) ? explode(',', $row['module_group_ids']) : '';
|
||||||
if((is_array($group_ary) && !in_array($user->data['group_id'], $group_ary)))
|
if ((is_array($group_ary) && !in_array($user->data['group_id'], $group_ary)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -115,10 +121,10 @@ foreach($portal_modules as $row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Custom Blocks that have been defined in the ACP will return an array instead of just the name of the template file
|
// Custom Blocks that have been defined in the ACP will return an array instead of just the name of the template file
|
||||||
if(is_array($template_module))
|
if (is_array($template_module))
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
||||||
'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'],
|
'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'],
|
||||||
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $template_module['image_src'],
|
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $template_module['image_src'],
|
||||||
'TITLE' => $template_module['title'],
|
'TITLE' => $template_module['title'],
|
||||||
'CODE' => $template_module['code'],
|
'CODE' => $template_module['code'],
|
||||||
@@ -128,10 +134,10 @@ foreach($portal_modules as $row)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
$template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
||||||
'TEMPLATE_FILE' => 'portal/modules/' . $template_module,
|
'TEMPLATE_FILE' => 'portal/modules/' . $template_module,
|
||||||
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $row['module_image_src'],
|
'IMAGE_SRC' => $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $row['module_image_src'],
|
||||||
'IMAGE_WIDTH' => $row['module_image_width'],
|
'IMAGE_WIDTH' => $row['module_image_width'],
|
||||||
'IMAGE_HEIGHT' => $row['module_image_height'],
|
'IMAGE_HEIGHT' => $row['module_image_height'],
|
||||||
'MODULE_ID' => $row['module_id'],
|
'MODULE_ID' => $row['module_id'],
|
||||||
'TITLE' => (isset($user->lang[$row['module_name']])) ? $user->lang[$row['module_name']] : utf8_normalize_nfc($row['module_name']),
|
'TITLE' => (isset($user->lang[$row['module_name']])) ? $user->lang[$row['module_name']] : utf8_normalize_nfc($row['module_name']),
|
||||||
));
|
));
|
||||||
@@ -143,20 +149,20 @@ $module_count['total'] = sizeof($portal_modules);
|
|||||||
// Redirect to index if there are currently no active modules
|
// Redirect to index if there are currently no active modules
|
||||||
if($module_count['total'] < 1)
|
if($module_count['total'] < 1)
|
||||||
{
|
{
|
||||||
redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
|
redirect(append_sid($phpbb_root_path . 'index.' . $phpEx));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign specific vars
|
// Assign specific vars
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_SMALL_BLOCK' => true,
|
// 'S_SMALL_BLOCK' => true,
|
||||||
'S_PORTAL_LEFT_COLUMN' => $config['board3_left_column_width'],
|
'S_PORTAL_LEFT_COLUMN' => $config['board3_left_column_width'],
|
||||||
'S_PORTAL_RIGHT_COLUMN' => $config['board3_right_column_width'],
|
'S_PORTAL_RIGHT_COLUMN' => $config['board3_right_column_width'],
|
||||||
'S_LEFT_COLUMN' => ($module_count['left'] > 0 && $config['board3_left_column']) ? true : false,
|
'S_LEFT_COLUMN' => ($module_count['left'] > 0 && $config['board3_left_column']) ? true : false,
|
||||||
'S_CENTER_COLUMN' => ($module_count['center'] > 0) ? true : false,
|
'S_CENTER_COLUMN' => ($module_count['center'] > 0) ? true : false,
|
||||||
'S_RIGHT_COLUMN' => ($module_count['right'] > 0 && $config['board3_right_column']) ? true : false,
|
'S_RIGHT_COLUMN' => ($module_count['right'] > 0 && $config['board3_right_column']) ? true : false,
|
||||||
'S_TOP_COLUMN' => ($module_count['top'] > 0) ? true : false,
|
'S_TOP_COLUMN' => ($module_count['top'] > 0) ? true : false,
|
||||||
'S_BOTTOM_COLUMN' => ($module_count['bottom'] > 0) ? true : false,
|
'S_BOTTOM_COLUMN' => ($module_count['bottom'] > 0) ? true : false,
|
||||||
'S_DISPLAY_PHPBB_MENU' => $config['board3_phpbb_menu'],
|
'S_DISPLAY_PHPBB_MENU' => $config['board3_phpbb_menu'],
|
||||||
'S_DISPLAY_JUMPBOX' => $config['board3_display_jumpbox'],
|
'S_DISPLAY_JUMPBOX' => $config['board3_display_jumpbox'],
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -171,4 +177,4 @@ make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
|||||||
|
|
||||||
page_footer();
|
page_footer();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -107,7 +107,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
$topic_icons = array(0);
|
$topic_icons = array(0);
|
||||||
$have_icons = 0;
|
$have_icons = 0;
|
||||||
|
|
||||||
if($permissions == true)
|
if ($permissions == true)
|
||||||
{
|
{
|
||||||
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
$disallow_access = array();
|
$disallow_access = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($invert == true)
|
if ($invert == true)
|
||||||
{
|
{
|
||||||
$disallow_access = array_merge($disallow_access, $forum_from);
|
$disallow_access = array_merge($disallow_access, $forum_from);
|
||||||
$forum_from = array();
|
$forum_from = array();
|
||||||
@@ -124,19 +124,19 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
|
|
||||||
$global_f = 0;
|
$global_f = 0;
|
||||||
|
|
||||||
if(sizeof($forum_from))
|
if (sizeof($forum_from))
|
||||||
{
|
{
|
||||||
$disallow_access = array_diff($forum_from, $disallow_access);
|
$disallow_access = array_diff($forum_from, $disallow_access);
|
||||||
if(!sizeof($disallow_access))
|
if (!sizeof($disallow_access))
|
||||||
{
|
{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($disallow_access as $acc_id)
|
foreach ($disallow_access as $acc_id)
|
||||||
{
|
{
|
||||||
$acc_id = (int) $acc_id;
|
$acc_id = (int) $acc_id;
|
||||||
$str_where .= "t.forum_id = $acc_id OR ";
|
$str_where .= "t.forum_id = $acc_id OR ";
|
||||||
if($type == 'announcements' && $global_f < 1 && $acc_id > 0)
|
if ($type == 'announcements' && $global_f < 1 && $acc_id > 0)
|
||||||
{
|
{
|
||||||
$global_f = $acc_id;
|
$global_f = $acc_id;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach($disallow_access as $acc_id)
|
foreach ($disallow_access as $acc_id)
|
||||||
{
|
{
|
||||||
$acc_id = (int) $acc_id;
|
$acc_id = (int) $acc_id;
|
||||||
$str_where .= "t.forum_id <> $acc_id AND ";
|
$str_where .= "t.forum_id <> $acc_id AND ";
|
||||||
@@ -176,7 +176,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type == 'announcements' && $global_f < 1)
|
if ($type == 'announcements' && $global_f < 1)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT
|
$sql = 'SELECT
|
||||||
forum_id
|
forum_id
|
||||||
@@ -191,7 +191,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if(!sizeof($row))
|
if (!sizeof($row))
|
||||||
{
|
{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$attachments = array();
|
$attachments = array();
|
||||||
if(($auth->acl_get('u_download') && ($auth->acl_get('f_download', $row['forum_id']) || $row['forum_id'] == 0)) && $config['allow_attachments'] && $row['post_id'] && $row['post_attachment'])
|
if (($auth->acl_get('u_download') && ($auth->acl_get('f_download', $row['forum_id']) || $row['forum_id'] == 0)) && $config['allow_attachments'] && $row['post_id'] && $row['post_attachment'])
|
||||||
{
|
{
|
||||||
// Pull attachment data
|
// Pull attachment data
|
||||||
$sql2 = 'SELECT *
|
$sql2 = 'SELECT *
|
||||||
@@ -318,7 +318,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
parse_attachments($row['forum_id'], $message, $attachments, $update_count);
|
parse_attachments($row['forum_id'], $message, $attachments, $update_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($global_f < 1)
|
if ($global_f < 1)
|
||||||
{
|
{
|
||||||
$global_f = $row['forum_id'];
|
$global_f = $row['forum_id'];
|
||||||
}
|
}
|
||||||
@@ -353,14 +353,14 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
|
|||||||
'attachments' => (!empty($attachments)) ? $attachments : array(),
|
'attachments' => (!empty($attachments)) ? $attachments : array(),
|
||||||
));
|
));
|
||||||
$posts['global_id'] = $global_f;
|
$posts['global_id'] = $global_f;
|
||||||
$i++;
|
++$i;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$posts['topic_icons'] = ((max($topic_icons) > 0) && $have_icons) ? true : false;
|
$posts['topic_icons'] = ((max($topic_icons) > 0) && $have_icons) ? true : false;
|
||||||
$posts['topic_count'] = $i;
|
$posts['topic_count'] = $i;
|
||||||
|
|
||||||
if($global_f < 1)
|
if ($global_f < 1)
|
||||||
{
|
{
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@@ -399,7 +399,7 @@ function is_valid_bbtag($str, $bbuid)
|
|||||||
function get_end_bbtag($tag, $bbuid)
|
function get_end_bbtag($tag, $bbuid)
|
||||||
{
|
{
|
||||||
$etag = '';
|
$etag = '';
|
||||||
for($i=0;$i<strlen($tag);$i++)
|
for ($i=0;$i<strlen($tag);++$i)
|
||||||
{
|
{
|
||||||
if ($tag[$i] == '[')
|
if ($tag[$i] == '[')
|
||||||
{
|
{
|
||||||
@@ -436,7 +436,7 @@ function get_end_bbtag($tag, $bbuid)
|
|||||||
function get_next_word($str)
|
function get_next_word($str)
|
||||||
{
|
{
|
||||||
$ret = '';
|
$ret = '';
|
||||||
for($i=0;$i<strlen($str);$i++)
|
for ($i=0;$i<strlen($str);++$i)
|
||||||
{
|
{
|
||||||
switch ($str[$i])
|
switch ($str[$i])
|
||||||
{
|
{
|
||||||
@@ -468,7 +468,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
|
|||||||
$last = '';
|
$last = '';
|
||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
while((strlen($ntext) < $cnt) && (strlen($sl) > 0))
|
while ((strlen($ntext) < $cnt) && (strlen($sl) > 0))
|
||||||
{
|
{
|
||||||
$sr = '';
|
$sr = '';
|
||||||
if (substr($sl, 0, 1) == '[')
|
if (substr($sl, 0, 1) == '[')
|
||||||
@@ -497,7 +497,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
|
|||||||
{
|
{
|
||||||
if (strcmp($elem[1],$sr) != 0)
|
if (strcmp($elem[1],$sr) != 0)
|
||||||
{
|
{
|
||||||
$tarr[$j++] = $elem;
|
$tarr[++$j] = $elem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$arr = $tarr;
|
$arr = $tarr;
|
||||||
@@ -505,7 +505,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$arr[$i][0] = $sr;
|
$arr[$i][0] = $sr;
|
||||||
$arr[$i++][1] = get_end_bbtag($sr, $bbuid);
|
$arr[++$i][1] = get_end_bbtag($sr, $bbuid);
|
||||||
}
|
}
|
||||||
$ret .= $sr;
|
$ret .= $sr;
|
||||||
}
|
}
|
||||||
@@ -528,7 +528,7 @@ function get_sub_taged_string($str, $bbuid, $maxlen)
|
|||||||
|
|
||||||
$ret .= $ap;
|
$ret .= $ap;
|
||||||
$ret = trim($ret);
|
$ret = trim($ret);
|
||||||
if(substr($ret, -4) == '<!--')
|
if (substr($ret, -4) == '<!--')
|
||||||
{
|
{
|
||||||
$ret .= ' -->';
|
$ret .= ' -->';
|
||||||
}
|
}
|
||||||
@@ -586,7 +586,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
|
|||||||
|
|
||||||
$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
|
$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
|
||||||
|
|
||||||
for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
|
for ($i = $start_cnt + 1; $i < $end_cnt; ++$i)
|
||||||
{
|
{
|
||||||
$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '">' . $i . '</a>';
|
$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '">' . $i . '</a>';
|
||||||
if ($i < $end_cnt - 1)
|
if ($i < $end_cnt - 1)
|
||||||
@@ -600,7 +600,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
|
|||||||
{
|
{
|
||||||
$page_string .= $seperator;
|
$page_string .= $seperator;
|
||||||
|
|
||||||
for ($i = 2; $i < $total_pages; $i++)
|
for ($i = 2; $i < $total_pages; ++$i)
|
||||||
{
|
{
|
||||||
$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '">' . $i . '</a>';
|
$page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '">' . $i . '</a>';
|
||||||
if ($i < $total_pages)
|
if ($i < $total_pages)
|
||||||
@@ -701,7 +701,7 @@ function add_endtag ($message = '')
|
|||||||
$check = (int) strripos($message, '<!-- m --><a ');
|
$check = (int) strripos($message, '<!-- m --><a ');
|
||||||
$check_2 = (int) strripos($message, '</a><!--');
|
$check_2 = (int) strripos($message, '</a><!--');
|
||||||
|
|
||||||
if(((isset($check) && $check > 0) && ($check_2 <= $check)) || ((isset($check) && $check > 0) && !isset($check_2)))
|
if (((isset($check) && $check > 0) && ($check_2 <= $check)) || ((isset($check) && $check > 0) && !isset($check_2)))
|
||||||
{
|
{
|
||||||
$message .= '</a><!-- m -->';
|
$message .= '</a><!-- m -->';
|
||||||
}
|
}
|
||||||
@@ -726,7 +726,7 @@ function get_portal_tracking_info($fetch_news)
|
|||||||
* group everything by the forum IDs
|
* group everything by the forum IDs
|
||||||
*/
|
*/
|
||||||
$count = $fetch_news['topic_count'];
|
$count = $fetch_news['topic_count'];
|
||||||
for ($i = 0; $i < $count; $i++)
|
for ($i = 0; $i < $count; ++$i)
|
||||||
{
|
{
|
||||||
$tracking_info[$fetch_news[$i]['forum_id']][] = $fetch_news[$i]['topic_id'];
|
$tracking_info[$fetch_news[$i]['forum_id']][] = $fetch_news[$i]['topic_id'];
|
||||||
}
|
}
|
||||||
@@ -855,16 +855,16 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
|||||||
{
|
{
|
||||||
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix, $config;
|
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix, $config;
|
||||||
|
|
||||||
if(!defined('PORTAL_MODULES_TABLE'))
|
if (!defined('PORTAL_MODULES_TABLE'))
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode == 'install' || $mode == 'update')
|
if ($mode == 'install' || $mode == 'update')
|
||||||
{
|
{
|
||||||
$directory = $phpbb_root_path . 'portal/modules/';
|
$directory = $phpbb_root_path . 'portal/modules/';
|
||||||
|
|
||||||
if($purge_modules)
|
if ($purge_modules)
|
||||||
{
|
{
|
||||||
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE;
|
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
@@ -905,7 +905,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
|||||||
'portal_links' => array(3, 6),
|
'portal_links' => array(3, 6),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($modules_ary as $module_name => $module_data)
|
foreach ($modules_ary as $module_name => $module_data)
|
||||||
{
|
{
|
||||||
$class_name = $module_name . '_module';
|
$class_name = $module_name . '_module';
|
||||||
if (!class_exists($class_name))
|
if (!class_exists($class_name))
|
||||||
@@ -935,7 +935,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
|||||||
$c_class->install($db->sql_nextid());
|
$c_class->install($db->sql_nextid());
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode == 'update')
|
if ($mode == 'update')
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Check if we need to convert from Board3 Portal 1.0.6
|
* Check if we need to convert from Board3 Portal 1.0.6
|
||||||
@@ -952,11 +952,11 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
|||||||
$convert = false;
|
$convert = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($convert)
|
if ($convert)
|
||||||
{
|
{
|
||||||
$portal_modules = obtain_portal_modules();
|
$portal_modules = obtain_portal_modules();
|
||||||
|
|
||||||
foreach($portal_modules as $row)
|
foreach ($portal_modules as $row)
|
||||||
{
|
{
|
||||||
switch($row['module_classname'])
|
switch($row['module_classname'])
|
||||||
{
|
{
|
||||||
@@ -1082,7 +1082,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* check if the entered source file actually exists
|
* check if the entered source file actually exists
|
||||||
*/
|
*/
|
||||||
function check_file_src($value, $key, $module_id)
|
function check_file_src($value, $key, $module_id)
|
||||||
@@ -1098,16 +1098,16 @@ function check_file_src($value, $key, $module_id)
|
|||||||
WHERE s.style_active = 1';
|
WHERE s.style_active = 1';
|
||||||
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
while($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if(!file_exists($phpbb_root_path . 'styles/' . $row['theme_path'] . '/theme/images/portal/' . $value))
|
if (!file_exists($phpbb_root_path . 'styles/' . $row['theme_path'] . '/theme/images/portal/' . $value))
|
||||||
{
|
{
|
||||||
$error .= $user->lang['B3P_FILE_NOT_FOUND'] . ': styles/' . $row['theme_path'] . '/theme/images/portal/' . $value . '<br />';
|
$error .= $user->lang['B3P_FILE_NOT_FOUND'] . ': styles/' . $row['theme_path'] . '/theme/images/portal/' . $value . '<br />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if(!empty($error))
|
if (!empty($error))
|
||||||
{
|
{
|
||||||
trigger_error($error . adm_back_link(append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)));
|
trigger_error($error . adm_back_link(append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)));
|
||||||
}
|
}
|
||||||
|
|||||||
5
root/portal/modules/portal_latest_bots.php
Normal file → Executable file
5
root/portal/modules/portal_latest_bots.php
Normal file → Executable file
@@ -87,7 +87,10 @@ class portal_latest_bots_module
|
|||||||
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $config['board3_last_visited_bots_number_' . $module_id]),
|
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $config['board3_last_visited_bots_number_' . $module_id]),
|
||||||
));
|
));
|
||||||
|
|
||||||
return 'latest_bots_side.html';
|
if(!empty($row))
|
||||||
|
{
|
||||||
|
return 'latest_bots_side.html';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_template_acp($module_id)
|
function get_template_acp($module_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user