Move over to own Repository :)
186
contrib/update_110b.xml
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../modx.prosilver.en.xsl"?>
|
||||
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
|
||||
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
|
||||
<header>
|
||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||
<title lang="en-gb">board3 Portal - based on phpBB3 Portal</title>
|
||||
<title lang="de">board3 Portal - basierend auf phpBB3 Portal</title>
|
||||
<description lang="en-gb">Adds a portal to your forum.
|
||||
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
||||
|
||||
Included language files:
|
||||
» English (en)
|
||||
» German (de)
|
||||
|
||||
This portal is based on the phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<description lang="de">Fügt ein Portal deinem Forum hinzu.
|
||||
Es hat diverse Boxen, die über das ACP an- / abgeschaltet und eingestellt werden können.
|
||||
|
||||
Dieses Portal basiert auf dem phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<author-notes lang="en-gb">i hope you get everything working. Further developement, new boxes for the portal or questions are welcome at www.board3.de</author-notes>
|
||||
<author-notes lang="de">Ich hoffe ihr habt Spaß am Portal. Neuen Code, bzw neue Boxen und Fragen könnt ihr auf www.board3.de posten.</author-notes>
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<email>nospam@breest.net</email>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>(N/A)</realname>
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Walter</realname>
|
||||
<email>w.bobeth@digitalfotografie-foren.de</email>
|
||||
<username>Redbull254</username>
|
||||
<homepage>http://www.digitalfotografie-foren.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Sevdin Filiz - original phpBB3 Portal developement</realname>
|
||||
<email></email>
|
||||
<username>angelside</username>
|
||||
<homepage>http://www.phpbb3portal.com</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
</author-group>
|
||||
<mod-version>
|
||||
<major>0</major>
|
||||
<minor>1</minor>
|
||||
<revision>0</revision>
|
||||
</mod-version>
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
<time>600</time>
|
||||
<target-version>
|
||||
<target-primary>3.0.0</target-primary>
|
||||
<target-major allow="exact">3</target-major>
|
||||
<target-minor allow="exact">0</target-minor>
|
||||
</target-version>
|
||||
</installation>
|
||||
<meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
|
||||
</header>
|
||||
<action-group>
|
||||
<copy>
|
||||
<file from="root/portal.php" to="portal.php" />
|
||||
<file from="root/includes/acp/acp_portal.php" to="includes/acp/acp_portal.php" />
|
||||
<file from="root/includes/acp/info/acp_portal.php" to="includes/acp/info/acp_portal.php" />
|
||||
<file from="root/install_portal/*.*" to="install_portal/*.*" />
|
||||
<file from="root/install_portal/schemas/*.*" to="install_portal/schemas/*.*" />
|
||||
<file from="root/language/en/mods/*.*" to="language/en/mods/*.*" />
|
||||
<file from="root/portal/index.html" to="portal/index.html" />
|
||||
<file from="root/portal/block/*.*" to="portal/block/*.*" />
|
||||
<file from="root/portal/images/*.*" to="portal/images/*.*" />
|
||||
<file from="root/portal/includes/*.*" to="portal/includes/*.*" />
|
||||
<file from="root/portal/includes/mini_cal/*.*" to="portal/includes/mini_cal/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/*.*" to="styles/prosilver/template/portal/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/block/*.*" to="styles/prosilver/template/portal/block/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/block/donation/*.*" to="styles/prosilver/template/portal/block/donation/*.*" />
|
||||
</copy>
|
||||
<open src=".htaccess">
|
||||
<edit>
|
||||
<find><![CDATA[#
|
||||
# @package phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
# @version $Id: .htaccess,v 1.3 2007/08/19 17:51:00 angelside Exp $
|
||||
# @copyright (c) Canver Software - www.canversoft.net
|
||||
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
#
|
||||
|
||||
DirectoryIndex portal.php index.php index.html index.htm]]></find>
|
||||
<action type="replace-with"><![CDATA[<Files "config.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
|
||||
<Files "common.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>
|
||||
|
||||
DirectoryIndex portal.php index.php index.html index.htm]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="includes/constants.php">
|
||||
<edit>
|
||||
<find><![CDATA[// Additional tables]]></find>
|
||||
<action type="after-add"><![CDATA[define('PORTAL_CONFIG_TABLE', $table_prefix . 'portal_config');]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="includes/functions.php">
|
||||
<edit>
|
||||
<find><![CDATA[//-- [+] MOD: phpBB3 Portal ---------------------------------------------
|
||||
//-- add
|
||||
//
|
||||
$user->add_lang('portal');
|
||||
//
|
||||
//-- [-] MOD: phpBB3 Portal ---------------------------------------------]]></find>
|
||||
<action type="replace-with"><![CDATA[]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA[// The following assigns all _common_ variables that may be used at any point in a template.]]></find>
|
||||
<action type="before-add"><![CDATA[ $user->add_lang('mods/lang_portal');]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA[ 'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),
|
||||
'S_PORTAL_COPY' => $user->lang['PORTAL_COPY'],]]></find>
|
||||
<action type="replace-with"><![CDATA[]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA['U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),]]></find>
|
||||
<action type="before-add"><![CDATA[ 'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="language/en/acp/common.php">
|
||||
<edit>
|
||||
<find><![CDATA[// phpBB3 Portal by phpbb3portal.com
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_INFO' => 'Portal',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'General',
|
||||
'ACP_PORTAL_ANNOUNCE_INFO' => 'Global announcements',
|
||||
'ACP_PORTAL_NEWS_INFO' => 'News',
|
||||
'ACP_PORTAL_RECENT_INFO' => 'Recent topics',
|
||||
'ACP_PORTAL_WORDGRAPH_INFO' => 'Wordgraph',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'General settings',
|
||||
'ACP_PORTAL_PAYPAL_INFO' => 'Paypal donations',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO' => 'Attachments',
|
||||
'ACP_PORTAL_MEMBERS_INFO' => 'Latest members',
|
||||
'ACP_PORTAL_POLLS_INFO' => 'Poll',
|
||||
'ACP_PORTAL_BOTS_INFO' => 'Last visited bots',
|
||||
'ACP_PORTAL_MOST_POSTER_INFO' => 'Most posters',
|
||||
'ACP_PORTAL_WELCOME_INFO' => 'Welcome message',
|
||||
'ACP_PORTAL_ADS_INFO' => 'Advertisement',
|
||||
'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini calendar',
|
||||
));]]></find>
|
||||
<action type="replace-with"><![CDATA[]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="styles/prosilver/template/overall_header.html">
|
||||
<edit>
|
||||
<find><![CDATA[<a class="icon-home" href="{U_PORTAL}">{L_PORTAL}</a> » <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>]]></find>
|
||||
<action type="replace-with"><![CDATA[<li class="icon-home"><a href="{U_PORTAL}">{L_PORTAL}</a> » <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="styles/prosilver/template/overall_footer.html">
|
||||
<edit>
|
||||
<find><![CDATA[<a class="icon-home" href="{U_PORTAL}">{L_PORTAL}</a> » <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>]]></find>
|
||||
<action type="replace-with"><![CDATA[<li class="icon-home"><a href="{U_PORTAL}">{L_PORTAL}</a> » <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA[<!-- IF S_PORTAL_COPY --><br />{S_PORTAL_COPY}<!-- ENDIF -->]]></find>
|
||||
<action type="replace-with"><![CDATA[]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<diy-instructions lang="en-gb">Browse to install_portal/install.php and run the installer, after successfull installation delete the installer.
|
||||
You may delete the language/en/portal.php and language/en/acp/portal.php which are from the old MOD</diy-instructions>
|
||||
<diy-instructions lang="de">install_portal/install.php aufrufen und ausführen, nach erfolgreicher Installation löschen
|
||||
Du kannst die language/en/portal.php und language/en/acp/portal.php löschen, die sind von der alten MOD</diy-instructions>
|
||||
</action-group>
|
||||
</mod>
|
||||
177
install.xml
Normal file
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
|
||||
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
|
||||
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
|
||||
<header>
|
||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||
<title lang="en-gb">board3 Portal - based on phpBB3 Portal</title>
|
||||
<title lang="de">board3 Portal - basierend auf phpBB3 Portal</title>
|
||||
<description lang="en-gb">Adds a portal to your forum.
|
||||
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
||||
|
||||
Included language files:
|
||||
» English (en)
|
||||
» German (de)
|
||||
|
||||
This portal is based on the phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<description lang="de">Fügt ein Portal deinem Forum hinzu.
|
||||
Es hat diverse Boxen, die über das ACP an- / abgeschaltet und eingestellt werden können.
|
||||
|
||||
Dieses Portal basiert auf dem phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<author-notes lang="en-gb">i hope you get everything working. Further developement, new boxes for the portal or questions are welcome at www.board3.de</author-notes>
|
||||
<author-notes lang="de">Ich hoffe ihr habt Spaß am Portal. Neuen Code, bzw neue Boxen und Fragen könnt ihr auf www.board3.de posten.</author-notes>
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<email>nospam@breest.net</email>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>(N/A)</realname>
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Walter</realname>
|
||||
<email>w.bobeth@digitalfotografie-foren.de</email>
|
||||
<username>Redbull254</username>
|
||||
<homepage>http://www.digitalfotografie-foren.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Sevdin Filiz - original phpBB3 Portal developement</realname>
|
||||
<email></email>
|
||||
<username>angelside</username>
|
||||
<homepage>http://www.phpbb3portal.com</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
</author-group>
|
||||
<mod-version>
|
||||
<major>0</major>
|
||||
<minor>1</minor>
|
||||
<revision>0</revision>
|
||||
</mod-version>
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
<time>600</time>
|
||||
<target-version>
|
||||
<target-primary>3.0.0</target-primary>
|
||||
<target-major allow="exact">3</target-major>
|
||||
<target-minor allow="exact">0</target-minor>
|
||||
</target-version>
|
||||
</installation>
|
||||
<history>
|
||||
<entry>
|
||||
<date>2008-01-15</date>
|
||||
<rev-version>
|
||||
<major>0</major>
|
||||
<minor>1</minor>
|
||||
<revision>0</revision>
|
||||
</rev-version>
|
||||
<changelog lang="en-GB">
|
||||
<change>Changes from "phpBB3 Portal 1.1.0Beta" to "board3 Portal - based on phpBB3 Portal Version 1.0.0":</change>
|
||||
<change>completet all missing ACP Control for several boxes</change>
|
||||
<change>valid XHTML 1.0 Strict template</change>
|
||||
<change>fixed several bugs</change>
|
||||
<change>added several language variables</change>
|
||||
<change>changed the language file path to /en/mods/</change>
|
||||
<change>updatet the install instructions</change>
|
||||
<change>updatet the MySQL installer</change>
|
||||
</changelog>
|
||||
<changelog lang="de">
|
||||
<change>Änderungen von "phpBB3 Portal 1.1.0Beta" zu "board3 Portal - based on phpBB3 Portal Version 1.0.0":</change>
|
||||
<change>Die ACP Verwaltung für diverse Boxen komplettiert</change>
|
||||
<change>valid XHTML 1.0 Strict Template</change>
|
||||
<change>Diverse Bugs gefixt</change>
|
||||
<change>Diverse Sprachvariablen hinzugefügt</change>
|
||||
<change>Pfad für die Sprachdateien ins Mod System integriert</change>
|
||||
<change>Die Installationanweisungen komplett überarbeitet</change>
|
||||
<change>Den MySQL Installer komplett überarbeitet</change>
|
||||
</changelog>
|
||||
</entry>
|
||||
</history>
|
||||
<meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
|
||||
</header>
|
||||
<action-group>
|
||||
<copy>
|
||||
<file from="root/portal.php" to="portal.php" />
|
||||
<file from="root/includes/acp/acp_portal.php" to="includes/acp/acp_portal.php" />
|
||||
<file from="root/includes/acp/info/acp_portal.php" to="includes/acp/info/acp_portal.php" />
|
||||
<file from="root/install_portal/*.*" to="install_portal/*.*" />
|
||||
<file from="root/install_portal/schemas/*.*" to="install_portal/schemas/*.*" />
|
||||
<file from="root/language/en/mods/*.*" to="language/en/mods/*.*" />
|
||||
<file from="root/portal/index.html" to="portal/index.html" />
|
||||
<file from="root/portal/block/*.*" to="portal/block/*.*" />
|
||||
<file from="root/portal/images/*.*" to="portal/images/*.*" />
|
||||
<file from="root/portal/includes/*.*" to="portal/includes/*.*" />
|
||||
<file from="root/portal/includes/mini_cal/*.*" to="portal/includes/mini_cal/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/*.*" to="styles/prosilver/template/portal/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/block/*.*" to="styles/prosilver/template/portal/block/*.*" />
|
||||
<file from="root/styles/prosilver/template/portal/block/donation/*.*" to="styles/prosilver/template/portal/block/donation/*.*" />
|
||||
</copy>
|
||||
<open src=".htaccess">
|
||||
<edit>
|
||||
<find><![CDATA[<Files "common.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
</Files>]]></find>
|
||||
<action type="after-add"><![CDATA[DirectoryIndex portal.php index.php index.html index.htm]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="includes/constants.php">
|
||||
<edit>
|
||||
<find><![CDATA[// Additional tables]]></find>
|
||||
<action type="after-add"><![CDATA[define('PORTAL_CONFIG_TABLE', $table_prefix . 'portal_config');]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="includes/functions.php">
|
||||
<edit>
|
||||
<find><![CDATA[// The following assigns all _common_ variables that may be used at any point in a template.]]></find>
|
||||
<action type="before-add"><![CDATA[ $user->add_lang('mods/lang_portal');]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA['U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),]]></find>
|
||||
<action type="before-add"><![CDATA[ 'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="styles/prosilver/template/overall_header.html">
|
||||
<edit>
|
||||
<find><![CDATA[<div class="navbar">]]></find>
|
||||
<action type="before-add"><![CDATA[<!-- IF not $S_IN_PORTAL -->]]></action>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA[<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a><!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>]]></find>
|
||||
<inline-edit>
|
||||
<inline-find><![CDATA[<li class="icon-home">]]></inline-find>
|
||||
<inline-action type="after-add"><![CDATA[<a href="{U_PORTAL}">{L_PORTAL}</a> » ]]></inline-action>
|
||||
</inline-edit>
|
||||
</edit>
|
||||
<edit>
|
||||
<find><![CDATA[ <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l">{L_LOGIN_LOGOUT}</a></li>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>]]></find>
|
||||
<action type="after-add"><![CDATA[<!-- ENDIF -->]]></action>
|
||||
</edit>
|
||||
</open>
|
||||
<open src="styles/prosilver/template/overall_footer.html">
|
||||
<edit>
|
||||
<find><![CDATA[<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>]]></find>
|
||||
<inline-edit>
|
||||
<inline-find><![CDATA[<li class="icon-home">]]></inline-find>
|
||||
<inline-action type="after-add"><![CDATA[<a href="{U_PORTAL}">{L_PORTAL}</a> » ]]></inline-action>
|
||||
</inline-edit>
|
||||
</edit>
|
||||
</open>
|
||||
<diy-instructions lang="en-gb">Browse to install_portal/install.php and run the installer, after successfull installation delete the installer.</diy-instructions>
|
||||
<diy-instructions lang="de">install_portal/install.php aufrufen und ausführen, nach erfolgreicher Installation löschen</diy-instructions>
|
||||
</action-group>
|
||||
</mod>
|
||||
78
languages/de.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../modx.prosilver.en.xsl"?>
|
||||
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
|
||||
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
|
||||
<header>
|
||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||
<title lang="en-gb">board3 Portal - based on phpBB3 Portal</title>
|
||||
<title lang="de">board3 Portal - basierend auf phpBB3 Portal</title>
|
||||
<description lang="en-gb">Adds a portal to your forum.
|
||||
It has several boxes wich can be turned on an off in the ACP and certain settings.
|
||||
|
||||
Included language files:
|
||||
» English (en)
|
||||
» German (de)
|
||||
|
||||
This portal is based on the phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<description lang="de">Fügt ein Portal deinem Forum hinzu.
|
||||
Es hat diverse Boxen, die über das ACP an- / abgeschaltet und eingestellt werden können.
|
||||
|
||||
Dieses Portal basiert auf dem phpBB3 Portal a.k.a canverPortal ( www.phpbb3portal.com )
|
||||
</description>
|
||||
<author-notes lang="en-gb">i hope you get everything working. Further developement, new boxes for the portal or questions are welcome at www.board3.de</author-notes>
|
||||
<author-notes lang="de">Ich hoffe ihr habt Spaß am Portal. Neuen Code, bzw neue Boxen und Fragen könnt ihr auf www.board3.de posten.</author-notes>
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<email>nospam@breest.net</email>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>(N/A)</realname>
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Walter</realname>
|
||||
<email>w.bobeth@digitalfotografie-foren.de</email>
|
||||
<username>Redbull254</username>
|
||||
<homepage>http://www.digitalfotografie-foren.de</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
<author>
|
||||
<realname>Sevdin Filiz - original phpBB3 Portal developement</realname>
|
||||
<email></email>
|
||||
<username>angelside</username>
|
||||
<homepage>http://www.phpbb3portal.com</homepage>
|
||||
<contributions />
|
||||
</author>
|
||||
</author-group>
|
||||
<mod-version>
|
||||
<major>0</major>
|
||||
<minor>1</minor>
|
||||
<revision>0</revision>
|
||||
</mod-version>
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
<time>600</time>
|
||||
<target-version>
|
||||
<target-primary>3.0.0</target-primary>
|
||||
<target-major allow="exact">3</target-major>
|
||||
<target-minor allow="exact">0</target-minor>
|
||||
</target-version>
|
||||
</installation>
|
||||
<meta name="generator" content="Phpbb.ModTeam.Tools (c#)" />
|
||||
</header>
|
||||
<action-group>
|
||||
<copy>
|
||||
<file from="languages/de/mods/*.*" to="language/de/mods/*.*" />
|
||||
</copy>
|
||||
<diy-instructions lang="en-gb">Browse to install_portal/install.php and run the installer, after successfull installation delete the installer.</diy-instructions>
|
||||
<diy-instructions lang="de">install_portal/install.php aufrufen und ausführen, nach erfolgreicher Installation löschen</diy-instructions>
|
||||
</action-group>
|
||||
</mod>
|
||||
40
languages/de/mods/info_acp_portal.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_INFO' => 'Portal',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'Allgemein',
|
||||
'ACP_PORTAL_ANNOUNCE_INFO' => 'Bekanntmachungen',
|
||||
'ACP_PORTAL_NEWS_INFO' => 'Aktuelle Beiträge',
|
||||
'ACP_PORTAL_RECENT_INFO' => 'Aktuelle Themen',
|
||||
'ACP_PORTAL_WORDGRAPH_INFO' => 'Wordgraph',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'Allgemeine Einstellungen',
|
||||
'ACP_PORTAL_PAYPAL_INFO' => 'Paypal Spenden',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO' => 'Dateianhänge',
|
||||
'ACP_PORTAL_MEMBERS_INFO' => 'Die neuesten Mitglieder',
|
||||
'ACP_PORTAL_POLLS_INFO' => 'Umfragen',
|
||||
'ACP_PORTAL_BOTS_INFO' => 'Die letzten Bots',
|
||||
'ACP_PORTAL_MOST_POSTER_INFO' => 'Die Vielschreiber',
|
||||
'ACP_PORTAL_WELCOME_INFO' => 'Willkommens Nachricht',
|
||||
'ACP_PORTAL_ADS_INFO' => 'Werbung',
|
||||
'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini Kalender',
|
||||
));
|
||||
|
||||
?>
|
||||
232
languages/de/mods/lang_portal.php
Normal file
@@ -0,0 +1,232 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// General
|
||||
'PORTAL' => 'Portal',
|
||||
'WELCOME' => 'Willkommen',
|
||||
|
||||
// news & global announcements
|
||||
'LATEST_ANNOUNCEMENTS' => 'Letzte Bekanntmachung',
|
||||
'LATEST_NEWS' => 'Aktuelle Beiträge',
|
||||
'READ_FULL' => 'alles lesen',
|
||||
'NO_NEWS' => 'Keine neuen Beiträge',
|
||||
'NO_ANNOUNCEMENTS' => 'Keine Bekanntmachung',
|
||||
'POSTED_BY' => 'Autor',
|
||||
'COMMENTS' => 'Antworten',
|
||||
'VIEW_COMMENTS' => 'Antworten anzeigen',
|
||||
'POST_REPLY' => 'Antwort schreiben',
|
||||
'TOPIC_VIEWS' => 'Zugriffe',
|
||||
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
|
||||
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
|
||||
'JUMP_TO_POST' => 'Rufe den Beitrag auf',
|
||||
|
||||
// who is online
|
||||
'WIO_TOTAL' => 'Insgesamt',
|
||||
'WIO_REGISTERED' => 'Registrierte Benutzer',
|
||||
'WIO_HIDDEN' => 'Unsichtbare Benutzer',
|
||||
'WIO_GUEST' => 'Gäste',
|
||||
//'RECORD_ONLINE_USERS'=> 'View record: <strong>%1$s</strong><br />%2$s',
|
||||
|
||||
// user menu
|
||||
'USER_MENU' => 'Benutzer Menü',
|
||||
'UM_LOG_ME_IN' => 'Mich bei jedem Besuch automatisch anmelden',
|
||||
'UM_HIDE_ME' => 'Meinen Online-Status während dieser Sitzung verbergen',
|
||||
'UM_MAIN_SUBSCRIBED'=> 'Benachrichtigungen verwalten',
|
||||
'UM_BOOKMARKS' => 'Lesezeichen verwalten',
|
||||
|
||||
// statistics
|
||||
'ST_TOP' => 'Insgesamt',
|
||||
'ST_TOP_ANNS' => 'Bekanntmachungen insgesamt',
|
||||
'ST_TOP_STICKYS'=> 'Wichtig insgesamt',
|
||||
'ST_TOT_ATTACH' => 'Dateianhänge insgesamt',
|
||||
|
||||
// search
|
||||
'SH' => 'Los',
|
||||
'SH_SITE' => 'Foren',
|
||||
'SH_POSTS' => 'Beiträge',
|
||||
'SH_AUTHOR' => 'Autor',
|
||||
'SH_ENGINE' => 'Suchmaschinen',
|
||||
'SH_ADV' => 'erweiterte Suche',
|
||||
|
||||
// recent
|
||||
'RECENT_NEWS' => 'Aktuelles',
|
||||
'RECENT_TOPIC' => 'Aktuelle Themen',
|
||||
'RECENT_ANN' => 'Aktuelle Bekanntmachungen',
|
||||
'RECENT_HOT_TOPIC' => 'Beliebte Themen',
|
||||
|
||||
// random member
|
||||
'RND_MEMBER' => 'Zufälliges Profil',
|
||||
'RND_JOIN' => 'Registriert',
|
||||
'RND_POSTS' => 'Beiträge',
|
||||
'RND_OCC' => 'Tätigkeit',
|
||||
'RND_FROM' => 'Wohnort',
|
||||
'RND_WWW' => 'Webseite',
|
||||
|
||||
// top poster
|
||||
'TOP_POSTER' => 'Die Vielschreiber',
|
||||
|
||||
// attachments
|
||||
'DOWNLOADS' => 'Downloads',
|
||||
|
||||
// links
|
||||
'LINKS' => 'Links',
|
||||
|
||||
// latest members
|
||||
'LATEST_MEMBERS' => 'Neue Mitglieder',
|
||||
|
||||
// make donation
|
||||
'DONATION' => 'Spenden',
|
||||
'DONATION_TEXT' => 'ist eine Webseite ohne jedes Gewinninteresse. Jeder, der dieses Projekt unterstützen möchte, kann dies mit einer kleinen Spende tun, damit die Rechnungen für den Server, die Domain, etc. bezahlt werden können.',
|
||||
'PAY_MSG' => 'Klicke auf das PayPal Bild, nachdem Du den Betrag, den Du spenden möchtest, aus dem Menü ausgewählt hast.',
|
||||
'PAY_ITEM' => 'Freiwillige Foren Spende',
|
||||
|
||||
// main menu
|
||||
'M_MENU' => 'Menü',
|
||||
'M_CONTENT' => 'Inhalt',
|
||||
'M_ACP' => 'Administrations-Bereich',
|
||||
'M_HELP' => 'Hilfe',
|
||||
'M_BBCODE' => 'BBCode-Anleitung',
|
||||
'M_TERMS' => 'Nutzungsbedingungen',
|
||||
'M_PRV' => 'Datenschutzrichtlinie',
|
||||
'M_SEARCH' => 'Suche',
|
||||
|
||||
// link us
|
||||
'LINK_US' => 'Link zu uns ',
|
||||
'LINK_US_TXT' => 'Benutze bitte diesen Link zum <strong>%s</strong>',
|
||||
|
||||
// friends
|
||||
'FRIENDS' => 'Freunde',
|
||||
'FRIENDS_OFFLINE' => 'Offline',
|
||||
'FRIENDS_ONLINE' => 'Online',
|
||||
'NO_FRIENDS' => 'Derzeit sind keine Freunde definiert',
|
||||
'NO_FRIENDS_OFFLINE' => 'Keine Freunde offline',
|
||||
'NO_FRIENDS_ONLINE' => 'Keine Freunde online',
|
||||
|
||||
// last bots
|
||||
'LAST_VISITED_BOTS' => 'Die letzten %s Bot-Besuche',
|
||||
|
||||
// wordgraph
|
||||
'WORDGRAPH' => 'Wordgraph',
|
||||
|
||||
// change style
|
||||
'BOARD_STYLE' => 'Mein Board-Style',
|
||||
'STYLE_CHOOSE' => 'Wähle einen Style',
|
||||
|
||||
// team
|
||||
'NO_ADMINISTRATORS_P' => 'Keine Administratoren',
|
||||
'NO_MODERATORS_P' => 'Keine Moderatoren',
|
||||
|
||||
// average Statistics
|
||||
'TOPICS_PER_DAY_OTHER' => 'Themen pro Tag: <strong>%d</strong>',
|
||||
'TOPICS_PER_DAY_ZERO' => 'Themen pro Tag: <strong>0</strong>',
|
||||
'POSTS_PER_DAY_OTHER' => 'Beiträge pro Tag: <strong>%d</strong>',
|
||||
'POSTS_PER_DAY_ZERO' => 'Beiträge pro Tag: <strong>0</strong>',
|
||||
'USERS_PER_DAY_OTHER' => 'Benutzer pro Tag: <strong>%d</strong>',
|
||||
'USERS_PER_DAY_ZERO' => 'Benutzer pro Tag: <strong>0</strong>',
|
||||
'TOPICS_PER_USER_OTHER' => 'Themen pro Benutzer: <strong>%d</strong>',
|
||||
'TOPICS_PER_USER_ZERO' => 'Themen pro Benutzer: <strong>0</strong>',
|
||||
'POSTS_PER_USER_OTHER' => 'Beiträge pro Benutzer: <strong>%d</strong>',
|
||||
'POSTS_PER_USER_ZERO' => 'Beiträge pro Benutzer: <strong>0</strong>',
|
||||
'POSTS_PER_TOPIC_OTHER' => 'Beiträge pro Thema: <strong>%d</strong>',
|
||||
'POSTS_PER_TOPIC_ZERO' => 'Beiträge pro Thema: <strong>0</strong>',
|
||||
|
||||
// other
|
||||
'POLL' => 'Umfrage',
|
||||
'CLOCK' => 'Uhr',
|
||||
'SPONSOR' => 'Sponsoren',
|
||||
'PORTAL_COPY' => '<a href="http://www.board3.de" title="board3.de">board3 Portal</a> - based on <a href="http://www.phpbb3portal.com" title="phpBB3 Portal">phpBB3 Portal</a>',
|
||||
)
|
||||
);
|
||||
|
||||
// mini calendar
|
||||
$lang = array_merge($lang, array(
|
||||
'Mini_Cal_calendar' => 'Kalender',
|
||||
'Mini_Cal_add_event' => 'Termin eintragen',
|
||||
'Mini_Cal_events' => 'Kommende Termine',
|
||||
'Mini_Cal_no_events' => 'Keine',
|
||||
'Mini_cal_this_event' => 'Ferientermine',
|
||||
'View_next_month' => 'nächster Monat',
|
||||
'View_previous_month' => 'voriger Monat',
|
||||
|
||||
// uses MySQL DATE_FORMAT - %c long_month, numeric (1..12) - %e Day of the long_month, numeric (0..31)
|
||||
// see http://www.mysql.com/doc/D/a/Date_and_time_functions.html for more details
|
||||
// currently supports: %a, %b, %c, %d, %e, %m, %y, %Y, %H, %k, %h, %l, %i, %s, %p
|
||||
'Mini_Cal_date_format' => '%b %e',
|
||||
'Mini_Cal_date_format_Time' => '%H:%i',
|
||||
|
||||
// if you change the first day of the week in constants.php, you should change values for the short day names accordingly
|
||||
// e.g. FDOW = Sunday -> $lang['mini_cal']['day'][1] = 'Su'; ... $lang['mini_cal']['day'][7] = 'Sa';
|
||||
// FDOW = Monday -> $lang['mini_cal']['day'][1] = 'Mo'; ... $lang['mini_cal']['day'][7] = 'Su';
|
||||
'mini_cal' => array(
|
||||
'day' => array(
|
||||
'1' => 'Mo',
|
||||
'2' => 'Di',
|
||||
'3' => 'Mi',
|
||||
'4' => 'Do',
|
||||
'5' => 'Fr',
|
||||
'6' => 'Sa',
|
||||
'7' => 'So',
|
||||
),
|
||||
|
||||
'month' => array(
|
||||
'1' => 'Jan',
|
||||
'2' => 'Feb',
|
||||
'3' => 'Mär',
|
||||
'4' => 'Apr',
|
||||
'5' => 'Mai',
|
||||
'6' => 'Jun',
|
||||
'7' => 'Jul',
|
||||
'8' => 'Aug',
|
||||
'9' => 'Sep',
|
||||
'10'=> 'Okt',
|
||||
'11'=> 'Nov',
|
||||
'12'=> 'Dez',
|
||||
),
|
||||
|
||||
'long_month'=> array(
|
||||
'1' => 'Januar',
|
||||
'2' => 'Februar',
|
||||
'3' => 'März',
|
||||
'4' => 'April',
|
||||
'5' => 'Mai',
|
||||
'6' => 'Juni',
|
||||
'7' => 'Juli',
|
||||
'8' => 'August',
|
||||
'9' => 'September',
|
||||
'10'=> 'Oktober',
|
||||
'11'=> 'November',
|
||||
'12'=> 'Dezember',
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
?>
|
||||
242
languages/de/mods/lang_portal_acp.php
Normal file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_INFO_SETTINGS' => 'Allgemeine Einstellungen',
|
||||
'ACP_PORTAL_INFO_SETTINGS_EXPLAIN' => 'Danke das du dich für board3 Portal entschieden hast. Auf dieser Seite kannst du dein Portal verwalten. Diese Anzeige gibt dir einen schnellen Überblick über die verschiedenen Portal Einstellungen. Die Links auf der linken Seite dieser Anzeige ermöglichen dir alle Einstellungen, das Portal betreffend, zu kontrollieren.',
|
||||
|
||||
'ACP_PORTAL_SETTINGS' => 'Allgemeine Einstellungen',
|
||||
'ACP_PORTAL_SETTINGS_EXPLAIN' => 'Danke das du dich für board3 Portal entschieden hast. Auf dieser Seite kannst du dein Portal verwalten. Diese Anzeige gibt dir einen schnellen Überblick über die verschiedenen Portal Einstellungen. Die Links auf der linken Seite dieser Anzeige ermöglichen dir alle Einstellungen, das Portal betreffend, zu kontrollieren.',
|
||||
|
||||
// general
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'Portal Administration',
|
||||
'ACP_PORTAL_GENERAL_INFO_EXPLAIN' => 'Danke das du dich für board3 Portal entschieden hast. Auf dieser Seite kannst du dein Portal verwalten. Diese Anzeige gibt dir einen schnellen Überblick über die verschiedenen Portal Einstellungen. Die Links auf der linken Seite dieser Anzeige ermöglichen dir alle Einstellungen, das Portal betreffend, zu kontrollieren.',
|
||||
'ACP_PORTAL_GENERAL_SETTINGS' => 'Allgemeine Einstellungen',
|
||||
'ACP_PORTAL_GENERAL_SETTINGS_EXPLAIN' => 'Hier kannst du die Haupteinstellungen vornehmen.',
|
||||
'PORTAL_ADVANCED_STAT' => 'Erweiterte Statistik',
|
||||
'PORTAL_ADVANCED_STAT_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_LEADERS' => 'Team',
|
||||
'PORTAL_LEADERS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_CLOCK' => 'Uhr',
|
||||
'PORTAL_CLOCK_EXPLAIN' => 'Die Uhr auf dem Portal anzeigen.',
|
||||
'PORTAL_LINK_US' => 'Verlink uns',
|
||||
'PORTAL_LINK_US_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_LINKS' => 'Links',
|
||||
'PORTAL_LINKS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_BIRTHDAYS' => 'Geburtstage',
|
||||
'PORTAL_BIRTHDAYS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_SEARCH' => 'Suche',
|
||||
'PORTAL_SEARCH_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_WELCOME' => 'Willkommen',
|
||||
'PORTAL_WELCOME_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_WHOIS_ONLINE' => 'Wer ist online?',
|
||||
'PORTAL_WHOIS_ONLINE_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_CHANGE_STYLE' => 'Styleswitcher',
|
||||
'PORTAL_CHANGE_STYLE_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.<br /><span style="color:red">Achtung:</span> wenn in den Board Einstellungen "Benutzer-Style überschreiben:" auf "ja" gesetzt wird, wird dieser Block unabängig von diesen Einstellungen <u>nicht angezeigt</u>.',
|
||||
'PORTAL_MAIN_MENU' => 'Hauptmenü',
|
||||
'PORTAL_MAIN_MENU_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_USER_MENU' => 'Benutzermenü / Login Box',
|
||||
'PORTAL_USER_MENU_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
|
||||
|
||||
// random member
|
||||
'PORTAL_RANDOM_MEMBER' => 'Zufälliges Profil',
|
||||
'PORTAL_RANDOM_MEMBER_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
|
||||
// global announcements
|
||||
'ACP_PORTAL_ANNOUNCE_INFO' => 'Bekanntmachungen',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Einstellungen für Bekanntmachungen',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die Bekanntmachungen ändern.',
|
||||
'PORTAL_ANNOUNCEMENTS' => 'Bekanntmachungen anzeigen',
|
||||
'PORTAL_ANNOUNCEMENTS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_ANNOUNCEMENTS_STYLE' => 'Kompakter Bekanntmachungen Block Style',
|
||||
'PORTAL_ANNOUNCEMENTS_STYLE_EXPLAIN' => 'Wenn ja angewählt ist, wird die kompakte Ansicht für die Bekanntmachungen angezeigt, nein ist die große Ansicht.',
|
||||
'PORTAL_NUMBER_OF_ANNOUNCEMENTS' => 'Anzahl der Bekanntmachungen auf dem Portal',
|
||||
'PORTAL_NUMBER_OF_ANNOUNCEMENTS_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_ANNOUNCEMENTS_DAY' => 'Anzahl der Tage, die die Bekanntmachung angezeigt werden soll',
|
||||
'PORTAL_ANNOUNCEMENTS_DAY_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_ANNOUNCEMENTS_LENGTH' => 'Maximal Länge der Bekanntmachungen',
|
||||
'PORTAL_ANNOUNCEMENTS_LENGTH_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' => 'ID des Forums der Bekanntmachungen',
|
||||
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXPLAIN' => 'Die Nummer des Forums, aus dem die Bekanntmachungen angezeigt werden sollen. Frei lassen um aus allen Foren anzeigen zu lassen. Mit Komma trennen wenn mehrere, ausgewählte Foren angezeigt werden soll, z.B. 1,2,5',
|
||||
|
||||
// news
|
||||
'ACP_PORTAL_NEWS_INFO' => 'Aktuelle Beiträge',
|
||||
'ACP_PORTAL_NEWS_SETTINGS' => 'Aktuelle Beiträge Einstellungen',
|
||||
'ACP_PORTAL_NEWS_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die aktuellen Beiträge ändern.',
|
||||
'PORTAL_NEWS' => 'Aktuelle Beiträge anzeigen',
|
||||
'PORTAL_NEWS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_NEWS_STYLE' => 'Kompakter Block Style',
|
||||
'PORTAL_NEWS_STYLE_EXPLAIN' => 'Wenn ja angewählt ist, wird die kompakte Ansicht für die aktuellen Beiträge angezeigt, nein ist die große Ansicht.',
|
||||
'PORTAL_SHOW_ALL_NEWS' => 'Zeige alle Beiträge dieses Forums',
|
||||
'PORTAL_SHOW_ALL_NEWS_EXPLAIN' => 'Inklusive Wichtigen und Bekanntmachungen.',
|
||||
'PORTAL_NUMBER_OF_NEWS' => 'Anzahl der Beiträge auf dem Portal',
|
||||
'PORTAL_NUMBER_OF_NEWS_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_NEWS_LENGTH' => 'Maximal angezeigte Länge der Beiträge',
|
||||
'PORTAL_NEWS_LENGTH_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_NEWS_FORUM' => 'Beiträge Forum ID',
|
||||
'PORTAL_NEWS_FORUM_EXPLAIN' => 'Die Nummer des Forums, aus dem die Beiträge angezeigt werden sollen. Frei lassen um aus allen Foren anzeigen zu lassen. Mit Komma trennen wenn aus mehreren, ausgewählten Foren angezeigt werden soll, z.B. 1,2,5',
|
||||
'PORTAL_EXCLUDE_FORUM' => 'ID der auszuschließenden Foren',
|
||||
'PORTAL_EXCLUDE_FORUM_EXPLAIN' => 'Die Nummer der Foren, aus denen Beiträge nicht angezeigt werden sollen. Frei lassen um aus allen Foren anzeigen zu lassen. Mit Komma trennen wenn mehrere Foren ausgeschlossen werden sollen, z.B. 1,2,5',
|
||||
|
||||
// recent topics
|
||||
'ACP_PORTAL_RECENT_INFO' => 'Neueste Themen',
|
||||
'ACP_PORTAL_RECENT_SETTINGS' => 'Einstellungen für neueste Themen',
|
||||
'ACP_PORTAL_RECENT_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die neuesten Themen ändern.',
|
||||
'PORTAL_RECENT' => 'Neueste Themen Block anzeigen',
|
||||
'PORTAL_RECENT_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_MAX_TOPIC' => 'Anzahl der neuesten Themen auf dem Portal',
|
||||
'PORTAL_MAX_TOPIC_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_RECENT_TITLE_LIMIT' => 'Maximal angezeigte Länge der neuesten Themen',
|
||||
'PORTAL_RECENT_TITLE_LIMIT_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
|
||||
// paypal
|
||||
'ACP_PORTAL_PAYPAL_INFO' => 'Paypal',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS' => 'Paypal Einstellungen',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS_EXPLAIN' => 'Hier kannst du die Paypal Einstellungen ändern.',
|
||||
'PORTAL_PAY_C_BLOCK' => 'Normalen Paypal Block anzeigen',
|
||||
'PORTAL_PAY_C_BLOCK_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_PAY_S_BLOCK' => 'Paypal als kleinen Block anzeigen',
|
||||
'PORTAL_PAY_S_BLOCK_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_PAY_ACC' => 'Paypal Account',
|
||||
'PORTAL_PAY_ACC_EXPLAIN' => 'Gib deine e-mail Adresse an, die du bei Paypal benutzt. Z.B. xxx@xxx.com',
|
||||
|
||||
// last member
|
||||
'ACP_PORTAL_MEMBERS_INFO' => 'Neue Mitglieder',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS' => 'Einstellungen für neue Mitglieder',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für neue Mitglieder ändern.',
|
||||
'PORTAL_LATEST_MEMBERS' => 'Neue Mitglieder Block anzeigen',
|
||||
'PORTAL_LATEST_MEMBERS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_MAX_LAST_MEMBER' => 'Anzahl der anzuzeigenden Mitglieder',
|
||||
'PORTAL_MAX_LAST_MEMBER_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
|
||||
// bots
|
||||
'ACP_PORTAL_BOTS_INFO' => 'Bot Besuche',
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Einstellungen für Bot Besuche',
|
||||
'ACP_PORTAL_BOTS_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für Bot Besuche ändern.',
|
||||
'PORTAL_LOAD_LAST_VISITED_BOTS' => 'Bot Block anzeigen',
|
||||
'PORTAL_LOAD_LAST_VISITED_BOTS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER' => 'Anzahl der anzuzeigenden Bots',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
|
||||
// polls
|
||||
'ACP_PORTAL_POLLS_INFO' => 'Umfrage',
|
||||
'ACP_PORTAL_POLLS_SETTINGS' => 'Einstellungen für Umfragen',
|
||||
'ACP_PORTAL_POLLS_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für Umfragen ändern.',
|
||||
'PORTAL_POLL_TOPIC' => 'Umfragen Block anzeigen',
|
||||
'PORTAL_POLL_TOPIC_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_POLL_TOPIC_ID' => 'Umfragen Topic ID',
|
||||
'PORTAL_POLL_TOPIC_ID_EXPLAIN' => 'Die Nummer des Themas, aus dem die Umfrage angezeigt werden soll. Nur eine Topic ID / Umfrage möglich.',
|
||||
|
||||
// most poster
|
||||
'ACP_PORTAL_MOST_POSTER_INFO' => 'Vielschreiber',
|
||||
'ACP_PORTAL_MOST_POSTER_SETTINGS' => 'Einstellungen für die Vielschreiber',
|
||||
'ACP_PORTAL_MOST_POSTER_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die Vielschreiber ändern.',
|
||||
'PORTAL_TOP_POSTERS' => 'Vielschreiber Block anzeigen',
|
||||
'PORTAL_TOP_POSTERS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_MAX_MOST_POSTER' => 'Anzahl der anzuzeigenden Vielschreiber',
|
||||
'PORTAL_MAX_MOST_POSTER_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
|
||||
// left and right collumn width
|
||||
'ACP_PORTAL_COLLUMN_WIDTH_INFO' => 'Spaltenbreite',
|
||||
'ACP_PORTAL_COLLUMN_WIDTH_SETTINGS' => 'Breiteneinstellung der rechten und linken Spalte',
|
||||
'PORTAL_LEFT_COLLUMN_WIDTH' => 'Breite der linken Spalte',
|
||||
'PORTAL_LEFT_COLLUMN_WIDTH_EXPLAIN' => 'Ändere hier die Breite der linken Spalte in Pixel, empfohlener Wert 180',
|
||||
'PORTAL_RIGHT_COLLUMN_WIDTH' => 'Breite der rechten Spalte',
|
||||
'PORTAL_RIGHT_COLLUMN_WIDTH_EXPLAIN' => 'Ändere hier die Breite der rechten Spalte in Pixel, empfohlener Wert 180',
|
||||
|
||||
// attachments
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO' => 'Dateianhänge',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS' => 'Einstellungen für Dateianhänge',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für Dateianhänge ändern.',
|
||||
'PORTAL_ATTACHMENTS' => 'Dateianhänge Block anzeigen',
|
||||
'PORTAL_ATTACHMENTS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_ATTACHMENTS_NUMBER' => 'Anzahl der anzuzeigenden Dateianhänge',
|
||||
'PORTAL_ATTACHMENTS_NUMBER_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
|
||||
// friends
|
||||
'ACP_PORTAL_FRIENDS_INFO' => 'Freunde',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS' => 'Einstellungen für den Freunde Block',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für den Freunde Block ändern.',
|
||||
'PORTAL_FRIENDS' => 'Freunde Block',
|
||||
'PORTAL_FRIENDS_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS' => 'Limitierung der Anzeige Freunde online',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS_EXPLAIN' => 'Limitiert die Anzeige Freunde online auf den angegebenen Wert.',
|
||||
|
||||
// wordgraph
|
||||
'ACP_PORTAL_WORDGRAPH_INFO' => 'Wordgraph',
|
||||
'ACP_PORTAL_WORDGRAPH_SETTINGS' => 'Wordgraph Einstellungen',
|
||||
'ACP_PORTAL_WORDGRAPH_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für den Wordgraph ändern.',
|
||||
'PORTAL_WORDGRAPH' => 'Wordgraph Block anzeigen',
|
||||
'PORTAL_WORDGRAPH_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_WORDGRAPH_MAX_WORDS' => 'Anzahl der anzuzeigenden Wörter',
|
||||
'PORTAL_WORDGRAPH_MAX_WORDS_EXPLAIN' => '0 bedeutet unbegrenzt',
|
||||
'PORTAL_WORDGRAPH_WORD_COUNTS' => 'Anzeigen wie häufig das Wort vorkommmt',
|
||||
'PORTAL_WORDGRAPH_WORD_COUNTS_EXPLAIN' => 'Zeigt pro Wort an wie häufig es verwendet wurde. Z.B. (25).',
|
||||
'PORTAL_WORDGRAPH_RATIO' => 'Faktor für die Wort Größe',
|
||||
'PORTAL_WORDGRAPH_RATIO_EXPLAIN' => 'Ändere hier den Faktor, der die Größe in Beziehung zur Häufigkeit bestimmt, in dem das Wort vorkommt (Empfohlen=18)',
|
||||
|
||||
// welcome message
|
||||
'ACP_PORTAL_WELCOME_INFO' => 'Wilkommen',
|
||||
'ACP_PORTAL_WELCOME_SETTINGS' => 'Einstellungen für die Willkommens Nachricht',
|
||||
'ACP_PORTAL_WELCOME_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die Willkommens Nachricht ändern.',
|
||||
'PORTAL_WELCOME_INTRO' => 'Willkommens Nachricht',
|
||||
'PORTAL_WELCOME_GUEST' => 'Willkommens Nachricht nur für Gäste?',
|
||||
'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Ändere hier die Willkommens Nachricht (nur Text). Max. 600 Zeichen!',
|
||||
|
||||
// ads
|
||||
'ACP_PORTAL_ADS_INFO' => 'Werbung',
|
||||
'ACP_PORTAL_ADS_SETTINGS' => 'Einstellungen für Werbung',
|
||||
'ACP_PORTAL_ADS_SETTINGS_EXPLAIN' => 'Einstellungen für Werbung und den Werbungscode ändern.',
|
||||
'PORTAL_ADS_SMALL' => 'Kleinen Werbungsblock anzeigen',
|
||||
'PORTAL_ADS_SMALL_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_ADS_SMALL_BOX' => 'Werbungscode',
|
||||
'PORTAL_ADS_SMALL_BOX_EXPLAIN' => 'Ändere den Werbungscode (nur Text). Max. 600 Zeichen!',
|
||||
'PORTAL_ADS_CENTER' => 'Werbungsblock in der Mitte anzeigen',
|
||||
'PORTAL_ADS_CENTER_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_ADS_CENTER_BOX' => 'Werbungscode',
|
||||
'PORTAL_ADS_CENTER_BOX_EXPLAIN' => 'Ändere den Werbungscode (nur Text). Max. 600 Zeichen!',
|
||||
|
||||
// minicalendar
|
||||
'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini Kalender',
|
||||
'ACP_PORTAL_MINICALENDAR_SETTINGS' => 'Einstellungen für den Mini Kalender',
|
||||
'ACP_PORTAL_MINICALENDAR_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für den Mini Kalender ändern.',
|
||||
'PORTAL_MINICALENDAR' => 'Mini Kalender Block anzeigen',
|
||||
'PORTAL_MINICALENDAR_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.',
|
||||
'PORTAL_MINICALENDAR_TODAY_COLOR' => 'Farbe für den aktuellen Tag',
|
||||
'PORTAL_MINICALENDAR_TODAY_COLOR_EXPLAIN' => 'HEX oder Farbennamen sind erlaubt (Englisch!) wie z.B. #FFFFFF für Weiß, oder (englische!) Farbennamen wie z.B. viollet.',
|
||||
'PORTAL_MINICALENDAR_DAY_LINK_COLOR' => 'Linkfarbe für die restlichen Tage',
|
||||
'PORTAL_MINICALENDAR_DAY_LINK_COLOR_EXPLAIN'=> 'HEX oder Farbennamen sind erlaubt (Englisch!) wie z.B. #FFFFFF für Weiß, oder (englische!) Farbennamen wie z.B. viollet.',
|
||||
|
||||
));
|
||||
|
||||
?>
|
||||
69
languages/de/mods/portal_install.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'INSTALLER_CONVERT' => 'Konvertieren',
|
||||
'INSTALLER_CONVERT_MENU' => 'Konvertierung',
|
||||
'INSTALLER_CONVERT_NOTE' => 'Konvertiere MOD zu v%s',
|
||||
'INSTALLER_CONVERT_PREFIX' => 'Präfix der phpBB2-Installation',
|
||||
'INSTALLER_CONVERT_SUCCESSFUL' => 'Konvertierung des MODs zu v%s war erfolgreich.<br />Kopiere nun die Bilder aus den Verzeichnissen album/upload und album/upload/cache aus der phpBB2-Installation in die der phpBB3-Installation.',
|
||||
'INSTALLER_CONVERT_UNSUCCESSFUL' => 'Konvertierung des MODs zu v%s war <strong>nicht</strong> erfolgreich.',
|
||||
'INSTALLER_CONVERT_UNSUCCESSFUL2' => 'Du hast kein Präfix für die phpBB2-Installation eingefügt.',
|
||||
'INSTALLER_CONVERT_WELCOME' => 'Willkommen zur Konvertierung',
|
||||
'INSTALLER_CONVERT_WELCOME_NOTE' => 'Wenn du den MOD konvertierst, kopieren wir die Daten aus deine phpBB2-Installation in die phpBB3-Installation.',
|
||||
|
||||
'INSTALLER_INTRO' => 'Intro',
|
||||
'INSTALLER_INTRO_WELCOME' => 'Willkommen zur MOD-Installation',
|
||||
'INSTALLER_INTRO_WELCOME_NOTE' => 'Bitte wähle aus, was du tun möchtest.',
|
||||
|
||||
'INSTALLER_INSTALL' => 'Installieren',
|
||||
'INSTALLER_INSTALL_MENU' => 'Installation',
|
||||
'INSTALLER_INSTALL_SUCCESSFUL' => 'Installation der MOD v%s war erfolgreich.',
|
||||
'INSTALLER_INSTALL_UNSUCCESSFUL' => 'Installation der MOD v%s war <strong>nicht</strong> erfolgreich.',
|
||||
'INSTALLER_INSTALL_VERSION' => 'Installiere MOD v%s',
|
||||
'INSTALLER_INSTALL_WELCOME' => 'Willkommen zur Installation',
|
||||
'INSTALLER_INSTALL_WELCOME_NOTE' => 'Wenn du den MOD installierst, werden möglicherweise vorhandene Datenbanktabellen mit gleichem Namen gelöscht.',
|
||||
|
||||
'INSTALLER_NEEDS_FOUNDER' => 'Du musst als Gründer eingeloggt sein.',
|
||||
|
||||
'INSTALLER_UPDATE' => 'Update',
|
||||
'INSTALLER_UPDATE_MENU' => 'Updatemenü',
|
||||
'INSTALLER_UPDATE_NOTE' => 'Update MOD von v%s nach v%s',
|
||||
'INSTALLER_UPDATE_SUCCESSFUL' => 'Update der MOD von v%s nach v%s war erfolgreich.',
|
||||
'INSTALLER_UPDATE_UNSUCCESSFUL' => 'Update der MOD von v%s nach v%s war <strong>nicht</strong> erfolgreich.',
|
||||
'INSTALLER_UPDATE_VERSION' => 'Update MOD von v',
|
||||
'INSTALLER_UPDATE_WELCOME' => 'Willkommen zum Update',
|
||||
|
||||
'WARNING' => 'Warnung',
|
||||
));
|
||||
|
||||
?>
|
||||
340
license.txt
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
1735
modx.prosilver.en.xsl
Normal file
360
root/includes/acp/acp_portal.php
Normal file
@@ -0,0 +1,360 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set config value. Creates missing config entry.
|
||||
*/
|
||||
function set_portal_config($config_name, $config_value, $is_dynamic = false)
|
||||
{
|
||||
global $db, $cache, $config;
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_CONFIG_TABLE . "
|
||||
SET config_value = '" . $db->sql_escape($config_value) . "'
|
||||
WHERE config_name = '" . $db->sql_escape($config_name) . "'";
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!$db->sql_affectedrows() && !isset($config[$config_name]))
|
||||
{
|
||||
$sql = 'INSERT INTO ' . PORTAL_CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'config_name' => $config_name,
|
||||
'config_value' => $config_value,
|
||||
'is_dynamic' => ($is_dynamic) ? 1 : 0));
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$config[$config_name] = $config_value;
|
||||
|
||||
if (!$is_dynamic)
|
||||
{
|
||||
$cache->destroy('config');
|
||||
}
|
||||
}
|
||||
|
||||
class acp_portal
|
||||
{
|
||||
var $u_action;
|
||||
var $new_config = array();
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $template;
|
||||
global $config, $portal_config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
// Get portal config
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PORTAL_CONFIG_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$config_name = $row['config_name'];
|
||||
$config_value = $row['config_value'];
|
||||
$config[$config_name] = $config_value;
|
||||
}
|
||||
|
||||
$user->add_lang('mods/lang_portal_acp');
|
||||
|
||||
$action = request_var('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
/**
|
||||
* Validation types are:
|
||||
* string, int, bool,
|
||||
* script_path (absolute path in url - beginning with / and no trailing slash),
|
||||
* rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable)
|
||||
*/
|
||||
switch ($mode)
|
||||
{
|
||||
case 'general':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_GENERAL_INFO',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_GENERAL_SETTINGS',
|
||||
'portal_advanced_stat' => array('lang' => 'PORTAL_ADVANCED_STAT' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_search' => array('lang' => 'PORTAL_SEARCH' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_leaders' => array('lang' => 'PORTAL_LEADERS' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_clock' => array('lang' => 'PORTAL_CLOCK' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_link_us' => array('lang' => 'PORTAL_LINK_US' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_links' => array('lang' => 'PORTAL_LINKS' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_birthdays' => array('lang' => 'PORTAL_BIRTHDAYS' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_random_member' => array('lang' => 'PORTAL_RANDOM_MEMBER' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_whois_online' => array('lang' => 'PORTAL_WHOIS_ONLINE' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
//'portal_change_style' => array('lang' => 'PORTAL_CHANGE_STYLE' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_main_menu' => array('lang' => 'PORTAL_MAIN_MENU' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_user_menu' => array('lang' => 'PORTAL_USER_MENU' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_friends' => array('lang' => 'PORTAL_FRIENDS' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
|
||||
'portal_max_online_friends' => array('lang' => 'PORTAL_MAX_ONLINE_FRIENDS' , 'validate' => 'int' , 'type' => 'text:3:3' , 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_PORTAL_COLLUMN_WIDTH_SETTINGS',
|
||||
'portal_left_collumn_width' => array('lang' => 'PORTAL_LEFT_COLLUMN_WIDTH' , 'validate' => 'int' , 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_right_collumn_width' => array('lang' => 'PORTAL_RIGHT_COLLUMN_WIDTH' , 'validate' => 'int' , 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'news':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_NEWS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_NEWS_SETTINGS',
|
||||
'portal_news' => array('lang' => 'PORTAL_NEWS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_news_style' => array('lang' => 'PORTAL_NEWS_STYLE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_show_all_news' => array('lang' => 'PORTAL_SHOW_ALL_NEWS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_number_of_news' => array('lang' => 'PORTAL_NUMBER_OF_NEWS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_news_length' => array('lang' => 'PORTAL_NEWS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_news_forum' => array('lang' => 'PORTAL_NEWS_FORUM' , 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'announcements':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
|
||||
'portal_announcements' => array('lang' => 'PORTAL_ANNOUNCEMENTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_announcements_style' => array('lang' => 'PORTAL_ANNOUNCEMENTS_STYLE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_number_of_announcements' => array('lang' => 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_announcements_day' => array('lang' => 'PORTAL_ANNOUNCEMENTS_DAY' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_announcements_length' => array('lang' => 'PORTAL_ANNOUNCEMENTS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_global_announcements_forum' => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM', 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'recent':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_RECENT_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_RECENT_SETTINGS',
|
||||
'portal_recent' => array('lang' => 'PORTAL_RECENT' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_max_topics' => array('lang' => 'PORTAL_MAX_TOPIC' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_recent_title_limit' => array('lang' => 'PORTAL_RECENT_TITLE_LIMIT' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_exclude_forums' => array('lang' => 'PORTAL_EXCLUDE_FORUM' , 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'wordgraph':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_WORDGRAPH_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_WORDGRAPH_SETTINGS',
|
||||
'portal_wordgraph' => array('lang' => 'PORTAL_WORDGRAPH' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_wordgraph_max_words' => array('lang' => 'PORTAL_WORDGRAPH_MAX_WORDS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
'portal_wordgraph_word_counts' => array('lang' => 'PORTAL_WORDGRAPH_WORD_COUNTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_wordgraph_ratio' => array('lang' => 'PORTAL_WORDGRAPH_RATIO' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'paypal':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_PAYPAL_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend2' => 'ACP_PORTAL_PAYPAL_SETTINGS',
|
||||
'portal_pay_c_block' => array('lang' => 'PORTAL_PAY_C_BLOCK' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_pay_s_block' => array('lang' => 'PORTAL_PAY_S_BLOCK' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_pay_acc' => array('lang' => 'PORTAL_PAY_ACC' , 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'attachments':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS',
|
||||
'portal_attachments' => array('lang' => 'PORTAL_ATTACHMENTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_attachments_number' => array('lang' => 'PORTAL_ATTACHMENTS_NUMBER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'members':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_MEMBERS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_MEMBERS_SETTINGS',
|
||||
'portal_latest_members' => array('lang' => 'PORTAL_LATEST_MEMBERS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_max_last_member' => array('lang' => 'PORTAL_MAX_LAST_MEMBER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'polls':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_POLLS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_POLLS_SETTINGS',
|
||||
'portal_poll_topic' => array('lang' => 'PORTAL_POLL_TOPIC' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_poll_topic_id' => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'text:10:200', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'bots':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_BOTS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_BOTS_SETTINGS',
|
||||
'portal_load_last_visited_bots' => array('lang' => 'PORTAL_LOAD_LAST_VISITED_BOTS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_last_visited_bots_number' => array('lang' => 'PORTAL_LAST_VISITED_BOTS_NUMBER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'poster':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_MOST_POSTER_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_MOST_POSTER_SETTINGS',
|
||||
'portal_top_posters' => array('lang' => 'PORTAL_TOP_POSTERS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_max_most_poster' => array('lang' => 'PORTAL_MAX_MOST_POSTER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'welcome':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_WELCOME_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_WELCOME_SETTINGS',
|
||||
'portal_welcome' => array('lang' => 'PORTAL_WELCOME' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_welcome_guest' => array('lang' => 'PORTAL_WELCOME_GUEST' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_welcome_intro' => array('lang' => 'PORTAL_WELCOME_INTRO' , 'validate' => 'string', 'type' => 'textarea:6:6', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
/*
|
||||
case 'ads':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_ADS_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_ADS_SETTINGS',
|
||||
'portal_ads_small' => array('lang' => 'PORTAL_ADS_SMALL' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
//'portal_ads_small_box' => array('lang' => 'PORTAL_ADS_SMALL_BOX' , 'validate' => 'string', 'type' => 'textarea:8:8', 'explain' => true),
|
||||
'portal_ads_center' => array('lang' => 'PORTAL_ADS_CENTER' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
//'portal_ads_center_box' => array('lang' => 'PORTAL_ADS_CENTER_BOX' , 'validate' => 'string', 'type' => 'textarea:8:8', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
*/
|
||||
case 'minicalendar':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_PORTAL_MINICALENDAR_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_MINICALENDAR_SETTINGS',
|
||||
'portal_minicalendar' => array('lang' => 'PORTAL_MINICALENDAR' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'portal_minicalendar_today_color' => array('lang' => 'PORTAL_MINICALENDAR_TODAY_COLOR' , 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
|
||||
'portal_minicalendar_day_link_color' => array('lang' => 'PORTAL_MINICALENDAR_DAY_LINK_COLOR' , 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
default:
|
||||
trigger_error('NO_MODE', E_USER_ERROR);
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($display_vars['lang']))
|
||||
{
|
||||
$user->add_lang($display_vars['lang']);
|
||||
}
|
||||
|
||||
$this->new_config = $config;
|
||||
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
|
||||
$error = array();
|
||||
|
||||
// We validate the complete config if whished
|
||||
validate_config_vars($display_vars['vars'], $cfg_array, $error);
|
||||
|
||||
// Do not write values if there is an error
|
||||
if (sizeof($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
|
||||
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
||||
foreach ($display_vars['vars'] as $config_name => $null)
|
||||
{
|
||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
||||
|
||||
if ($config_name == 'email_function_name')
|
||||
{
|
||||
$this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
|
||||
$this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
|
||||
$config_value = $this->new_config['email_function_name'];
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
set_portal_config($config_name, $config_value);
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_board';
|
||||
$this->page_title = $display_vars['title'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang[$display_vars['title']],
|
||||
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
|
||||
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'ERROR_MSG' => implode('<br />', $error),
|
||||
|
||||
'U_ACTION' => $this->u_action)
|
||||
);
|
||||
|
||||
// Output relevant page
|
||||
foreach ($display_vars['vars'] as $config_key => $vars)
|
||||
{
|
||||
if (!is_array($vars) && strpos($config_key, 'legend') === false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($config_key, 'legend') !== false)
|
||||
{
|
||||
$template->assign_block_vars('options', array(
|
||||
'S_LEGEND' => true,
|
||||
'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = explode(':', $vars['type']);
|
||||
|
||||
$l_explain = '';
|
||||
if ($vars['explain'] && isset($vars['lang_explain']))
|
||||
{
|
||||
$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
|
||||
}
|
||||
else if ($vars['explain'])
|
||||
{
|
||||
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
|
||||
}
|
||||
|
||||
$template->assign_block_vars('options', array(
|
||||
'KEY' => $config_key,
|
||||
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
|
||||
'S_EXPLAIN' => $vars['explain'],
|
||||
'TITLE_EXPLAIN' => $l_explain,
|
||||
'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars),
|
||||
)
|
||||
);
|
||||
unset($display_vars['vars'][$config_key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
43
root/includes/acp/info/acp_portal.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class acp_portal_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_portal',
|
||||
'title' => 'ACP_PORTAL_INFO',
|
||||
'version' => '0.1.0',
|
||||
'modes' => array(
|
||||
'general' => array('title' => 'ACP_PORTAL_GENERAL_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'news' => array('title' => 'ACP_PORTAL_NEWS_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'announcements' => array('title' => 'ACP_PORTAL_ANNOUNCE_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'welcome' => array('title' => 'ACP_PORTAL_WELCOME_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'recent' => array('title' => 'ACP_PORTAL_RECENT_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'wordgraph' => array('title' => 'ACP_PORTAL_WORDGRAPH_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'paypal' => array('title' => 'ACP_PORTAL_PAYPAL_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'attachments' => array('title' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'members' => array('title' => 'ACP_PORTAL_MEMBERS_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'polls' => array('title' => 'ACP_PORTAL_POLLS_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'bots' => array('title' => 'ACP_PORTAL_BOTS_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'poster' => array('title' => 'ACP_PORTAL_MOST_POSTER_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
//'ads' => array('title' => 'ACP_PORTAL_ADS_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'minicalendar' => array('title' => 'ACP_PORTAL_MINICALENDAR_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
954
root/install_portal/create_schema_files.php
Normal file
@@ -0,0 +1,954 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpbb3f1webtipp
|
||||
* $LastChangedDate$
|
||||
* $LastChangedBy$
|
||||
* $Id$
|
||||
* $Revision$
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
* This file creates new schema files for every database.
|
||||
* The filenames will be prefixed with an underscore to not overwrite the current schema files.
|
||||
*
|
||||
* If you overwrite the original schema files please make sure you save the file with UNIX linefeeds.
|
||||
*/
|
||||
|
||||
//die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
$schema_path = './schemas/';
|
||||
|
||||
if (!is_writable($schema_path))
|
||||
{
|
||||
die('Schema path not writable');
|
||||
}
|
||||
|
||||
$schema_data = get_schema_struct();
|
||||
$dbms_type_map = array(
|
||||
'mysql_41' => array(
|
||||
'INT:' => 'int(%d)',
|
||||
'BINT' => 'bigint(20)',
|
||||
'UINT' => 'mediumint(8) UNSIGNED',
|
||||
'UINT:' => 'int(%d) UNSIGNED',
|
||||
'TINT:' => 'tinyint(%d)',
|
||||
'USINT' => 'smallint(4) UNSIGNED',
|
||||
'BOOL' => 'tinyint(1) UNSIGNED',
|
||||
'VCHAR' => 'varchar(255)',
|
||||
'VCHAR:' => 'varchar(%d)',
|
||||
'CHAR:' => 'char(%d)',
|
||||
'XSTEXT' => 'text',
|
||||
'XSTEXT_UNI'=> 'varchar(100)',
|
||||
'STEXT' => 'text',
|
||||
'STEXT_UNI' => 'varchar(255)',
|
||||
'TEXT' => 'text',
|
||||
'TEXT_UNI' => 'text',
|
||||
'MTEXT' => 'mediumtext',
|
||||
'MTEXT_UNI' => 'mediumtext',
|
||||
'TIMESTAMP' => 'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar(255)',
|
||||
'VARBINARY' => 'varbinary(255)',
|
||||
),
|
||||
|
||||
'mysql_40' => array(
|
||||
'INT:' => 'int(%d)',
|
||||
'BINT' => 'bigint(20)',
|
||||
'UINT' => 'mediumint(8) UNSIGNED',
|
||||
'UINT:' => 'int(%d) UNSIGNED',
|
||||
'TINT:' => 'tinyint(%d)',
|
||||
'USINT' => 'smallint(4) UNSIGNED',
|
||||
'BOOL' => 'tinyint(1) UNSIGNED',
|
||||
'VCHAR' => 'varbinary(255)',
|
||||
'VCHAR:' => 'varbinary(%d)',
|
||||
'CHAR:' => 'binary(%d)',
|
||||
'XSTEXT' => 'blob',
|
||||
'XSTEXT_UNI'=> 'blob',
|
||||
'STEXT' => 'blob',
|
||||
'STEXT_UNI' => 'blob',
|
||||
'TEXT' => 'blob',
|
||||
'TEXT_UNI' => 'blob',
|
||||
'MTEXT' => 'mediumblob',
|
||||
'MTEXT_UNI' => 'mediumblob',
|
||||
'TIMESTAMP' => 'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'blob',
|
||||
'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
|
||||
'VCHAR_CI' => 'blob',
|
||||
'VARBINARY' => 'varbinary(255)',
|
||||
),
|
||||
|
||||
'firebird' => array(
|
||||
'INT:' => 'INTEGER',
|
||||
'BINT' => 'DOUBLE PRECISION',
|
||||
'UINT' => 'INTEGER',
|
||||
'UINT:' => 'INTEGER',
|
||||
'TINT:' => 'INTEGER',
|
||||
'USINT' => 'INTEGER',
|
||||
'BOOL' => 'INTEGER',
|
||||
'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
|
||||
'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
|
||||
'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
|
||||
'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
|
||||
'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
|
||||
'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
|
||||
'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
|
||||
'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
|
||||
'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
|
||||
'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
|
||||
'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
|
||||
'TIMESTAMP' => 'INTEGER',
|
||||
'DECIMAL' => 'DOUBLE PRECISION',
|
||||
'DECIMAL:' => 'DOUBLE PRECISION',
|
||||
'PDECIMAL' => 'DOUBLE PRECISION',
|
||||
'PDECIMAL:' => 'DOUBLE PRECISION',
|
||||
'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
|
||||
'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
|
||||
'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
|
||||
'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
|
||||
),
|
||||
|
||||
'mssql' => array(
|
||||
'INT:' => '[int]',
|
||||
'BINT' => '[float]',
|
||||
'UINT' => '[int]',
|
||||
'UINT:' => '[int]',
|
||||
'TINT:' => '[int]',
|
||||
'USINT' => '[int]',
|
||||
'BOOL' => '[int]',
|
||||
'VCHAR' => '[varchar] (255)',
|
||||
'VCHAR:' => '[varchar] (%d)',
|
||||
'CHAR:' => '[char] (%d)',
|
||||
'XSTEXT' => '[varchar] (1000)',
|
||||
'STEXT' => '[varchar] (3000)',
|
||||
'TEXT' => '[varchar] (8000)',
|
||||
'MTEXT' => '[text]',
|
||||
'XSTEXT_UNI'=> '[varchar] (100)',
|
||||
'STEXT_UNI' => '[varchar] (255)',
|
||||
'TEXT_UNI' => '[varchar] (4000)',
|
||||
'MTEXT_UNI' => '[text]',
|
||||
'TIMESTAMP' => '[int]',
|
||||
'DECIMAL' => '[float]',
|
||||
'DECIMAL:' => '[float]',
|
||||
'PDECIMAL' => '[float]',
|
||||
'PDECIMAL:' => '[float]',
|
||||
'VCHAR_UNI' => '[varchar] (255)',
|
||||
'VCHAR_UNI:'=> '[varchar] (%d)',
|
||||
'VCHAR_CI' => '[varchar] (255)',
|
||||
'VARBINARY' => '[varchar] (255)',
|
||||
),
|
||||
|
||||
'oracle' => array(
|
||||
'INT:' => 'number(%d)',
|
||||
'BINT' => 'number(20)',
|
||||
'UINT' => 'number(8)',
|
||||
'UINT:' => 'number(%d)',
|
||||
'TINT:' => 'number(%d)',
|
||||
'USINT' => 'number(4)',
|
||||
'BOOL' => 'number(1)',
|
||||
'VCHAR' => 'varchar2(255)',
|
||||
'VCHAR:' => 'varchar2(%d)',
|
||||
'CHAR:' => 'char(%d)',
|
||||
'XSTEXT' => 'varchar2(1000)',
|
||||
'STEXT' => 'varchar2(3000)',
|
||||
'TEXT' => 'clob',
|
||||
'MTEXT' => 'clob',
|
||||
'XSTEXT_UNI'=> 'varchar2(300)',
|
||||
'STEXT_UNI' => 'varchar2(765)',
|
||||
'TEXT_UNI' => 'clob',
|
||||
'MTEXT_UNI' => 'clob',
|
||||
'TIMESTAMP' => 'number(11)',
|
||||
'DECIMAL' => 'number(5, 2)',
|
||||
'DECIMAL:' => 'number(%d, 2)',
|
||||
'PDECIMAL' => 'number(6, 3)',
|
||||
'PDECIMAL:' => 'number(%d, 3)',
|
||||
'VCHAR_UNI' => 'varchar2(765)',
|
||||
'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
|
||||
'VCHAR_CI' => 'varchar2(255)',
|
||||
'VARBINARY' => 'raw(255)',
|
||||
),
|
||||
|
||||
'sqlite' => array(
|
||||
'INT:' => 'int(%d)',
|
||||
'BINT' => 'bigint(20)',
|
||||
'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
|
||||
'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
|
||||
'TINT:' => 'tinyint(%d)',
|
||||
'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
|
||||
'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
|
||||
'VCHAR' => 'varchar(255)',
|
||||
'VCHAR:' => 'varchar(%d)',
|
||||
'CHAR:' => 'char(%d)',
|
||||
'XSTEXT' => 'text(65535)',
|
||||
'STEXT' => 'text(65535)',
|
||||
'TEXT' => 'text(65535)',
|
||||
'MTEXT' => 'mediumtext(16777215)',
|
||||
'XSTEXT_UNI'=> 'text(65535)',
|
||||
'STEXT_UNI' => 'text(65535)',
|
||||
'TEXT_UNI' => 'text(65535)',
|
||||
'MTEXT_UNI' => 'mediumtext(16777215)',
|
||||
'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar(255)',
|
||||
'VARBINARY' => 'blob',
|
||||
),
|
||||
|
||||
'postgres' => array(
|
||||
'INT:' => 'INT4',
|
||||
'BINT' => 'INT8',
|
||||
'UINT' => 'INT4', // unsigned
|
||||
'UINT:' => 'INT4', // unsigned
|
||||
'USINT' => 'INT2', // unsigned
|
||||
'BOOL' => 'INT2', // unsigned
|
||||
'TINT:' => 'INT2',
|
||||
'VCHAR' => 'varchar(255)',
|
||||
'VCHAR:' => 'varchar(%d)',
|
||||
'CHAR:' => 'char(%d)',
|
||||
'XSTEXT' => 'varchar(1000)',
|
||||
'STEXT' => 'varchar(3000)',
|
||||
'TEXT' => 'varchar(8000)',
|
||||
'MTEXT' => 'TEXT',
|
||||
'XSTEXT_UNI'=> 'varchar(100)',
|
||||
'STEXT_UNI' => 'varchar(255)',
|
||||
'TEXT_UNI' => 'varchar(4000)',
|
||||
'MTEXT_UNI' => 'TEXT',
|
||||
'TIMESTAMP' => 'INT4', // unsigned
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar_ci',
|
||||
'VARBINARY' => 'bytea',
|
||||
),
|
||||
);
|
||||
|
||||
// A list of types being unsigned for better reference in some db's
|
||||
$unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
|
||||
$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
|
||||
|
||||
foreach ($supported_dbms as $dbms)
|
||||
{
|
||||
$fp = fopen($schema_path . '_' . $dbms . '_schema.sql', 'wt');
|
||||
|
||||
$line = '';
|
||||
|
||||
// Write Header
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
$line .= custom_data('firebird') . "\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
$line .= "BEGIN TRANSACTION;\n\n";
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
$line .= "BEGIN TRANSACTION\nGO\n\n";
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
$line .= custom_data('oracle') . "\n";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
$line .= "BEGIN;\n\n";
|
||||
$line .= custom_data('postgres') . "\n";
|
||||
break;
|
||||
}
|
||||
|
||||
fwrite($fp, $line);
|
||||
|
||||
foreach ($schema_data as $table_name => $table_data)
|
||||
{
|
||||
// Write comment about table
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
case 'firebird':
|
||||
case 'sqlite':
|
||||
fwrite($fp, "# Table: '{$table_name}'\n");
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'oracle':
|
||||
case 'postgres':
|
||||
fwrite($fp, "/*\n\tTable: '{$table_name}'\n*/\n");
|
||||
break;
|
||||
}
|
||||
|
||||
// Create Table statement
|
||||
$generator = $textimage = false;
|
||||
$line = '';
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
case 'firebird':
|
||||
case 'oracle':
|
||||
case 'sqlite':
|
||||
case 'postgres':
|
||||
$line = "CREATE TABLE {$table_name} (\n";
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line = "CREATE TABLE [{$table_name}] (\n";
|
||||
break;
|
||||
}
|
||||
|
||||
// Table specific so we don't get overlap
|
||||
$modded_array = array();
|
||||
|
||||
// Write columns one by one...
|
||||
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
|
||||
{
|
||||
// Get type
|
||||
if (strpos($column_data[0], ':') !== false)
|
||||
{
|
||||
list($orig_column_type, $column_length) = explode(':', $column_data[0]);
|
||||
if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
|
||||
{
|
||||
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
|
||||
{
|
||||
switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
|
||||
{
|
||||
case 'div':
|
||||
$column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
|
||||
$column_length = ceil($column_length);
|
||||
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
|
||||
{
|
||||
switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
|
||||
{
|
||||
case 'mult':
|
||||
$column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
|
||||
if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
|
||||
{
|
||||
$column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
|
||||
$modded_array[$column_name] = $column_type;
|
||||
}
|
||||
else
|
||||
{
|
||||
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$orig_column_type .= ':';
|
||||
}
|
||||
else
|
||||
{
|
||||
$orig_column_type = $column_data[0];
|
||||
$column_type = $dbms_type_map[$dbms][$column_data[0]];
|
||||
if ($column_type == 'text' || $column_type == 'blob')
|
||||
{
|
||||
$modded_array[$column_name] = $column_type;
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust default value if db-dependant specified
|
||||
if (is_array($column_data[1]))
|
||||
{
|
||||
$column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default'];
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
$line .= "\t{$column_name} {$column_type} ";
|
||||
|
||||
// For hexadecimal values do not use single quotes
|
||||
if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
|
||||
{
|
||||
$line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
|
||||
}
|
||||
$line .= 'NOT NULL';
|
||||
|
||||
if (isset($column_data[2]))
|
||||
{
|
||||
if ($column_data[2] == 'auto_increment')
|
||||
{
|
||||
$line .= ' auto_increment';
|
||||
}
|
||||
else if ($dbms === 'mysql_41' && $column_data[2] == 'true_sort')
|
||||
{
|
||||
$line .= ' COLLATE utf8_unicode_ci';
|
||||
}
|
||||
}
|
||||
|
||||
$line .= ",\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$line .= "\t{$column_name} INTEGER PRIMARY KEY ";
|
||||
$generator = $column_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$line .= "\t{$column_name} {$column_type} ";
|
||||
}
|
||||
|
||||
$line .= 'NOT NULL ';
|
||||
$line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
|
||||
$line .= ",\n";
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$line .= "\t{$column_name} {$column_type} ";
|
||||
|
||||
if (!is_null($column_data[1]))
|
||||
{
|
||||
$line .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
|
||||
}
|
||||
|
||||
$line .= 'NOT NULL';
|
||||
|
||||
// This is a UNICODE column and thus should be given it's fair share
|
||||
if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
|
||||
{
|
||||
$line .= ' COLLATE UNICODE';
|
||||
}
|
||||
|
||||
$line .= ",\n";
|
||||
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$generator = $column_name;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
if ($column_type == '[text]')
|
||||
{
|
||||
$textimage = true;
|
||||
}
|
||||
|
||||
$line .= "\t[{$column_name}] {$column_type} ";
|
||||
|
||||
if (!is_null($column_data[1]))
|
||||
{
|
||||
// For hexadecimal values do not use single quotes
|
||||
if (strpos($column_data[1], '0x') === 0)
|
||||
{
|
||||
$line .= 'DEFAULT (' . $column_data[1] . ') ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$line .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$line .= 'IDENTITY (1, 1) ';
|
||||
}
|
||||
|
||||
$line .= 'NOT NULL';
|
||||
$line .= " ,\n";
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$line .= "\t{$column_name} {$column_type} ";
|
||||
$line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
|
||||
|
||||
// In Oracle empty strings ('') are treated as NULL.
|
||||
// Therefore in oracle we allow NULL's for all DEFAULT '' entries
|
||||
$line .= ($column_data[1] === '') ? ",\n" : "NOT NULL,\n";
|
||||
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$generator = $column_name;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$line .= "\t{$column_name} {$column_type} ";
|
||||
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$line .= "DEFAULT nextval('{$table_name}_seq'),\n";
|
||||
|
||||
// Make sure the sequence will be created before creating the table
|
||||
$line = "CREATE SEQUENCE {$table_name}_seq;\n\n" . $line;
|
||||
}
|
||||
else
|
||||
{
|
||||
$line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
|
||||
$line .= "NOT NULL";
|
||||
|
||||
// Unsigned? Then add a CHECK contraint
|
||||
if (in_array($orig_column_type, $unsigned_types))
|
||||
{
|
||||
$line .= " CHECK ({$column_name} >= 0)";
|
||||
}
|
||||
|
||||
$line .= ",\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'firebird':
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n);;\n\n";
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n) ON [PRIMARY]" . (($textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '') . "\n";
|
||||
$line .= "GO\n\n";
|
||||
break;
|
||||
}
|
||||
|
||||
// Write primary key
|
||||
if (isset($table_data['PRIMARY_KEY']))
|
||||
{
|
||||
if (!is_array($table_data['PRIMARY_KEY']))
|
||||
{
|
||||
$table_data['PRIMARY_KEY'] = array($table_data['PRIMARY_KEY']);
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
case 'postgres':
|
||||
$line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$line .= "ALTER TABLE {$table_name} ADD PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ");;\n\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
if ($generator === false || !in_array($generator, $table_data['PRIMARY_KEY']))
|
||||
{
|
||||
$line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line .= "ALTER TABLE [{$table_name}] WITH NOCHECK ADD \n";
|
||||
$line .= "\tCONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED \n";
|
||||
$line .= "\t(\n";
|
||||
$line .= "\t\t[" . implode("],\n\t\t[", $table_data['PRIMARY_KEY']) . "]\n";
|
||||
$line .= "\t) ON [PRIMARY] \n";
|
||||
$line .= "GO\n\n";
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$line .= "\tCONSTRAINT pk_{$table_name} PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'oracle':
|
||||
// UNIQUE contrains to be added?
|
||||
if (isset($table_data['KEYS']))
|
||||
{
|
||||
foreach ($table_data['KEYS'] as $key_name => $key_data)
|
||||
{
|
||||
if (!is_array($key_data[1]))
|
||||
{
|
||||
$key_data[1] = array($key_data[1]);
|
||||
}
|
||||
|
||||
if ($key_data[0] == 'UNIQUE')
|
||||
{
|
||||
$line .= "\tCONSTRAINT u_phpbb_{$key_name} UNIQUE (" . implode(', ', $key_data[1]) . "),\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n)\n/\n\n";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n);\n\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n);\n\n";
|
||||
break;
|
||||
}
|
||||
|
||||
// Write Keys
|
||||
if (isset($table_data['KEYS']))
|
||||
{
|
||||
foreach ($table_data['KEYS'] as $key_name => $key_data)
|
||||
{
|
||||
if (!is_array($key_data[1]))
|
||||
{
|
||||
$key_data[1] = array($key_data[1]);
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
$line .= ($key_data[0] == 'INDEX') ? "\tKEY" : '';
|
||||
$line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : '';
|
||||
foreach ($key_data[1] as $key => $col_name)
|
||||
{
|
||||
if (isset($modded_array[$col_name]))
|
||||
{
|
||||
switch ($modded_array[$col_name])
|
||||
{
|
||||
case 'text':
|
||||
case 'blob':
|
||||
$key_data[1][$key] = $col_name . '(255)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n";
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
$line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
|
||||
|
||||
$line .= ' ' . $table_name . '_' . $key_name . ' ON ' . $table_name . '(' . implode(', ', $key_data[1]) . ");;\n";
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
$line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
|
||||
$line .= " [{$key_name}] ON [{$table_name}]([" . implode('], [', $key_data[1]) . "]) ON [PRIMARY]\n";
|
||||
$line .= "GO\n\n";
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
if ($key_data[0] == 'UNIQUE')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
|
||||
$line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ")\n";
|
||||
$line .= "/\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
$line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
|
||||
|
||||
$line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
$line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
|
||||
|
||||
$line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n);\n\n";
|
||||
break;
|
||||
|
||||
case 'mysql_41':
|
||||
// Remove last line delimiter...
|
||||
$line = substr($line, 0, -2);
|
||||
$line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;\n\n";
|
||||
break;
|
||||
|
||||
// Create Generator
|
||||
case 'firebird':
|
||||
if ($generator !== false)
|
||||
{
|
||||
$line .= "\nCREATE GENERATOR {$table_name}_gen;;\n";
|
||||
$line .= 'SET GENERATOR ' . $table_name . "_gen TO 0;;\n\n";
|
||||
|
||||
$line .= 'CREATE TRIGGER t_' . $table_name . ' FOR ' . $table_name . "\n";
|
||||
$line .= "BEFORE INSERT\nAS\nBEGIN\n";
|
||||
$line .= "\tNEW.{$generator} = GEN_ID({$table_name}_gen, 1);\nEND;;\n\n";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
if ($generator !== false)
|
||||
{
|
||||
$line .= "\nCREATE SEQUENCE {$table_name}_seq\n/\n\n";
|
||||
|
||||
$line .= "CREATE OR REPLACE TRIGGER t_{$table_name}\n";
|
||||
$line .= "BEFORE INSERT ON {$table_name}\n";
|
||||
$line .= "FOR EACH ROW WHEN (\n";
|
||||
$line .= "\tnew.{$generator} IS NULL OR new.{$generator} = 0\n";
|
||||
$line .= ")\nBEGIN\n";
|
||||
$line .= "\tSELECT {$table_name}_seq.nextval\n";
|
||||
$line .= "\tINTO :new.{$generator}\n";
|
||||
$line .= "\tFROM dual;\nEND;\n/\n\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
fwrite($fp, $line . "\n");
|
||||
}
|
||||
|
||||
$line = '';
|
||||
|
||||
// Write custom function at the end for some db's
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mssql':
|
||||
$line = "\nCOMMIT\nGO\n\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$line = "\nCOMMIT;";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$line = "\nCOMMIT;";
|
||||
break;
|
||||
}
|
||||
|
||||
fwrite($fp, $line);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define the basic structure
|
||||
* The format:
|
||||
* array('{TABLE_NAME}' => {TABLE_DATA})
|
||||
* {TABLE_DATA}:
|
||||
* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
|
||||
* PRIMARY_KEY = {column_name(s)}
|
||||
* KEYS = array({key_name} = array({key_type}, {column_name(s)})),
|
||||
*
|
||||
* Column Types:
|
||||
* INT:x => SIGNED int(x)
|
||||
* BINT => BIGINT
|
||||
* UINT => mediumint(8) UNSIGNED
|
||||
* UINT:x => int(x) UNSIGNED
|
||||
* TINT:x => tinyint(x)
|
||||
* USINT => smallint(4) UNSIGNED (for _order columns)
|
||||
* BOOL => tinyint(1) UNSIGNED
|
||||
* VCHAR => varchar(255)
|
||||
* CHAR:x => char(x)
|
||||
* XSTEXT_UNI => text for storing 100 characters (topic_title for example)
|
||||
* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
|
||||
* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.)
|
||||
* MTEXT_UNI => mediumtext (post text, large text)
|
||||
* VCHAR:x => varchar(x)
|
||||
* TIMESTAMP => int(11) UNSIGNED
|
||||
* DECIMAL => decimal number (5,2)
|
||||
* DECIMAL: => decimal number (x,2)
|
||||
* PDECIMAL => precision decimal number (6,3)
|
||||
* PDECIMAL: => precision decimal number (x,3)
|
||||
* VCHAR_UNI => varchar(255) BINARY
|
||||
* VCHAR_CI => varchar_ci for postgresql, others VCHAR
|
||||
*/
|
||||
function get_schema_struct()
|
||||
{
|
||||
$schema_data = array();
|
||||
|
||||
// Create formel_config table
|
||||
$schema_data['phpbb_portal_config'] = array(
|
||||
'COLUMNS' => array(
|
||||
'config_name' => array('VCHAR', ''),
|
||||
'config_value' => array('VCHAR', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'config_name',
|
||||
);
|
||||
|
||||
return $schema_data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data put into the header for various dbms
|
||||
*/
|
||||
function custom_data($dbms)
|
||||
{
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'oracle':
|
||||
return <<<EOF
|
||||
/*
|
||||
This first section is optional, however its probably the best method
|
||||
of running phpBB on Oracle. If you already have a tablespace and user created
|
||||
for phpBB you can leave this section commented out!
|
||||
|
||||
The first set of statements create a phpBB tablespace and a phpBB user,
|
||||
make sure you change the password of the phpBB user before you run this script!!
|
||||
*/
|
||||
|
||||
/*
|
||||
CREATE TABLESPACE "PHPBB"
|
||||
LOGGING
|
||||
DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
|
||||
SIZE 10M
|
||||
AUTOEXTEND ON NEXT 10M
|
||||
MAXSIZE 100M;
|
||||
|
||||
CREATE USER "PHPBB"
|
||||
PROFILE "DEFAULT"
|
||||
IDENTIFIED BY "phpbb_password"
|
||||
DEFAULT TABLESPACE "PHPBB"
|
||||
QUOTA UNLIMITED ON "PHPBB"
|
||||
ACCOUNT UNLOCK;
|
||||
|
||||
GRANT ANALYZE ANY TO "PHPBB";
|
||||
GRANT CREATE SEQUENCE TO "PHPBB";
|
||||
GRANT CREATE SESSION TO "PHPBB";
|
||||
GRANT CREATE TABLE TO "PHPBB";
|
||||
GRANT CREATE TRIGGER TO "PHPBB";
|
||||
GRANT CREATE VIEW TO "PHPBB";
|
||||
GRANT "CONNECT" TO "PHPBB";
|
||||
|
||||
COMMIT;
|
||||
DISCONNECT;
|
||||
|
||||
CONNECT phpbb/phpbb_password;
|
||||
*/
|
||||
EOF;
|
||||
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
return <<<EOF
|
||||
/*
|
||||
Domain definition
|
||||
*/
|
||||
CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
|
||||
|
||||
/*
|
||||
Operation Functions
|
||||
*/
|
||||
CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
|
||||
CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
|
||||
CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
|
||||
CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
|
||||
CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
|
||||
CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
/*
|
||||
Operators
|
||||
*/
|
||||
CREATE OPERATOR <(
|
||||
PROCEDURE = _varchar_ci_less_than,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = >,
|
||||
NEGATOR = >=,
|
||||
RESTRICT = scalarltsel,
|
||||
JOIN = scalarltjoinsel);
|
||||
|
||||
CREATE OPERATOR <=(
|
||||
PROCEDURE = _varchar_ci_less_equal,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = >=,
|
||||
NEGATOR = >,
|
||||
RESTRICT = scalarltsel,
|
||||
JOIN = scalarltjoinsel);
|
||||
|
||||
CREATE OPERATOR >(
|
||||
PROCEDURE = _varchar_ci_greater_than,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = <,
|
||||
NEGATOR = <=,
|
||||
RESTRICT = scalargtsel,
|
||||
JOIN = scalargtjoinsel);
|
||||
|
||||
CREATE OPERATOR >=(
|
||||
PROCEDURE = _varchar_ci_greater_equals,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = <=,
|
||||
NEGATOR = <,
|
||||
RESTRICT = scalargtsel,
|
||||
JOIN = scalargtjoinsel);
|
||||
|
||||
CREATE OPERATOR <>(
|
||||
PROCEDURE = _varchar_ci_not_equal,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = <>,
|
||||
NEGATOR = =,
|
||||
RESTRICT = neqsel,
|
||||
JOIN = neqjoinsel);
|
||||
|
||||
CREATE OPERATOR =(
|
||||
PROCEDURE = _varchar_ci_equal,
|
||||
LEFTARG = varchar_ci,
|
||||
RIGHTARG = varchar_ci,
|
||||
COMMUTATOR = =,
|
||||
NEGATOR = <>,
|
||||
RESTRICT = eqsel,
|
||||
JOIN = eqjoinsel,
|
||||
HASHES,
|
||||
MERGES,
|
||||
SORT1= <);
|
||||
|
||||
EOF;
|
||||
break;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
?>
|
||||
0
root/install_portal/index.htm
Normal file
683
root/install_portal/install.php
Normal file
@@ -0,0 +1,683 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
$user->add_lang('mods/portal_install');
|
||||
$new_mod_version = '0.1.0';
|
||||
$page_title = 'Board3portal v' . $new_mod_version;
|
||||
|
||||
$mode = request_var('mode', 'else', true);
|
||||
function split_sql_file($sql, $delimiter)
|
||||
{
|
||||
$sql = str_replace("\r" , '', $sql);
|
||||
$data = preg_split('/' . preg_quote($delimiter, '/') . '$/m', $sql);
|
||||
|
||||
$data = array_map('trim', $data);
|
||||
|
||||
// The empty case
|
||||
$end_data = end($data);
|
||||
|
||||
if (empty($end_data))
|
||||
{
|
||||
unset($data[key($data)]);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
// What sql_layer should we use?
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mysql':
|
||||
$db_schema = 'mysql_40';
|
||||
$delimiter = ';';
|
||||
break;
|
||||
|
||||
case 'mysql4':
|
||||
if (version_compare($db->mysql_version, '4.1.3', '>='))
|
||||
{
|
||||
$db_schema = 'mysql_41';
|
||||
}
|
||||
else
|
||||
{
|
||||
$db_schema = 'mysql_40';
|
||||
}
|
||||
$delimiter = ';';
|
||||
break;
|
||||
|
||||
case 'mysqli':
|
||||
$db_schema = 'mysql_41';
|
||||
$delimiter = ';';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$db_schema = 'mssql';
|
||||
$delimiter = 'GO';
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$db_schema = 'postgres';
|
||||
$delimiter = ';';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$db_schema = 'sqlite';
|
||||
$delimiter = ';';
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$db_schema = 'firebird';
|
||||
$delimiter = ';;';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$db_schema = 'oracle';
|
||||
$delimiter = '/';
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error('Sorry, unsupportet Databases found.');
|
||||
break;
|
||||
}
|
||||
switch ($mode)
|
||||
{
|
||||
case 'install':
|
||||
$install = request_var('install', 0);
|
||||
$installed = false;
|
||||
if ($install == 1)
|
||||
{
|
||||
// Drop thes tables if existing
|
||||
if ($db->sql_layer != 'mssql')
|
||||
{
|
||||
$sql = 'DROP TABLE IF EXISTS ' . $table_prefix . 'portal_config';
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config)
|
||||
drop table ' . $table_prefix . 'portal_config';
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
// locate the schema files
|
||||
$dbms_schema = 'schemas/_' . $db_schema . '_schema.sql';
|
||||
$sql_query = @file_get_contents($dbms_schema);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql_query));
|
||||
$sql_query = split_sql_file($sql_query, $delimiter);
|
||||
// make the new one's
|
||||
foreach ($sql_query as $sql)
|
||||
{
|
||||
if (!$db->sql_query($sql))
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
unset($sql_query);
|
||||
|
||||
// Tadaa! Fill all data in ;-)
|
||||
$sql_query = file_get_contents('schemas/_schema_data.sql');
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2;', $sql_query);
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
||||
break;
|
||||
}
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql_query));
|
||||
$sql_query = split_sql_file($sql_query, ';');
|
||||
|
||||
foreach ($sql_query as $sql)
|
||||
{
|
||||
if (!$db->sql_query($sql))
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
unset($sql_query);
|
||||
|
||||
// create the acp modules
|
||||
$modules = new acp_modules();
|
||||
$portal = array(
|
||||
'module_basename' => '',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => 31,
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_INFO',
|
||||
'module_mode' => '',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($portal);
|
||||
$general = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_GENERAL_INFO',
|
||||
'module_mode' => 'general',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($general);
|
||||
$news = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_NEWS_INFO',
|
||||
'module_mode' => 'news',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($news);
|
||||
$announcements = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_ANNOUNCE_INFO',
|
||||
'module_mode' => 'announcements',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($announcements);
|
||||
$welcome = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_WELCOME_INFO',
|
||||
'module_mode' => 'welcome',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($welcome);
|
||||
$recent = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_RECENT_INFO',
|
||||
'module_mode' => 'recent',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($recent);
|
||||
$wordgraph = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_WORDGRAPH_INFO',
|
||||
'module_mode' => 'wordgraph',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($wordgraph);
|
||||
$paypal = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_PAYPAL_INFO',
|
||||
'module_mode' => 'paypal',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($paypal);
|
||||
$attachments = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO',
|
||||
'module_mode' => 'attachments',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($attachments);
|
||||
$members = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MEMBERS_INFO',
|
||||
'module_mode' => 'members',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($members);
|
||||
$polls = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_POLLS_INFO',
|
||||
'module_mode' => 'polls',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($polls);
|
||||
$bots = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_BOTS_INFO',
|
||||
'module_mode' => 'bots',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($bots);
|
||||
$poster = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MOST_POSTER_INFO',
|
||||
'module_mode' => 'poster',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($poster);
|
||||
$minicalendar = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MINICALENDAR_INFO',
|
||||
'module_mode' => 'minicalendar',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($minicalendar);
|
||||
// clear cache and log what we did
|
||||
$cache->purge();
|
||||
add_log('admin', $page_title . ' installed');
|
||||
$installed = true;
|
||||
}
|
||||
break;
|
||||
case 'update110b':
|
||||
$update = request_var('update', 0);
|
||||
$version = request_var('v', '0', true);
|
||||
$updated = false;
|
||||
if ($update == 1)
|
||||
{
|
||||
// Drop thes tables if existing
|
||||
if ($db->sql_layer != 'mssql')
|
||||
{
|
||||
$sql = 'DROP TABLE IF EXISTS ' . $table_prefix . 'portal_config';
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config)
|
||||
drop table ' . $table_prefix . 'portal_config';
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
// locate the schema files
|
||||
$dbms_schema = 'schemas/_' . $db_schema . '_schema.sql';
|
||||
$sql_query = @file_get_contents($dbms_schema);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql_query));
|
||||
$sql_query = split_sql_file($sql_query, $delimiter);
|
||||
// make the new one's
|
||||
foreach ($sql_query as $sql)
|
||||
{
|
||||
if (!$db->sql_query($sql))
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
unset($sql_query);
|
||||
|
||||
// Tadaa! Fill all data in ;-)
|
||||
$sql_query = file_get_contents('schemas/_schema_data.sql');
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2;', $sql_query);
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
||||
break;
|
||||
}
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql_query));
|
||||
$sql_query = split_sql_file($sql_query, ';');
|
||||
|
||||
foreach ($sql_query as $sql)
|
||||
{
|
||||
if (!$db->sql_query($sql))
|
||||
{
|
||||
$error = $db->sql_error();
|
||||
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
unset($sql_query);
|
||||
|
||||
|
||||
//fill the table, but with the old settings
|
||||
$sql = 'SELECT * FROM ' . PORTAL_CONFIG_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (isset($config[$row['config_name']]))
|
||||
{
|
||||
$sql2 = 'UPDATE ' . PORTAL_CONFIG_TABLE . " SET config_value = '" . $config[$row['config_name']] . "' WHERE config_name = '" . $row['config_name'] . "' LIMIT 1";
|
||||
$db->sql_query($sql2);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$sql = 'UPDATE ' . PORTAL_CONFIG_TABLE . " SET config_value = '" . $new_mod_version . "' WHERE config_name = 'portal_version' LIMIT 1";
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
//set back the config_table Oo
|
||||
$sql = "ALTER TABLE {$table_prefix}config CHANGE config_value config_value varchar(255) NOT NULL";
|
||||
$db->sql_query($sql);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'portal_welcome_intro'
|
||||
OR config_name = 'portal_max_online_friends'
|
||||
OR config_name = 'portal_max_most_poster'
|
||||
OR config_name = 'portal_max_last_member'
|
||||
OR config_name = 'portal_welcome'
|
||||
OR config_name = 'portal_links'
|
||||
OR config_name = 'portal_link_us'
|
||||
OR config_name = 'portal_clock'
|
||||
OR config_name = 'portal_random_member'
|
||||
OR config_name = 'portal_latest_members'
|
||||
OR config_name = 'portal_top_posters'
|
||||
OR config_name = 'portal_leaders'
|
||||
OR config_name = 'portal_advanced_stat'
|
||||
OR config_name = 'portal_version'
|
||||
OR config_name = 'portal_right_collumn_width'
|
||||
OR config_name = 'portal_left_collumn_width'
|
||||
OR config_name = 'portal_poll_topic'
|
||||
OR config_name = 'portal_poll_topic_id'
|
||||
OR config_name = 'portal_last_visited_bots_number'
|
||||
OR config_name = 'portal_load_last_visited_bots'
|
||||
OR config_name = 'portal_pay_acc'
|
||||
OR config_name = 'portal_pay_s_block'
|
||||
OR config_name = 'portal_pay_c_block'
|
||||
OR config_name = 'portal_recent'
|
||||
OR config_name = 'portal_recent_title_limit'
|
||||
OR config_name = 'portal_max_topics'
|
||||
OR config_name = 'portal_exclude_forums'
|
||||
OR config_name = 'portal_news_forum'
|
||||
OR config_name = 'portal_news_length'
|
||||
OR config_name = 'portal_number_of_news'
|
||||
OR config_name = 'portal_show_all_news'
|
||||
OR config_name = 'portal_news'
|
||||
OR config_name = 'portal_news_style'
|
||||
OR config_name = 'portal_announcements'
|
||||
OR config_name = 'portal_announcements_style'
|
||||
OR config_name = 'portal_number_of_announcements'
|
||||
OR config_name = 'portal_announcements_day'
|
||||
OR config_name = 'portal_announcements_length'
|
||||
OR config_name = 'portal_global_announcements_forum'
|
||||
OR config_name = 'portal_wordgraph_word_counts'
|
||||
OR config_name = 'portal_wordgraph_max_words'
|
||||
OR config_name = 'portal_wordgraph'
|
||||
OR config_name = 'portal_wordgraph_ratio'
|
||||
OR config_name = 'portal_minicalendar'
|
||||
OR config_name = 'portal_minicalendar_today_color'
|
||||
OR config_name = 'portal_minicalendar_day_link_color'
|
||||
OR config_name = 'portal_attachments'
|
||||
OR config_name = 'portal_attachments_number'";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'SELECT right_id, module_id FROM ' . MODULES_TABLE . "
|
||||
WHERE module_langname = 'ACP_PORTAL_GENERAL_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_NEWS_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_ANNOUNCE_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_WELCOME_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_RECENT_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_WORDGRAPH_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_PAYPAL_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_MEMBERS_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_POLLS_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_BOTS_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_MOST_POSTER_INFO'
|
||||
OR module_langname = 'ACP_PORTAL_MINICALENDAR_INFO'";
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . MODULES_TABLE . " WHERE module_id = '{$row['module_id']}'";
|
||||
$db->sql_query($sql);
|
||||
$sql = 'UPDATE ' . MODULES_TABLE . "
|
||||
SET left_id = left_id - 2
|
||||
WHERE module_class = 'acp'
|
||||
AND left_id > {$row['right_id']}";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . MODULES_TABLE . "
|
||||
SET right_id = right_id - 2
|
||||
WHERE module_class = 'acp'
|
||||
AND right_id > {$row['right_id']}";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT right_id, module_id FROM ' . MODULES_TABLE . "
|
||||
WHERE module_langname = 'ACP_PORTAL_INFO'";
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . MODULES_TABLE . " WHERE module_id = '{$row['module_id']}'";
|
||||
$db->sql_query($sql);
|
||||
$sql = 'UPDATE ' . MODULES_TABLE . "
|
||||
SET left_id = left_id - 2
|
||||
WHERE module_class = 'acp'
|
||||
AND left_id > {$row['right_id']}";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . MODULES_TABLE . "
|
||||
SET right_id = right_id - 2
|
||||
WHERE module_class = 'acp'
|
||||
AND right_id > {$row['right_id']}";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// create the acp modules
|
||||
$modules = new acp_modules();
|
||||
$portal = array(
|
||||
'module_basename' => '',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => 31,
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_INFO',
|
||||
'module_mode' => '',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($portal);
|
||||
$general = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_GENERAL_INFO',
|
||||
'module_mode' => 'general',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($general);
|
||||
$news = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_NEWS_INFO',
|
||||
'module_mode' => 'news',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($news);
|
||||
$announcements = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_ANNOUNCE_INFO',
|
||||
'module_mode' => 'announcements',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($announcements);
|
||||
$welcome = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_WELCOME_INFO',
|
||||
'module_mode' => 'welcome',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($welcome);
|
||||
$recent = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_RECENT_INFO',
|
||||
'module_mode' => 'recent',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($recent);
|
||||
$wordgraph = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_WORDGRAPH_INFO',
|
||||
'module_mode' => 'wordgraph',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($wordgraph);
|
||||
$paypal = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_PAYPAL_INFO',
|
||||
'module_mode' => 'paypal',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($paypal);
|
||||
$attachments = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO',
|
||||
'module_mode' => 'attachments',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($attachments);
|
||||
$members = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MEMBERS_INFO',
|
||||
'module_mode' => 'members',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($members);
|
||||
$polls = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_POLLS_INFO',
|
||||
'module_mode' => 'polls',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($polls);
|
||||
$bots = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_BOTS_INFO',
|
||||
'module_mode' => 'bots',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($bots);
|
||||
$poster = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MOST_POSTER_INFO',
|
||||
'module_mode' => 'poster',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($poster);
|
||||
$minicalendar = array(
|
||||
'module_basename' => 'portal',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => $portal['module_id'],
|
||||
'module_class' => 'acp',
|
||||
'module_langname' => 'ACP_PORTAL_MINICALENDAR_INFO',
|
||||
'module_mode' => 'minicalendar',
|
||||
'module_auth' => ''
|
||||
);
|
||||
$modules->update_module_data($minicalendar);
|
||||
|
||||
// clear cache and log what we did
|
||||
$cache->purge();
|
||||
add_log('admin', $page_title . ' updated');
|
||||
$updated = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//we had a little cheater
|
||||
break;
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'install_portal/layout.'.$phpEx);
|
||||
?>
|
||||
155
root/install_portal/layout.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$activemenu = ' id="activemenu"';
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="en-gb" lang="en-gb"><head>';
|
||||
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
echo '<meta http-equiv="Content-Style-Type" content="text/css">';
|
||||
echo '<meta http-equiv="Content-Language" content="en-gb">';
|
||||
echo '<meta http-equiv="imagetoolbar" content="no"><title>' . $page_title . '</title>';
|
||||
echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen">';
|
||||
echo '</head>';
|
||||
echo '<body class="ltr">';
|
||||
echo '<div id="wrap">';
|
||||
echo ' <div id="page-header">';
|
||||
echo ' <h1>' . $page_title . '</h1>';
|
||||
echo ' <p><a href="' . $phpbb_root_path . '">' . $user->lang['INDEX'] . '</a></p>';
|
||||
echo ' <p id="skip"><a href="#acp">Skip to content</a></p>';
|
||||
echo ' </div>';
|
||||
echo ' <div id="page-body">';
|
||||
echo ' <div id="acp">';
|
||||
echo ' <div class="panel">';
|
||||
echo ' <span class="corners-top"><span></span></span>';
|
||||
echo ' <div id="content">';
|
||||
echo ' <div id="menu">';
|
||||
echo ' <ul>';
|
||||
echo ' <li' . (($mode == 'else') ? $activemenu : '') . '><a href="install.php"><span>' . $user->lang['INSTALLER_INTRO'] . '</span></a></li>';
|
||||
echo ' <li class="header">' . $user->lang['INSTALLER_INSTALL_MENU'] . '</li>';
|
||||
echo ' <li' . (($mode == 'install') ? $activemenu : '') . '><a href="install.php?mode=install"><span>' . sprintf($user->lang['INSTALLER_INSTALL_VERSION'], $new_mod_version) . '</span></a></li>';
|
||||
echo ' <li class="header">' . $user->lang['INSTALLER_UPDATE_MENU'] . '</li>';
|
||||
echo ' <li' . (($mode == 'update110b') ? $activemenu : '') . '><a href="install.php?mode=update110b&v=1.1.0b"><span>' . $user->lang['INSTALLER_UPDATE_VERSION'] . '1.1.0b - phpbb3portal</span></a></li>';
|
||||
echo ' </ul>';
|
||||
echo ' </div>';
|
||||
echo ' <div id="main">';
|
||||
echo '<a name="maincontent"></a>';
|
||||
if ($mode == 'install')
|
||||
{
|
||||
if ($install == 1)
|
||||
{
|
||||
if ($installed)
|
||||
{
|
||||
echo '<div class="successbox">';
|
||||
echo ' <h3>' . $user->lang['INFORMATION'] . '</h3>';
|
||||
echo ' <p>' . sprintf($user->lang['INSTALLER_INSTALL_SUCCESSFUL'], $new_mod_version) . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div class="errorbox">';
|
||||
echo ' <h3>' . $user->lang['WARNING'] . '</h3>';
|
||||
echo ' <p>' . sprintf($user->lang['INSTALLER_INSTALL_UNSUCCESSFUL'], $new_mod_version) . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>' . $user->lang['INSTALLER_INSTALL_WELCOME'] . '</h1>';
|
||||
echo '<p>' . $user->lang['INSTALLER_INSTALL_WELCOME_NOTE'] . '</p>';
|
||||
echo '<form id="acp_board" method="post" action="install.php?mode=install">';
|
||||
echo ' <fieldset>';
|
||||
echo ' <legend>' . $user->lang['INSTALLER_INSTALL'] . '</legend>';
|
||||
echo ' <dl>';
|
||||
echo ' <dt><label for="install">v' . $new_mod_version . ':</label></dt>';
|
||||
echo ' <dd><label><input name="install" value="1" class="radio" type="radio" />' . $user->lang['YES'] . '</label><label><input name="install" value="0" checked="checked" class="radio" type="radio" />' . $user->lang['NO'] . '</label></dd>';
|
||||
echo ' </dl>';
|
||||
echo ' <p class="submit-buttons">';
|
||||
echo ' <input class="button1" id="submit" name="submit" value="Submit" type="submit" /> ';
|
||||
echo ' <input class="button2" id="reset" name="reset" value="Reset" type="reset" />';
|
||||
echo ' </p>';
|
||||
echo ' </fieldset>';
|
||||
echo '</form>';
|
||||
}
|
||||
}
|
||||
else if ($mode == 'update110b')
|
||||
{
|
||||
if ($update == 1)
|
||||
{
|
||||
if ($updated)
|
||||
{
|
||||
echo '<div class="successbox">';
|
||||
echo ' <h3>' . $user->lang['INFORMATION'] . '</h3>';
|
||||
echo ' <p>' . sprintf($user->lang['INSTALLER_UPDATE_SUCCESSFUL'], $version, $new_mod_version) . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div class="errorbox">';
|
||||
echo ' <h3>' . $user->lang['WARNING'] . '</h3>';
|
||||
echo ' <p>' . sprintf($user->lang['INSTALLER_UPDATE_UNSUCCESSFUL'], $version, $new_mod_version) . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>' . $user->lang['INSTALLER_UPDATE_WELCOME'] . '</h1>';
|
||||
echo '<form id="acp_board" method="post" action="install.php?mode=' . $mode . '&v=' . $version . '">';
|
||||
echo ' <fieldset>';
|
||||
echo ' <legend>' . $user->lang['INSTALLER_UPDATE'] . '</legend>';
|
||||
echo ' <dl>';
|
||||
echo ' <dt><label for="update">' . sprintf($user->lang['INSTALLER_UPDATE_NOTE'], $version, $new_mod_version) . ':</label></dt>';
|
||||
echo ' <dd><label><input name="update" value="1" class="radio" type="radio" />' . $user->lang['YES'] . '</label><label><input name="update" value="0" checked="checked" class="radio" type="radio" />' . $user->lang['NO'] . '</label></dd>';
|
||||
echo ' </dl>';
|
||||
echo ' <p class="submit-buttons">';
|
||||
echo ' <input class="button1" id="submit" name="submit" value="Submit" type="submit" /> ';
|
||||
echo ' <input class="button2" id="reset" name="reset" value="Reset" type="reset" />';
|
||||
echo ' </p>';
|
||||
echo ' </fieldset>';
|
||||
echo '</form>';
|
||||
}
|
||||
}
|
||||
else if ($mode == 'else')
|
||||
{
|
||||
echo '<h1>' . $user->lang['INSTALLER_INTRO_WELCOME'] . '</h1>';
|
||||
echo '<p>' . $user->lang['INSTALLER_INTRO_WELCOME_NOTE'] . '</p>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div class="errorbox">';
|
||||
echo ' <h3>ERROR</h3>';
|
||||
echo ' <p>' . $user->lang['INSTALLER_NEEDS_FOUNDER'] . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
echo ' <span class="corners-bottom"><span></span></span>';
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
echo ' <!--';
|
||||
echo ' We request you retain the full copyright notice below including the link to www.phpbb.com.';
|
||||
echo ' This not only gives respect to the large amount of time given freely by the developers';
|
||||
echo ' but also helps build interest, traffic and use of phpBB. If you (honestly) cannot retain';
|
||||
echo ' the full copyright we ask you at least leave in place the "Powered by phpBB" line, with';
|
||||
echo ' "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our';
|
||||
echo ' forums may be affected.';
|
||||
echo ' The phpBB Group : 2006';
|
||||
echo ' // -->';
|
||||
echo '<div id="page-footer">Powered by phpBB © 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a><br />Installer by <a href="http://mods.flying-bits.org/">nickvergessen</a></div>';
|
||||
echo '</div>';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
?>
|
||||
14
root/install_portal/schemas/_firebird_schema.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
|
||||
|
||||
# Table: 'phpbb_portal_config'
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
config_value VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_portal_config ADD PRIMARY KEY (config_name);;
|
||||
|
||||
|
||||
30
root/install_portal/schemas/_mssql_schema.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
|
||||
$Id: $
|
||||
|
||||
*/
|
||||
|
||||
BEGIN TRANSACTION
|
||||
GO
|
||||
|
||||
/*
|
||||
Table: 'phpbb_portal_config'
|
||||
*/
|
||||
CREATE TABLE [phpbb_portal_config] (
|
||||
[config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[config_value] [varchar] (255) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_portal_config] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_portal_config] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[config_name]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
|
||||
COMMIT
|
||||
GO
|
||||
|
||||
12
root/install_portal/schemas/_mysql_40_schema.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
|
||||
# Table: 'phpbb_portal_config'
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name varbinary(255) DEFAULT '' NOT NULL,
|
||||
config_value varbinary(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (config_name)
|
||||
);
|
||||
|
||||
|
||||
12
root/install_portal/schemas/_mysql_41_schema.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
|
||||
# Table: 'phpbb_portal_config'
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name varchar(255) DEFAULT '' NOT NULL,
|
||||
config_value varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (config_name)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
90
root/install_portal/schemas/_oracle_schema.sql
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
|
||||
$Id: $
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This first section is optional, however its probably the best method
|
||||
|
||||
of running phpBB on Oracle. If you already have a tablespace and user created
|
||||
|
||||
for phpBB you can leave this section commented out!
|
||||
|
||||
|
||||
|
||||
The first set of statements create a phpBB tablespace and a phpBB user,
|
||||
|
||||
make sure you change the password of the phpBB user before you run this script!!
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
CREATE TABLESPACE "PHPBB"
|
||||
|
||||
LOGGING
|
||||
|
||||
DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
|
||||
|
||||
SIZE 10M
|
||||
|
||||
AUTOEXTEND ON NEXT 10M
|
||||
|
||||
MAXSIZE 100M;
|
||||
|
||||
|
||||
|
||||
CREATE USER "PHPBB"
|
||||
|
||||
PROFILE "DEFAULT"
|
||||
|
||||
IDENTIFIED BY "phpbb_password"
|
||||
|
||||
DEFAULT TABLESPACE "PHPBB"
|
||||
|
||||
QUOTA UNLIMITED ON "PHPBB"
|
||||
|
||||
ACCOUNT UNLOCK;
|
||||
|
||||
|
||||
|
||||
GRANT ANALYZE ANY TO "PHPBB";
|
||||
|
||||
GRANT CREATE SEQUENCE TO "PHPBB";
|
||||
|
||||
GRANT CREATE SESSION TO "PHPBB";
|
||||
|
||||
GRANT CREATE TABLE TO "PHPBB";
|
||||
|
||||
GRANT CREATE TRIGGER TO "PHPBB";
|
||||
|
||||
GRANT CREATE VIEW TO "PHPBB";
|
||||
|
||||
GRANT "CONNECT" TO "PHPBB";
|
||||
|
||||
|
||||
|
||||
COMMIT;
|
||||
|
||||
DISCONNECT;
|
||||
|
||||
|
||||
|
||||
CONNECT phpbb/phpbb_password;
|
||||
|
||||
*/
|
||||
/*
|
||||
Table: 'phpbb_portal_config'
|
||||
*/
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name varchar2(255) DEFAULT '' ,
|
||||
config_value varchar2(255) DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_portal_config PRIMARY KEY (config_name)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
169
root/install_portal/schemas/_postgres_schema.sql
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
|
||||
$Id: $
|
||||
|
||||
*/
|
||||
|
||||
BEGIN;
|
||||
|
||||
/*
|
||||
|
||||
Domain definition
|
||||
|
||||
*/
|
||||
|
||||
CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Operation Functions
|
||||
|
||||
*/
|
||||
|
||||
CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Operators
|
||||
|
||||
*/
|
||||
|
||||
CREATE OPERATOR <(
|
||||
|
||||
PROCEDURE = _varchar_ci_less_than,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = >,
|
||||
|
||||
NEGATOR = >=,
|
||||
|
||||
RESTRICT = scalarltsel,
|
||||
|
||||
JOIN = scalarltjoinsel);
|
||||
|
||||
|
||||
|
||||
CREATE OPERATOR <=(
|
||||
|
||||
PROCEDURE = _varchar_ci_less_equal,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = >=,
|
||||
|
||||
NEGATOR = >,
|
||||
|
||||
RESTRICT = scalarltsel,
|
||||
|
||||
JOIN = scalarltjoinsel);
|
||||
|
||||
|
||||
|
||||
CREATE OPERATOR >(
|
||||
|
||||
PROCEDURE = _varchar_ci_greater_than,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = <,
|
||||
|
||||
NEGATOR = <=,
|
||||
|
||||
RESTRICT = scalargtsel,
|
||||
|
||||
JOIN = scalargtjoinsel);
|
||||
|
||||
|
||||
|
||||
CREATE OPERATOR >=(
|
||||
|
||||
PROCEDURE = _varchar_ci_greater_equals,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = <=,
|
||||
|
||||
NEGATOR = <,
|
||||
|
||||
RESTRICT = scalargtsel,
|
||||
|
||||
JOIN = scalargtjoinsel);
|
||||
|
||||
|
||||
|
||||
CREATE OPERATOR <>(
|
||||
|
||||
PROCEDURE = _varchar_ci_not_equal,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = <>,
|
||||
|
||||
NEGATOR = =,
|
||||
|
||||
RESTRICT = neqsel,
|
||||
|
||||
JOIN = neqjoinsel);
|
||||
|
||||
|
||||
|
||||
CREATE OPERATOR =(
|
||||
|
||||
PROCEDURE = _varchar_ci_equal,
|
||||
|
||||
LEFTARG = varchar_ci,
|
||||
|
||||
RIGHTARG = varchar_ci,
|
||||
|
||||
COMMUTATOR = =,
|
||||
|
||||
NEGATOR = <>,
|
||||
|
||||
RESTRICT = eqsel,
|
||||
|
||||
JOIN = eqjoinsel,
|
||||
|
||||
HASHES,
|
||||
|
||||
MERGES,
|
||||
|
||||
SORT1= <);
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_portal_config'
|
||||
*/
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name varchar(255) DEFAULT '' NOT NULL,
|
||||
config_value varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (config_name)
|
||||
);
|
||||
|
||||
|
||||
|
||||
COMMIT;
|
||||
68
root/install_portal/schemas/_schema_data.sql
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# $Id: schema_data.sql,v 1.257 2007/09/20 21:19:00 stoffel04 Exp $
|
||||
#
|
||||
|
||||
# POSTGRES BEGIN #
|
||||
|
||||
# -- Config
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_welcome_intro', 'Welcome to my community!');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_max_online_friends', '8');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_max_most_poster', '8');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_max_last_member', '8');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_welcome', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_links', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_link_us', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_clock', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_random_member', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_latest_members', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_top_posters', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_leaders', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_advanced_stat', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_version', '0.1.0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_welcome_guest', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_birthdays', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_search', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_friends', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_whois_online', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_change_style', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_main_menu', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_user_menu', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_right_collumn_width', '180');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_left_collumn_width', '180');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_poll_topic', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_poll_topic_id', '2');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_last_visited_bots_number', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_load_last_visited_bots', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_pay_acc', 'your@paypal.com');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_pay_s_block', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_pay_c_block', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_recent', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_recent_title_limit', '100');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_max_topics', '10');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_exclude_forums', '');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_forum', '2');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_length', '250');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_number_of_news', '5');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_show_all_news', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_style', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_style', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_number_of_announcements', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_day', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_length', '200');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_global_announcements_forum', '2');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_wordgraph_word_counts', '0');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_wordgraph_max_words', '80');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_wordgraph', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_wordgraph_ratio', '18');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_minicalendar', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_minicalendar_today_color', '//FF0000');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_minicalendar_day_link_color', '//006F00');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_attachments', '1');
|
||||
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_attachments_number', '8');
|
||||
|
||||
|
||||
|
||||
# POSTGRES COMMIT #
|
||||
|
||||
16
root/install_portal/schemas/_sqlite_schema.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
# Table: 'phpbb_portal_config'
|
||||
CREATE TABLE phpbb_portal_config (
|
||||
config_name varchar(255) NOT NULL DEFAULT '',
|
||||
config_value varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (config_name)
|
||||
);
|
||||
|
||||
|
||||
|
||||
COMMIT;
|
||||
0
root/install_portal/schemas/index.htm
Normal file
40
root/language/en/mods/info_acp_portal.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_INFO' => 'Portal',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'General',
|
||||
'ACP_PORTAL_ANNOUNCE_INFO' => 'Global announcements',
|
||||
'ACP_PORTAL_NEWS_INFO' => 'News',
|
||||
'ACP_PORTAL_RECENT_INFO' => 'Recent topics',
|
||||
'ACP_PORTAL_WORDGRAPH_INFO' => 'Wordgraph',
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'General settings',
|
||||
'ACP_PORTAL_PAYPAL_INFO' => 'Paypal donations',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO' => 'Attachments',
|
||||
'ACP_PORTAL_MEMBERS_INFO' => 'Latest members',
|
||||
'ACP_PORTAL_POLLS_INFO' => 'Poll',
|
||||
'ACP_PORTAL_BOTS_INFO' => 'Last visited bots',
|
||||
'ACP_PORTAL_MOST_POSTER_INFO' => 'Most posters',
|
||||
'ACP_PORTAL_WELCOME_INFO' => 'Welcome message',
|
||||
'ACP_PORTAL_ADS_INFO' => 'Advertisement',
|
||||
'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini calendar',
|
||||
));
|
||||
|
||||
?>
|
||||
243
root/language/en/mods/lang_portal.php
Normal file
@@ -0,0 +1,243 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// General
|
||||
'PORTAL' => 'Portal',
|
||||
'WELCOME' => 'Welcome',
|
||||
|
||||
// news & global announcements
|
||||
'LATEST_ANNOUNCEMENTS' => 'Latest global announcements',
|
||||
'LATEST_NEWS' => 'Latest news',
|
||||
'READ_FULL' => 'Read all',
|
||||
'NO_NEWS' => 'No news',
|
||||
'NO_ANNOUNCEMENTS' => 'No global announcements',
|
||||
'POSTED_BY' => 'Poster',
|
||||
'COMMENTS' => 'Comments',
|
||||
'VIEW_COMMENTS' => 'View comments',
|
||||
'POST_REPLY' => 'Write comments',
|
||||
'TOPIC_VIEWS' => 'Views',
|
||||
'JUMP_NEWEST' => 'Jump to newest post',
|
||||
'JUMP_FIRST' => 'Jump to first post',
|
||||
'JUMP_TO_POST' => 'Jump to post',
|
||||
|
||||
// who is online
|
||||
'WIO_TOTAL' => 'Total',
|
||||
'WIO_REGISTERED' => 'Registered',
|
||||
'WIO_HIDDEN' => 'Hidden',
|
||||
'WIO_GUEST' => 'Guest',
|
||||
//'RECORD_ONLINE_USERS'=> 'View record: <strong>%1$s</strong><br />%2$s',
|
||||
|
||||
// user menu
|
||||
'USER_MENU' => 'User menu',
|
||||
'UM_LOG_ME_IN' => 'remember me',
|
||||
'UM_HIDE_ME' => 'hide me',
|
||||
'UM_MAIN_SUBSCRIBED'=> 'Subscribed',
|
||||
'UM_BOOKMARKS' => 'Bookmarks',
|
||||
|
||||
// statistics
|
||||
/*
|
||||
'ST_NEW' => 'New',
|
||||
'ST_NEW_POSTS' => 'New post',
|
||||
'ST_NEW_TOPICS' => 'New topic',
|
||||
'ST_NEW_ANNS' => 'New announcment',
|
||||
'ST_NEW_STICKYS'=> 'New sticky',
|
||||
*/
|
||||
'ST_TOP' => 'Total',
|
||||
'ST_TOP_ANNS' => 'Total announcment',
|
||||
'ST_TOP_STICKYS'=> 'Total sticky',
|
||||
'ST_TOT_ATTACH' => 'Total attachments',
|
||||
|
||||
// search
|
||||
'SH' => 'go',
|
||||
'SH_SITE' => 'forums',
|
||||
'SH_POSTS' => 'posts',
|
||||
'SH_AUTHOR' => 'author',
|
||||
'SH_ENGINE' => 'search engines',
|
||||
'SH_ADV' => 'advanced search',
|
||||
|
||||
// recent
|
||||
'RECENT_NEWS' => 'Recent',
|
||||
'RECENT_TOPIC' => 'Recent topic',
|
||||
'RECENT_ANN' => 'Recent announcment',
|
||||
'RECENT_HOT_TOPIC' => 'Recent popular topic',
|
||||
|
||||
// random member
|
||||
'RND_MEMBER' => 'Random member',
|
||||
'RND_JOIN' => 'Join',
|
||||
'RND_POSTS' => 'Posts',
|
||||
'RND_OCC' => 'Occupation',
|
||||
'RND_FROM' => 'Location',
|
||||
'RND_WWW' => 'Web page',
|
||||
|
||||
// top poster
|
||||
'TOP_POSTER' => 'Top poster',
|
||||
|
||||
// attachments
|
||||
'DOWNLOADS' => 'Downloads',
|
||||
|
||||
// links
|
||||
'LINKS' => 'Links',
|
||||
|
||||
// latest members
|
||||
'LATEST_MEMBERS' => 'Latest members',
|
||||
|
||||
// make donation
|
||||
'DONATION' => 'Make donation',
|
||||
'DONATION_TEXT' => 'is a formation suplying services with no intention of any revenue. Anyone who wants to support this formation can do it by donating so that the cost of server, the domain and etc. could be paid of.',
|
||||
'PAY_MSG' => 'After selecting the amount which you want to donate from the menu, you can go on by clicking on the picture of PayPal.',
|
||||
'PAY_ITEM' => 'Make donation', // paypal item
|
||||
|
||||
// main menu
|
||||
'M_MENU' => 'Menu',
|
||||
'M_CONTENT' => 'Content',
|
||||
'M_ACP' => 'ACP',
|
||||
'M_HELP' => 'Help',
|
||||
'M_BBCODE' => 'BBCode FAQ',
|
||||
'M_TERMS' => 'Term of use',
|
||||
'M_PRV' => 'Privacy policy',
|
||||
'M_SEARCH' => 'Search',
|
||||
|
||||
// link us
|
||||
'LINK_US' => 'Link to us',
|
||||
'LINK_US_TXT' => 'Please feel free to link to <strong>%s</strong>. Use the following HTML:',
|
||||
|
||||
// friends
|
||||
'FRIENDS' => 'Friends',
|
||||
'FRIENDS_OFFLINE' => 'Offline',
|
||||
'FRIENDS_ONLINE' => 'Online',
|
||||
'NO_FRIENDS' => 'No friends currently defined',
|
||||
'NO_FRIENDS_OFFLINE' => 'No friends offline',
|
||||
'NO_FRIENDS_ONLINE' => 'No friends online',
|
||||
|
||||
// last bots
|
||||
'LAST_VISITED_BOTS' => 'Last %s visited bots',
|
||||
|
||||
// wordgraph
|
||||
'WORDGRAPH' => 'Wordgraph',
|
||||
|
||||
// change style
|
||||
'BOARD_STYLE' => 'Board style',
|
||||
'STYLE_CHOOSE' => 'Select a style',
|
||||
|
||||
// team
|
||||
'NO_ADMINISTRATORS_P' => 'No administrators',
|
||||
'NO_MODERATORS_P' => 'No moderators',
|
||||
|
||||
// average Statistics
|
||||
'TOPICS_PER_DAY_OTHER' => 'Topics per day: <strong>%d</strong>',
|
||||
'TOPICS_PER_DAY_ZERO' => 'Topics per day: <strong>0</strong>',
|
||||
'POSTS_PER_DAY_OTHER' => 'Posts per day: <strong>%d</strong>',
|
||||
'POSTS_PER_DAY_ZERO' => 'Posts per day: <strong>0</strong>',
|
||||
'USERS_PER_DAY_OTHER' => 'Users per day: <strong>%d</strong>',
|
||||
'USERS_PER_DAY_ZERO' => 'Users per day: <strong>0</strong>',
|
||||
'TOPICS_PER_USER_OTHER' => 'Topics per user: <strong>%d</strong>',
|
||||
'TOPICS_PER_USER_ZERO' => 'Topics per user: <strong>0</strong>',
|
||||
'POSTS_PER_USER_OTHER' => 'Posts per user: <strong>%d</strong>',
|
||||
'POSTS_PER_USER_ZERO' => 'Posts per user: <strong>0</strong>',
|
||||
'POSTS_PER_TOPIC_OTHER' => 'Posts per topic: <strong>%d</strong>',
|
||||
'POSTS_PER_TOPIC_ZERO' => 'Posts per topic: <strong>0</strong>',
|
||||
|
||||
// other
|
||||
'POLL' => 'Poll',
|
||||
'CLOCK' => 'Clock',
|
||||
'SPONSOR' => 'Sponsors',
|
||||
|
||||
/**
|
||||
* DO NOT REMOVE or CHANGE
|
||||
*/
|
||||
'PORTAL_COPY' => '<a href="http://www.board3.de" title="board3.de">board3 Portal</a> - based on <a href="http://www.phpbb3portal.com" title="phpBB3 Portal">phpBB3 Portal</a>',
|
||||
)
|
||||
);
|
||||
|
||||
// mini calendar
|
||||
$lang = array_merge($lang, array(
|
||||
'Mini_Cal_calendar' => 'Calendar',
|
||||
'Mini_Cal_add_event' => 'Add Event',
|
||||
'Mini_Cal_events' => 'Upcoming Events',
|
||||
'Mini_Cal_no_events' => 'None',
|
||||
'Mini_cal_this_event' => 'This month holiday events',
|
||||
'View_next_month' => 'next month',
|
||||
'View_previous_month' => 'previous month',
|
||||
|
||||
// uses MySQL DATE_FORMAT - %c long_month, numeric (1..12) - %e Day of the long_month, numeric (0..31)
|
||||
// see http://www.mysql.com/doc/D/a/Date_and_time_functions.html for more details
|
||||
// currently supports: %a, %b, %c, %d, %e, %m, %y, %Y, %H, %k, %h, %l, %i, %s, %p
|
||||
'Mini_Cal_date_format' => '%b %e',
|
||||
'Mini_Cal_date_format_Time' => '%H:%i',
|
||||
|
||||
// if you change the first day of the week in constants.php, you should change values for the short day names accordingly
|
||||
// e.g. FDOW = Sunday -> $lang['mini_cal']['day'][1] = 'Su'; ... $lang['mini_cal']['day'][7] = 'Sa';
|
||||
// FDOW = Monday -> $lang['mini_cal']['day'][1] = 'Mo'; ... $lang['mini_cal']['day'][7] = 'Su';
|
||||
'mini_cal' => array(
|
||||
'day' => array(
|
||||
'1' => 'Mo',
|
||||
'2' => 'Tu',
|
||||
'3' => 'We',
|
||||
'4' => 'Th',
|
||||
'5' => 'Fr',
|
||||
'6' => 'Sa',
|
||||
'7' => 'Su',
|
||||
),
|
||||
|
||||
'month' => array(
|
||||
'1' => 'Jan',
|
||||
'2' => 'Feb',
|
||||
'3' => 'Mar',
|
||||
'4' => 'Apr',
|
||||
'5' => 'May',
|
||||
'6' => 'Jun',
|
||||
'7' => 'Jul',
|
||||
'8' => 'Aug',
|
||||
'9' => 'Sep',
|
||||
'10'=> 'Oct',
|
||||
'11'=> 'Nov',
|
||||
'12'=> 'Dec',
|
||||
),
|
||||
|
||||
'long_month'=> array(
|
||||
'1' => 'January',
|
||||
'2' => 'February',
|
||||
'3' => 'March',
|
||||
'4' => 'April',
|
||||
'5' => 'May',
|
||||
'6' => 'June',
|
||||
'7' => 'July',
|
||||
'8' => 'August',
|
||||
'9' => 'September',
|
||||
'10'=> 'October',
|
||||
'11'=> 'November',
|
||||
'12'=> 'December',
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
?>
|
||||
233
root/language/en/mods/lang_portal_acp.php
Normal file
@@ -0,0 +1,233 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_INFO_SETTINGS' => 'General settings',
|
||||
'ACP_PORTAL_INFO_SETTINGS_EXPLAIN' => 'Thank you for choosing board3 Portal. On this page you can manage the portal of your board. The screens inhere will give you a quick overview of all the various portal settings. The links on the left hand side of this screen allow you to control every aspect of your portal experience.',
|
||||
|
||||
'ACP_PORTAL_SETTINGS' => 'Portal settings',
|
||||
'ACP_PORTAL_SETTINGS_EXPLAIN' => 'Thank you for choosing board3 Portal. On this page you can manage the portal of your board. The screens inhere will give you a quick overview of all the various portal settings. The links on the left hand side of this screen allow you to control every aspect of your portal experience.',
|
||||
|
||||
// general
|
||||
'ACP_PORTAL_GENERAL_INFO' => 'Portal administration',
|
||||
'ACP_PORTAL_GENERAL_INFO_EXPLAIN' => 'Thank you for choosing board3 Portal. On this page you can manage the portal of your board. The screens inhere will give you a quick overview of all the various portal settings. The links on the left hand side of this screen allow you to control every aspect of your portal experience.',
|
||||
'ACP_PORTAL_GENERAL_SETTINGS' => 'General settings',
|
||||
'ACP_PORTAL_GENERAL_SETTINGS_EXPLAIN' => 'Here you can change your general and certain specific options.',
|
||||
'PORTAL_ADVANCED_STAT' => 'Advanced statistics block',
|
||||
'PORTAL_ADVANCED_STAT_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_LEADERS' => 'Leaders / team block',
|
||||
'PORTAL_LEADERS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_CLOCK' => 'Clock block',
|
||||
'PORTAL_CLOCK_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_LINK_US' => 'Link us block',
|
||||
'PORTAL_LINK_US_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_LINKS' => 'Links block',
|
||||
'PORTAL_LINKS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_BIRTHDAYS' => 'Birthday block',
|
||||
'PORTAL_BIRTHDAYS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_SEARCH' => 'Search block',
|
||||
'PORTAL_SEARCH_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_WELCOME' => 'Welcome center block',
|
||||
'PORTAL_WELCOME_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_WHOIS_ONLINE' => 'Who is online?',
|
||||
'PORTAL_WHOIS_ONLINE_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_CHANGE_STYLE' => 'Styleswitcher',
|
||||
'PORTAL_CHANGE_STYLE_EXPLAIN' => 'Display this block on portal.<br /><span style="color:red">Please note:</span> if "Override user style:" in the board settings is set to "Yes", this block <u>wont be displayed</u>, independent of this settings.',
|
||||
'PORTAL_FRIENDS' => 'Friends block',
|
||||
'PORTAL_FRIENDS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS' => 'Limit of displayed online friends',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS_EXPLAIN' => 'Limit display of online friends in portal block to a certain value.',
|
||||
'PORTAL_MAIN_MENU' => 'Main menu',
|
||||
'PORTAL_MAIN_MENU_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_USER_MENU' => 'User menu / Login box',
|
||||
'PORTAL_USER_MENU_EXPLAIN' => 'Display this block on portal.',
|
||||
|
||||
// random member
|
||||
'PORTAL_RANDOM_MEMBER' => 'Random member block',
|
||||
'PORTAL_RANDOM_MEMBER_EXPLAIN' => 'Display this block on portal.',
|
||||
|
||||
// global announcements
|
||||
'ACP_PORTAL_ANNOUNCE_INFO' => 'Global announcements',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Global announcements settings',
|
||||
'ACP_PORTAL_ANNOUNCE_SETTINGS_EXPLAIN' => 'Here you can change your global announcment information and certain specific options.',
|
||||
'PORTAL_ANNOUNCEMENTS' => 'Display global announcements',
|
||||
'PORTAL_ANNOUNCEMENTS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_ANNOUNCEMENTS_STYLE' => 'Compact global announcements block style',
|
||||
'PORTAL_ANNOUNCEMENTS_STYLE_EXPLAIN' => 'If select yes use compact style for global announcements, no is large style',
|
||||
'PORTAL_NUMBER_OF_ANNOUNCEMENTS' => 'Number of announcements on portal',
|
||||
'PORTAL_NUMBER_OF_ANNOUNCEMENTS_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_ANNOUNCEMENTS_DAY' => 'Number of days to display the announcement',
|
||||
'PORTAL_ANNOUNCEMENTS_DAY_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_ANNOUNCEMENTS_LENGTH' => 'Max length of global announcements',
|
||||
'PORTAL_ANNOUNCEMENTS_LENGTH_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' => 'Global global announcements forum ID',
|
||||
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXPLAIN' => 'Forum we pull the articles from, leave blank to pull from all forums, separate by comma for multi-forums, eg. 1,2,5',
|
||||
|
||||
// news
|
||||
'ACP_PORTAL_NEWS_INFO' => 'News',
|
||||
'ACP_PORTAL_NEWS_SETTINGS' => 'News settings',
|
||||
'ACP_PORTAL_NEWS_SETTINGS_EXPLAIN' => 'Here you can change your news information and certain specific options.',
|
||||
'PORTAL_NEWS' => 'Display news block',
|
||||
'PORTAL_NEWS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_NEWS_STYLE' => 'Compact news block style',
|
||||
'PORTAL_NEWS_STYLE_EXPLAIN' => 'If select yes use compact style for news, no is large style.',
|
||||
'PORTAL_SHOW_ALL_NEWS' => 'Show all of the articles in this forum',
|
||||
'PORTAL_SHOW_ALL_NEWS_EXPLAIN' => 'Including stickies and announcements.',
|
||||
'PORTAL_NUMBER_OF_NEWS' => 'Number of news articles on portal',
|
||||
'PORTAL_NUMBER_OF_NEWS_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_NEWS_LENGTH' => 'Max length of news article',
|
||||
'PORTAL_NEWS_LENGTH_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_NEWS_FORUM' => 'News Forum ID',
|
||||
'PORTAL_NEWS_FORUM_EXPLAIN' => 'Forum we pull the articles from, leave blank to pull from all forums, separate by comma for multi-forums, eg. 1,2,5',
|
||||
'PORTAL_EXCLUDE_FORUM' => 'Exclude Forum ID',
|
||||
'PORTAL_EXCLUDE_FORUM_EXPLAIN' => 'Forum we pull the articles from, leave blank to pull from all forums, separate by comma for multi-forums, eg. 1,2,5',
|
||||
|
||||
// recent topics
|
||||
'ACP_PORTAL_RECENT_INFO' => 'Recent topics',
|
||||
'ACP_PORTAL_RECENT_SETTINGS' => 'Recent topics settings',
|
||||
'ACP_PORTAL_RECENT_SETTINGS_EXPLAIN' => 'Here you can change your recent topics information and certain specific options.',
|
||||
'PORTAL_RECENT' => 'Display recent topics block',
|
||||
'PORTAL_RECENT_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_MAX_TOPIC' => 'Limit of recent announcements/hot topics',
|
||||
'PORTAL_MAX_TOPIC_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_RECENT_TITLE_LIMIT' => 'Character limit for recent topic',
|
||||
'PORTAL_RECENT_TITLE_LIMIT_EXPLAIN' => '0 means infinite',
|
||||
|
||||
// paypal
|
||||
'ACP_PORTAL_PAYPAL_INFO' => 'Paypal',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS' => 'Paypal settings',
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS_EXPLAIN' => 'Here you can change your Paypal information and certain specific options.',
|
||||
'PORTAL_PAY_C_BLOCK' => 'Display paypal center block',
|
||||
'PORTAL_PAY_C_BLOCK_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_PAY_S_BLOCK' => 'Display paypal small block',
|
||||
'PORTAL_PAY_S_BLOCK_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_PAY_ACC' => 'Paypal account to use',
|
||||
'PORTAL_PAY_ACC_EXPLAIN' => 'Enter your on Paypal used e-mail address eg. xxx@xxx.com',
|
||||
|
||||
// last member
|
||||
'ACP_PORTAL_MEMBERS_INFO' => 'Latest members',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS' => 'Latest members settings',
|
||||
'ACP_PORTAL_MEMBERS_SETTINGS_EXPLAIN' => 'Here you can change your latest members information and certain specific options.',
|
||||
'PORTAL_LATEST_MEMBERS' => 'Display latest members block',
|
||||
'PORTAL_LATEST_MEMBERS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_MAX_LAST_MEMBER' => 'Limit of displayed latest members',
|
||||
'PORTAL_MAX_LAST_MEMBER_EXPLAIN' => '0 means infinite',
|
||||
|
||||
// bots
|
||||
'ACP_PORTAL_BOTS_INFO' => 'Visiting bots',
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Visiting bots settings',
|
||||
'ACP_PORTAL_BOTS_SETTINGS_EXPLAIN' => 'Here you can change your visiting bots information and certain specific options.',
|
||||
'PORTAL_LOAD_LAST_VISITED_BOTS' => 'Display visiting bots block',
|
||||
'PORTAL_LOAD_LAST_VISITED_BOTS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER' => 'How many bots to display',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER_EXPLAIN' => '0 means infinite',
|
||||
|
||||
// polls
|
||||
'ACP_PORTAL_POLLS_INFO' => 'Poll',
|
||||
'ACP_PORTAL_POLLS_SETTINGS' => 'Poll settings',
|
||||
'ACP_PORTAL_POLLS_SETTINGS_EXPLAIN' => 'Here you can change your poll information and certain specific options.',
|
||||
'PORTAL_POLL_TOPIC' => 'Display poll blocks',
|
||||
'PORTAL_POLL_TOPIC_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_POLL_TOPIC_ID' => 'Poll topic id',
|
||||
'PORTAL_POLL_TOPIC_ID_EXPLAIN' => 'The id of the topic from wich the poll should be displayed. Only one ID number / poll is possible.',
|
||||
|
||||
// most poster
|
||||
'ACP_PORTAL_MOST_POSTER_INFO' => 'Most poster',
|
||||
'ACP_PORTAL_MOST_POSTER_SETTINGS' => 'Most poster settings',
|
||||
'ACP_PORTAL_MOST_POSTER_SETTINGS_EXPLAIN' => 'Here you can change your most poster information and certain specific options.',
|
||||
'PORTAL_TOP_POSTERS' => 'Display most/top posters block',
|
||||
'PORTAL_TOP_POSTERS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_MAX_MOST_POSTER' => 'How many most posters to display',
|
||||
'PORTAL_MAX_MOST_POSTER_EXPLAIN' => '0 means infinite',
|
||||
|
||||
// left and right collumn width
|
||||
'ACP_PORTAL_COLLUMN_WIDTH_INFO' => 'Collumn width',
|
||||
'ACP_PORTAL_COLLUMN_WIDTH_SETTINGS' => 'Left and right collumn width settings',
|
||||
'PORTAL_LEFT_COLLUMN_WIDTH' => 'Width value of the left collumn',
|
||||
'PORTAL_LEFT_COLLUMN_WIDTH_EXPLAIN' => 'Change the width of left collumn in pixel, recommended value 180',
|
||||
'PORTAL_RIGHT_COLLUMN_WIDTH' => 'Width value of the right collumn',
|
||||
'PORTAL_RIGHT_COLLUMN_WIDTH_EXPLAIN' => 'Change the width of right collumn in pixel, recommended value 180',
|
||||
|
||||
// attachments
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_INFO' => 'Attachments',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS' => 'Attachments settings',
|
||||
'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS_EXPLAIN' => 'Here you can change your attachments information and certain specific options.',
|
||||
'PORTAL_ATTACHMENTS' => 'Display attachments block',
|
||||
'PORTAL_ATTACHMENTS_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_ATTACHMENTS_NUMBER' => 'Limit of displayed attachments',
|
||||
'PORTAL_ATTACHMENTS_NUMBER_EXPLAIN' => '0 means infinite',
|
||||
|
||||
// friends
|
||||
'ACP_PORTAL_FRIENDS_INFO' => 'Friends',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS' => 'Friends Settings',
|
||||
'ACP_PORTAL_FRIENDS_SETTINGS_EXPLAIN' => 'Here you can change your friends information and certain specific options.',
|
||||
'PORTAL_FRIENDS' => 'Display friends block',
|
||||
'PORTAL_FRIENDS_EXPLAIN' => 'Display attachments block',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS' => 'Limit of displayed friends',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS_EXPLAIN' => 'Limits the amound of displayed friends to the given value.',
|
||||
|
||||
// wordgraph
|
||||
'ACP_PORTAL_WORDGRAPH_INFO' => 'Wordgraph',
|
||||
'ACP_PORTAL_WORDGRAPH_SETTINGS' => 'Wordgraph settings',
|
||||
'ACP_PORTAL_WORDGRAPH_SETTINGS_EXPLAIN' => 'Here you can change your wordgraph information and certain specific options.',
|
||||
'PORTAL_WORDGRAPH' => 'Display wordgraph block',
|
||||
'PORTAL_WORDGRAPH_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_WORDGRAPH_MAX_WORDS' => 'How many words to display',
|
||||
'PORTAL_WORDGRAPH_MAX_WORDS_EXPLAIN' => '0 means infinite',
|
||||
'PORTAL_WORDGRAPH_WORD_COUNTS' => 'Include count values to display',
|
||||
'PORTAL_WORDGRAPH_WORD_COUNTS_EXPLAIN' => 'Display count values per word eg. (25).',
|
||||
'PORTAL_WORDGRAPH_RATIO' => 'Used aspect ratio word size',
|
||||
'PORTAL_WORDGRAPH_RATIO_EXPLAIN' => 'Change the aspect ratio (bigger/smaler) word size (default=18)',
|
||||
|
||||
// welcome message
|
||||
'ACP_PORTAL_WELCOME_INFO' => 'Welcome',
|
||||
'ACP_PORTAL_WELCOME_SETTINGS' => 'Welcome settings',
|
||||
'ACP_PORTAL_WELCOME_SETTINGS_EXPLAIN' => 'Here you can change welcome messages and certain specific options.',
|
||||
'PORTAL_WELCOME_INTRO' => 'Welcome message',
|
||||
'PORTAL_WELCOME_GUEST' => 'Welcome message only for guests?',
|
||||
'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Change the welcome (plain text only). Max. 600 characters!',
|
||||
|
||||
// minicalendar
|
||||
'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini calendar',
|
||||
'ACP_PORTAL_MINICALENDAR_SETTINGS' => 'Mini calendar settings',
|
||||
'ACP_PORTAL_MINICALENDAR_SETTINGS_EXPLAIN' => 'Here you can change your mini calendar information and certain specific options.',
|
||||
'PORTAL_MINICALENDAR' => 'Display mini calendar block',
|
||||
'PORTAL_MINICALENDAR_EXPLAIN' => 'Display this block on portal.',
|
||||
'PORTAL_MINICALENDAR_TODAY_COLOR' => 'Active day color',
|
||||
'PORTAL_MINICALENDAR_TODAY_COLOR_EXPLAIN' => 'HEX or named colors are allowed such as #FFFFFF for white, or color names like vilolet.',
|
||||
'PORTAL_MINICALENDAR_DAY_LINK_COLOR' => 'Day link color',
|
||||
'PORTAL_MINICALENDAR_DAY_LINK_COLOR_EXPLAIN'=> 'HEX or named colors are allowed such as #FFFFFF for white, or color names like vilolet.',
|
||||
|
||||
|
||||
));
|
||||
|
||||
?>
|
||||
69
root/language/en/mods/portal_install.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'INSTALLER_CONVERT' => 'Convert',
|
||||
'INSTALLER_CONVERT_MENU' => 'Convertmenu',
|
||||
'INSTALLER_CONVERT_NOTE' => 'Convert MOD to v%s',
|
||||
'INSTALLER_CONVERT_PREFIX' => 'Prefix of phpBB2-installation',
|
||||
'INSTALLER_CONVERT_SUCCESSFUL' => 'Convert of the MOD to v%s was successful.<br />Now copy the image-files of album/upload and album/upload/cache of your phpbb2-Installation into the one\'s of the phpBB3',
|
||||
'INSTALLER_CONVERT_UNSUCCESSFUL' => 'Convert of the MOD to v%s was <strong>not</strong> successful.',
|
||||
'INSTALLER_CONVERT_UNSUCCESSFUL2' => 'You didn\'t insert a prefix of your phpBB2-installation.',
|
||||
'INSTALLER_CONVERT_WELCOME' => 'Welcome to the Convertmenu',
|
||||
'INSTALLER_CONVERT_WELCOME_NOTE' => 'When you choose to convert the MOD, we try to copy the data of your older phpBB2 Installation.',
|
||||
|
||||
'INSTALLER_INTRO' => 'Intro',
|
||||
'INSTALLER_INTRO_WELCOME' => 'Welcome to the MOD Installation',
|
||||
'INSTALLER_INTRO_WELCOME_NOTE' => 'Please choose what you want to do.',
|
||||
|
||||
'INSTALLER_INSTALL' => 'Install',
|
||||
'INSTALLER_INSTALL_MENU' => 'Installmenu',
|
||||
'INSTALLER_INSTALL_SUCCESSFUL' => 'Installation of the MOD v%s was successful.',
|
||||
'INSTALLER_INSTALL_UNSUCCESSFUL' => 'Installation of the MOD v%s was <strong>not</strong> successful.',
|
||||
'INSTALLER_INSTALL_VERSION' => 'Install MOD v%s',
|
||||
'INSTALLER_INSTALL_WELCOME' => 'Welcome to the Installationmenu',
|
||||
'INSTALLER_INSTALL_WELCOME_NOTE' => 'When you choose to install the MOD, any database of previous versions will be dropped.',
|
||||
|
||||
'INSTALLER_NEEDS_FOUNDER' => 'You must be logged in as a founder.',
|
||||
|
||||
'INSTALLER_UPDATE' => 'Update',
|
||||
'INSTALLER_UPDATE_MENU' => 'Updatemenu',
|
||||
'INSTALLER_UPDATE_NOTE' => 'Update MOD from v%s to v%s',
|
||||
'INSTALLER_UPDATE_SUCCESSFUL' => 'Update of the MOD from v%s to v%s was successful.',
|
||||
'INSTALLER_UPDATE_UNSUCCESSFUL' => 'Update of the MOD from v%s to v%s was <strong>not</strong> successful.',
|
||||
'INSTALLER_UPDATE_VERSION' => 'Update MOD from v',
|
||||
'INSTALLER_UPDATE_WELCOME' => 'Welcome to the Updatemenu',
|
||||
|
||||
'WARNING' => 'Warning',
|
||||
));
|
||||
|
||||
?>
|
||||
226
root/portal.php
Normal file
@@ -0,0 +1,226 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_PORTAL', true);
|
||||
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
include($phpbb_root_path . 'portal/includes/functions.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('mods/lang_portal');
|
||||
|
||||
// show login box and user menu
|
||||
|
||||
// only registered user see user menu
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/user_menu.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/login_box.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_main_menu'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_MAINMENU' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_user_menu'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_USERMENU' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_birthdays'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/birthday_list.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_search'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/search.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_attachments'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/attachments.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_recent'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/recent.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_advanced_stat'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/statistics.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_minicalendar'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/mini_cal.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_link_us'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/link_us.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_leaders'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/leaders.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_wordgraph'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/wordgraph.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_poll_topic'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/poll.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_load_last_visited_bots'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/latest_bots.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_top_posters'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/top_posters.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_latest_members'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/latest_members.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_random_member'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/random_member.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_friends'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/friends.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_whois_online'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/whois_online.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_change_style'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_clock'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_CLOCK' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_links'])
|
||||
{
|
||||
// include($phpbb_root_path . 'portal/block/links.'.$phpEx);
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LINKS' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_welcome'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WELCOME' => true,
|
||||
'PORTAL_WELCOME_INTRO' => str_replace("\n", "<br />", $portal_config['portal_welcome_intro']),
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_welcome_guest'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WELCOME_GUEST' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_announcements'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/announcements.'.$phpEx);
|
||||
$template->assign_vars(array(
|
||||
'S_ANNOUNCE_COMPACT' => ($portal_config['portal_announcements_style']) ? true : false,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_news'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/news.'.$phpEx);
|
||||
$template->assign_vars(array(
|
||||
'S_NEWS_COMPACT' => ($portal_config['portal_news_style']) ? true : false,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_pay_s_block'] or $portal_config['portal_pay_c_block'])
|
||||
{
|
||||
include($phpbb_root_path . 'portal/block/donate.'.$phpEx);
|
||||
}
|
||||
|
||||
/*
|
||||
if ($portal_config['portal_ads_small'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_ADS_SMALL' => ($portal_config['portal_ads_small_box']) ? true : false,
|
||||
// 'ADS_SMALL_BOX' => $portal_config['portal_ads_small_box'],
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_ads_center'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_ADS_CENTER' => ($portal_config['portal_ads_center_box']) ? true : false,
|
||||
// 'ADS_CENTER_BOX' => $portal_config['portal_ads_center_box'],
|
||||
));
|
||||
}
|
||||
*/
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_JUMPBOX' => true, // SQL + ACP eklenecek
|
||||
'PORTAL_LEFT_COLLUMN' => $portal_config['portal_left_collumn_width'],
|
||||
'PORTAL_RIGHT_COLLUMN' => $portal_config['portal_right_collumn_width'],
|
||||
));
|
||||
|
||||
|
||||
// output page
|
||||
page_header($user->lang['PORTAL']);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => '/portal/portal_body.html'
|
||||
));
|
||||
|
||||
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
||||
|
||||
page_footer();
|
||||
|
||||
?>
|
||||
113
root/portal/block/announcements.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_NEWEST_POST'),
|
||||
'S_DISPLAY_ANNOUNCEMENTS' => true,
|
||||
));
|
||||
|
||||
#if (!isset($HTTP_GET_VARS['article']))
|
||||
$news = request_var('announcement', -1);
|
||||
if($news < 0)
|
||||
{
|
||||
$fetch_news = phpbb_fetch_posts('', $portal_config['portal_number_of_announcements'], $portal_config['portal_announcements_length'], $portal_config['portal_announcements_day'], 'announcements');
|
||||
|
||||
if (count($fetch_news) == 0)
|
||||
{
|
||||
$template->assign_block_vars('announcements_row', array(
|
||||
'S_NO_TOPICS' => true,
|
||||
'S_NOT_LAST' => false
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
for ($i = 0; $i < count($fetch_news); $i++)
|
||||
{
|
||||
if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true )
|
||||
{
|
||||
$open_bracket = '[ ';
|
||||
$close_bracket = ' ]';
|
||||
$read_full = $user->lang['READ_FULL'];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$open_bracket = '';
|
||||
$close_bracket = '';
|
||||
$read_full = '';
|
||||
}
|
||||
// unread?
|
||||
$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;
|
||||
|
||||
$template->assign_block_vars('announcements_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
'TEXT' => $fetch_news[$i]['post_text'],
|
||||
'REPLIES' => $fetch_news[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 'p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 't=' . $fetch_news[$i]['topic_id']),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&' . (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 't=' . $fetch_news[$i]['topic_id']),
|
||||
'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", 'announcement=' . $i),
|
||||
'L_READ_FULL' => $read_full,
|
||||
'OPEN' => $open_bracket,
|
||||
'CLOSE' => $close_bracket,
|
||||
'S_NOT_LAST' => ($i < count($fetch_news) - 1) ? true : false,
|
||||
'S_POLL' => $fetch_news[$i]['poll'],
|
||||
// 'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'),
|
||||
'S_UNREAD_INFO' => $unread_topic,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#$fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_config['portal_number_of_news'], 0, 0, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news');
|
||||
$fetch_news = $fetch_news = phpbb_fetch_posts('', $portal_config['portal_number_of_announcements'], 0, 0, 'announcements');
|
||||
|
||||
$i = $news;
|
||||
$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;
|
||||
|
||||
$template->assign_block_vars('announcements_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
'TEXT' => $fetch_news[$i]['post_text'],
|
||||
'REPLIES' => $fetch_news[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 'p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 't=' . $fetch_news[$i]['topic_id']),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&' . (($fetch_news[$i]['forum_id']) ? 'f=' . $fetch_news[$i]['forum_id'] . '&' : '') . 't=' . $fetch_news[$i]['topic_id']),
|
||||
'S_POLL' => $fetch_news[$i]['poll'],
|
||||
'S_UNREAD_INFO' => $unread_topic,
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
54
root/portal/block/attachments.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Just grab all attachment info from database
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_attachments_number']);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$size_lang = ($row['filesize'] >= 1048576) ? $user->lang['MB'] : (($row['filesize'] >= 1024) ? $user->lang['KB'] : $user->lang['BYTES']);
|
||||
$row['filesize'] = ($row['filesize'] >= 1048576) ? round((round($row['filesize'] / 1048576 * 100) / 100), 2) : (($row['filesize'] >= 1024) ? round((round($row['filesize'] / 1024 * 100) / 100), 2) : $row['filesize']);
|
||||
|
||||
$replace = str_replace(array('_','.zip','.jpg','.gif','.png','.ZIP','.JPG','.GIF','.PNG','.','-'), ' ', $row['real_filename']);
|
||||
|
||||
$template->assign_block_vars('attach', array(
|
||||
'FILESIZE' => $row['filesize'] . ' ' . $size_lang,
|
||||
'FILETIME' => $user->format_date($row['filetime']),
|
||||
'DOWNLOAD_COUNT' => (int) $row['download_count'], // grab downloads count
|
||||
'REAL_FILENAME' => $replace,
|
||||
'PHYSICAL_FILENAME' => basename($row['physical_filename']),
|
||||
'ATTACH_ID' => $row['attach_id'],
|
||||
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
|
||||
'POST_MSG_ID' => $row['post_msg_id'], // grab post ID to redirect to post
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $row['attach_id']),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ATTACHMENTS' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
52
root/portal/block/birthday_list.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Generate birthday list if required ... / borrowed from index.php (RC4)
|
||||
$birthday_list = '';
|
||||
if ($config['load_birthdays'] && $config['allow_birthdays'])
|
||||
{
|
||||
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
|
||||
$sql = 'SELECT user_id, username, user_colour, user_birthday
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
|
||||
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
|
||||
if ($age = (int) substr($row['user_birthday'], -4))
|
||||
{
|
||||
$birthday_list .= ' (' . ($now['year'] - $age) . ')';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Assign index specific vars
|
||||
$template->assign_vars(array(
|
||||
'BIRTHDAY_LIST' => $birthday_list,
|
||||
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
76
root/portal/block/change_style.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$lang = request_var('lang', '', false, true);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'language/' . $lang . "/common.$phpEx"))
|
||||
{
|
||||
$this->lang_name = $lang;
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
|
||||
|
||||
$cookie_expire = $this->time_now + (($config['max_autologin_time']) ? 86400 * (int) $config['max_autologin_time'] : 31536000);
|
||||
$this->set_cookie('lang', $lang, $cookie_expire);
|
||||
unset($cookie_expire);
|
||||
}
|
||||
|
||||
$requested_style = request_var('style', 0, false, true);
|
||||
|
||||
if ($requested_style && (!$config['override_user_style'] || $auth->acl_get('a_styles')))
|
||||
{
|
||||
$style = $requested_style;
|
||||
|
||||
$cookie_expire = $this->time_now + (($config['max_autologin_time']) ? 86400 * (int) $config['max_autologin_time'] : 31536000);
|
||||
$this->set_cookie('style', $style, $cookie_expire);
|
||||
unset($cookie_expire);
|
||||
}
|
||||
|
||||
$all = false;
|
||||
$default = '';
|
||||
|
||||
$sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
|
||||
$sql = 'SELECT style_id, style_name, style_copyright
|
||||
FROM ' . STYLES_TABLE . "
|
||||
$sql_where
|
||||
ORDER BY style_name";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$style_options = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$selected = ($row['style_id'] == $default) ? ' selected="selected"' : '';
|
||||
$style_options .= '<option value="' . $row['style_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
|
||||
|
||||
$template->assign_block_vars('styles', array(
|
||||
'STYLE_ID' => $row['style_id'],
|
||||
'STYLE_NAME' => $row['style_name'],
|
||||
'STYLE_COPY' => $row['style_copyright'],
|
||||
'U_STYLE' => append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
|
||||
'S_DISPLAY_CHANGE_STYLE' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
44
root/portal/block/donate.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($portal_config['portal_pay_acc'])
|
||||
{
|
||||
if ($portal_config['portal_pay_c_block'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PAY_C' => true,
|
||||
));
|
||||
}
|
||||
|
||||
if ($portal_config['portal_pay_s_block'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PAY_S' => true,
|
||||
));
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'PAY_ACC' => $portal_config['portal_pay_acc'],
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
71
root/portal/block/friends.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$s_display_friends = false;
|
||||
|
||||
// Output listing of friends online
|
||||
$update_time = $config['load_online_time'] * 60;
|
||||
|
||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||
'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
ZEBRA_TABLE => 'z'
|
||||
),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(SESSIONS_TABLE => 's'),
|
||||
'ON' => 's.session_user_id = z.zebra_id'
|
||||
)
|
||||
),
|
||||
|
||||
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
|
||||
AND z.friend = 1
|
||||
AND u.user_id = z.zebra_id',
|
||||
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour',
|
||||
'ORDER_BY' => 'u.username_clean ASC',
|
||||
));
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_online_friends']);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$which = (time() - $update_time < $row['online_time'] && $row['viewonline'] && $row['user_allow_viewonline']) ? 'online' : 'offline';
|
||||
$s_display_friends = ($row['user_id']) ? true : false;
|
||||
|
||||
$template->assign_block_vars("friends_{$which}", array(
|
||||
'USER_ID' => $row['user_id'],
|
||||
'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_FRIENDS' => $s_display_friends,
|
||||
'S_ZEBRA_ENABLED' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
8
root/portal/block/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
59
root/portal/block/latest_bots.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Last x visited bots
|
||||
$sql = 'SELECT username, user_colour, user_lastvisit
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type = ' . USER_IGNORE . '
|
||||
ORDER BY user_lastvisit DESC';
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_last_visited_bots_number']);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// if ($row['user_lastvisit'] == 0)
|
||||
if (!$row['user_lastvisit'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LAST_BOTS' => false,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LAST_BOTS' => true,
|
||||
));
|
||||
|
||||
$template->assign_block_vars('last_visited_bots', array(
|
||||
'BOT_NAME' => get_username_string('full', '', $row['username'], $row['user_colour']),
|
||||
'LAST_VISIT_DATE' => $user->format_date($row['user_lastvisit']),
|
||||
));
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $portal_config['portal_last_visited_bots_number']),
|
||||
'S_LAST_VISITED_BOTS' => ($portal_config['portal_load_last_visited_bots']) ? true : false,
|
||||
));
|
||||
|
||||
?>
|
||||
44
root/portal/block/latest_members.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username, user_regdate, user_colour
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type <> ' . USER_IGNORE . '
|
||||
AND user_inactive_time = 0
|
||||
ORDER BY user_regdate DESC';
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_last_member']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['username']) )
|
||||
{
|
||||
$template->assign_block_vars('latest_members', array(
|
||||
'USERNAME' => censor_text($row['username']),
|
||||
'USERNAME_COLOR'=> ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] .'"' : '',
|
||||
'U_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
|
||||
'JOINED' => $user->format_date($row['user_regdate'], $format = 'd M'),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LATEST_MEMBERS' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
174
root/portal/block/leaders.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Display a listing of board admins, moderators
|
||||
$user->add_lang('groups');
|
||||
|
||||
$user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
|
||||
|
||||
$admin_id_ary = $mod_id_ary = $forum_id_ary = array();
|
||||
foreach ($user_ary as $forum_id => $forum_ary)
|
||||
{
|
||||
foreach ($forum_ary as $auth_option => $id_ary)
|
||||
{
|
||||
if (!$forum_id && $auth_option == 'a_')
|
||||
{
|
||||
$admin_id_ary = array_merge($admin_id_ary, $id_ary);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_id_ary = array_merge($mod_id_ary, $id_ary);
|
||||
}
|
||||
|
||||
if ($forum_id)
|
||||
{
|
||||
foreach ($id_ary as $id)
|
||||
{
|
||||
$forum_id_ary[$id][] = $forum_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$admin_id_ary = array_unique($admin_id_ary);
|
||||
$mod_id_ary = array_unique($mod_id_ary);
|
||||
|
||||
// Admin group id...
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = 'ADMINISTRATORS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$admin_group_id = (int) $db->sql_fetchfield('group_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT forum_id, forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type = ' . FORUM_POST;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forums = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forums[$row['forum_id']] = $row['forum_name'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', array(
|
||||
'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.user_colour, u.user_allow_pm, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
GROUPS_TABLE => 'g'
|
||||
),
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(USER_GROUP_TABLE => 'ug'),
|
||||
'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id']
|
||||
)),
|
||||
'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . '
|
||||
AND u.group_id = g.group_id',
|
||||
'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC'
|
||||
));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$which_row = (in_array($row['user_id'], $admin_id_ary)) ? 'admin' : 'mod';
|
||||
|
||||
// We sort out admins not having the admin group as default
|
||||
// The drawback is that only those admins are displayed which are within
|
||||
// the special group 'Administrators' and also having it assigned as their default group.
|
||||
// - might change
|
||||
if ($which_row == 'admin' && $row['default_group'] != $admin_group_id)
|
||||
{
|
||||
// Remove from admin_id_ary, because the user may be a mod instead
|
||||
unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
|
||||
|
||||
if (!in_array($row['user_id'], $mod_id_ary))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$which_row = 'mod';
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
|
||||
{
|
||||
$group_name = $user->lang['GROUP_UNDISCLOSED'];
|
||||
$u_group = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
$u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']);
|
||||
}
|
||||
|
||||
$template->assign_block_vars($which_row, array(
|
||||
'USER_ID' => $row['user_id'],
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOR' => $row['group_colour'],
|
||||
|
||||
'U_GROUP' => $u_group,
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
/*we may delete this?
|
||||
// Generate online information for user
|
||||
if ($config['load_onlinetrack'] && sizeof($id_cache))
|
||||
{
|
||||
$sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
|
||||
FROM ' . SESSIONS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('session_user_id', $id_cache) . '
|
||||
GROUP BY session_user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$update_time = $config['load_online_time'] * 60;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_cache[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline'] && $user_cache[$row['session_user_id']]['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
unset($id_cache);
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'ONLINE_IMG'=> ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
|
||||
));
|
||||
*/
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LEADERS' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
31
root/portal/block/link_us.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
//doing the easy way ;)
|
||||
$u_link = $config['server_protocol'] . $config['server_name'] . $config['script_path'];
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LINK_US' => true,
|
||||
'LINK_US_TXT' => sprintf($user->lang['LINK_US_TXT'], $config['sitename']),
|
||||
'U_LINK_US' => '<a href="' . $u_link . '" ' . (($config['site_desc']) ? 'title="' . $config['site_desc'] . '"' : '' ) . '>' . (($config['sitename']) ? $config['sitename'] : $u_link ) . '</a>',
|
||||
));
|
||||
|
||||
?>
|
||||
26
root/portal/block/links.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LINKS' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
32
root/portal/block/login_box.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$s_display = true;
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),
|
||||
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
|
||||
'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,
|
||||
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
|
||||
));
|
||||
|
||||
?>
|
||||
22
root/portal/block/main_menu.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
//we main delete this aswell? Oo
|
||||
?>
|
||||
164
root/portal/block/mini_cal.php
Normal file
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
define ('IN_MINI_CAL', 1);
|
||||
|
||||
include_once($phpbb_root_path . '/portal/includes/mini_cal/mini_cal_config.'.$phpEx);
|
||||
include_once($phpbb_root_path . '/portal/includes/mini_cal/mini_cal_common.'.$phpEx);
|
||||
include_once($phpbb_root_path . '/portal/includes/mini_cal/calendarSuite.'.$phpEx);
|
||||
// get the mode (if any)
|
||||
$mini_cal_mode = 0;
|
||||
if( isset($_GET['mode']) || isset($_POST['mode']) )
|
||||
{
|
||||
$mini_cal_mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
|
||||
}
|
||||
$mini_cal_mode = ($mini_cal_mode == 'personal') ? $mini_cal_mode : 'default';
|
||||
|
||||
// get the user (for personal calendar)
|
||||
if( isset($_GET['u']) || isset($_POST['u']) )
|
||||
{
|
||||
$mini_cal_user = ( isset($_POST['u']) ) ? intval($_POST['u']) : intval($_GET['u']);
|
||||
}
|
||||
|
||||
// get the calendar month
|
||||
$mini_cal_month = 0;
|
||||
if( isset($_GET['m']) || isset($_POST['m']) )
|
||||
{
|
||||
$mini_cal_month = ( isset($_POST['m']) ) ? intval($_POST['m']) : intval($_GET['m']);
|
||||
}
|
||||
|
||||
// initialise our calendarsuite class
|
||||
$mini_cal = new calendarSuite();
|
||||
|
||||
// setup our mini_cal template
|
||||
$template->set_filenames(array(
|
||||
'mini_cal_body' => 'portal/block/mini_cal_body.html'
|
||||
));
|
||||
|
||||
// initialise some variables
|
||||
$mini_cal_today = date('Ymd', time());
|
||||
$s_cal_month = ($mini_cal_month != 0) ? $mini_cal_month . ' month' : $mini_cal_today;
|
||||
$mini_cal->getMonth($s_cal_month);
|
||||
$mini_cal_count=MINI_CAL_FDOW;
|
||||
$mini_cal_this_year = $mini_cal->dateYYYY;
|
||||
$mini_cal_this_month = $mini_cal->dateMM;
|
||||
$mini_cal_this_day = $mini_cal->dateDD;
|
||||
$mini_cal_month_days = $mini_cal->daysMonth;
|
||||
|
||||
if ( MINI_CAL_CALENDAR_VERSION != 'NONE' )
|
||||
{
|
||||
// include the required events calendar support
|
||||
$mini_cal_inc = 'mini_cal_' . MINI_CAL_CALENDAR_VERSION;
|
||||
include_once($phpbb_root_path . 'portal/includes/mini_cal/' . $mini_cal_inc . '.' . $phpEx);
|
||||
|
||||
// include the required events calendar support
|
||||
$mini_cal_auth = getMiniCalForumsAuth($user);
|
||||
$mini_cal_event_days = getMiniCalEventDays($mini_cal_auth['view']);
|
||||
getMiniCalEvents($mini_cal_auth);
|
||||
getMiniCalPostForumsList($mini_cal_auth['post']);
|
||||
}
|
||||
|
||||
// output the days for the current month
|
||||
// if MINI_CAL_DATE_SEARCH = POSTS then hyperlink any days which have already past
|
||||
// if MINI_CAL_DATE_SEARCH = EVENTS then hyperkink any which have events
|
||||
$holiday=0;
|
||||
for($i=0; $i < $mini_cal_month_days;)
|
||||
{
|
||||
// is this the first day of the week?
|
||||
if($mini_cal_count==MINI_CAL_FDOW)
|
||||
{
|
||||
$template->assign_block_vars('mini_cal_row', array());
|
||||
}
|
||||
|
||||
// is this a valid weekday?
|
||||
if($mini_cal_count==($mini_cal->day[$i][7]))
|
||||
{
|
||||
$mini_cal_this_day = $mini_cal->day[$i][0];
|
||||
|
||||
$d_mini_cal_today = $mini_cal_this_year . ( ($mini_cal_this_month <= 9) ? '0' . $mini_cal_this_month : $mini_cal_this_month ) . ( ($mini_cal_this_day <= 9) ? '0' . $mini_cal_this_day : $mini_cal_this_day );
|
||||
$mini_cal_day = ( $mini_cal_today == $d_mini_cal_today ) ? '<span class="' . MINI_CAL_TODAY_CLASS . '" style="font-weight: bold; border-style: outset; border-width: thin; color:' . $portal_config['portal_minicalendar_today_color'] . ';">' . $mini_cal_this_day . '</span>' : $mini_cal_this_day;
|
||||
|
||||
if ( (MINI_CAL_CALENDAR_VERSION != 'NONE') && (MINI_CAL_DATE_SEARCH == 'EVENTS') )
|
||||
{
|
||||
$mini_cal_day_link = '<a href="' . getMiniCalSearchURL($d_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color: ' . $portal_config['portal_minicalendar_day_link_color'] . ';">' . ( $mini_cal_day ) . '</a>';
|
||||
$mini_cal_day = ( in_array($mini_cal_this_day, $mini_cal_event_days) ) ? $mini_cal_day_link : $mini_cal_day;
|
||||
}
|
||||
else
|
||||
{
|
||||
$nix_mini_cal_today = gmmktime($config['board_timezone'], 0, 0, $mini_cal_this_month, $mini_cal_this_day, $mini_cal_this_year);
|
||||
$mini_cal_day_link = '<a href="' . append_sid($phpbb_root_path . "search.$phpEx?search_id=unanswered&st=" . $nix_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color: ' . $portal_config['portal_minicalendar_day_link_color'] . ';">' . ( $mini_cal_day ) . '</a>';
|
||||
$mini_cal_day = ( $mini_cal_today >= $d_mini_cal_today ) ? $mini_cal_day_link : $mini_cal_day;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('mini_cal_row.mini_cal_days', array(
|
||||
'MINI_CAL_DAY' => $mini_cal_day
|
||||
));
|
||||
$i++;
|
||||
}
|
||||
// no day
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars('mini_cal_row.mini_cal_days', array(
|
||||
'MINI_CAL_DAY' => ' '
|
||||
));
|
||||
}
|
||||
|
||||
// is this the last day of the week?
|
||||
if ($mini_cal_count==6)
|
||||
{
|
||||
// if so then reset the count
|
||||
$mini_cal_count=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise increment the count
|
||||
$mini_cal_count++;
|
||||
}
|
||||
}
|
||||
|
||||
// output our general calendar bits
|
||||
$prev_qs = setQueryStringVal('m', $mini_cal_month -1);
|
||||
$next_qs = setQueryStringVal('m', $mini_cal_month +1);
|
||||
$down = $mini_cal_month - 1;
|
||||
$up = $mini_cal_month + 1;
|
||||
$prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$down") . '"><img src="' . "{$phpbb_root_path}portal/images/mini_cal_icon_left_arrow.png" . '" title="' . $user->lang['View_previous_month'] . '" height="16" width="16" alt="<<" /></a>';
|
||||
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$up") . '"><img src="' . "{$phpbb_root_path}portal/images/mini_cal_icon_right_arrow.png" . '" title="' . $user->lang['View_next_month'] . '" height="16" width="16" alt=">>" /></a>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_MINICAL' => true,
|
||||
'L_MINI_CAL_MONTH' => $user->lang['mini_cal']['long_month'][$mini_cal->day[0][4]] . " " . $mini_cal->day[0][5],
|
||||
'L_MINI_CAL_ADD_EVENT' => $user->lang['Mini_Cal_add_event'],
|
||||
'L_MINI_CAL_CALENDAR' => $user->lang['Mini_Cal_calendar'],
|
||||
'L_MINI_CAL_EVENTS' => $user->lang['Mini_Cal_events'],
|
||||
'L_MINI_CAL_NO_EVENTS' => $user->lang['Mini_Cal_no_events'],
|
||||
'L_MINI_CAL_SUN' => $user->lang['mini_cal']['day'][1],
|
||||
'L_MINI_CAL_MON' => $user->lang['mini_cal']['day'][2],
|
||||
'L_MINI_CAL_TUE' => $user->lang['mini_cal']['day'][3],
|
||||
'L_MINI_CAL_WED' => $user->lang['mini_cal']['day'][4],
|
||||
'L_MINI_CAL_THU' => $user->lang['mini_cal']['day'][5],
|
||||
'L_MINI_CAL_FRI' => $user->lang['mini_cal']['day'][6],
|
||||
'L_MINI_CAL_SAT' => $user->lang['mini_cal']['day'][7],
|
||||
'U_PREV_MONTH' => $prev_month,
|
||||
'U_NEXT_MONTH' => $next_month,
|
||||
));
|
||||
|
||||
?>
|
||||
117
root/portal/block/news.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// Fetch Posts for news from portal/includes/functions.php
|
||||
//
|
||||
$template->assign_vars(array(
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_NEWEST_POST'),
|
||||
'S_DISPLAY_NEWS' => true,
|
||||
));
|
||||
|
||||
#if (!isset($HTTP_GET_VARS['article']))
|
||||
$news = request_var('news', -1);
|
||||
if($news < 0)
|
||||
{
|
||||
$fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_config['portal_number_of_news'], $portal_config['portal_news_length'], 0, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news');
|
||||
|
||||
if (count($fetch_news) == 0)
|
||||
{
|
||||
$template->assign_block_vars('news_row', array(
|
||||
'S_NO_TOPICS' => true,
|
||||
'S_NOT_LAST' => false
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
for ($i = 0; $i < count($fetch_news); $i++)
|
||||
{
|
||||
if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true )
|
||||
{
|
||||
$open_bracket = '[ ';
|
||||
$close_bracket = ' ]';
|
||||
$read_full = $user->lang['READ_FULL'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$open_bracket = '';
|
||||
$close_bracket = '';
|
||||
$read_full = '';
|
||||
}
|
||||
// unread?
|
||||
$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;
|
||||
|
||||
$template->assign_block_vars('news_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
'TEXT' => $fetch_news[$i]['post_text'],
|
||||
'REPLIES' => $fetch_news[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
|
||||
'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", 'news=' . $i),
|
||||
'L_READ_FULL' => $read_full,
|
||||
'OPEN' => $open_bracket,
|
||||
'CLOSE' => $close_bracket,
|
||||
'S_NOT_LAST' => ($i < count($fetch_news) - 1) ? true : false,
|
||||
'S_POLL' => $fetch_news[$i]['poll'],
|
||||
'S_UNREAD_INFO' => $unread_topic,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_config['portal_number_of_news'], 0, 0, ($portal_config['portal_show_all_news']) ? 'news_all' : 'news');
|
||||
|
||||
$i = $news;
|
||||
$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;
|
||||
|
||||
$template->assign_block_vars('news_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
//'FORUM_NAME' => $fetch_news[$i]['forum_name'],
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
'TEXT' => $fetch_news[$i]['post_text'],
|
||||
'REPLIES' => $fetch_news[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
//'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'],
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']),
|
||||
'S_POLL' => $fetch_news[$i]['poll'],
|
||||
'S_UNREAD_INFO' => $unread_topic,
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
395
root/portal/block/poll.php
Normal file
@@ -0,0 +1,395 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
// Initial var setup
|
||||
$forum_id = request_var('f', 0);
|
||||
$topic_id = request_var('t', ((!empty($portal_config['portal_poll_topic_id'])) ? $portal_config['portal_poll_topic_id'] : 0));
|
||||
$topic_id = preg_replace('/[^0-9]/', '', $topic_id); // just a temporary solution to get rid of sql errors
|
||||
$post_id = request_var('p', 0);
|
||||
$voted_id = request_var('vote_id', array('' => 0));
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$view = request_var('view', '');
|
||||
|
||||
$sort_days = request_var('st', ((!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0));
|
||||
$sort_key = request_var('sk', ((!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'));
|
||||
$sort_dir = request_var('sd', ((!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'));
|
||||
|
||||
$update = request_var('update', false);
|
||||
|
||||
// Do we have a topic or post id?
|
||||
if (!$topic_id && !$post_id)
|
||||
{
|
||||
// trigger_error('NO_TOPIC');
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
|
||||
// Find topic id if user requested a newer or older topic
|
||||
if ($view && !$post_id)
|
||||
{
|
||||
if (!$forum_id)
|
||||
{
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . TOPICS_TABLE . "
|
||||
WHERE topic_id = $topic_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_id = (int) $db->sql_fetchfield('forum_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$forum_id)
|
||||
{
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
}
|
||||
|
||||
// Check for global announcement correctness?
|
||||
if ((!isset($row) || !$row['forum_id']) && !$forum_id)
|
||||
{
|
||||
//trigger_error('NO_TOPIC');
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
else if (isset($row) && $row['forum_id'])
|
||||
{
|
||||
$forum_id = $row['forum_id'];
|
||||
}
|
||||
}
|
||||
|
||||
// This rather complex gaggle of code handles querying for topics but
|
||||
// also allows for direct linking to a post (and the calculation of which
|
||||
// page the post is on and the correct display of viewtopic)
|
||||
$sql_array = array(
|
||||
'SELECT' => 't.*, f.*',
|
||||
|
||||
'FROM' => array(
|
||||
FORUMS_TABLE => 'f',
|
||||
)
|
||||
);
|
||||
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
$sql_array['SELECT'] .= ', tw.notify_status';
|
||||
$sql_array['LEFT_JOIN'] = array();
|
||||
|
||||
$sql_array['LEFT_JOIN'][] = array(
|
||||
'FROM' => array(TOPICS_WATCH_TABLE => 'tw'),
|
||||
'ON' => 'tw.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tw.topic_id'
|
||||
);
|
||||
}
|
||||
|
||||
if (!$post_id)
|
||||
{
|
||||
$sql_array['WHERE'] = "t.topic_id = $topic_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id" . ((!$auth->acl_get('m_approve', $forum_id)) ? ' AND p.post_approved = 1' : '');
|
||||
$sql_array['FROM'][POSTS_TABLE] = 'p';
|
||||
}
|
||||
|
||||
$sql_array['WHERE'] .= ' AND (f.forum_id = t.forum_id';
|
||||
|
||||
$sql_array['WHERE'] .= ')';
|
||||
$sql_array['FROM'][TOPICS_TABLE] = 't';
|
||||
|
||||
// Join to forum table on topic forum_id unless topic forum_id is zero
|
||||
// whereupon we join on the forum_id passed as a parameter ... this
|
||||
// is done so navigation, forum name, etc. remain consistent with where
|
||||
// user clicked to view a global topic
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query($sql);
|
||||
$topic_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$topic_data)
|
||||
{
|
||||
// If post_id was submitted, we try at least to display the topic as a last resort...
|
||||
if ($post_id && $forum_id && $topic_id)
|
||||
{
|
||||
redirect(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"));
|
||||
}
|
||||
|
||||
//trigger_error('NO_TOPIC');
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
|
||||
$forum_id = (int) $topic_data['forum_id'];
|
||||
$topic_id = (int) $topic_data['topic_id'];
|
||||
|
||||
// Setup look and feel
|
||||
$user->setup('viewtopic', $topic_data['forum_style']);
|
||||
|
||||
if (!$topic_data['topic_approved'] && !$auth->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
//trigger_error('NO_TOPIC');
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
|
||||
// Start auth check
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
{
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
//trigger_error('SORRY_AUTH_READ');
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
|
||||
//login_box('', $user->lang['LOGIN_VIEWFORUM']);
|
||||
$portal_config['portal_poll_topic'] = false;
|
||||
}
|
||||
|
||||
// Forum is passworded ... check whether access has been granted to this
|
||||
// user this session, if not show login box
|
||||
if ($topic_data['forum_password'])
|
||||
{
|
||||
login_forum_box($topic_data);
|
||||
}
|
||||
|
||||
// Post ordering options
|
||||
$limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||
|
||||
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
|
||||
$sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
|
||||
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
// General Viewtopic URL for return links
|
||||
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start&$u_sort_param");
|
||||
|
||||
// This is only used for print view so ...
|
||||
$server_path = (!$view) ? $phpbb_root_path : generate_board_url() . '/';
|
||||
|
||||
// Does this topic contain a poll?
|
||||
if (!empty($topic_data['poll_start']))
|
||||
{
|
||||
$sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid
|
||||
FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p
|
||||
WHERE o.topic_id = $topic_id
|
||||
AND p.post_id = {$topic_data['topic_first_post_id']}
|
||||
AND p.topic_id = o.topic_id
|
||||
ORDER BY o.poll_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$poll_info = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$poll_info[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$cur_voted_id = array();
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
$sql = 'SELECT poll_option_id
|
||||
FROM ' . POLL_VOTES_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id . '
|
||||
AND vote_user_id = ' . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$cur_voted_id[] = $row['poll_option_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cookie based guest tracking ... I don't like this but hum ho
|
||||
// it's oft requested. This relies on "nice" users who don't feel
|
||||
// the need to delete cookies to mess with results.
|
||||
if (isset($_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]))
|
||||
{
|
||||
$cur_voted_id = explode(',', $_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]);
|
||||
$cur_voted_id = array_map('intval', $cur_voted_id);
|
||||
}
|
||||
}
|
||||
|
||||
$s_can_vote = (((!sizeof($cur_voted_id) && $auth->acl_get('f_vote', $forum_id)) ||
|
||||
($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change'])) &&
|
||||
(($topic_data['poll_length'] != 0 && $topic_data['poll_start'] + $topic_data['poll_length'] > time()) || $topic_data['poll_length'] == 0) &&
|
||||
$topic_data['topic_status'] != ITEM_LOCKED &&
|
||||
$topic_data['forum_status'] != ITEM_LOCKED) ? true : false;
|
||||
$s_display_results = (!$s_can_vote || ($s_can_vote && sizeof($cur_voted_id)) || $view == 'viewpoll') ? true : false;
|
||||
|
||||
if ($update && $s_can_vote)
|
||||
{
|
||||
if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'])
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id");
|
||||
|
||||
meta_refresh(5, $redirect_url);
|
||||
|
||||
$message = (!sizeof($voted_id)) ? 'NO_VOTE_OPTION' : 'TOO_MANY_VOTE_OPTIONS';
|
||||
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
foreach ($voted_id as $option)
|
||||
{
|
||||
if (in_array($option, $cur_voted_id))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
|
||||
SET poll_option_total = poll_option_total + 1
|
||||
WHERE poll_option_id = ' . (int) $option . '
|
||||
AND topic_id = ' . (int) $topic_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
$sql_ary = array(
|
||||
'topic_id' => (int) $topic_id,
|
||||
'poll_option_id' => (int) $option,
|
||||
'vote_user_id' => (int) $user->data['user_id'],
|
||||
'vote_user_ip' => (string) $user->ip,
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($cur_voted_id as $option)
|
||||
{
|
||||
if (!in_array($option, $voted_id))
|
||||
{
|
||||
$sql = 'UPDATE ' . POLL_OPTIONS_TABLE . '
|
||||
SET poll_option_total = poll_option_total - 1
|
||||
WHERE poll_option_id = ' . (int) $option . '
|
||||
AND topic_id = ' . (int) $topic_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
$sql = 'DELETE FROM ' . POLL_VOTES_TABLE . '
|
||||
WHERE topic_id = ' . (int) $topic_id . '
|
||||
AND poll_option_id = ' . (int) $option . '
|
||||
AND vote_user_id = ' . (int) $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS && !$user->data['is_bot'])
|
||||
{
|
||||
$user->set_cookie('poll_' . $topic_id, implode(',', $voted_id), time() + 31536000);
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET poll_last_vote = ' . time() . "
|
||||
WHERE topic_id = $topic_id";
|
||||
//, topic_last_post_time = ' . time() . " -- for bumping topics with new votes, ignore for now
|
||||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id");
|
||||
|
||||
meta_refresh(5, $redirect_url);
|
||||
trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
}
|
||||
|
||||
$poll_total = 0;
|
||||
foreach ($poll_info as $poll_option)
|
||||
{
|
||||
$poll_total += $poll_option['poll_option_total'];
|
||||
}
|
||||
|
||||
if ($poll_info[0]['bbcode_bitfield'])
|
||||
{
|
||||
$poll_bbcode = new bbcode();
|
||||
}
|
||||
else
|
||||
{
|
||||
$poll_bbcode = false;
|
||||
}
|
||||
|
||||
for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++)
|
||||
{
|
||||
$poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']);
|
||||
$poll_info[$i]['poll_option_text'] = str_replace("\n", '<br />', $poll_info[$i]['poll_option_text']);
|
||||
|
||||
if ($poll_bbcode !== false)
|
||||
{
|
||||
$poll_bbcode->bbcode_second_pass($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
|
||||
}
|
||||
|
||||
$topic_data['poll_title'] = censor_text($topic_data['poll_title']);
|
||||
$topic_data['poll_title'] = str_replace("\n", '<br />', $topic_data['poll_title']);
|
||||
|
||||
if ($poll_bbcode !== false)
|
||||
{
|
||||
$poll_bbcode->bbcode_second_pass($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield']);
|
||||
}
|
||||
$topic_data['poll_title'] = smiley_text($topic_data['poll_title']);
|
||||
|
||||
unset($poll_bbcode);
|
||||
|
||||
foreach ($poll_info as $poll_option)
|
||||
{
|
||||
$option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
|
||||
$option_pct_txt = sprintf("%.1d%%", ($option_pct * 100));
|
||||
|
||||
$template->assign_block_vars('poll_option', array(
|
||||
'POLL_OPTION_ID' => $poll_option['poll_option_id'],
|
||||
'POLL_OPTION_CAPTION' => $poll_option['poll_option_text'],
|
||||
'POLL_OPTION_RESULT' => $poll_option['poll_option_total'],
|
||||
'POLL_OPTION_PERCENT' => $option_pct_txt,
|
||||
'POLL_OPTION_PCT' => round($option_pct * 100),
|
||||
'POLL_OPTION_IMG' => $user->img('poll_center', $option_pct_txt, round($option_pct * 10)),
|
||||
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false
|
||||
));
|
||||
}
|
||||
|
||||
$poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'POLL_QUESTION' => $topic_data['poll_title'],
|
||||
'TOTAL_VOTES' => $poll_total,
|
||||
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
|
||||
'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
|
||||
|
||||
'L_MAX_VOTES' => ($topic_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $topic_data['poll_max_options']),
|
||||
'L_POLL_LENGTH' => ($topic_data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '',
|
||||
|
||||
'S_HAS_POLL' => true,
|
||||
'S_CAN_VOTE' => $s_can_vote,
|
||||
'S_DISPLAY_RESULTS' => $s_display_results,
|
||||
'S_IS_MULTI_CHOICE' => ($topic_data['poll_max_options'] > 1) ? true : false,
|
||||
'S_POLL_ACTION' => $viewtopic_url,
|
||||
|
||||
'U_VIEW_RESULTS' => $viewtopic_url . '&view=viewpoll'
|
||||
));
|
||||
unset($poll_end, $poll_info, $voted_id);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_POLL' => true
|
||||
));
|
||||
|
||||
?>
|
||||
63
root/portal/block/random_member.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type <> ' . USER_IGNORE . '
|
||||
AND user_inactive_time = 0
|
||||
ORDER BY RAND()
|
||||
LIMIT 0,1';
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$avatar_img = get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']);
|
||||
|
||||
$rank_title = $rank_img = '';
|
||||
get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||
|
||||
$username = $row['username'];
|
||||
$user_id = (int) $row['user_id'];
|
||||
$colour = $row['user_colour'];
|
||||
|
||||
$template->assign_block_vars('random_member', array(
|
||||
//'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
|
||||
'USERNAME' => get_username_string('username', $user_id, $username, $colour),
|
||||
'USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
|
||||
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'USER_POSTS' => (int) $row['user_posts'],
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
'JOINED' => $user->format_date($row['user_regdate'], 'd.M.Y'),
|
||||
'USER_OCC' => censor_text($row['user_occ']),
|
||||
'USER_FROM' => censor_text($row['user_from']),
|
||||
'U_WWW' => censor_text($row['user_website']),
|
||||
));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_RANDOM_MEMBER' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
158
root/portal/block/recent.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// Exclude forums
|
||||
//
|
||||
$sql_where = '';
|
||||
if ($portal_config['portal_exclude_forums'])
|
||||
{
|
||||
$exclude_forums = explode(',', $portal_config['portal_exclude_forums']);
|
||||
foreach ($exclude_forums as $i => $id)
|
||||
{
|
||||
if ($id > 0)
|
||||
{
|
||||
$sql_where .= ' AND forum_id <> ' . trim($id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Recent announcements
|
||||
//
|
||||
$sql = 'SELECT topic_title, forum_id, topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_status <> ' . FORUM_LINK . '
|
||||
AND topic_approved = 1
|
||||
AND ( topic_type = ' . POST_ANNOUNCE . ' OR topic_type = ' . POST_GLOBAL . ' )
|
||||
' . $sql_where . '
|
||||
ORDER BY topic_time DESC';
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
|
||||
{
|
||||
// auto auth
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
$template->assign_block_vars('latest_announcements', array(
|
||||
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
|
||||
'FULL_TITLE' => censor_text($row['topic_title']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
|
||||
));
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// Recent hot topics
|
||||
//
|
||||
$sql = 'SELECT topic_title, forum_id, topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_approved = 1
|
||||
AND topic_replies >=' . $config['hot_threshold'] . '
|
||||
' . $sql_where . '
|
||||
ORDER BY topic_time DESC';
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
|
||||
{
|
||||
// auto auth
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
$template->assign_block_vars('latest_hot_topics', array(
|
||||
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
|
||||
'FULL_TITLE' => censor_text($row['topic_title']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
|
||||
));
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// Recent topic (only show normal topic)
|
||||
//
|
||||
$sql = 'SELECT topic_title, forum_id, topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_status <> ' . FORUM_LINK . '
|
||||
AND topic_approved = 1
|
||||
AND topic_type = ' . POST_NORMAL . '
|
||||
' . $sql_where . '
|
||||
ORDER BY topic_time DESC';
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
|
||||
{
|
||||
// auto auth
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
$template->assign_block_vars('latest_topics', array(
|
||||
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
|
||||
'FULL_TITLE' => censor_text($row['topic_title']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
|
||||
));
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
/*//we may also delete this?
|
||||
//
|
||||
// Recent active topic
|
||||
//
|
||||
$last_post_time_sql = ($sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($sort_days * 24 * 3600)) : '';
|
||||
|
||||
$sql = 'SELECT topic_title, forum_id, topic_id, topic_time, topic_first_poster_name
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_status <> ' . FORUM_LINK . "
|
||||
$last_post_time_sql
|
||||
AND topic_moved_id = 0
|
||||
AND topic_approved = 1
|
||||
AND topic_type = " . POST_NORMAL . '
|
||||
' . $sql_where . '
|
||||
ORDER BY topic_time DESC';
|
||||
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
|
||||
{
|
||||
// auto auth
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
$template->assign_block_vars('active_topics', array(
|
||||
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
|
||||
'FULL_TITLE' => censor_text($row['topic_title']),
|
||||
'DATE' => $user->format_date($row['topic_time']),
|
||||
'POSTER' => $row['topic_first_poster_name'],
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
|
||||
));
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
*/
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_RECENT' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
28
root/portal/block/search.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_PORTALSEARCH' => true,
|
||||
'S_SEARCH_ACTION' => "{$phpbb_root_path}search.$phpEx",
|
||||
|
||||
));
|
||||
|
||||
?>
|
||||
149
root/portal/block/statistics.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// switch idea from phpBB2 :p
|
||||
function get_db_stat($mode)
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
switch( $mode )
|
||||
{
|
||||
case 'announcmenttotal':
|
||||
$sql = 'SELECT COUNT(distinct t.topic_id) AS announcment_total
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
|
||||
WHERE t.topic_type = ' . POST_ANNOUNCE . '
|
||||
AND p.post_id = t.topic_first_post_id';
|
||||
break;
|
||||
case 'stickytotal':
|
||||
$sql = 'SELECT COUNT(distinct t.topic_id) AS sticky_total
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
|
||||
WHERE t.topic_type = ' . POST_STICKY . '
|
||||
AND p.post_id = t.topic_first_post_id';
|
||||
break;
|
||||
case 'attachmentstotal':
|
||||
$sql = 'SELECT COUNT(attach_id) AS attachments_total
|
||||
FROM ' . ATTACHMENTS_TABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
switch ( $mode )
|
||||
{
|
||||
case 'announcmenttotal':
|
||||
return $row['announcment_total'];
|
||||
break;
|
||||
case 'stickytotal':
|
||||
return $row['sticky_total'];
|
||||
break;
|
||||
case 'attachmentstotal':
|
||||
return $row['attachments_total'];
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
|
||||
$total_posts = $config['num_posts'];
|
||||
$total_topics = $config['num_topics'];
|
||||
$total_users = $config['num_users'];
|
||||
|
||||
// no last user color, no more SQL codes ;)
|
||||
$newest_user = $config['newest_username'];
|
||||
$newest_uid = $config['newest_user_id'];
|
||||
|
||||
$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
|
||||
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
|
||||
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
|
||||
|
||||
// avarage stat
|
||||
$board_days = ( time() - $config['board_startdate'] ) / 86400;
|
||||
|
||||
$topics_per_day = round($total_topics / $board_days, 0);
|
||||
$posts_per_day = round($total_posts / $board_days, 0);
|
||||
$users_per_day = round($total_users / $board_days, 0);
|
||||
$topics_per_user = round($total_topics / $total_users, 0);
|
||||
$posts_per_user = round($total_posts / $total_users, 0);
|
||||
$posts_per_topic = round($total_posts / $total_topics, 0);
|
||||
|
||||
if ($topics_per_day > $total_topics)
|
||||
{
|
||||
$topics_per_day = $total_topics;
|
||||
}
|
||||
|
||||
if ($posts_per_day > $total_posts)
|
||||
{
|
||||
$posts_per_day = $total_posts;
|
||||
}
|
||||
|
||||
if ($users_per_day > $total_users)
|
||||
{
|
||||
$users_per_day = $total_users;
|
||||
}
|
||||
|
||||
if ($topics_per_user > $total_topics)
|
||||
{
|
||||
$topics_per_user = $total_topics;
|
||||
}
|
||||
|
||||
if ($posts_per_user > $total_posts)
|
||||
{
|
||||
$posts_per_user = $total_posts;
|
||||
}
|
||||
|
||||
if ($posts_per_topic > $total_posts)
|
||||
{
|
||||
$posts_per_topic = $total_posts;
|
||||
}
|
||||
|
||||
$l_topics_per_day_s = ($total_topics == 0) ? 'TOPICS_PER_DAY_ZERO' : 'TOPICS_PER_DAY_OTHER';
|
||||
$l_posts_per_day_s = ($total_posts == 0) ? 'POSTS_PER_DAY_ZERO' : 'POSTS_PER_DAY_OTHER';
|
||||
$l_users_per_day_s = ($total_users == 0) ? 'USERS_PER_DAY_ZERO' : 'USERS_PER_DAY_OTHER';
|
||||
$l_topics_per_user_s = ($total_topics == 0) ? 'TOPICS_PER_USER_ZERO' : 'TOPICS_PER_USER_OTHER';
|
||||
$l_posts_per_user_s = ($total_posts == 0) ? 'POSTS_PER_USER_ZERO' : 'POSTS_PER_USER_OTHER';
|
||||
$l_posts_per_topic_s = ($total_posts == 0) ? 'POSTS_PER_TOPIC_ZERO' : 'POSTS_PER_TOPIC_OTHER';
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ADVANCED_STAT' => true,
|
||||
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
|
||||
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
|
||||
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
|
||||
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $newest_uid) . '" style="color: #' . $config['newest_user_colour'] . ';">' . $newest_user . '</a>'),
|
||||
'S_ANN' => get_db_stat('announcmenttotal'),
|
||||
'S_SCT' => get_db_stat('stickytotal'),
|
||||
'S_TOT_ATTACH' => get_db_stat('attachmentstotal'),
|
||||
|
||||
// avarage stat
|
||||
'TOPICS_PER_DAY' => sprintf($user->lang[$l_topics_per_day_s], $topics_per_day),
|
||||
'POSTS_PER_DAY' => sprintf($user->lang[$l_posts_per_day_s], $posts_per_day),
|
||||
'USERS_PER_DAY' => sprintf($user->lang[$l_users_per_day_s], $users_per_day),
|
||||
'TOPICS_PER_USER' => sprintf($user->lang[$l_topics_per_user_s], $topics_per_user),
|
||||
'POSTS_PER_USER' => sprintf($user->lang[$l_posts_per_user_s], $posts_per_user),
|
||||
'POSTS_PER_TOPIC' => sprintf($user->lang[$l_posts_per_topic_s], $posts_per_topic),
|
||||
));
|
||||
|
||||
?>
|
||||
48
root/portal/block/top_posters.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
$sql = 'SELECT user_id, username, user_posts, user_colour
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type <> ' . USER_IGNORE . '
|
||||
AND user_posts <> 0
|
||||
ORDER BY user_posts DESC';
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_max_most_poster']);
|
||||
|
||||
while( ($row = $db->sql_fetchrow($result)) && ($row['username']) )
|
||||
{
|
||||
$template->assign_block_vars('top_poster', array(
|
||||
'S_SEARCH_ACTION'=> append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $row['user_id'] . '&sr=posts'),
|
||||
'USERNAME' => censor_text($row['username']),
|
||||
'USERNAME_COLOR'=> ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] .'"' : '',
|
||||
'U_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
|
||||
'POSTER_POSTS' => $row['user_posts'],
|
||||
)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_TOP_POSTERS' => true
|
||||
));
|
||||
|
||||
?>
|
||||
86
root/portal/block/user_menu.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// + new posts since last visit & you post number
|
||||
//
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
// new posts since last visit
|
||||
$sql = "SELECT COUNT(distinct post_id) as total
|
||||
FROM " . POSTS_TABLE . "
|
||||
WHERE post_time >= " . $user->data['session_last_visit'];
|
||||
$result = $db->sql_query($sql);
|
||||
$new_posts_count = (int) $db->sql_fetchfield('total');
|
||||
|
||||
// your post number
|
||||
$sql = "SELECT user_posts
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$you_posts_count = (int) $db->sql_fetchfield('user_posts');
|
||||
}
|
||||
//
|
||||
// - new posts since last visit & you post number
|
||||
//
|
||||
|
||||
|
||||
// Get user...
|
||||
$user_id = $user->data['user_id'];
|
||||
$username = $user->data['username'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
|
||||
$result = $db->sql_query($sql);
|
||||
$member = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$avatar_img = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
|
||||
$rank_title = $rank_img = '';
|
||||
get_user_rank($member['user_rank'], $member['user_posts'], $rank_title, $rank_img, $rank_img_src);
|
||||
$username = $member['username'];
|
||||
$user_id = (int) $member['user_id'];
|
||||
$colour = $member['user_colour'];
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'L_NEW_POSTS' => $user->lang['SEARCH_NEW'] . ' (' . $new_posts_count . ')',
|
||||
'L_SELF_POSTS' => $user->lang['SEARCH_SELF'] . ' (' . $you_posts_count . ')',
|
||||
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
|
||||
'USERNAME' => get_username_string('username', $user_id, $username, $colour),
|
||||
'USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
|
||||
|
||||
'U_NEW_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=newposts'),
|
||||
'U_SELF_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=egosearch'),
|
||||
'U_UM_BOOKMARKS' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=main&mode=bookmarks'),
|
||||
'U_UM_MAIN_SUBSCRIBED' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=main&mode=subscribed'),
|
||||
'U_PRIVATE_MESSAGES' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=pm&folder=inbox'),
|
||||
));
|
||||
|
||||
?>
|
||||
251
root/portal/block/whois_online.php
Normal file
@@ -0,0 +1,251 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// who is online borrowed from index.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in index.php) and I don't notice it, please tell me)
|
||||
//
|
||||
|
||||
// Grab group details for legend display
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_legend = 1
|
||||
AND group_type <> ' . GROUP_HIDDEN . '
|
||||
ORDER BY group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
{
|
||||
$legend .= (($legend) ? ', ' : '') . '<span' . $colour_text . '>' . $user->lang['G_BOTS'] . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend .= (($legend) ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// users online list borrowed from includes/functions.php (phpBB-3.0.B3)
|
||||
// if this gets changed (in functions.php) and I don't notice it, please tell me)
|
||||
//
|
||||
$display_online_list = true;
|
||||
|
||||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
|
||||
{
|
||||
$userlist_ary = $userlist_visible = array();
|
||||
$logged_visible_online = $logged_hidden_online = $guests_online = $prev_user_id = 0;
|
||||
$prev_session_ip = $reading_sql = '';
|
||||
|
||||
if (!empty($_REQUEST['f']))
|
||||
{
|
||||
$f = request_var('f', 0);
|
||||
|
||||
// Do not change this (it is defined as _f_={forum_id}x within session.php)
|
||||
$reading_sql = " AND s.session_page LIKE '%\_f\_={$f}x%'";
|
||||
|
||||
// Specify escape character for MSSQL
|
||||
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
|
||||
{
|
||||
$reading_sql .= " ESCAPE '\\'";
|
||||
}
|
||||
}
|
||||
|
||||
// Get number of online guests
|
||||
if (!$config['load_online_guests'])
|
||||
{
|
||||
if ($db->sql_layer === 'sqlite')
|
||||
{
|
||||
$sql = 'SELECT COUNT(session_ip) as num_guests
|
||||
FROM (
|
||||
SELECT DISTINCT s.session_ip
|
||||
FROM ' . SESSIONS_TABLE . ' s
|
||||
WHERE s.session_user_id = ' . ANONYMOUS . '
|
||||
AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
|
||||
$reading_sql .
|
||||
')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT COUNT(DISTINCT s.session_ip) as num_guests
|
||||
FROM ' . SESSIONS_TABLE . ' s
|
||||
WHERE s.session_user_id = ' . ANONYMOUS . '
|
||||
AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
|
||||
$reading_sql;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
$guests_online = (int) $db->sql_fetchfield('num_guests');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$sql = 'SELECT u.username, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour, s.session_ip, s.session_viewonline
|
||||
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s
|
||||
WHERE s.session_time >= ' . (time() - (intval($config['load_online_time']) * 60)) .
|
||||
$reading_sql .
|
||||
((!$config['load_online_guests']) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . '
|
||||
AND u.user_id = s.session_user_id
|
||||
ORDER BY u.username ASC, s.session_ip ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// User is logged in and therefore not a guest
|
||||
if ($row['user_id'] != ANONYMOUS)
|
||||
{
|
||||
// Skip multiple sessions for one user
|
||||
if ($row['user_id'] != $prev_user_id)
|
||||
{
|
||||
if ($row['user_colour'])
|
||||
{
|
||||
$user_colour = ' style="color:#' . $row['user_colour'] . '"';
|
||||
$row['username'] = '<strong>' . $row['username'] . '</strong>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_colour = '';
|
||||
}
|
||||
|
||||
if ($row['user_allow_viewonline'] && $row['session_viewonline'])
|
||||
{
|
||||
$user_online_link = $row['username'];
|
||||
$logged_visible_online++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_online_link = '<em>' . $row['username'] . '</em>';
|
||||
$logged_hidden_online++;
|
||||
}
|
||||
|
||||
if (($row['user_allow_viewonline'] && $row['session_viewonline']) || $auth->acl_get('u_viewonline'))
|
||||
{
|
||||
if ($row['user_type'] <> USER_IGNORE)
|
||||
{
|
||||
$user_online_link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) . '"' . $user_colour . '>' . $user_online_link . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_online_link = ($user_colour) ? '<span' . $user_colour . '>' . $user_online_link . '</span>' : $user_online_link;
|
||||
}
|
||||
|
||||
$online_userlist .= ($online_userlist) ? ', ' . $user_online_link : $user_online_link;
|
||||
}
|
||||
}
|
||||
|
||||
$prev_user_id = $row['user_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Skip multiple sessions for one user
|
||||
if ($row['session_ip'] != $prev_session_ip)
|
||||
{
|
||||
$guests_online++;
|
||||
}
|
||||
}
|
||||
|
||||
$prev_session_ip = $row['session_ip'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$online_userlist)
|
||||
{
|
||||
$online_userlist = $user->lang['NO_ONLINE_USERS'];
|
||||
}
|
||||
|
||||
if (empty($_REQUEST['f']))
|
||||
{
|
||||
$online_userlist = $user->lang['REGISTERED_USERS'] . ' ' . $online_userlist;
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online = ($guests_online == 1) ? $user->lang['BROWSING_FORUM_GUEST'] : $user->lang['BROWSING_FORUM_GUESTS'];
|
||||
$online_userlist = sprintf($l_online, $online_userlist, $guests_online);
|
||||
}
|
||||
|
||||
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
|
||||
|
||||
if ($total_online_users > $config['record_online_users'])
|
||||
{
|
||||
set_config('record_online_users', $total_online_users, true);
|
||||
set_config('record_online_date', time(), true);
|
||||
}
|
||||
|
||||
// Build online listing
|
||||
$vars_online = array(
|
||||
'ONLINE' => array('total_online_users', 'l_t_user_s'),
|
||||
'REG' => array('logged_visible_online', 'l_r_user_s'),
|
||||
'HIDDEN' => array('logged_hidden_online', 'l_h_user_s'),
|
||||
'GUEST' => array('guests_online', 'l_g_user_s')
|
||||
);
|
||||
|
||||
foreach ($vars_online as $l_prefix => $var_ary)
|
||||
{
|
||||
switch (${$var_ary[0]})
|
||||
{
|
||||
case 0:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL'];
|
||||
break;
|
||||
|
||||
case 1:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL'];
|
||||
break;
|
||||
|
||||
default:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($vars_online);
|
||||
|
||||
$l_online_users = sprintf($l_t_user_s, $total_online_users);
|
||||
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
|
||||
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
|
||||
$l_online_users .= sprintf($l_g_user_s, $guests_online);
|
||||
|
||||
$l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date']));
|
||||
|
||||
$l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
|
||||
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online_time = '';
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_ONLINE_PORTAL_LIST' => true,
|
||||
'TOTAL_ONLINE_USERS' => $total_online_users,
|
||||
'VISIBLE_ONLINE' => $logged_visible_online,
|
||||
'HIDDEN_ONLINE' => $logged_hidden_online,
|
||||
'GUEST_ONLINE' => $guests_online,
|
||||
'RECORD_USERS' => $l_online_record,
|
||||
'LEGEND'=> $legend,
|
||||
));
|
||||
|
||||
?>
|
||||
76
root/portal/block/wordgraph.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$words_array = array();
|
||||
|
||||
// Get words and number of those words
|
||||
$sql = 'SELECT l.word_text, COUNT(*) AS word_count
|
||||
FROM ' . SEARCH_WORDLIST_TABLE . ' AS l, ' . SEARCH_WORDMATCH_TABLE . ' AS m
|
||||
WHERE m.word_id = l.word_id
|
||||
GROUP BY m.word_id
|
||||
ORDER BY word_count DESC';
|
||||
$result = $db->sql_query_limit($sql, $portal_config['portal_wordgraph_max_words']);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$word = strtolower($row['word_text']);
|
||||
$words_array[$word] = $row['word_count'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$minimum = 1000000;
|
||||
$maximum = -1000000;
|
||||
|
||||
foreach ( array_keys($words_array) as $word )
|
||||
{
|
||||
if ( $words_array[$word] > $maximum )
|
||||
{
|
||||
$maximum = $words_array[$word];
|
||||
}
|
||||
|
||||
if ( $words_array[$word] < $minimum )
|
||||
{
|
||||
$minimum = $words_array[$word];
|
||||
}
|
||||
}
|
||||
|
||||
// ratio
|
||||
$ratio = $portal_config['portal_wordgraph_ratio'] / ( $maximum - $minimum +1);
|
||||
|
||||
$words = array_keys($words_array);
|
||||
sort($words);
|
||||
|
||||
foreach ( $words as $word )
|
||||
{
|
||||
$template->assign_block_vars('wordgraph', array(
|
||||
'WORD' => ($portal_config['portal_wordgraph_word_counts']) ? $word . '(' . $words_array[$word] . ')' : $word,
|
||||
'WORD_FONT_SIZE' => (int) ( 9 + ( $words_array[$word] * $ratio ) ),
|
||||
'WORD_SEARCH_URL' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode($word)),
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_WORDGRAPH' => true,
|
||||
'L_WORDGRAPH' => $user->lang['WORDGRAPH'],
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
BIN
root/portal/images/bullet.gif
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
root/portal/images/clock.swf
Normal file
BIN
root/portal/images/dot.gif
Normal file
|
After Width: | Height: | Size: 92 B |
BIN
root/portal/images/icon_topic_attach.gif
Normal file
|
After Width: | Height: | Size: 144 B |
8
root/portal/images/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
BIN
root/portal/images/link.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
root/portal/images/member.gif
Normal file
|
After Width: | Height: | Size: 231 B |
BIN
root/portal/images/mini_cal_icon_left_arrow.png
Normal file
|
After Width: | Height: | Size: 745 B |
BIN
root/portal/images/mini_cal_icon_right_arrow.png
Normal file
|
After Width: | Height: | Size: 736 B |
BIN
root/portal/images/paypal.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
489
root/portal/includes/functions.php
Normal file
@@ -0,0 +1,489 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Get portal config
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PORTAL_CONFIG_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$portal_config_name = $row['config_name'];
|
||||
$portal_config_value = $row['config_value'];
|
||||
$portal_config[$portal_config_name] = $portal_config_value;
|
||||
}
|
||||
|
||||
//
|
||||
include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
|
||||
|
||||
// fetch post for news & announce
|
||||
function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $type)
|
||||
{
|
||||
global $db, $phpbb_root_path, $auth, $bbcode_bitfield, $user, $forum_id;
|
||||
|
||||
$from_forum = ($forum_sql) ? 't.forum_id IN (' . $forum_sql . ') AND' : '';
|
||||
$post_time = ($time == 0) ? '' : 't.topic_last_post_time > ' . (time() - $time * 86400) . ' AND';
|
||||
|
||||
|
||||
if ($type == 'announcements')
|
||||
{
|
||||
// only global announcements for announcements block
|
||||
$topic_type = '(( t.topic_type = ' . POST_ANNOUNCE . ') OR ( t.topic_type = ' . POST_GLOBAL . ')) AND';
|
||||
|
||||
|
||||
$sql = 'SELECT
|
||||
t.forum_id,
|
||||
t.topic_id,
|
||||
t.topic_last_post_id,
|
||||
t.topic_last_post_time,
|
||||
t.topic_time,
|
||||
t.topic_title,
|
||||
t.topic_attachment,
|
||||
t.topic_views,
|
||||
t.poll_title,
|
||||
t.topic_replies,
|
||||
t.forum_id,
|
||||
t.topic_poster,
|
||||
u.username,
|
||||
u.user_id,
|
||||
u.user_type,
|
||||
u.user_colour,
|
||||
p.post_id,
|
||||
p.post_time,
|
||||
p.post_text,
|
||||
p.post_attachment,
|
||||
p.enable_smilies,
|
||||
p.enable_bbcode,
|
||||
p.enable_magic_url,
|
||||
p.bbcode_bitfield,
|
||||
p.bbcode_uid
|
||||
FROM
|
||||
' . TOPICS_TABLE . ' AS t,
|
||||
' . USERS_TABLE . ' AS u,
|
||||
' . POSTS_TABLE . ' AS p
|
||||
WHERE
|
||||
' . $topic_type . '
|
||||
' . $from_forum . '
|
||||
' . $post_time . '
|
||||
t.topic_poster = u.user_id AND
|
||||
t.topic_first_post_id = p.post_id AND
|
||||
t.topic_status <> 2 AND
|
||||
t.topic_approved = 1
|
||||
|
||||
ORDER BY
|
||||
t.topic_time DESC';
|
||||
|
||||
|
||||
// query the database
|
||||
if(!($result = $db->sql_query_limit($sql, $number_of_posts)))
|
||||
{
|
||||
die('Could not query topic information for board3 Portal announcements section');
|
||||
}
|
||||
|
||||
//
|
||||
// fetch all postings
|
||||
//
|
||||
|
||||
// Instantiate BBCode if need be
|
||||
if ($bbcode_bitfield !== '')
|
||||
{
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
$posts = array();
|
||||
$i = 0;
|
||||
while ( ($row = $db->sql_fetchrow($result)) && ( ($i < $number_of_posts) || ($number_of_posts == '0') ) )
|
||||
{
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
if ($row['user_id'] != ANONYMOUS && $row['user_colour'])
|
||||
{
|
||||
$row['username'] = '<b style="color:#' . $row['user_colour'] . '">' . $row['username'] . '</b>';
|
||||
}
|
||||
$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
|
||||
$len_check = $row['post_text'];
|
||||
$maxlen = $text_length;
|
||||
if (($text_length != 0) && (strlen($len_check) > $text_length))
|
||||
{
|
||||
$posts[$i]['post_text'] = censor_text(get_sub_taged_string(str_replace("\n", '<br/> ', $row['post_text']), $row['bbcode_uid'], $maxlen));
|
||||
$posts[$i]['striped'] = true;
|
||||
} else $posts[$i]['post_text'] = censor_text($row['post_text']);
|
||||
|
||||
$posts[$i]['topic_id'] = $row['topic_id'];
|
||||
$posts[$i]['topic_last_post_id'] = $row['topic_last_post_id'];
|
||||
$posts[$i]['forum_id'] = $row['forum_id'];
|
||||
$posts[$i]['topic_replies'] = $row['topic_replies'];
|
||||
$posts[$i]['topic_time'] = $user->format_date($row['topic_time']);
|
||||
$posts[$i]['topic_last_post_time'] = $row['topic_last_post_time'];
|
||||
$posts[$i]['topic_title'] = $row['topic_title'];
|
||||
$posts[$i]['username'] = $row['username'];
|
||||
$posts[$i]['user_id'] = $row['user_id'];
|
||||
$posts[$i]['user_type'] = $row['user_type'];
|
||||
$posts[$i]['user_user_colour'] = $row['user_colour'];
|
||||
$posts[$i]['poll'] = ($row['poll_title']) ? true : false;
|
||||
$posts[$i]['attachment'] = ($row['topic_attachment']) ? true : false;
|
||||
$posts[$i]['topic_views'] = ($row['topic_views']);
|
||||
|
||||
$message = $posts[$i]['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
|
||||
if ($auth->acl_get('f_html', $forum_id))
|
||||
{
|
||||
$message = preg_replace('#<!\-\-(.*?)\-\->#is', '', $message); // Remove Comments from post content
|
||||
}
|
||||
// Second parse bbcode here
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
$message = smiley_text($message); // Always process smilies after parsing bbcodes
|
||||
$posts[$i]['post_text']= ap_validate($message);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
// return the result
|
||||
return $posts;
|
||||
}
|
||||
|
||||
// news - get last post
|
||||
|
||||
else if ($type == 'news_all')
|
||||
{
|
||||
// not show global announcements
|
||||
$topic_type = '( t.topic_type != ' . POST_ANNOUNCE . ' ) AND ( t.topic_type != ' . POST_GLOBAL . ') AND';
|
||||
}
|
||||
else
|
||||
{
|
||||
// only normal topic
|
||||
$topic_type = 't.topic_type = ' . POST_NORMAL . ' AND';
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT
|
||||
t.forum_id,
|
||||
t.topic_id,
|
||||
t.topic_last_post_id,
|
||||
t.topic_last_post_time,
|
||||
t.topic_time,
|
||||
t.topic_title,
|
||||
t.topic_attachment,
|
||||
t.topic_views,
|
||||
t.poll_title,
|
||||
t.topic_replies,
|
||||
t.forum_id,
|
||||
t.topic_poster,
|
||||
u.username,
|
||||
u.user_id,
|
||||
u.user_type,
|
||||
u.user_colour,
|
||||
p.post_id,
|
||||
p.post_time,
|
||||
p.post_text,
|
||||
p.post_attachment,
|
||||
p.enable_smilies,
|
||||
p.enable_bbcode,
|
||||
p.enable_magic_url,
|
||||
p.bbcode_bitfield,
|
||||
p.bbcode_uid
|
||||
FROM
|
||||
' . TOPICS_TABLE . ' AS t,
|
||||
' . USERS_TABLE . ' AS u,
|
||||
' . POSTS_TABLE . ' AS p
|
||||
WHERE
|
||||
' . $topic_type . '
|
||||
' . $from_forum . '
|
||||
' . $post_time . '
|
||||
t.topic_last_poster_id = u.user_id AND
|
||||
t.topic_last_post_id = p.post_id AND
|
||||
t.topic_status <> 2 AND
|
||||
t.topic_approved = 1
|
||||
|
||||
ORDER BY
|
||||
t.topic_last_post_time DESC';
|
||||
|
||||
|
||||
// query the database
|
||||
if(!($result = $db->sql_query_limit($sql, $number_of_posts)))
|
||||
{
|
||||
die('Could not query topic information for board Portal news section');
|
||||
}
|
||||
|
||||
//
|
||||
// fetch all postings
|
||||
//
|
||||
|
||||
// Instantiate BBCode if need be
|
||||
if ($bbcode_bitfield !== '')
|
||||
{
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
$posts = array();
|
||||
$i = 0;
|
||||
while ( ($row = $db->sql_fetchrow($result)) && ( ($i < $number_of_posts) || ($number_of_posts == '0') ) )
|
||||
{
|
||||
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
|
||||
{
|
||||
if ($row['user_id'] != ANONYMOUS && $row['user_colour'])
|
||||
{
|
||||
$row['username'] = '<b style="color:#' . $row['user_colour'] . '">' . $row['username'] . '</b>';
|
||||
}
|
||||
$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
|
||||
$len_check = $row['post_text'];
|
||||
$maxlen = $text_length;
|
||||
if (($text_length != 0) && (strlen($len_check) > $text_length))
|
||||
{
|
||||
$posts[$i]['post_text'] = censor_text(get_sub_taged_string(str_replace("\n", '<br/> ', $row['post_text']), $row['bbcode_uid'], $maxlen));
|
||||
$posts[$i]['striped'] = true;
|
||||
} else $posts[$i]['post_text'] = censor_text($row['post_text']);
|
||||
|
||||
|
||||
$posts[$i]['topic_id'] = $row['topic_id'];
|
||||
$posts[$i]['topic_last_post_id'] = $row['topic_last_post_id'];
|
||||
$posts[$i]['forum_id'] = $row['forum_id'];
|
||||
$posts[$i]['topic_replies'] = $row['topic_replies'];
|
||||
$posts[$i]['topic_time'] = $user->format_date($row['topic_last_post_time']);
|
||||
$posts[$i]['topic_last_post_time'] = $row['topic_last_post_time'];
|
||||
$posts[$i]['topic_title'] = $row['topic_title'];
|
||||
$posts[$i]['username'] = $row['username'];
|
||||
$posts[$i]['user_id'] = $row['user_id'];
|
||||
$posts[$i]['user_type'] = $row['user_type'];
|
||||
$posts[$i]['user_user_colour'] = $row['user_colour'];
|
||||
$posts[$i]['poll'] = ($row['poll_title']) ? true : false;
|
||||
$posts[$i]['attachment'] = ($row['topic_attachment']) ? true : false;
|
||||
$posts[$i]['topic_views'] = ($row['topic_views']);
|
||||
|
||||
$message = $posts[$i]['post_text'];
|
||||
$message = str_replace("\n", '<br/> ', $message);
|
||||
|
||||
|
||||
if ($auth->acl_get('f_html', $forum_id))
|
||||
{
|
||||
$message = preg_replace('#<!\-\-(.*?)\-\->#is', '', $message); // Remove Comments from post content
|
||||
}
|
||||
// Second parse bbcode here
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
$message = smiley_text($message); // Always process smilies after parsing bbcodes
|
||||
$posts[$i]['post_text']= ap_validate($message);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
// return the result
|
||||
return $posts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Censor title, return short title
|
||||
*
|
||||
* @param $title string title to censor
|
||||
* @param $limit int short title character limit
|
||||
*
|
||||
*/
|
||||
function character_limit(&$title, $limit = 0)
|
||||
{
|
||||
$title = censor_text($title);
|
||||
if ($limit > 0)
|
||||
{
|
||||
return (strlen(utf8_decode($title)) > $limit + 3) ? truncate_string($title, $limit) . '...' : $title;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user avatar / barroved from RC4
|
||||
*
|
||||
* @param string $avatar Users assigned avatar name
|
||||
* @param int $avatar_type Type of avatar
|
||||
* @param string $avatar_width Width of users avatar
|
||||
* @param string $avatar_height Height of users avatar
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
*
|
||||
* @return string Avatar image
|
||||
*/
|
||||
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
|
||||
{
|
||||
global $user, $portal_config, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (empty($avatar) || !$avatar_type)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$avatar_img = '';
|
||||
|
||||
switch ($avatar_type)
|
||||
{
|
||||
case AVATAR_UPLOAD:
|
||||
$avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
|
||||
break;
|
||||
|
||||
case AVATAR_GALLERY:
|
||||
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
|
||||
break;
|
||||
}
|
||||
|
||||
$avatar_img .= $avatar;
|
||||
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user rank title and image / barroved from RC4
|
||||
*
|
||||
* @param int $user_rank the current stored users rank id
|
||||
* @param int $user_posts the users number of posts
|
||||
* @param string &$rank_title the rank title will be stored here after execution
|
||||
* @param string &$rank_img the rank image as full img tag is stored here after execution
|
||||
* @param string &$rank_img_src the rank image source is stored here after execution
|
||||
*
|
||||
*/
|
||||
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
|
||||
{
|
||||
global $ranks, $config;
|
||||
|
||||
if (empty($ranks))
|
||||
{
|
||||
global $cache;
|
||||
$ranks = $cache->obtain_ranks();
|
||||
}
|
||||
|
||||
if (!empty($user_rank))
|
||||
{
|
||||
$rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
|
||||
$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
|
||||
$rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!empty($ranks['normal']))
|
||||
{
|
||||
foreach ($ranks['normal'] as $rank)
|
||||
{
|
||||
if ($user_posts >= $rank['rank_min'])
|
||||
{
|
||||
$rank_title = $rank['rank_title'];
|
||||
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $rank['rank_image'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
|
||||
$rank_img_src = (!empty($rank['rank_image'])) ? $config['ranks_path'] . '/' . $rank['rank_image'] : '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Don't let them mess up the complete portal layout in cut messages and do some real AP magic
|
||||
|
||||
function is_valid_bbtag($str, $bbuid) {
|
||||
return (substr($str,0,1) == '[') && (strpos($str, ':'.$bbuid.']') > 0);
|
||||
}
|
||||
|
||||
function get_end_bbtag($tag, $bbuid) {
|
||||
$etag = '';
|
||||
for($i=0;$i<strlen($tag);$i++) {
|
||||
if ($tag[$i] == '[') $etag .= $tag[$i] . '/';
|
||||
else if (($tag[$i] == '=') || ($tag[$i] == ':')) {
|
||||
if ($tag[1] == '*') $etag .= ':m:'.$bbuid.']';
|
||||
else if (strpos($tag, 'list')) $etag .= ':u:'.$bbuid.']';
|
||||
else $etag .= ':'.$bbuid.']';
|
||||
break;
|
||||
} else $etag .= $tag[$i];
|
||||
}
|
||||
|
||||
return $etag;
|
||||
}
|
||||
|
||||
function get_next_word($str) {
|
||||
$ret = '';
|
||||
for($i=0;$i<strlen($str);$i++) {
|
||||
switch ($str[$i]) {
|
||||
case ' ': //$ret .= ' '; break; break;
|
||||
return $ret . ' ';
|
||||
case '\\':
|
||||
if ($str[$i+1] == 'n') return $ret . '\n';
|
||||
case '[': if ($i != 0) return $ret;
|
||||
default: $ret .= $str[$i];
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function get_sub_taged_string($str, $bbuid, $maxlen) {
|
||||
$sl = $str;
|
||||
$ret = '';
|
||||
$ntext = '';
|
||||
$lret = '';
|
||||
$i = 0;
|
||||
$cnt = $maxlen;
|
||||
$last = '';
|
||||
$arr = array();
|
||||
|
||||
while((strlen($ntext) < $cnt) && (strlen($sl) > 0)) {
|
||||
$sr = '';
|
||||
if (substr($sl, 0, 1) == '[') $sr = substr($sl,0,strpos($sl,']')+1);
|
||||
/* GESCHLOSSENE HTML-TAGS BEACHTEN */
|
||||
if (substr($sl, 0, 1) == '<') {
|
||||
$sr = substr($sl,0,strpos($sl,'>')+1);
|
||||
$ret .= $sr;
|
||||
} else if (is_valid_bbtag($sr, $bbuid)) {
|
||||
if ($sr[1] == '/') {
|
||||
/* entfernt das endtag aus dem tag array */
|
||||
$tarr = array();
|
||||
$j = 0;
|
||||
foreach ($arr as $elem) {
|
||||
if (strcmp($elem[1],$sr) != 0) $tarr[$j++] = $elem;
|
||||
}
|
||||
$arr = $tarr;
|
||||
} else {
|
||||
$arr[$i][0] = $sr;
|
||||
$arr[$i++][1] = get_end_bbtag($sr, $bbuid);
|
||||
}
|
||||
$ret .= $sr;
|
||||
} else {
|
||||
$sr = get_next_word($sl);
|
||||
$ret .= $sr;
|
||||
$ntext .= $sr;
|
||||
$last = $sr;
|
||||
}
|
||||
$sl = trim(substr($sl, strlen($sr), strlen($sl)-strlen($sr)));
|
||||
}
|
||||
|
||||
$ret = trim($ret) . '...';
|
||||
|
||||
$ap = '';
|
||||
foreach ($arr as $elem) {
|
||||
$ap = $elem[1] . $ap;
|
||||
}
|
||||
$ret .= $ap;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function ap_validate($str) {
|
||||
$s = str_replace('<br />', '<br/>', $str);
|
||||
return str_replace('</li><br/>', '</li>', $s);
|
||||
}
|
||||
|
||||
?>
|
||||
7
root/portal/includes/index.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
307
root/portal/includes/mini_cal/calendarSuite.php
Normal file
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_MINI_CAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Features include: 11 languages, returns all data in one array,
|
||||
* intelligent linker function
|
||||
*
|
||||
* day[] = array(0 => 'dayNumeric', // e.g. 19
|
||||
* 1 => 'dayName', // e.g. Tue
|
||||
* 2 => 'dayNameL', // e.g. Tuesday
|
||||
* 3 => 'monthName', // e.g. March
|
||||
* 4 => 'monthNumeric' // e.g. 12
|
||||
* 5 => 'year' // e.g. 2002
|
||||
* 6 => 'timestamp' // e.g. 1020204000
|
||||
* 7 => 'dayOfWeek' // 0-6 ! e.g. sunday=0, monday=1...
|
||||
* 8 => 'dayOfYear' // day of year (001 - 366)
|
||||
* 9 => 'weekNum' // weeknumber of current year
|
||||
* 10 => 'link' // link from link function
|
||||
* 11 => 'mysqlDate' // contains date in mysql-format (YYYY-MM-DD)
|
||||
*
|
||||
*
|
||||
* language options:
|
||||
* 0 = english (default) 1 = german
|
||||
* 2 = french 3 = spanish
|
||||
* 4 = finish 5 = polish
|
||||
* 6 = portuguese 7 = italian
|
||||
* 8 = italian 9 = slovak
|
||||
* 10 = turkish
|
||||
*
|
||||
**/
|
||||
|
||||
|
||||
/**
|
||||
* set language
|
||||
* @const language
|
||||
* default 0 / english
|
||||
**/
|
||||
define("language", "1");
|
||||
|
||||
|
||||
/**
|
||||
* set default date format
|
||||
* @const dateFormat
|
||||
* default
|
||||
**/
|
||||
define("dateFormat" , "0");
|
||||
|
||||
|
||||
class calendarSuite {
|
||||
|
||||
var $dateYYY; // year in numeric format (YYYY)
|
||||
var $dateMM; // month in numeric format (MM)
|
||||
var $dateDD; // day in numeric format (DD)
|
||||
var $ext_dateMM; // extended month (e.g. February)
|
||||
var $ext_dateDD; // extended day (e.g. Mon)
|
||||
var $daysMonth; // count of days in month
|
||||
var $nextMonth; // contains next month
|
||||
var $lastMonth; // contains last month
|
||||
var $stamp; // timestamp
|
||||
var $day; // return array s.a.
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* Sets default values for e.g. language (default=english)
|
||||
**/
|
||||
function calendarSuite(){
|
||||
switch (language) {
|
||||
|
||||
case 0:
|
||||
$this->language = "en_EN";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$this->language = "de_DE";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$this->language = "fr_FR";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$this->language = "es_ES";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
$this->language = "fi_FI";
|
||||
break;
|
||||
|
||||
case 5:
|
||||
$this->language = "pl_PL";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
$this->language = "pt_PT";
|
||||
break;
|
||||
|
||||
case 7:
|
||||
$this->language = "it_IT";
|
||||
break;
|
||||
|
||||
case 8:
|
||||
$this->language = "ru_RU";
|
||||
break;
|
||||
|
||||
case 9:
|
||||
$this->language = "sk_SK";
|
||||
break;
|
||||
|
||||
case 10:
|
||||
$this->language = "tr_TR";
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->language = "en_EN";
|
||||
|
||||
}
|
||||
setlocale (LC_TIME, $this->language); // set language
|
||||
|
||||
// end of function calendarSuite
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* determine the next month after current
|
||||
**/
|
||||
function nextMonth() {
|
||||
$this->nextMonth = $this->getMonth("+1 month");
|
||||
|
||||
// end of function nextMonth
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* determine the last month before current
|
||||
**/
|
||||
function lastMonth() {
|
||||
$this->lastMonth = $this->getMonth("-1 month");
|
||||
|
||||
// end of function lastMonth
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* convert date->timestamp
|
||||
**/
|
||||
function makeTimestamp($date) {
|
||||
|
||||
$this->stamp = strtotime($date);
|
||||
return ($this->stamp);
|
||||
|
||||
// end of function makeTimestamp
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get date listed in array
|
||||
**/
|
||||
function getMonth($callDate) {
|
||||
|
||||
$this->makeTimestamp($callDate);
|
||||
$this->dateYYYY = date("Y", $this->stamp);
|
||||
$this->dateMM = date("n", $this->stamp);
|
||||
$this->ext_dateMM = date("F", $this->stamp);
|
||||
$this->dateDD = date("d", $this->stamp);
|
||||
$this->daysMonth = date("t", $this->stamp);
|
||||
$this->monthStart = date("w", $this->stamp);
|
||||
|
||||
for($i=1; $i < $this->daysMonth+1; $i++) {
|
||||
$this->makeTimestamp("$i $this->ext_dateMM $this->dateYYYY");
|
||||
$this->day[] = array(
|
||||
"0" => "$i",
|
||||
"1" => (strftime('%a', $this->stamp)),
|
||||
"2" => (strftime('%A', $this->stamp)),
|
||||
"3" => (strftime("%B", $this->stamp)),
|
||||
"4" => $this->dateMM,
|
||||
"5" => $this->dateYYYY,
|
||||
"6" => $this->stamp,
|
||||
"7" => (date('w', $this->stamp)),
|
||||
"8" => (strftime('%j', $this->stamp)),
|
||||
"9" => (strftime('%U', $this->stamp)),
|
||||
"10" => $this->dateLinker($this->stamp),
|
||||
"11" => $this->formatDate($this->stamp, 99)
|
||||
);
|
||||
}
|
||||
|
||||
// end of function getMonth
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get detailed array of day
|
||||
**/
|
||||
function getDayDetail($stamp) {
|
||||
|
||||
$this->dateYYYY = date("Y", $stamp);
|
||||
$this->dateMM = date("n", $stamp);
|
||||
$this->dateDD = date("d", $stamp);
|
||||
$this->ext_dateMM = date("F", $stamp);
|
||||
$this->daysMonth = date("t", $stamp);
|
||||
$this->monthStart = date("w", $stamp);
|
||||
|
||||
$this->day = array(
|
||||
"0" => (date("j",$stamp)),
|
||||
"1" => (strftime('%a', $stamp)),
|
||||
"2" => (strftime('%A', $stamp)),
|
||||
"3" => $this->ext_dateMM,
|
||||
"4" => $this->dateMM,
|
||||
"5" => $this->dateYYYY,
|
||||
"6" => $stamp,
|
||||
"7" => (date('w', $stamp)),
|
||||
"8" => strftime('%j', $stamp),
|
||||
"9" => strftime('%U', $stamp)
|
||||
);
|
||||
|
||||
// end of function getDay
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* make links for every day
|
||||
**/
|
||||
function dateLinker($stamp) {
|
||||
$link = "?stamp=".$stamp;
|
||||
return $link;
|
||||
|
||||
// end of function dateLinker
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* format date in different forms
|
||||
**/
|
||||
function formatDate($stamp, $option = dateFormat) {
|
||||
|
||||
switch ($option) {
|
||||
|
||||
case 0:
|
||||
$this->formatted = date("d n Y", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$this->formatted = date("d Y M", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$this->formatted = date("M d Y", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$this->formatted = date("M Y d", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
$this->formatted = date("Y M d", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
$this->formatted = date("Y d M", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
$this->formatted = date("d M Y", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
case 99:
|
||||
$this->formatted = date("Y-m-d", $stamp);
|
||||
return $this->formatted;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// end of function formatDate
|
||||
}
|
||||
|
||||
|
||||
// end of class
|
||||
}
|
||||
|
||||
?>
|
||||
7
root/portal/includes/mini_cal/index.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
142
root/portal/includes/mini_cal/mini_cal_common.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_MINI_CAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
getFormattedDate
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $cal_weekday -
|
||||
$cal_month -
|
||||
$cal_monthday -
|
||||
$cal_year -
|
||||
$cal_hour -
|
||||
$cal_min -
|
||||
$cal_sec -
|
||||
|
||||
returns: a date formatted according to the MINI_CAL_DATE_PATTERNS
|
||||
set in mini_cal_config.php and the Mini_Cal_date_format
|
||||
set in lang_main_min_cal.php
|
||||
***************************************************************************/
|
||||
function getFormattedDate($cal_weekday, $cal_month, $cal_monthday, $cal_year, $cal_hour, $cal_min, $cal_sec, $format)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
// initialise out date formatting patterns
|
||||
$cal_date_pattern = unserialize(MINI_CAL_DATE_PATTERNS);
|
||||
|
||||
$cal_date_replace = array(
|
||||
$lang['mini_cal']['day'][$cal_weekday],
|
||||
$lang['mini_cal']['month'][$cal_month],
|
||||
$cal_month,
|
||||
( (strlen($cal_monthday) < 2 ) ? '0' : '' ) . $cal_monthday,
|
||||
$cal_monthday,
|
||||
( (strlen($cal_month) < 2 ) ? '0' : '' ) . $cal_month,
|
||||
substr($cal_year, -2),
|
||||
$cal_year,
|
||||
( (strlen($cal_hour) < 2 ) ? '0' : '' ) . $cal_hour,
|
||||
$cal_hour,
|
||||
( (strlen($cal_hour) < 2 ) ? '0' : '' ) . ( ( $cal_hour > 12 ) ? $cal_hour-12 : $cal_hour ),
|
||||
( $cal_hour > 12 ) ? $cal_hour-12 : $cal_hour,
|
||||
$cal_min,
|
||||
$cal_sec,
|
||||
( $cal_hour < 12 ) ? 'AM' : 'PM'
|
||||
);
|
||||
|
||||
return preg_replace($cal_date_pattern, $cal_date_replace, $format);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
setQueryStringVal
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $var - the variable who's value is to be replaced
|
||||
$value - the new value for the variable
|
||||
|
||||
returns: a modified querystring prefixed with ?
|
||||
***************************************************************************/
|
||||
function setQueryStringVal($var, $value)
|
||||
{
|
||||
$querystring = $_SERVER["QUERY_STRING"];
|
||||
|
||||
if (!stristr($querystring, $var))
|
||||
{
|
||||
$querystring .= ($querystring) ? '&' : '';
|
||||
$querystring .= "$var=$value";
|
||||
}
|
||||
else
|
||||
{
|
||||
$querystring = ereg_replace("($var=[[:digit:]]{1,3})", "$var=$value", $querystring);
|
||||
}
|
||||
return '?' . $querystring;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getPostForumsList
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $mini_cal_post_auth - a comma seperated list of forms with post rights
|
||||
|
||||
returns: adds a forums select list to the template output
|
||||
***************************************************************************/
|
||||
function getPostForumsList($mini_cal_post_auth, $and_post_auth_sql = '')
|
||||
{
|
||||
if ($mini_cal_post_auth)
|
||||
{
|
||||
global $db, $template, $lang;
|
||||
|
||||
// get a list of events forums
|
||||
$sql = 'SELECT c.cat_id, c.cat_title, f.forum_id, f.forum_name
|
||||
FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
|
||||
WHERE f.cat_id = c.cat_id
|
||||
AND f.forum_id IN (' . $mini_cal_post_auth . ')' .
|
||||
$and_post_auth_sql;
|
||||
|
||||
if( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$num_rows = $db->sql_numrows($result);
|
||||
if ( $num_rows > 0 )
|
||||
{
|
||||
$template->assign_block_vars('switch_mini_cal_add_events', array());
|
||||
|
||||
$forums_list = '<select style="width: 100%" name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value > -1){ forms[\'mini_cal\'].submit() }">';
|
||||
|
||||
$cat_id = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forums_list .= '<option value="' . $row['forum_id'] . '"' . $selected . '> - ' . substr($row['forum_name'],0,20) . '</option>';
|
||||
}
|
||||
$forums_list .= '</select>';
|
||||
|
||||
$template->assign_vars( array(
|
||||
'S_MINI_CAL_EVENTS_FORUMS_LIST' => $forums_list
|
||||
)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
88
root/portal/includes/mini_cal/mini_cal_config.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_MINI_CAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
The following values are configurable to tailor the mini cal to your needs.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
// Defines which events calendar you are using, if any
|
||||
// possible values:
|
||||
// MYCAL - MyCalendar
|
||||
// PLUS - MyCalendar+
|
||||
// TOPIC - Topic Calendar
|
||||
// SNAIL - Websnail Calendar Pro
|
||||
// SNAILLITE - Websnail Calendar Lite
|
||||
// NONE - No Supported Calendar is installed
|
||||
define('MINI_CAL_CALENDAR_VERSION', 'NONE');
|
||||
|
||||
|
||||
// EVENTS CALENDAR USERS ONLY!
|
||||
// Limits the number of events shown on the mini cal
|
||||
define('MINI_CAL_LIMIT', 5);
|
||||
|
||||
|
||||
// EVENTS CALENDAR USERS ONLY!
|
||||
// Limits the number of days ahead in which time upcoming events will be shown
|
||||
// set to 0 (zero) for umlimited
|
||||
define('MINI_CAL_DAYS_AHEAD', 7);
|
||||
|
||||
|
||||
// Defines what type of search happens when a user clicks on a date in the calendar
|
||||
// possible values:
|
||||
// POSTS - will return all posts posted on that date
|
||||
// EVENTS - will return all events happening on that date (ONLY SUITABLE FOR EVENTS CALENDAR USERS).
|
||||
define('MINI_CAL_DATE_SEARCH', 'POSTS');
|
||||
|
||||
|
||||
// First Day of the Week - 0=Sunday, 1=Monday...6=Saturday
|
||||
// if you change this remember to change the short day names in lang_main_mini_cal.php
|
||||
define('MINI_CAL_FDOW', 1);
|
||||
|
||||
|
||||
// Defines the css class to use for mini cal days urls
|
||||
define('MINI_CAL_DAY_LINK_CLASS', 'gensmall');
|
||||
|
||||
// Defines the css class to use for mini cal today date
|
||||
define('MINI_CAL_TODAY_CLASS', 'gensmall');
|
||||
|
||||
|
||||
// defines the authentication level required to be able to view the upcoming events
|
||||
// this relates to the permission level assigned to forum
|
||||
// possible values:
|
||||
// auth_view, auth_read, auth_post, auth_reply, auth_edit,
|
||||
// auth_delte, auth_sticky, auth_announce, auth_vote, auth_pollcreate
|
||||
define('MINI_CAL_EVENT_AUTH_LEVEL', 'auth_view');
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
You should NOT modify any values below here.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
// DO NOT MODIFY THIS!
|
||||
define('MINI_CAL_DATE_PATTERNS', serialize(array('/%a/', '/%b/', '/%c/', '/%d/', '/%e/', '/%m/', '/%y/', '/%Y/',
|
||||
'/%H/', '/%k/', '/%h/', '/%l/', '/%i/', '/%s/', '/%p/')));
|
||||
|
||||
?>
|
||||
304
root/portal/includes/mini_cal/mini_cal_topic.php
Normal file
@@ -0,0 +1,304 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) nickvergessen ( http://mods.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_MINI_CAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* set_var
|
||||
*
|
||||
* Set variable, used by {@link request_var the request_var function}
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalForumsAuth
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $userdata - an initialised $userdata array.
|
||||
returns: a two part array
|
||||
$mini_cal_auth['view'] - a comma seperated list of forums which the user has VIEW permissions for
|
||||
$mini_cal_auth['post'] - a comma seperated list of forums which the user has POST permissions for
|
||||
***************************************************************************/
|
||||
function getMiniCalForumsAuth($user)
|
||||
{
|
||||
global $db, $auth, $user;
|
||||
|
||||
// initialise our forums auth list
|
||||
$mini_cal_auth_ary = array();
|
||||
$mini_cal_auth_ary = $auth->acl($user->data);
|
||||
|
||||
$mini_cal_auth = array();
|
||||
$mini_cal_auth['view'] = '';
|
||||
$mini_cal_auth['post'] = '';
|
||||
|
||||
while ( list($mini_cal_forum_id, $mini_cal_auth_level) = each($mini_cal_auth_ary) )
|
||||
{
|
||||
if ( $mini_cal_auth_level[MINI_CAL_EVENT_AUTH_LEVEL] )
|
||||
{
|
||||
$mini_cal_auth['view'] .= ($mini_cal_auth['view'] == '') ? $mini_cal_forum_id : ', ' . $mini_cal_forum_id;
|
||||
}
|
||||
|
||||
if ( ($mini_cal_auth_level['auth_post']) && $mini_cal_auth_level['auth_cal'] )
|
||||
{
|
||||
$mini_cal_auth['post'] .= ($mini_cal_auth['post'] == '') ? $mini_cal_forum_id : ', ' . $mini_cal_forum_id;
|
||||
}
|
||||
}
|
||||
|
||||
return $mini_cal_auth;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalEventDays
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $auth_view_forums - a comma seperated list of forums which the user has VIEW permissions for
|
||||
returns: an array containing a list of day containing event the user has permission to view
|
||||
***************************************************************************/
|
||||
function getMiniCalEventDays($auth_view_forums)
|
||||
{
|
||||
global $db, $mini_cal_this_year, $mini_cal_this_month;
|
||||
|
||||
$mini_cal_event_days = array();
|
||||
|
||||
if ($auth_view_forums)
|
||||
{
|
||||
// start and end date
|
||||
$start_date = mktime(0,0,0, $mini_cal_this_month, 01, $mini_cal_this_year);
|
||||
$w_month = $mini_cal_this_month + 1;
|
||||
$w_year = $mini_cal_this_year;
|
||||
if ($w_month > 12)
|
||||
{
|
||||
$w_month = 01;
|
||||
$w_year++;
|
||||
}
|
||||
$end_date = mktime(0,0,0, $w_month, 01, $w_year);
|
||||
|
||||
// we consider the duration
|
||||
$sql = "SELECT DISTINCT topic_calendar_time, topic_calendar_duration
|
||||
FROM " . TOPICS_TABLE . "
|
||||
WHERE forum_id IN ($auth_view_forums)
|
||||
AND (topic_calendar_time + topic_calendar_duration) >= $start_date
|
||||
AND topic_calendar_time < $end_date
|
||||
AND topic_calendar_time IS NOT NULL
|
||||
AND topic_calendar_time <> 0";
|
||||
|
||||
if ( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$mini_cal_event_days_ww = array();
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$start_day = intval(date('d', $row['topic_calendar_time']));
|
||||
for ($i = 0; ( ($i <= intval($row['topic_calendar_duration'] / 86400)) && ( ($start_day + $i) <= 31) ); $i++)
|
||||
{
|
||||
$mini_cal_event_days_ww[ ($start_day + $i) ] = true;
|
||||
}
|
||||
}
|
||||
while (list($mini_cal_event_day, $mini_cal_event_present) = each($mini_cal_event_days_ww) )
|
||||
{
|
||||
$mini_cal_event_days[] = $mini_cal_event_day;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $mini_cal_event_days;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalEvents
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $mini_cal_auth - a two part array
|
||||
$mini_cal_auth['view'] - a comma seperated list of forums which the user has VIEW permissions for
|
||||
$mini_cal_auth['post'] - a comma seperated list of forums which the user has POST permissions for
|
||||
|
||||
returns: nothing - it assigns variable to the template
|
||||
***************************************************************************/
|
||||
function getMiniCalEvents($mini_cal_auth)
|
||||
{
|
||||
global $template, $db, $phpEx, $lang, $mini_cal_today,
|
||||
$mini_cal_this_month, $mini_cal_this_year, $mini_cal_this_day;
|
||||
|
||||
// start and end date
|
||||
$start_date = mktime(0,0,0, intval(substr($mini_cal_today, 4, 2)), $mini_cal_this_day, $mini_cal_this_year);
|
||||
|
||||
$w_month = $mini_cal_this_month;
|
||||
$days_ahead_sql = '';
|
||||
if (MINI_CAL_DAYS_AHEAD > 0)
|
||||
{
|
||||
$w_year = $mini_cal_this_year;
|
||||
if ($w_month > 12)
|
||||
{
|
||||
$w_month = 01;
|
||||
$w_year++;
|
||||
}
|
||||
$end_date = mktime(0,0,0, $w_month, $mini_cal_this_day + MINI_CAL_DAYS_AHEAD, $w_year);
|
||||
$days_ahead_sql = " AND topic_calendar_time < $end_date ";
|
||||
}
|
||||
|
||||
// initialise some sql bits
|
||||
$mini_cal_auth_sql = ($mini_cal_auth['view']) ? ' AND t.forum_id in (' . $mini_cal_auth['view'] . ') ' : '';
|
||||
|
||||
// get events
|
||||
$sql = "SELECT t.topic_id, t.topic_calendar_time, t.topic_title, t.forum_id, t.topic_calendar_duration
|
||||
FROM " . TOPICS_TABLE . " t
|
||||
WHERE topic_calendar_time >= $start_date
|
||||
$days_ahead_sql
|
||||
AND topic_calendar_time IS NOT NULL
|
||||
AND topic_calendar_time <> 0
|
||||
$mini_cal_auth_sql
|
||||
ORDER BY
|
||||
t.topic_calendar_time ASC
|
||||
LIMIT
|
||||
0," . MINI_CAL_LIMIT;
|
||||
|
||||
// did we get a result?
|
||||
if( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$template->assign_block_vars('switch_mini_cal_events', array());
|
||||
if ( $db->sql_numrows($result) > 0 )
|
||||
{
|
||||
// we've got some events
|
||||
|
||||
// now let's output our events in the given date format for the current language
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$cal_time = $row['topic_calendar_time'];
|
||||
$day_span = (date("Ymd", $cal_time) < date("Ymd", $cal_time+$row['topic_calendar_duration']));
|
||||
$include_time = date("His", $cal_time) > 0;
|
||||
$cal_date = getFormattedDate(
|
||||
date('w', $cal_time),
|
||||
date('n', $cal_time),
|
||||
date('d', $cal_time),
|
||||
date('Y', $cal_time),
|
||||
date('H', $cal_time),
|
||||
date('i', $cal_time),
|
||||
date('s', $cal_time),
|
||||
$lang['Mini_Cal_date_format'].((!$day_span && $include_time)?' '.$lang['Mini_Cal_date_format_Time']:'')
|
||||
);
|
||||
|
||||
if ($day_span || $row['topic_calendar_duration'] > 0)
|
||||
{
|
||||
$cal_time = $cal_time + $row['topic_calendar_duration'];
|
||||
$cal_date .= ' - ' . getFormattedDate(
|
||||
date('w', $cal_time),
|
||||
date('n', $cal_time),
|
||||
date('d', $cal_time),
|
||||
date('Y', $cal_time),
|
||||
date('H', $cal_time),
|
||||
date('i', $cal_time),
|
||||
date('s', $cal_time),
|
||||
((!$day_span)?$lang['Mini_Cal_date_format_Time']:$lang['Mini_Cal_date_format'])
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('mini_cal_events', array(
|
||||
'MINI_CAL_EVENT_DATE' => $cal_date,
|
||||
'S_MINI_CAL_EVENT' => $row['topic_title'],
|
||||
'U_MINI_CAL_EVENT' => append_sid( $phpbb_root_path . "viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $row['topic_id'] )
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// no events :(
|
||||
$template->assign_block_vars('mini_cal_no_events', array());
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalSearchSql
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $search_id - the type of search we're looking for
|
||||
$search_date - the date passed to the search
|
||||
|
||||
returns: an sql string
|
||||
***************************************************************************/
|
||||
function getMiniCalSearchSql($search_date)
|
||||
{
|
||||
$s_yy = intval(substr($search_date, 0, 4));
|
||||
$s_mm = intval(substr($search_date, 4, 2));
|
||||
$s_dd = intval(substr($search_date, 6, 2));
|
||||
$search_date = mktime(0,0,0, $s_mm, $s_dd, $s_yy);
|
||||
$nix_tomorrow = mktime (0,0,0, $s_mm, $s_dd + 1, $s_yy);
|
||||
|
||||
$sql = "SELECT topic_first_post_id as post_id
|
||||
FROM " . TOPICS_TABLE . "
|
||||
WHERE (topic_calendar_time + topic_calendar_duration) >= $search_date AND topic_calendar_time < $nix_tomorrow";
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalSearchURL
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $search_date - the date passed to the search
|
||||
|
||||
returns: an url string
|
||||
***************************************************************************/
|
||||
function getMiniCalSearchURL($search_date)
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
$s_yy = intval(substr($search_date, 0, 4));
|
||||
$s_mm = intval(substr($search_date, 4, 2));
|
||||
$s_dd = intval(substr($search_date, 6, 2));
|
||||
$search_date = mktime(0,0,0, $s_mm, $s_dd, $s_yy);
|
||||
|
||||
//$url = append_sid($phpbb_root_path . "search.$phpEx?search_id=mini_cal_events&d=" . $search_date);
|
||||
$url = append_sid($phpbb_root_path . "calendar_scheduler.$phpEx?d=" . $search_date);
|
||||
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
getMiniCalPostForumsList
|
||||
|
||||
version: 1.0.0
|
||||
parameters: $mini_cal_post_auth - a comma seperated list of forms with post rights
|
||||
|
||||
returns: adds a forums select list to the template output
|
||||
***************************************************************************/
|
||||
function getMiniCalPostForumsList($mini_cal_post_auth)
|
||||
{
|
||||
getPostForumsList($mini_cal_post_auth);
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_MINI_CAL_CALENDAR' => append_sid($phpbb_root_path . 'calendar.' . $phpEx),
|
||||
'U_MINI_CAL_ADD_EVENT' => append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=newtopic&f=' . MINI_CAL_EVENTS_FORUM )
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
7
root/portal/index.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,96 @@
|
||||
<hr class="dashed" />
|
||||
|
||||
<h3>sample block design</h3>
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<div class="content">
|
||||
<h2>{ TITLE }</h2>
|
||||
{ CONTENT }<br />{ CONTENT }
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{ TITLE }</h3>
|
||||
{ CONTENT }<br />{ CONTENT }
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{ TITLE }</h3>
|
||||
{ CONTENT }<hr />{ CONTENT }
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{ TITLE }</h3>
|
||||
{ CONTENT }<hr class="dashed" />{ CONTENT }
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{ TITLE }</h3>
|
||||
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
left side
|
||||
</li>
|
||||
<li class="rightside">
|
||||
right side
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="navbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
{ CONTENT }<br />{ CONTENT }
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
|
||||
|
||||
<div class="forabg">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{ TITLE }</dt></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
<li><dl>
|
||||
<dd class="posts_portal">
|
||||
{ CONTENT }<br />{ CONTENT }
|
||||
</dd>
|
||||
</dl></li>
|
||||
</ul>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="dashed" />
|
||||
17
root/styles/prosilver/template/portal/block/active.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_ACTIVE_TOPIC}</h3>
|
||||
|
||||
<!-- BEGIN active_topics -->
|
||||
<a href="{active_topics.U_VIEW_TOPIC}" title="{active_topics.FULL_TITLE}"><strong>{active_topics.TITLE}</strong></a><br />
|
||||
{active_topics.DATE}<br />
|
||||
{L_POSTED_BY}: {active_topics.POSTER}<br />
|
||||
<!-- END lactive_topics -->
|
||||
<hr />
|
||||
<a href="search.php?search_id=active_topics">{ALL_ACTIVE_TOPIC}</a>
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
12
root/styles/prosilver/template/portal/block/ads_center.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_SPONSOR}</h3>
|
||||
<div style="text-align: center;">
|
||||
-insert ads codes here-
|
||||
</div>
|
||||
<br />
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
12
root/styles/prosilver/template/portal/block/ads_small.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_SPONSOR}</h3>
|
||||
<div style="text-align: center;">
|
||||
-insert ads codes here-
|
||||
</div>
|
||||
<br />
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="forabg">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{L_LATEST_ANNOUNCEMENTS}</dt></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
<li><dl>
|
||||
<dd class="posts_portal" style="border-left:0px">
|
||||
<!-- BEGIN announcements_row -->
|
||||
<!-- IF announcements_row.S_NO_TOPICS -->
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_ANNOUNCEMENTS}</strong></span>
|
||||
<!-- ELSE -->
|
||||
<div class="postbody postbody_portal" style="width: 100%">
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF --><a href="{announcements_row.U_VIEW_COMMENTS}"><strong>{announcements_row.TITLE}</strong></a></span></h4>
|
||||
<ul class="linklist">
|
||||
<li><span style="margin: 0 0 0 5px">{L_POSTED_BY}: <strong><a href="{announcements_row.U_USER_PROFILE}">{announcements_row.POSTER}</a></strong></span></li>
|
||||
<li class="rightside"><span style="margin: 0 5px 0 0;">{announcements_row.TIME}</span></li>
|
||||
</ul>
|
||||
<br />
|
||||
<div class="content"><div style="float: left; margin: 0 0 0 5px"> {announcements_row.TEXT}</div></div><br />
|
||||
<span style="float: left; margin: 0 0 0 5px">{L_TOPIC_VIEWS}: {announcements_row.TOPIC_VIEWS} • <a href="{announcements_row.U_VIEW_COMMENTS}" title="{L_VIEW_COMMENTS}">{L_COMMENTS}: {announcements_row.REPLIES}</a> • <a href="{announcements_row.U_POST_COMMENT}">{L_POST_REPLY}</a></span>
|
||||
<span style="float: right; margin: 0 5px 5px 0">{announcements_row.OPEN}<a href="{announcements_row.U_READ_FULL}">{announcements_row.L_READ_FULL}</a>{announcements_row.CLOSE}</span>
|
||||
</div>
|
||||
<div class="back2top"><span style="float: right; margin: 0 5px 0 0"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></span></div>
|
||||
<!-- IF announcements_row.S_NOT_LAST --><hr /><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- END announcements_row -->
|
||||
</dd>
|
||||
</dl></li>
|
||||
</ul>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,41 @@
|
||||
<div class="forabg">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{L_LATEST_ANNOUNCEMENTS}</dt></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
<li>
|
||||
<dl>
|
||||
<dd class="posts_portal" style="border-left:0px">
|
||||
<ul class="news">
|
||||
<!-- BEGIN announcements_row -->
|
||||
<!-- IF announcements_row.S_NO_TOPICS -->
|
||||
<li>
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_ANNOUNCEMENTS}</strong></span>
|
||||
</li>
|
||||
<!-- ELSE -->
|
||||
<li>
|
||||
<span style="float: left; margin: 0 0 0 5px;"><img src="{T_THEME_PATH}/images/arrow_right.gif" alt=""/>
|
||||
<!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF -->
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="{announcements_row.TITLE}"><strong style="font-size:1.1em;">{announcements_row.TITLE}</strong></a></span>
|
||||
<span style="float: right; margin: 0 5px 0 0;">{L_POST_BY_AUTHOR}: <strong><a href="{announcements_row.U_USER_PROFILE}">{announcements_row.POSTER}</a></strong></span>
|
||||
<br style="clear:both" />
|
||||
<span style="float: left; margin: 0 0 0 14px;">
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="{L_VIEW_COMMENTS}"><span style="font-size:0.9em;"><em>{L_COMMENTS}: {announcements_row.REPLIES}</em></span></a>
|
||||
<span style="font-size:0.9em;"><em>{L_TOPIC_VIEWS}: {announcements_row.TOPIC_VIEWS}</em></span>
|
||||
</span>
|
||||
<span style="float: right; margin: 0 5px 0 0;">{L_POSTED_ON_DATE} <strong>{announcements_row.TIME}</strong></span>
|
||||
<!-- IF announcements_row.S_NOT_LAST --><hr style="margin: 0px 0px 3px 0px;" /><!-- ENDIF -->
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END announcements_row -->
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
19
root/styles/prosilver/template/portal/block/attachments.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_ATTACHMENTS}</h3>
|
||||
|
||||
<span style="float:left;"><strong>{L_FILENAME}</strong></span><br />
|
||||
<!-- <span style="float:right;padding-right:10px;"><strong>{L_FILESIZE}</strong></span><br /> -->
|
||||
<!-- BEGIN attach -->
|
||||
<span style="float:left;" class="gensmall"><img src="portal/images/icon_topic_attach.gif" alt="" /> <a href="viewtopic.php?p={attach.POST_MSG_ID}#p{attach.POST_MSG_ID}" ><strong>{attach.REAL_FILENAME}</strong></a></span><br style="clear:both" />
|
||||
<!-- <span style="float:right;padding-right:10px;" class="gensmall">{attach.FILESIZE}</span><br style="clear:both" /> -->
|
||||
<span style="float:left;padding-right:10px;">{L_FILESIZE}:</span><span style="float:right;padding-right:10px;" class="gensmall"><strong>{attach.FILESIZE}</strong></span><br style="clear:both" />
|
||||
<span style="float:left;padding-right:10px;">{L_DOWNLOADS}:</span><span style="float:right;padding-right:10px;" class="gensmall"><strong>{attach.DOWNLOAD_COUNT}</strong></span><br style="clear:both" />
|
||||
<hr />
|
||||
<!-- END attach -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_BIRTHDAYS}</h3>
|
||||
<!-- IF BIRTHDAY_LIST -->
|
||||
<strong>{L_CONGRATULATIONS}: {BIRTHDAY_LIST}</strong>
|
||||
<!-- ELSE -->
|
||||
{L_NO_BIRTHDAYS}
|
||||
<!-- ENDIF -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_BOARD_STYLE}</h3>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// borrowed from forumimages.com !!
|
||||
function jumpMenu(targ, selObj, restore)
|
||||
{
|
||||
eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
|
||||
if (restore) selObj.selectedIndex = 0;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<form method="get" name="jumpbox" action="portal.php" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
|
||||
<select name="demo" onchange="jumpMenu('self',this,0)" class="input">
|
||||
<option selected="selected" disabled="disabled">{L_STYLE_CHOOSE}</option>
|
||||
<!-- BEGIN styles-->
|
||||
<option value="{styles.U_STYLE}">{styles.STYLE_NAME}</option>
|
||||
<!-- END styles -->
|
||||
</select>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
15
root/styles/prosilver/template/portal/block/clock.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_CLOCK}</h3>
|
||||
<div style="text-align: center;">
|
||||
<object type="application/x-shockwave-flash" data="portal/images/clock.swf" width="160" height="70">
|
||||
<param name="wmode" value="transparent" />
|
||||
<param name="movie" value="portal/images/clock.swf" />
|
||||
</object>
|
||||
</div>
|
||||
<br />
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="forabg">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{L_DONATION}</dt></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
<li><dl>
|
||||
<dd class="posts_portal" style="border-left:0px">
|
||||
<table width="100%" cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{SITENAME}</strong> {L_DONATION_TEXT}
|
||||
<br /><br />
|
||||
{L_PAY_MSG}
|
||||
<br />
|
||||
</td>
|
||||
<td style="width: 100px;" align="center">
|
||||
<!-- INCLUDE portal/block/donation/paypal.html -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl></li>
|
||||
</ul>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,10 @@
|
||||
<!-- $Id$ //-->
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_DONATION}</h3>
|
||||
<!-- INCLUDE portal/block/donation/paypal.html -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!-- $Id$ //-->
|
||||
|
||||
<!-- reference and all paypal codes
|
||||
https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/howto_checkout-outside
|
||||
https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_wa-outside
|
||||
//-->
|
||||
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<div style="text-align: center;">
|
||||
<input type="hidden" name="cmd" value="_xclick" />
|
||||
<input type="hidden" name="business" value="{PAY_ACC}" />
|
||||
<input type="hidden" name="item_name" value="{L_PAY_ITEM}" />
|
||||
<input type="hidden" name="no_note" value="1" />
|
||||
<input type="hidden" name="currency_code" value="EUR" />
|
||||
<input type="hidden" name="no_shipping" value="2" />
|
||||
<input type="hidden" name="bn" value="PP-DonationsBF" />
|
||||
<input type="hidden" name="tax" value="0" />
|
||||
EUR
|
||||
<!--
|
||||
ISO 8859-1 character set overview
|
||||
http://www.htmlhelp.com/reference/charset/
|
||||
//-->
|
||||
<select name="amount">
|
||||
<option value="1.00">1.00</option>
|
||||
<option value="2.00">2.00</option>
|
||||
<option value="3.00">3.00</option>
|
||||
<option value="4.00">4.00</option>
|
||||
<option value="5.00">5.00</option>
|
||||
<option value="10.00">10.00</option>
|
||||
<option value="20.00">20.00</option>
|
||||
<option value="25.00">25.00</option>
|
||||
<option value="50.00">50.00</option>
|
||||
<option value="100.00">100.00</option>
|
||||
</select>
|
||||
<br />
|
||||
<input type="image" src="portal/images/paypal.gif" style="border:0px; background-color:transparent; padding-top:6px" />
|
||||
</div>
|
||||
</form>
|
||||
7
root/styles/prosilver/template/portal/block/index.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
</body>
|
||||
</html>
|
||||
11
root/styles/prosilver/template/portal/block/latest_bots.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{LAST_VISITED_BOTS}</h3>
|
||||
<!-- BEGIN last_visited_bots -->
|
||||
<span class="genmed">{last_visited_bots.BOT_NAME}</span> <br /> <span class="gensmall">{last_visited_bots.LAST_VISIT_DATE}</span><hr />
|
||||
<!-- END last_visited_bots -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_LATEST_MEMBERS}</h3>
|
||||
<span style="float:left;"><strong>{L_USERNAME}</strong></span>
|
||||
<span style="float:right;padding-right:10px;"><strong>{L_JOINED}</strong></span><br />
|
||||
<!-- BEGIN latest_members -->
|
||||
<span style="float:left;"><img src="portal/images/member.gif" height="15" width="15" alt="new" /> <a href="{latest_members.U_USERNAME}"><span<!-- IF latest_members.USERNAME_COLOR -->{latest_members.USERNAME_COLOR}<!-- ENDIF -->>{latest_members.USERNAME}</span></a></span>
|
||||
<span style="float:right;padding-right:10px;">{latest_members.JOINED}</span><br style="clear:both" />
|
||||
<!-- END latest_members -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
21
root/styles/prosilver/template/portal/block/leaders.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_THE_TEAM}</h3>
|
||||
<strong>{L_ADMINISTRATORS}</strong><br />
|
||||
<!-- BEGIN admin -->
|
||||
<img src="portal/images/member.gif" height="15" width="15" alt="Admin" /> <strong>{admin.USERNAME_FULL}</strong><br />
|
||||
<!-- BEGINELSE -->
|
||||
{L_NO_ADMINISTRATORS_P}<br /><br />
|
||||
<!-- END admin -->
|
||||
|
||||
<strong>{L_MODERATORS}</strong><br />
|
||||
<!-- BEGIN mod -->
|
||||
<img src="portal/images/member.gif" height="15" width="15" alt="Moderator" /> <strong>{mod.USERNAME_FULL}</strong><br />
|
||||
<!-- BEGINELSE -->
|
||||
{L_NO_MODERATORS_P}
|
||||
<!-- END mod -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
10
root/styles/prosilver/template/portal/block/link_us.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_LINK_US}</h3>
|
||||
{LINK_US_TXT}<br /><br />
|
||||
<input type="text" tabindex="1" size="28" value="{U_LINK_US}" class="inputbox autowidth" /><br />
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
16
root/styles/prosilver/template/portal/block/links.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_LINKS}</h3>
|
||||
<div class="panel" style="margin-bottom: 0px;">
|
||||
<ul class="ul-link">
|
||||
<li><a href="http://www.phpbb.de" title="Deutsche phpBB Supportseite">phpbb.de</a></li>
|
||||
<li><a href="http://www.board3.de" title="Home of the board3 Portal">board3</a></li>
|
||||
<li><a href="http://www.flying-bits.org" title="Hier findest du die Mods von nickvergessen">www.flying-bits.org</a></li>
|
||||
<li><a href="http://www.phpbb3portal.com" title="phpbb3portal.com">phpbb3portal.com</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
30
root/styles/prosilver/template/portal/block/login_box.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<form action="{S_LOGIN_ACTION}" method="post">
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h3>
|
||||
|
||||
<span class="genmed">{L_USERNAME}:</span><br />
|
||||
<input type="text" tabindex="1" name="username" id="username" size="20" maxlength="40" value="" class="inputbox autowidth" /><br /><br />
|
||||
<span class="genmed">{L_PASSWORD}:</span><br />
|
||||
<input type="password" tabindex="2" id="password" name="password" size="20" maxlength="25" class="inputbox autowidth" />
|
||||
|
||||
<!-- IF S_DISPLAY_FULL_LOGIN -->
|
||||
<br /><br />
|
||||
<!-- IF S_AUTOLOGIN_ENABLED -->
|
||||
<input type="checkbox" class="radio" name="autologin" tabindex="3" /> <span class="gensmall">{L_UM_LOG_ME_IN}</span><br />
|
||||
<!-- ENDIF -->
|
||||
<!--
|
||||
<input type="checkbox" class="radio" name="viewonline" tabindex="4" /> <span class="gensmall">{L_UM_HIDE_ME}</span><br />
|
||||
-->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br />
|
||||
<input type="hidden" name="redirect" value="{U_PORTAL}" />
|
||||
<input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" />
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br style="clear:both" />
|
||||
39
root/styles/prosilver/template/portal/block/main_menu.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_M_MENU}</h3>
|
||||
|
||||
<div id="navigation" style="padding-top:0px">
|
||||
|
||||
|
||||
<strong>{L_M_CONTENT}</strong>
|
||||
<ul>
|
||||
<li><a href="{U_INDEX}">{L_INDEX}</a></li>
|
||||
<li><a href="{U_SEARCH}">{L_SEARCH}</a></li>
|
||||
<!-- IF not S_USER_LOGGED_IN -->
|
||||
<li><a href="{U_REGISTER}">{L_REGISTER}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<li><a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a></li>
|
||||
<li><a href="{U_TEAM}">{L_THE_TEAM}</a></li>
|
||||
<!-- IF U_MCP -->
|
||||
<li><a href="{U_MCP}">{L_MCP}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_ACP -->
|
||||
<li><a href="{U_ACP}">{L_M_ACP}</a></li>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
<br />
|
||||
|
||||
<strong>{L_M_HELP}</strong>
|
||||
<ul>
|
||||
<li><a href="{U_FAQ}">{L_FAQ}</a></li>
|
||||
<li><a href="faq.php?mode=bbcode">{L_M_BBCODE}</a></li>
|
||||
<li><a href="ucp.php?mode=terms">{L_M_TERMS}</a></li>
|
||||
<li><a href="ucp.php?mode=privacy">{L_M_PRV}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,38 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_M_MENU}</h3>
|
||||
<div id="navigationportal">
|
||||
<strong>{L_M_CONTENT}</strong>
|
||||
<ul>
|
||||
<li><a href="{U_INDEX}">{L_INDEX}</a></li>
|
||||
<li><a href="{U_SEARCH}">{L_SEARCH}</a></li>
|
||||
<!-- IF not S_USER_LOGGED_IN -->
|
||||
<li><a href="{U_REGISTER}">{L_REGISTER}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
|
||||
<li><a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a></li>
|
||||
<li><a href="{U_TEAM}">{L_THE_TEAM}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_MCP -->
|
||||
<li><a href="{U_MCP}">{L_MCP}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_ACP -->
|
||||
<li><a href="{U_ACP}">{L_M_ACP}</a></li>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
<br />
|
||||
|
||||
<strong>{L_M_HELP}</strong>
|
||||
<ul>
|
||||
<li><a href="{U_FAQ}">{L_FAQ}</a></li>
|
||||
<li><a href="faq.php?mode=bbcode">{L_M_BBCODE}</a></li>
|
||||
<li><a href="ucp.php?mode=terms">{L_M_TERMS}</a></li>
|
||||
<li><a href="ucp.php?mode=privacy">{L_M_PRV}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,44 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_MINI_CAL_CALENDAR}</h3>
|
||||
|
||||
<table width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<td align="left" colspan="2">{U_PREV_MONTH}</td>
|
||||
<td colspan="3" align="center"><span class="genmed">{L_MINI_CAL_MONTH}</span></td>
|
||||
<td align="right" colspan="2">{U_NEXT_MONTH}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#0000FF">{L_MINI_CAL_SUN}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#0000FF">{L_MINI_CAL_MON}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#0000FF">{L_MINI_CAL_TUE}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#0000FF">{L_MINI_CAL_WED}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#0000FF">{L_MINI_CAL_THU}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall">{L_MINI_CAL_FRI}</span></td>
|
||||
<td style="width: 14%;"><span class="gensmall" style="color:#FF0000">{L_MINI_CAL_SAT}</span></td>
|
||||
</tr>
|
||||
<!-- BEGIN mini_cal_row -->
|
||||
<tr>
|
||||
<!-- BEGIN mini_cal_days -->
|
||||
<td class="row1" align="center"><span class="gensmall">{mini_cal_row.mini_cal_days.MINI_CAL_DAY}</span></td>
|
||||
<!-- END mini_cal_days -->
|
||||
</tr>
|
||||
<!-- END mini_cal_row -->
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<!-- IF .mini_cal_holiday -->
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<!-- BEGIN mini_cal_holiday -->
|
||||
<tr>
|
||||
<td class="row1" align="left"><span class="gensmall">{mini_cal_holiday.MINI_CAL_HOLIDAYS}</span></td>
|
||||
</tr>
|
||||
<!-- END mini_cal_holiday -->
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
35
root/styles/prosilver/template/portal/block/news.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="forabg">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{L_LATEST_NEWS}</dt></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
<li><dl>
|
||||
<dd class="posts_portal" style="border-left:0px">
|
||||
<!-- BEGIN news_row -->
|
||||
<!-- IF news_row.S_NO_TOPICS -->
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_NEWS}</strong></span>
|
||||
<!-- ELSE -->
|
||||
<div class="postbody postbody_portal" style="width: 100%">
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}"><strong>{news_row.TITLE}</strong></a></span></h4>
|
||||
<ul class="linklist">
|
||||
<li><span style="margin: 0 0 0 5px">{L_POSTED_BY}: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span></li>
|
||||
<li class="rightside"><span style="margin: 0 5px 0 0;">{news_row.TIME}</span></li>
|
||||
</ul>
|
||||
<br />
|
||||
<div class="content"><div style="float: left; margin: 0 0 0 5px">{news_row.TEXT}</div></div><br />
|
||||
<span style="float: left; margin: 0 0 0 5px">{L_TOPIC_VIEWS}: {news_row.TOPIC_VIEWS} • <a href="{news_row.U_VIEW_COMMENTS}" title="{L_VIEW_COMMENTS}">{L_COMMENTS}: {news_row.REPLIES}</a> • <a href="{news_row.U_POST_COMMENT}">{L_POST_REPLY}</a></span>
|
||||
<span style="float: right; margin: 0 5px 5px 0">{news_row.OPEN}<a href="{news_row.U_READ_FULL}">{news_row.L_READ_FULL}</a>{news_row.CLOSE}</span>
|
||||
</div>
|
||||
<div class="back2top"><span style="float: right; margin: 0 5px 0 0"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></span></div>
|
||||
<!-- IF news_row.S_NOT_LAST --><hr /><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- END news_row -->
|
||||
</dd>
|
||||
</dl></li>
|
||||
</ul>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_FRIENDS}</h3>
|
||||
<strong style="color:green">{L_FRIENDS_ONLINE}</strong><br />
|
||||
<!-- BEGIN friends_online -->
|
||||
<img src="portal/images/member.gif" /> {friends_online.USERNAME_FULL}<br /><br />
|
||||
<!-- BEGINELSE -->
|
||||
{L_NO_FRIENDS_ONLINE}<br /><br />
|
||||
<!-- END friends_online -->
|
||||
|
||||
<strong style="color:red">{L_FRIENDS_OFFLINE}</strong><br />
|
||||
<!-- BEGIN friends_offline -->
|
||||
<img src="portal/images/member.gif" /> {friends_offline.USERNAME_FULL}<br />
|
||||
<!-- BEGINELSE -->
|
||||
{L_NO_FRIENDS_OFFLINE}
|
||||
<!-- END friends_offline -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
47
root/styles/prosilver/template/portal/block/poll.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<div class="forabg"><span class="corners-top"><span></span></span>
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl><dt>{L_POLL}</dt></dl></li>
|
||||
</ul>
|
||||
<form method="post" action="{S_POLL_ACTION}">
|
||||
<div class="panel" style="margin-bottom: 0px;"><span class="corners-top"><span></span></span>
|
||||
<h3>{POLL_QUESTION}</h3>
|
||||
<div class="content">
|
||||
<p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></p>
|
||||
<fieldset class="polls">
|
||||
<!-- BEGIN poll_option -->
|
||||
<dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
|
||||
<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
|
||||
<!-- IF S_CAN_VOTE --><dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF -->/><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
|
||||
<!-- IF S_DISPLAY_RESULTS --><dd class="resultbar"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
|
||||
<dd><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- END poll_option -->
|
||||
|
||||
<!-- IF S_DISPLAY_RESULTS -->
|
||||
<dl>
|
||||
<dt> </dt>
|
||||
<dd class="resultbar">{L_TOTAL_VOTES} : {TOTAL_VOTES}<br /><br /><a href="{U_VIEW_RESULTS}">{L_JUMP_TO_POST}</a></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_CAN_VOTE -->
|
||||
<dl style="border-top: none;">
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_DISPLAY_RESULTS -->
|
||||
<dl style="border-top: none;">
|
||||
<dt> </dt>
|
||||
<dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
{S_HIDDEN_FIELDS}
|
||||
</form>
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
<br style="clear:both" />
|
||||
@@ -0,0 +1,28 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<h3>{L_RND_MEMBER}</h3>
|
||||
<!-- BEGIN random_member -->
|
||||
<span style="float:left;font-size:12px;">
|
||||
<img src="portal/images/member.gif" height="15" width="15" alt="{random_member.USERNAME}" /> <a href="{random_member.U_VIEW_PROFILE}"><!-- IF random_member.USER_COLOR --><span style="color: {random_member.USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{random_member.USERNAME}</span></a>
|
||||
</span>
|
||||
<span style="float:right;"></span>
|
||||
<!-- //IF random_member.AVATAR_IMG --><br /><br /><a href="{random_member.U_VIEW_PROFILE}">{random_member.AVATAR_IMG}</a><!-- //ENDIF -->
|
||||
<!-- IF random_member.RANK_TITLE --><br /><small>{random_member.RANK_TITLE}</small><br /><!-- ENDIF -->
|
||||
<!-- IF random_member.RANK_IMG -->{random_member.RANK_IMG}<br /><!-- ENDIF -->
|
||||
<span style="float:left;">{L_RND_JOIN}:</span><span style="float:right;padding-right:10px;">{random_member.JOINED}</span><br />
|
||||
<span style="float:left;">{L_RND_POSTS}:</span><span style="float:right;padding-right:10px;">{random_member.USER_POSTS}</span><br />
|
||||
<!-- IF random_member.USER_OCC -->
|
||||
<span style="float:left;">{L_RND_OCC}:</span><span style="float:right;padding-right:10px;">{random_member.USER_OCC}</span><br />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF random_member.USER_FROM -->
|
||||
<span style="float:left;">{L_RND_FROM}:</span><span style="float:right;padding-right:10px;">{random_member.USER_FROM}</span><br />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF random_member.U_WWW -->
|
||||
<span style="float:left;"><a href="{random_member.U_WWW}" title="{random_member.U_WWW}" target="_blank">{L_RND_WWW}</a></span><span style="float:right;"></span><br />
|
||||
<!-- ENDIF -->
|
||||
<!-- END random_member -->
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||