Merge pull request #152 from marc1706/apply/master

Apply/master
This commit is contained in:
Marc Alexander
2013-10-17 02:08:59 -07:00
22 changed files with 802 additions and 963 deletions

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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/-->
<!-- $Id$ --> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
@@ -31,11 +30,11 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author-notes> </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 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -86,12 +85,12 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>120</time> <time>120</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
@@ -107,4 +106,4 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
<diy-instructions lang="en">See general install.xml file</diy-instructions> <diy-instructions lang="en">See general install.xml file</diy-instructions>
<diy-instructions lang="de">Siehe install.xml</diy-instructions> <diy-instructions lang="de">Siehe install.xml</diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -5,7 +5,7 @@
<!DOCTYPE xsl:stylesheet[ <!DOCTYPE xsl:stylesheet[
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
]> ]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:output method="html" omit-xml-declaration="no" indent="yes" />
<xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" />
<xsl:variable name="version"> <xsl:variable name="version">
@@ -23,7 +23,7 @@
/* phpBB 3.0 Admin Style Sheet /* phpBB 3.0 Admin Style Sheet
Original author: subBlue ( http://www.subblue.com/ ) Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) Copyright 2007 phpBB Group ( https://www.phpbb.com/ )
*/ */
@@ -624,7 +624,7 @@ div.endMOD { padding:0 5px; }
// The following line from http://www.ryancooper.com/resources/keycode.asp // The following line from http://www.ryancooper.com/resources/keycode.asp
document.onkeydown = mod_do_keypress; document.onkeydown = mod_do_keypress;
var host = "http://www.phpbb.com/mods/modx/i18n/"; var host = "https://www.phpbb.com/mods/modx/i18n/";
var enStrings = "dir=ltr\n" + var enStrings = "dir=ltr\n" +
"h1=Installation instructions for\n" + "h1=Installation instructions for\n" +
@@ -646,6 +646,7 @@ var enStrings = "dir=ltr\n" +
"a-e=Email:\n" + "a-e=Email:\n" +
"a-n=Name:\n" + "a-n=Name:\n" +
"a-h=WWW:\n" + "a-h=WWW:\n" +
"a-git=Github:\n" +
"a-c=Contributions:\n" + "a-c=Contributions:\n" +
"a-c-f=From\n" + "a-c-f=From\n" +
"a-c-t=to\n" + "a-c-t=to\n" +
@@ -654,9 +655,9 @@ var enStrings = "dir=ltr\n" +
"icf=Included files\n" + "icf=Included files\n" +
"icfn=No files have been included with this MOD.\n" + "icfn=No files have been included with this MOD.\n" +
"dcl=Disclaimer\n" + "dcl=Disclaimer\n" +
"dclt=For security purposes, please check: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a>\n" + "dclt=For security purposes, please check: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a>\n" +
"isp=and English support\n" + "isp=and English support\n" +
"ispt=English support can be obtained at <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for released MODs.\n" + "ispt=English support can be obtained at <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for released MODs.\n" +
"ant=Author notes:\n" + "ant=Author notes:\n" +
"lic=License\n" + "lic=License\n" +
"lict=This MOD has been licensed under the following license:\n" + "lict=This MOD has been licensed under the following license:\n" +
@@ -709,8 +710,8 @@ var enStrings = "dir=ltr\n" +
"regex=This find contains an advanced feature known as regular expressions.\n" + "regex=This find contains an advanced feature known as regular expressions.\n" +
"mhe-v=- Version\n" + "mhe-v=- Version\n" +
"mh=MOD history\n" + "mh=MOD history\n" +
"addtl-modx=Additional MODX files\n" + "addtl-modx=Additional file(s)\n" +
"imn=This MOD has no additional MODX files.\n" + "imn=This MOD has no additional file(s).\n" +
"link-c=Contrib\n" + "link-c=Contrib\n" +
"link-d=Dependency\n" + "link-d=Dependency\n" +
"link-l=Language\n" + "link-l=Language\n" +
@@ -722,7 +723,7 @@ var enStrings = "dir=ltr\n" +
"installer-h2=PHP install file\n" + "installer-h2=PHP install file\n" +
"installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" + "installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" +
"installer-exp2=To run it point your browser to, for example,\n" + "installer-exp2=To run it point your browser to, for example,\n" +
"ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"http://www.phpbb.com/support/intl/\">international support site</a>.\n" + "ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"https://www.phpbb.com/support/intl/\">international support site</a>.\n" +
"del-heads=Delete files\n" + "del-heads=Delete files\n" +
"del-head=Delete file\n" + "del-head=Delete file\n" +
"del-file=Delete\n" + "del-file=Delete\n" +
@@ -741,14 +742,14 @@ var arrClasCnt = [
['cde-' , codes_ll ], ['cde-' , codes_ll ],
['edt-' , edits_ll ], ['edt-' , edits_ll ],
['fnd' , finds_ll ], ['fnd' , finds_ll ],
['fnd' , removes_ll ], ['rem' , removes_ll ],
['regex', regex_ll ], ['regex', regex_ll ],
['rplw' , replacewiths_ll ], ['rplw' , replacewiths_ll ],
['aft' , addafters_ll ], ['aft' , addafters_ll ],
['bef' , addbefores_ll ], ['bef' , addbefores_ll ],
['inc' , increments_ll ], ['inc' , increments_ll ],
['ifnd' , ifinds_ll ], ['ifnd' , ifinds_ll ],
['ifnd' , iremoves_ll ], ['irem' , iremoves_ll ],
['regex', iregex_ll ], ['regex', iregex_ll ],
['irplw', ireplacewiths_ll ], ['irplw', ireplacewiths_ll ],
['iaft' , iaddafters_ll ], ['iaft' , iaddafters_ll ],
@@ -780,6 +781,8 @@ function changeLanguage(langCode)
applyLanguage(enStrings.split("\n")); applyLanguage(enStrings.split("\n"));
} }
xslLanguage(langCode); xslLanguage(langCode);
show_title(langCode);
} }
function load_languages() function load_languages()
@@ -808,6 +811,71 @@ function load_language()
send('', host + currentLanguage + '.txt?rnd=' + cachernd); send('', host + currentLanguage + '.txt?rnd=' + cachernd);
} }
/**
* From http://stackoverflow.com/questions/1280903/javascript-ie-and-getelementsbyclassname-problems/8472488#8472488
*/
if (typeof document.getElementsByClassName != 'function')
{
document.getElementsByClassName = function()
{
var elms = document.getElementsByTagName('*');
var ei = new Array();
for (i = 0; i < elms.length; i++)
{
if (elms[i].getAttribute('class'))
{
ecl = elms[i].getAttribute('class').split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
else if (elms[i].className)
{
ecl = elms[i].className.split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
}
return ei;
}
}
function show_title(langCode)
{
var sel_title = document.getElementById('title-' + langCode);
if (sel_title == null)
{
// A title in English is required.
sel_title = document.getElementById('title-en')
if (sel_title == null)
{
// No title in English or the selected language.
return;
}
}
var hide_title = document.getElementsByClassName('hide-title');
for (var i = 0; i < hide_title.length; i++)
{
hide_title[i].style.display='none';
}
sel_title.style.display='inline';
document.title = "phpBB MOD » " + sel_title.innerHTML;
}
/***************** /*****************
* AJAX Functions * * AJAX Functions *
*****************/ *****************/
@@ -1425,7 +1493,7 @@ function change_dbms($form)
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$exists = 0; $exists = 0;
$tags = document.getElementsByTagName('dbms'); $tags = document.getElementsByTagName('dbms');
@@ -1440,7 +1508,7 @@ function change_dbms($form)
{ {
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1472,7 +1540,7 @@ function sql_display($value)
// show the dbms of type we have selected, hide all others except for non dbms specific // show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1520,7 +1588,7 @@ function sql_dropdown()
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$options = []; $options = [];
$ie_options = []; $ie_options = [];
@@ -1530,7 +1598,7 @@ function sql_dropdown()
// Show the dbms of type we have selected, hide all others except for non dbms specific // Show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1628,7 +1696,14 @@ function toggle_edit(o)
<div id="debug"></div> <div id="debug"></div>
<div id="wrap"> <div id="wrap">
<div id="page-header"> <div id="page-header">
<h1><span id="lang-h1">Installation instructions for</span> '<xsl:value-of select="$title" />' <span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" /></h1> <h1>
<span id="lang-h1">Installation instructions for</span>
<span class="hide-title" lang="{@lang}"> '<xsl:value-of select="$title" />' </span>
<xsl:for-each select="mod:header/mod:title">
<span class="hide-title" lang="{@lang}" id="title-{@lang}" style="display: none;"> '<xsl:value-of select="current()" />' </span>
</xsl:for-each>
<span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" />
</h1>
<form method="post" action="" id="lang-selector" style="display: none;"> <form method="post" action="" id="lang-selector" style="display: none;">
<fieldset class="nobg"> <fieldset class="nobg">
<label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select> <label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select>
@@ -1667,6 +1742,7 @@ function toggle_edit(o)
</html> </html>
</xsl:template> </xsl:template>
<xsl:template name="give-header"> <xsl:template name="give-header">
<fieldset> <fieldset>
<legend id="lang-atm">About this MOD</legend> <legend id="lang-atm">About this MOD</legend>
@@ -1750,6 +1826,12 @@ function toggle_edit(o)
</xsl:if> </xsl:if>
</dd> </dd>
</xsl:if> </xsl:if>
<xsl:if test="mod:github != 'N/A' and mod:github != 'n/a' and mod:github != ''">
<xsl:if test="contains(mod:github, 'https://github.com/')">
<dt id="lang-a-git[{generate-id()}]">Github:</dt>
<dd name="author-dd"><a href="{mod:github}" dir="ltr"><xsl:value-of select="mod:github" /></a></dd>
</xsl:if>
</xsl:if>
</dl> </dl>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1778,9 +1860,9 @@ function toggle_edit(o)
<xsl:for-each select="../mod:action-group"> <xsl:for-each select="../mod:action-group">
<xsl:call-template name="give-files-included"></xsl:call-template> <xsl:call-template name="give-files-included"></xsl:call-template>
</xsl:for-each> </xsl:for-each>
<h3 id="lang-addtl-modx">Additional MODX files</h3> <h3 id="lang-addtl-modx">Additional file(s)</h3>
<xsl:if test="count(mod:link-group/mod:link) = 0"> <xsl:if test="count(mod:link-group/mod:link) = 0">
<p id="lang-imn">This MOD has no additional MODX files.</p> <p id="lang-imn">This MOD has no additional file(s).</p>
</xsl:if> </xsl:if>
<ul class="link-group" id="link-group"> <ul class="link-group" id="link-group">
@@ -1823,7 +1905,7 @@ function toggle_edit(o)
<div class="mod-about"> <div class="mod-about">
<span class="corners-top"><span></span></span> <span class="corners-top"><span></span></span>
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-dclt">For security purposes, please check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></span></p> <p><span id="lang-dclt">For security purposes, please check: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></span></p>
<p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p> <p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p>
<p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p> <p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p>
<xsl:for-each select="./mod:mod-version"> <xsl:for-each select="./mod:mod-version">
@@ -1842,8 +1924,8 @@ function toggle_edit(o)
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-lict">This MOD has been licensed under the following license:</span></p> <p><span id="lang-lict">This MOD has been licensed under the following license:</span></p>
<p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p> <p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p>
<p><span id="lang-ispt">English support can be obtained at <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for released MODs.</span></p> <p><span id="lang-ispt">English support can be obtained at <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for released MODs.</span></p>
<p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="http://www.phpbb.com/support/intl/">international support site</a>.</span></p> <p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="https://www.phpbb.com/support/intl/">international support site</a>.</span></p>
</div> </div>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1882,10 +1964,10 @@ function toggle_edit(o)
<xsl:with-param name="string-in" select="string($authorurl)"/> <xsl:with-param name="string-in" select="string($authorurl)"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
@@ -2083,7 +2165,7 @@ function toggle_edit(o)
<option value="mssql">MSSQL</option> <option value="mssql">MSSQL</option>
<option value="oracle">Oracle</option> <option value="oracle">Oracle</option>
<option value="postgres">Postgres</option> <option value="postgres">Postgres</option>
<option value="sqllite">SQLLite</option> <option value="sqlite">SQLite</option>
</select> </select>
</fieldset> </fieldset>
</form> </form>
@@ -2652,4 +2734,4 @@ function toggle_edit(o)
</xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template> </xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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/-->
<!-- $Id: subsilver2.xml 658 2010-06-01 12:26:23Z marc1706 $ --> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
@@ -31,11 +30,11 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author-notes> </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 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -86,12 +85,12 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>120</time> <time>120</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
@@ -170,4 +169,4 @@ Refresh your Styles:
Clear your cache in the "Administration Control Panel" (ACP) > "General" > "Purge the cache" Clear your cache in the "Administration Control Panel" (ACP) > "General" > "Purge the cache"
]]></diy-instructions> ]]></diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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/-->
<!-- $Id$ --> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en">board3 Portal - German Language Update for 2.0.1</title> <title lang="en">board3 Portal - German Language Update for 2.0.2</title>
<title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.1</title> <title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.2</title>
<description lang="en">Adds a portal to your forum. <description lang="en">Adds a portal to your forum.
It has several boxes wich can be turned on an off in the ACP and certain settings. It has several boxes wich can be turned on an off in the ACP and certain settings.
@@ -31,11 +30,11 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author-notes> </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 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -86,12 +85,12 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>120</time> <time>120</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
@@ -101,11 +100,9 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</header> </header>
<action-group> <action-group>
<copy> <copy>
<file from="root/language/de/mods/info_acp_portal.php" to="language/de/mods/info_acp_portal.php" /> <file from="root/language/de/mods/*.*" to="language/de/mods/*.*" />
<file from="root/language/de/mods/portal/portal_links_module.php" to="language/de/mods/portal/portal_links_module.php" />
<file from="root/language/de/mods/portal/portal_main_menu_module.php" to="language/de/mods/portal/portal_main_menu_module.php" />
</copy> </copy>
<diy-instructions lang="en">See general install.xml file</diy-instructions> <diy-instructions lang="en">See general install.xml file</diy-instructions>
<diy-instructions lang="de">Siehe install.xml</diy-instructions> <diy-instructions lang="de">Siehe install.xml</diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -5,7 +5,7 @@
<!DOCTYPE xsl:stylesheet[ <!DOCTYPE xsl:stylesheet[
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
]> ]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:output method="html" omit-xml-declaration="no" indent="yes" />
<xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" />
<xsl:variable name="version"> <xsl:variable name="version">
@@ -23,7 +23,7 @@
/* phpBB 3.0 Admin Style Sheet /* phpBB 3.0 Admin Style Sheet
Original author: subBlue ( http://www.subblue.com/ ) Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) Copyright 2007 phpBB Group ( https://www.phpbb.com/ )
*/ */
@@ -624,7 +624,7 @@ div.endMOD { padding:0 5px; }
// The following line from http://www.ryancooper.com/resources/keycode.asp // The following line from http://www.ryancooper.com/resources/keycode.asp
document.onkeydown = mod_do_keypress; document.onkeydown = mod_do_keypress;
var host = "http://www.phpbb.com/mods/modx/i18n/"; var host = "https://www.phpbb.com/mods/modx/i18n/";
var enStrings = "dir=ltr\n" + var enStrings = "dir=ltr\n" +
"h1=Installation instructions for\n" + "h1=Installation instructions for\n" +
@@ -646,6 +646,7 @@ var enStrings = "dir=ltr\n" +
"a-e=Email:\n" + "a-e=Email:\n" +
"a-n=Name:\n" + "a-n=Name:\n" +
"a-h=WWW:\n" + "a-h=WWW:\n" +
"a-git=Github:\n" +
"a-c=Contributions:\n" + "a-c=Contributions:\n" +
"a-c-f=From\n" + "a-c-f=From\n" +
"a-c-t=to\n" + "a-c-t=to\n" +
@@ -654,9 +655,9 @@ var enStrings = "dir=ltr\n" +
"icf=Included files\n" + "icf=Included files\n" +
"icfn=No files have been included with this MOD.\n" + "icfn=No files have been included with this MOD.\n" +
"dcl=Disclaimer\n" + "dcl=Disclaimer\n" +
"dclt=For security purposes, please check: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a>\n" + "dclt=For security purposes, please check: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a>\n" +
"isp=and English support\n" + "isp=and English support\n" +
"ispt=English support can be obtained at <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for released MODs.\n" + "ispt=English support can be obtained at <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for released MODs.\n" +
"ant=Author notes:\n" + "ant=Author notes:\n" +
"lic=License\n" + "lic=License\n" +
"lict=This MOD has been licensed under the following license:\n" + "lict=This MOD has been licensed under the following license:\n" +
@@ -709,8 +710,8 @@ var enStrings = "dir=ltr\n" +
"regex=This find contains an advanced feature known as regular expressions.\n" + "regex=This find contains an advanced feature known as regular expressions.\n" +
"mhe-v=- Version\n" + "mhe-v=- Version\n" +
"mh=MOD history\n" + "mh=MOD history\n" +
"addtl-modx=Additional MODX files\n" + "addtl-modx=Additional file(s)\n" +
"imn=This MOD has no additional MODX files.\n" + "imn=This MOD has no additional file(s).\n" +
"link-c=Contrib\n" + "link-c=Contrib\n" +
"link-d=Dependency\n" + "link-d=Dependency\n" +
"link-l=Language\n" + "link-l=Language\n" +
@@ -722,7 +723,7 @@ var enStrings = "dir=ltr\n" +
"installer-h2=PHP install file\n" + "installer-h2=PHP install file\n" +
"installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" + "installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" +
"installer-exp2=To run it point your browser to, for example,\n" + "installer-exp2=To run it point your browser to, for example,\n" +
"ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"http://www.phpbb.com/support/intl/\">international support site</a>.\n" + "ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"https://www.phpbb.com/support/intl/\">international support site</a>.\n" +
"del-heads=Delete files\n" + "del-heads=Delete files\n" +
"del-head=Delete file\n" + "del-head=Delete file\n" +
"del-file=Delete\n" + "del-file=Delete\n" +
@@ -741,14 +742,14 @@ var arrClasCnt = [
['cde-' , codes_ll ], ['cde-' , codes_ll ],
['edt-' , edits_ll ], ['edt-' , edits_ll ],
['fnd' , finds_ll ], ['fnd' , finds_ll ],
['fnd' , removes_ll ], ['rem' , removes_ll ],
['regex', regex_ll ], ['regex', regex_ll ],
['rplw' , replacewiths_ll ], ['rplw' , replacewiths_ll ],
['aft' , addafters_ll ], ['aft' , addafters_ll ],
['bef' , addbefores_ll ], ['bef' , addbefores_ll ],
['inc' , increments_ll ], ['inc' , increments_ll ],
['ifnd' , ifinds_ll ], ['ifnd' , ifinds_ll ],
['ifnd' , iremoves_ll ], ['irem' , iremoves_ll ],
['regex', iregex_ll ], ['regex', iregex_ll ],
['irplw', ireplacewiths_ll ], ['irplw', ireplacewiths_ll ],
['iaft' , iaddafters_ll ], ['iaft' , iaddafters_ll ],
@@ -780,6 +781,8 @@ function changeLanguage(langCode)
applyLanguage(enStrings.split("\n")); applyLanguage(enStrings.split("\n"));
} }
xslLanguage(langCode); xslLanguage(langCode);
show_title(langCode);
} }
function load_languages() function load_languages()
@@ -808,6 +811,71 @@ function load_language()
send('', host + currentLanguage + '.txt?rnd=' + cachernd); send('', host + currentLanguage + '.txt?rnd=' + cachernd);
} }
/**
* From http://stackoverflow.com/questions/1280903/javascript-ie-and-getelementsbyclassname-problems/8472488#8472488
*/
if (typeof document.getElementsByClassName != 'function')
{
document.getElementsByClassName = function()
{
var elms = document.getElementsByTagName('*');
var ei = new Array();
for (i = 0; i < elms.length; i++)
{
if (elms[i].getAttribute('class'))
{
ecl = elms[i].getAttribute('class').split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
else if (elms[i].className)
{
ecl = elms[i].className.split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
}
return ei;
}
}
function show_title(langCode)
{
var sel_title = document.getElementById('title-' + langCode);
if (sel_title == null)
{
// A title in English is required.
sel_title = document.getElementById('title-en')
if (sel_title == null)
{
// No title in English or the selected language.
return;
}
}
var hide_title = document.getElementsByClassName('hide-title');
for (var i = 0; i < hide_title.length; i++)
{
hide_title[i].style.display='none';
}
sel_title.style.display='inline';
document.title = "phpBB MOD » " + sel_title.innerHTML;
}
/***************** /*****************
* AJAX Functions * * AJAX Functions *
*****************/ *****************/
@@ -1425,7 +1493,7 @@ function change_dbms($form)
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$exists = 0; $exists = 0;
$tags = document.getElementsByTagName('dbms'); $tags = document.getElementsByTagName('dbms');
@@ -1440,7 +1508,7 @@ function change_dbms($form)
{ {
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1472,7 +1540,7 @@ function sql_display($value)
// show the dbms of type we have selected, hide all others except for non dbms specific // show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1520,7 +1588,7 @@ function sql_dropdown()
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$options = []; $options = [];
$ie_options = []; $ie_options = [];
@@ -1530,7 +1598,7 @@ function sql_dropdown()
// Show the dbms of type we have selected, hide all others except for non dbms specific // Show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1628,7 +1696,14 @@ function toggle_edit(o)
<div id="debug"></div> <div id="debug"></div>
<div id="wrap"> <div id="wrap">
<div id="page-header"> <div id="page-header">
<h1><span id="lang-h1">Installation instructions for</span> '<xsl:value-of select="$title" />' <span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" /></h1> <h1>
<span id="lang-h1">Installation instructions for</span>
<span class="hide-title" lang="{@lang}"> '<xsl:value-of select="$title" />' </span>
<xsl:for-each select="mod:header/mod:title">
<span class="hide-title" lang="{@lang}" id="title-{@lang}" style="display: none;"> '<xsl:value-of select="current()" />' </span>
</xsl:for-each>
<span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" />
</h1>
<form method="post" action="" id="lang-selector" style="display: none;"> <form method="post" action="" id="lang-selector" style="display: none;">
<fieldset class="nobg"> <fieldset class="nobg">
<label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select> <label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select>
@@ -1667,6 +1742,7 @@ function toggle_edit(o)
</html> </html>
</xsl:template> </xsl:template>
<xsl:template name="give-header"> <xsl:template name="give-header">
<fieldset> <fieldset>
<legend id="lang-atm">About this MOD</legend> <legend id="lang-atm">About this MOD</legend>
@@ -1750,6 +1826,12 @@ function toggle_edit(o)
</xsl:if> </xsl:if>
</dd> </dd>
</xsl:if> </xsl:if>
<xsl:if test="mod:github != 'N/A' and mod:github != 'n/a' and mod:github != ''">
<xsl:if test="contains(mod:github, 'https://github.com/')">
<dt id="lang-a-git[{generate-id()}]">Github:</dt>
<dd name="author-dd"><a href="{mod:github}" dir="ltr"><xsl:value-of select="mod:github" /></a></dd>
</xsl:if>
</xsl:if>
</dl> </dl>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1778,9 +1860,9 @@ function toggle_edit(o)
<xsl:for-each select="../mod:action-group"> <xsl:for-each select="../mod:action-group">
<xsl:call-template name="give-files-included"></xsl:call-template> <xsl:call-template name="give-files-included"></xsl:call-template>
</xsl:for-each> </xsl:for-each>
<h3 id="lang-addtl-modx">Additional MODX files</h3> <h3 id="lang-addtl-modx">Additional file(s)</h3>
<xsl:if test="count(mod:link-group/mod:link) = 0"> <xsl:if test="count(mod:link-group/mod:link) = 0">
<p id="lang-imn">This MOD has no additional MODX files.</p> <p id="lang-imn">This MOD has no additional file(s).</p>
</xsl:if> </xsl:if>
<ul class="link-group" id="link-group"> <ul class="link-group" id="link-group">
@@ -1823,7 +1905,7 @@ function toggle_edit(o)
<div class="mod-about"> <div class="mod-about">
<span class="corners-top"><span></span></span> <span class="corners-top"><span></span></span>
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-dclt">For security purposes, please check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></span></p> <p><span id="lang-dclt">For security purposes, please check: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></span></p>
<p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p> <p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p>
<p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p> <p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p>
<xsl:for-each select="./mod:mod-version"> <xsl:for-each select="./mod:mod-version">
@@ -1842,8 +1924,8 @@ function toggle_edit(o)
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-lict">This MOD has been licensed under the following license:</span></p> <p><span id="lang-lict">This MOD has been licensed under the following license:</span></p>
<p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p> <p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p>
<p><span id="lang-ispt">English support can be obtained at <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for released MODs.</span></p> <p><span id="lang-ispt">English support can be obtained at <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for released MODs.</span></p>
<p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="http://www.phpbb.com/support/intl/">international support site</a>.</span></p> <p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="https://www.phpbb.com/support/intl/">international support site</a>.</span></p>
</div> </div>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1882,10 +1964,10 @@ function toggle_edit(o)
<xsl:with-param name="string-in" select="string($authorurl)"/> <xsl:with-param name="string-in" select="string($authorurl)"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
@@ -2083,7 +2165,7 @@ function toggle_edit(o)
<option value="mssql">MSSQL</option> <option value="mssql">MSSQL</option>
<option value="oracle">Oracle</option> <option value="oracle">Oracle</option>
<option value="postgres">Postgres</option> <option value="postgres">Postgres</option>
<option value="sqllite">SQLLite</option> <option value="sqlite">SQLite</option>
</select> </select>
</fieldset> </fieldset>
</form> </form>
@@ -2652,4 +2734,4 @@ function toggle_edit(o)
</xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template> </xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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/-->
<!-- $Id: subsilver2.xml 658 2010-06-01 12:26:23Z marc1706 $ --> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en">board3 Portal - Update subsilver2 style for 2.0.1</title> <title lang="en">board3 Portal - Update subsilver2 style for 2.0.2</title>
<title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.1</title> <title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.2</title>
<description lang="en">Adds a portal to your forum. <description lang="en">Adds a portal to your forum.
It has several boxes wich can be turned on an off in the ACP and certain settings. It has several boxes wich can be turned on an off in the ACP and certain settings.
@@ -31,11 +30,11 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author-notes> </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 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -86,12 +85,12 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>120</time> <time>120</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
@@ -101,7 +100,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</header> </header>
<action-group> <action-group>
<copy> <copy>
<file from="root/styles/subsilver2/template/portal/modules/user_menu_side.html" to="styles/subsilver2/template/portal/modules/user_menu_side.html" /> <file from="root/styles/subsilver2/template/portal/modules/*.*" to="styles/subsilver2/template/portal/modules/*.*" />
</copy> </copy>
<diy-instructions lang="de"><![CDATA[ <diy-instructions lang="de"><![CDATA[
Aktualisiere deine Styles: Aktualisiere deine Styles:
@@ -120,4 +119,4 @@ Refresh your Styles:
Clear your cache in the "Administration Control Panel" (ACP) > "General" > "Purge the cache" Clear your cache in the "Administration Control Panel" (ACP) > "General" > "Purge the cache"
]]></diy-instructions> ]]></diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -5,7 +5,7 @@
<!DOCTYPE xsl:stylesheet[ <!DOCTYPE xsl:stylesheet[
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
]> ]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:output method="html" omit-xml-declaration="no" indent="yes" />
<xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" />
<xsl:variable name="version"> <xsl:variable name="version">
@@ -23,7 +23,7 @@
/* phpBB 3.0 Admin Style Sheet /* phpBB 3.0 Admin Style Sheet
Original author: subBlue ( http://www.subblue.com/ ) Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) Copyright 2007 phpBB Group ( https://www.phpbb.com/ )
*/ */
@@ -624,7 +624,7 @@ div.endMOD { padding:0 5px; }
// The following line from http://www.ryancooper.com/resources/keycode.asp // The following line from http://www.ryancooper.com/resources/keycode.asp
document.onkeydown = mod_do_keypress; document.onkeydown = mod_do_keypress;
var host = "http://www.phpbb.com/mods/modx/i18n/"; var host = "https://www.phpbb.com/mods/modx/i18n/";
var enStrings = "dir=ltr\n" + var enStrings = "dir=ltr\n" +
"h1=Installation instructions for\n" + "h1=Installation instructions for\n" +
@@ -646,6 +646,7 @@ var enStrings = "dir=ltr\n" +
"a-e=Email:\n" + "a-e=Email:\n" +
"a-n=Name:\n" + "a-n=Name:\n" +
"a-h=WWW:\n" + "a-h=WWW:\n" +
"a-git=Github:\n" +
"a-c=Contributions:\n" + "a-c=Contributions:\n" +
"a-c-f=From\n" + "a-c-f=From\n" +
"a-c-t=to\n" + "a-c-t=to\n" +
@@ -654,9 +655,9 @@ var enStrings = "dir=ltr\n" +
"icf=Included files\n" + "icf=Included files\n" +
"icfn=No files have been included with this MOD.\n" + "icfn=No files have been included with this MOD.\n" +
"dcl=Disclaimer\n" + "dcl=Disclaimer\n" +
"dclt=For security purposes, please check: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a>\n" + "dclt=For security purposes, please check: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a>\n" +
"isp=and English support\n" + "isp=and English support\n" +
"ispt=English support can be obtained at <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for released MODs.\n" + "ispt=English support can be obtained at <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for released MODs.\n" +
"ant=Author notes:\n" + "ant=Author notes:\n" +
"lic=License\n" + "lic=License\n" +
"lict=This MOD has been licensed under the following license:\n" + "lict=This MOD has been licensed under the following license:\n" +
@@ -709,8 +710,8 @@ var enStrings = "dir=ltr\n" +
"regex=This find contains an advanced feature known as regular expressions.\n" + "regex=This find contains an advanced feature known as regular expressions.\n" +
"mhe-v=- Version\n" + "mhe-v=- Version\n" +
"mh=MOD history\n" + "mh=MOD history\n" +
"addtl-modx=Additional MODX files\n" + "addtl-modx=Additional file(s)\n" +
"imn=This MOD has no additional MODX files.\n" + "imn=This MOD has no additional file(s).\n" +
"link-c=Contrib\n" + "link-c=Contrib\n" +
"link-d=Dependency\n" + "link-d=Dependency\n" +
"link-l=Language\n" + "link-l=Language\n" +
@@ -722,7 +723,7 @@ var enStrings = "dir=ltr\n" +
"installer-h2=PHP install file\n" + "installer-h2=PHP install file\n" +
"installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" + "installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" +
"installer-exp2=To run it point your browser to, for example,\n" + "installer-exp2=To run it point your browser to, for example,\n" +
"ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"http://www.phpbb.com/support/intl/\">international support site</a>.\n" + "ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"https://www.phpbb.com/support/intl/\">international support site</a>.\n" +
"del-heads=Delete files\n" + "del-heads=Delete files\n" +
"del-head=Delete file\n" + "del-head=Delete file\n" +
"del-file=Delete\n" + "del-file=Delete\n" +
@@ -741,14 +742,14 @@ var arrClasCnt = [
['cde-' , codes_ll ], ['cde-' , codes_ll ],
['edt-' , edits_ll ], ['edt-' , edits_ll ],
['fnd' , finds_ll ], ['fnd' , finds_ll ],
['fnd' , removes_ll ], ['rem' , removes_ll ],
['regex', regex_ll ], ['regex', regex_ll ],
['rplw' , replacewiths_ll ], ['rplw' , replacewiths_ll ],
['aft' , addafters_ll ], ['aft' , addafters_ll ],
['bef' , addbefores_ll ], ['bef' , addbefores_ll ],
['inc' , increments_ll ], ['inc' , increments_ll ],
['ifnd' , ifinds_ll ], ['ifnd' , ifinds_ll ],
['ifnd' , iremoves_ll ], ['irem' , iremoves_ll ],
['regex', iregex_ll ], ['regex', iregex_ll ],
['irplw', ireplacewiths_ll ], ['irplw', ireplacewiths_ll ],
['iaft' , iaddafters_ll ], ['iaft' , iaddafters_ll ],
@@ -780,6 +781,8 @@ function changeLanguage(langCode)
applyLanguage(enStrings.split("\n")); applyLanguage(enStrings.split("\n"));
} }
xslLanguage(langCode); xslLanguage(langCode);
show_title(langCode);
} }
function load_languages() function load_languages()
@@ -808,6 +811,71 @@ function load_language()
send('', host + currentLanguage + '.txt?rnd=' + cachernd); send('', host + currentLanguage + '.txt?rnd=' + cachernd);
} }
/**
* From http://stackoverflow.com/questions/1280903/javascript-ie-and-getelementsbyclassname-problems/8472488#8472488
*/
if (typeof document.getElementsByClassName != 'function')
{
document.getElementsByClassName = function()
{
var elms = document.getElementsByTagName('*');
var ei = new Array();
for (i = 0; i < elms.length; i++)
{
if (elms[i].getAttribute('class'))
{
ecl = elms[i].getAttribute('class').split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
else if (elms[i].className)
{
ecl = elms[i].className.split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
}
return ei;
}
}
function show_title(langCode)
{
var sel_title = document.getElementById('title-' + langCode);
if (sel_title == null)
{
// A title in English is required.
sel_title = document.getElementById('title-en')
if (sel_title == null)
{
// No title in English or the selected language.
return;
}
}
var hide_title = document.getElementsByClassName('hide-title');
for (var i = 0; i < hide_title.length; i++)
{
hide_title[i].style.display='none';
}
sel_title.style.display='inline';
document.title = "phpBB MOD » " + sel_title.innerHTML;
}
/***************** /*****************
* AJAX Functions * * AJAX Functions *
*****************/ *****************/
@@ -1425,7 +1493,7 @@ function change_dbms($form)
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$exists = 0; $exists = 0;
$tags = document.getElementsByTagName('dbms'); $tags = document.getElementsByTagName('dbms');
@@ -1440,7 +1508,7 @@ function change_dbms($form)
{ {
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1472,7 +1540,7 @@ function sql_display($value)
// show the dbms of type we have selected, hide all others except for non dbms specific // show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1520,7 +1588,7 @@ function sql_dropdown()
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$options = []; $options = [];
$ie_options = []; $ie_options = [];
@@ -1530,7 +1598,7 @@ function sql_dropdown()
// Show the dbms of type we have selected, hide all others except for non dbms specific // Show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1628,7 +1696,14 @@ function toggle_edit(o)
<div id="debug"></div> <div id="debug"></div>
<div id="wrap"> <div id="wrap">
<div id="page-header"> <div id="page-header">
<h1><span id="lang-h1">Installation instructions for</span> '<xsl:value-of select="$title" />' <span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" /></h1> <h1>
<span id="lang-h1">Installation instructions for</span>
<span class="hide-title" lang="{@lang}"> '<xsl:value-of select="$title" />' </span>
<xsl:for-each select="mod:header/mod:title">
<span class="hide-title" lang="{@lang}" id="title-{@lang}" style="display: none;"> '<xsl:value-of select="current()" />' </span>
</xsl:for-each>
<span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" />
</h1>
<form method="post" action="" id="lang-selector" style="display: none;"> <form method="post" action="" id="lang-selector" style="display: none;">
<fieldset class="nobg"> <fieldset class="nobg">
<label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select> <label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select>
@@ -1667,6 +1742,7 @@ function toggle_edit(o)
</html> </html>
</xsl:template> </xsl:template>
<xsl:template name="give-header"> <xsl:template name="give-header">
<fieldset> <fieldset>
<legend id="lang-atm">About this MOD</legend> <legend id="lang-atm">About this MOD</legend>
@@ -1750,6 +1826,12 @@ function toggle_edit(o)
</xsl:if> </xsl:if>
</dd> </dd>
</xsl:if> </xsl:if>
<xsl:if test="mod:github != 'N/A' and mod:github != 'n/a' and mod:github != ''">
<xsl:if test="contains(mod:github, 'https://github.com/')">
<dt id="lang-a-git[{generate-id()}]">Github:</dt>
<dd name="author-dd"><a href="{mod:github}" dir="ltr"><xsl:value-of select="mod:github" /></a></dd>
</xsl:if>
</xsl:if>
</dl> </dl>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1778,9 +1860,9 @@ function toggle_edit(o)
<xsl:for-each select="../mod:action-group"> <xsl:for-each select="../mod:action-group">
<xsl:call-template name="give-files-included"></xsl:call-template> <xsl:call-template name="give-files-included"></xsl:call-template>
</xsl:for-each> </xsl:for-each>
<h3 id="lang-addtl-modx">Additional MODX files</h3> <h3 id="lang-addtl-modx">Additional file(s)</h3>
<xsl:if test="count(mod:link-group/mod:link) = 0"> <xsl:if test="count(mod:link-group/mod:link) = 0">
<p id="lang-imn">This MOD has no additional MODX files.</p> <p id="lang-imn">This MOD has no additional file(s).</p>
</xsl:if> </xsl:if>
<ul class="link-group" id="link-group"> <ul class="link-group" id="link-group">
@@ -1823,7 +1905,7 @@ function toggle_edit(o)
<div class="mod-about"> <div class="mod-about">
<span class="corners-top"><span></span></span> <span class="corners-top"><span></span></span>
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-dclt">For security purposes, please check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></span></p> <p><span id="lang-dclt">For security purposes, please check: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></span></p>
<p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p> <p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p>
<p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p> <p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p>
<xsl:for-each select="./mod:mod-version"> <xsl:for-each select="./mod:mod-version">
@@ -1842,8 +1924,8 @@ function toggle_edit(o)
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-lict">This MOD has been licensed under the following license:</span></p> <p><span id="lang-lict">This MOD has been licensed under the following license:</span></p>
<p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p> <p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p>
<p><span id="lang-ispt">English support can be obtained at <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for released MODs.</span></p> <p><span id="lang-ispt">English support can be obtained at <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for released MODs.</span></p>
<p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="http://www.phpbb.com/support/intl/">international support site</a>.</span></p> <p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="https://www.phpbb.com/support/intl/">international support site</a>.</span></p>
</div> </div>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1882,10 +1964,10 @@ function toggle_edit(o)
<xsl:with-param name="string-in" select="string($authorurl)"/> <xsl:with-param name="string-in" select="string($authorurl)"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
@@ -2083,7 +2165,7 @@ function toggle_edit(o)
<option value="mssql">MSSQL</option> <option value="mssql">MSSQL</option>
<option value="oracle">Oracle</option> <option value="oracle">Oracle</option>
<option value="postgres">Postgres</option> <option value="postgres">Postgres</option>
<option value="sqllite">SQLLite</option> <option value="sqlite">SQLite</option>
</select> </select>
</fieldset> </fieldset>
</form> </form>
@@ -2652,4 +2734,4 @@ function toggle_edit(o)
</xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template> </xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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.2.5.xsd"> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en">board3 Portal 2.0.1 - Update from Board3 Portal 2.0.0</title> <title lang="en">board3 Portal 2.0.2 - Update from Board3 Portal 2.0.1</title>
<title lang="de">board3 Portal 2.0.1 - Update von Board3 Portal 2.0.0</title> <title lang="de">board3 Portal 2.0.2 - Update von Board3 Portal 2.0.1</title>
<description lang="en">Adds a portal to your forum. <description lang="en">Adds a portal to your forum.
It has several boxes wich can be turned on an off in the ACP and certain settings. It has several boxes wich can be turned on an off in the ACP and certain settings.
@@ -30,11 +30,11 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author-notes> </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 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -85,56 +85,40 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>120</time> <time>120</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
<link type="parent" lang="de" href="../../install.xml">Installations-Anleitung</link> <link type="parent" lang="de" href="../../install.xml">Installations-Anleitung</link>
<link type="parent" lang="en" href="../../install.xml">Manual</link> <link type="parent" lang="en" href="../../install.xml">Manual</link>
<link type="template" lang="en" href="contrib/subsilver2.xml">Update subsilver2 to Board3 Portal 2.0.1</link> <link type="template" lang="en" href="contrib/subsilver2.xml">Update subsilver2 to Board3 Portal 2.0.2</link>
<link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.1</link> <link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.2</link>
<link type="language" lang="en" href="contrib/de.xml">Update German language to Board3 Portal 2.0.1</link> <link type="language" lang="en" href="contrib/de.xml">Update German language to Board3 Portal 2.0.2</link>
<link type="language" lang="de" href="contrib/de.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.1</link> <link type="language" lang="de" href="contrib/de.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.2</link>
</link-group> </link-group>
</header> </header>
<action-group> <action-group>
<copy> <copy>
<file from="root/adm/style/portal/acp_portal.js" to="adm/style/portal/acp_portal.js" />
<file from="root/adm/style/portal/acp_portal_custom.html" to="adm/style/portal/acp_portal_custom.html" />
<file from="root/adm/style/portal/acp_portal_welcome.html" to="adm/style/portal/acp_portal_welcome.html" />
<file from="root/includes/acp/acp_portal.php" to="includes/acp/acp_portal.php" /> <file from="root/includes/acp/acp_portal.php" to="includes/acp/acp_portal.php" />
<file from="root/includes/trim_message/bbcodes.php" to="includes/trim_message/bbcodes.php" />
<file from="root/install/index.php" to="install/index.php" /> <file from="root/install/index.php" to="install/index.php" />
<file from="root/language/en/mods/info_acp_portal.php" to="language/en/mods/info_acp_portal.php" /> <file from="root/language/en/mods/*.*" to="language/en/mods/*.*" />
<file from="root/language/en/mods/portal/portal_links_module.php" to="language/en/mods/portal/portal_links_module.php" />
<file from="root/language/en/mods/portal/portal_main_menu_module.php" to="language/en/mods/portal/portal_main_menu_module.php" />
<file from="root/portal/includes/functions.php" to="portal/includes/functions.php" /> <file from="root/portal/includes/functions.php" to="portal/includes/functions.php" />
<file from="root/portal/includes/functions_modules.php" to="portal/includes/functions_modules.php" />
<file from="root/portal/includes/functions_upload.php" to="portal/includes/functions_upload.php" /> <file from="root/portal/includes/functions_upload.php" to="portal/includes/functions_upload.php" />
<file from="root/portal/modules/portal_announcements.php" to="portal/modules/portal_announcements.php" /> <file from="root/portal/modules/*.*" to="portal/modules/*.*" />
<file from="root/portal/modules/portal_attachments.php" to="portal/modules/portal_attachments.php" /> <file from="root/styles/prosilver/template/portal/modules/*.*" to="styles/prosilver/template/portal/modules/*.*" />
<file from="root/portal/modules/portal_calendar.php" to="portal/modules/portal_calendar.php" /> <file from="root/umil/*.*" to="umil/*.*" />
<file from="root/portal/modules/portal_links.php" to="portal/modules/portal_links.php" /> <file from="root/portal.php" to="portal.php" />
<file from="root/portal/modules/portal_main_menu.php" to="portal/modules/portal_main_menu.php" />
<file from="root/portal/modules/portal_recent.php" to="portal/modules/portal_recent.php" />
<file from="root/styles/prosilver/template/portal/modules/announcements_center.html" to="styles/prosilver/template/portal/modules/announcements_center.html" />
<file from="root/styles/prosilver/template/portal/modules/announcements_center_compact.html" to="styles/prosilver/template/portal/modules/announcements_center_compact.html" />
<file from="root/styles/prosilver/template/portal/modules/calendar_side.html" to="styles/prosilver/template/portal/modules/calendar_side.html" />
<file from="root/styles/prosilver/template/portal/modules/news_center.html" to="styles/prosilver/template/portal/modules/news_center.html" />
<file from="root/styles/prosilver/template/portal/modules/news_compact_center.html" to="styles/prosilver/template/portal/modules/news_compact_center.html" />
<file from="root/styles/prosilver/template/portal/modules/poll_center.html" to="styles/prosilver/template/portal/modules/poll_center.html" />
<file from="root/styles/prosilver/template/portal/modules/poll_side.html" to="styles/prosilver/template/portal/modules/poll_side.html" />
</copy> </copy>
<open src="includes/session.php">
<edit>
<find><![CDATA[ if (!empty($_GET['style']) && !defined('ADMIN_START') && $this->data['user_type'] != USER_IGNORE)]]></find>
<action type="replace-with"><![CDATA[ if (!empty($_GET['style']) && !defined('ADMIN_START') && !$this->data['is_bot'])]]></action>
</edit>
</open>
<php-installer>install/index.php</php-installer> <php-installer>install/index.php</php-installer>
<diy-instructions lang="de"><![CDATA[Rufe install/index.php auf und führe den Installer aus.]]></diy-instructions> <diy-instructions lang="de"><![CDATA[Rufe install/index.php auf und führe den Installer aus.]]></diy-instructions>
<diy-instructions lang="en"><![CDATA[Browse to install/index.php and run the installer.]]></diy-instructions> <diy-instructions lang="en"><![CDATA[Browse to install/index.php and run the installer.]]></diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> <?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/--> <!--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/-->
<!-- $Id$ --> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header> <header>
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
<title lang="en">board3 Portal 2.0.1</title> <title lang="en">board3 Portal</title>
<title lang="de">board3 Portal 2.0.1</title> <title lang="de">board3 Portal</title>
<description lang="en">Adds a portal with several blocks to your forum. <description lang="en">Adds a portal with several blocks to your forum.
You can change the settings, move the blocks, add new blocks and more in the ACP. You can change the settings, move the blocks, add new blocks and more in the ACP.
@@ -31,11 +30,11 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
</author-notes> </author-notes>
<author-notes lang="de">Dieser MOD benötigt PHP5. Ich hoffe ihr habt Spaß am Portal. Neuen Code, bzw neue Boxen und Fragen könnt ihr auf www.board3.de posten. <author-notes lang="de">Dieser MOD benötigt PHP5. 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-notes>
<github>https://github.com/board3/Board3-Portal</github>
<author-group> <author-group>
<author> <author>
<realname>Marc Alexander</realname> <realname>Marc Alexander</realname>
<username>marc1706</username> <username>Marc</username>
<email>admin@m-a-styles.de</email> <email>admin@m-a-styles.de</email>
<homepage>http://www.m-a-styles.de</homepage> <homepage>http://www.m-a-styles.de</homepage>
<contributions-group> <contributions-group>
@@ -86,12 +85,12 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
</author> </author>
</author-group> </author-group>
<mod-version>2.0.1</mod-version> <mod-version>2.0.2</mod-version>
<installation> <installation>
<level>easy</level> <level>easy</level>
<time>600</time> <time>600</time>
<target-version>3.0.11</target-version> <target-version>3.0.12</target-version>
</installation> </installation>
<link-group> <link-group>
@@ -101,10 +100,40 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
<link type="language" lang="de" href="contrib/de.xml">Anleitung für das deutsche Sprachpaket</link> <link type="language" lang="de" href="contrib/de.xml">Anleitung für das deutsche Sprachpaket</link>
<link type="template" lang="en" href="contrib/subsilver2.xml">Manual for subsilver2</link> <link type="template" lang="en" href="contrib/subsilver2.xml">Manual for subsilver2</link>
<link type="template" lang="de" href="contrib/subsilver2.xml">Anleitung für subsilver2</link> <link type="template" lang="de" href="contrib/subsilver2.xml">Anleitung für subsilver2</link>
<link type="contrib" lang="en" href="contrib/update_200_to_201/update.xml">Manual for Updating B3P 2.0.0 to 2.0.1</link> <link type="contrib" lang="en" href="contrib/update_201_to_202/update.xml">Manual for Updating B3P 2.0.1 to 2.0.2</link>
<link type="contrib" lang="de" href="contrib/update_200_to_201/update.xml">Anleitung für das Aktualisieren von B3P 2.0.0 zu 2.0.1</link> <link type="contrib" lang="de" href="contrib/update_201_to_202/update.xml">Anleitung für das Aktualisieren von B3P 2.0.1 zu 2.0.2</link>
</link-group> </link-group>
<history> <history>
<entry>
<date>2013-10-13</date>
<rev-version>2.0.2</rev-version>
<changelog lang="en">
<change>[ticket/216] Add function for obtaining user's groups</change>
<change>[ticket/217] Handle incorrect values in the news URL</change>
<change>[cleanup/acp] Make acp_portal module more readable</change>
<change>[cleanup/tabs] Remove unnecessary tabbing in portal files</change>
<change>[cleanup/whitespace] Get rid of unnecessary whitespace</change>
<change>Display correct day of the week with negative UTC offset</change>
<change>[ticket/120] Move birthday block HTML to template files</change>
<change>[ticket/224] Add possibility to append username to donation</change>
<change>[ŧicket/223] Set correct permissions to uploaded files (644)</change>
<change>[feature/clean-up] Remove duplicated code from portal modules</change>
<change>[gh/113] Update UMIL to 1.0.5</change>
</changelog>
<changelog lang="de">
<change>[ticket/216] Füge Funktion zur Erlangung der Gruppen eines Benutzers hinzu</change>
<change>[ticket/217] Behandele falsche Parameter in der News URL</change>
<change>[cleanup/acp] Mache acp_portal lesbarer</change>
<change>[cleanup/tabs] Entferne sinnlose Tabs in Portal Dateien</change>
<change>[cleanup/whitespace] Entferne unnötige Leerzeichen</change>
<change>Zeige korrekten Tag der Woche bei negativem UTC Abstand an</change>
<change>[ticket/120] Verschiebe HTML des Geburtstags-Blocks in Template Dateien</change>
<change>[ticket/224] Füge Möglichkeit des Anhängens des Benutzernamens an Spende ein</change>
<change>[ŧicket/223] Setze richtige Berechtigungen für hochgeladene Dateien (644)</change>
<change>[feature/clean-up] Entferne doppelten Code von Portal Modulen</change>
<change>[gh/113] Aktualisiere UMIL zu 1.0.5</change>
</changelog>
</entry>
<entry> <entry>
<date>2012-10-13</date> <date>2012-10-13</date>
<rev-version>2.0.1</rev-version> <rev-version>2.0.1</rev-version>
@@ -428,4 +457,4 @@ Lösche anschließend das Installationsverzeichnis.]]></diy-instructions>
Remove the install-folder afterwards.]]></diy-instructions> Remove the install-folder afterwards.]]></diy-instructions>
</action-group> </action-group>
</mod> </mod>

View File

@@ -5,7 +5,7 @@
<!DOCTYPE xsl:stylesheet[ <!DOCTYPE xsl:stylesheet[
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
]> ]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:mod="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
<xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:output method="html" omit-xml-declaration="no" indent="yes" />
<xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" />
<xsl:variable name="version"> <xsl:variable name="version">
@@ -23,7 +23,7 @@
/* phpBB 3.0 Admin Style Sheet /* phpBB 3.0 Admin Style Sheet
Original author: subBlue ( http://www.subblue.com/ ) Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) Copyright 2007 phpBB Group ( https://www.phpbb.com/ )
*/ */
@@ -624,7 +624,7 @@ div.endMOD { padding:0 5px; }
// The following line from http://www.ryancooper.com/resources/keycode.asp // The following line from http://www.ryancooper.com/resources/keycode.asp
document.onkeydown = mod_do_keypress; document.onkeydown = mod_do_keypress;
var host = "http://www.phpbb.com/mods/modx/i18n/"; var host = "https://www.phpbb.com/mods/modx/i18n/";
var enStrings = "dir=ltr\n" + var enStrings = "dir=ltr\n" +
"h1=Installation instructions for\n" + "h1=Installation instructions for\n" +
@@ -646,6 +646,7 @@ var enStrings = "dir=ltr\n" +
"a-e=Email:\n" + "a-e=Email:\n" +
"a-n=Name:\n" + "a-n=Name:\n" +
"a-h=WWW:\n" + "a-h=WWW:\n" +
"a-git=Github:\n" +
"a-c=Contributions:\n" + "a-c=Contributions:\n" +
"a-c-f=From\n" + "a-c-f=From\n" +
"a-c-t=to\n" + "a-c-t=to\n" +
@@ -654,9 +655,9 @@ var enStrings = "dir=ltr\n" +
"icf=Included files\n" + "icf=Included files\n" +
"icfn=No files have been included with this MOD.\n" + "icfn=No files have been included with this MOD.\n" +
"dcl=Disclaimer\n" + "dcl=Disclaimer\n" +
"dclt=For security purposes, please check: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a>\n" + "dclt=For security purposes, please check: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a>\n" +
"isp=and English support\n" + "isp=and English support\n" +
"ispt=English support can be obtained at <a href=\"http://www.phpbb.com/mods/\">http://www.phpbb.com/mods/</a> for released MODs.\n" + "ispt=English support can be obtained at <a href=\"https://www.phpbb.com/mods/\">https://www.phpbb.com/mods/</a> for released MODs.\n" +
"ant=Author notes:\n" + "ant=Author notes:\n" +
"lic=License\n" + "lic=License\n" +
"lict=This MOD has been licensed under the following license:\n" + "lict=This MOD has been licensed under the following license:\n" +
@@ -709,8 +710,8 @@ var enStrings = "dir=ltr\n" +
"regex=This find contains an advanced feature known as regular expressions.\n" + "regex=This find contains an advanced feature known as regular expressions.\n" +
"mhe-v=- Version\n" + "mhe-v=- Version\n" +
"mh=MOD history\n" + "mh=MOD history\n" +
"addtl-modx=Additional MODX files\n" + "addtl-modx=Additional file(s)\n" +
"imn=This MOD has no additional MODX files.\n" + "imn=This MOD has no additional file(s).\n" +
"link-c=Contrib\n" + "link-c=Contrib\n" +
"link-d=Dependency\n" + "link-d=Dependency\n" +
"link-l=Language\n" + "link-l=Language\n" +
@@ -722,7 +723,7 @@ var enStrings = "dir=ltr\n" +
"installer-h2=PHP install file\n" + "installer-h2=PHP install file\n" +
"installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" + "installer-exp1=There is a PHP install file that needs to be run in order to complete the installation.\n" +
"installer-exp2=To run it point your browser to, for example,\n" + "installer-exp2=To run it point your browser to, for example,\n" +
"ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"http://www.phpbb.com/support/intl/\">international support site</a>.\n" + "ispt-int=Support in your language <strong>might</strong> be available at a <a href=\"https://www.phpbb.com/support/intl/\">international support site</a>.\n" +
"del-heads=Delete files\n" + "del-heads=Delete files\n" +
"del-head=Delete file\n" + "del-head=Delete file\n" +
"del-file=Delete\n" + "del-file=Delete\n" +
@@ -741,14 +742,14 @@ var arrClasCnt = [
['cde-' , codes_ll ], ['cde-' , codes_ll ],
['edt-' , edits_ll ], ['edt-' , edits_ll ],
['fnd' , finds_ll ], ['fnd' , finds_ll ],
['fnd' , removes_ll ], ['rem' , removes_ll ],
['regex', regex_ll ], ['regex', regex_ll ],
['rplw' , replacewiths_ll ], ['rplw' , replacewiths_ll ],
['aft' , addafters_ll ], ['aft' , addafters_ll ],
['bef' , addbefores_ll ], ['bef' , addbefores_ll ],
['inc' , increments_ll ], ['inc' , increments_ll ],
['ifnd' , ifinds_ll ], ['ifnd' , ifinds_ll ],
['ifnd' , iremoves_ll ], ['irem' , iremoves_ll ],
['regex', iregex_ll ], ['regex', iregex_ll ],
['irplw', ireplacewiths_ll ], ['irplw', ireplacewiths_ll ],
['iaft' , iaddafters_ll ], ['iaft' , iaddafters_ll ],
@@ -780,6 +781,8 @@ function changeLanguage(langCode)
applyLanguage(enStrings.split("\n")); applyLanguage(enStrings.split("\n"));
} }
xslLanguage(langCode); xslLanguage(langCode);
show_title(langCode);
} }
function load_languages() function load_languages()
@@ -808,6 +811,71 @@ function load_language()
send('', host + currentLanguage + '.txt?rnd=' + cachernd); send('', host + currentLanguage + '.txt?rnd=' + cachernd);
} }
/**
* From http://stackoverflow.com/questions/1280903/javascript-ie-and-getelementsbyclassname-problems/8472488#8472488
*/
if (typeof document.getElementsByClassName != 'function')
{
document.getElementsByClassName = function()
{
var elms = document.getElementsByTagName('*');
var ei = new Array();
for (i = 0; i < elms.length; i++)
{
if (elms[i].getAttribute('class'))
{
ecl = elms[i].getAttribute('class').split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
else if (elms[i].className)
{
ecl = elms[i].className.split(' ');
for (j = 0; j < ecl.length; j++)
{
if (ecl[j].toLowerCase() == arguments[0].toLowerCase())
{
ei.push(elms[i]);
}
}
}
}
return ei;
}
}
function show_title(langCode)
{
var sel_title = document.getElementById('title-' + langCode);
if (sel_title == null)
{
// A title in English is required.
sel_title = document.getElementById('title-en')
if (sel_title == null)
{
// No title in English or the selected language.
return;
}
}
var hide_title = document.getElementsByClassName('hide-title');
for (var i = 0; i < hide_title.length; i++)
{
hide_title[i].style.display='none';
}
sel_title.style.display='inline';
document.title = "phpBB MOD » " + sel_title.innerHTML;
}
/***************** /*****************
* AJAX Functions * * AJAX Functions *
*****************/ *****************/
@@ -1425,7 +1493,7 @@ function change_dbms($form)
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$exists = 0; $exists = 0;
$tags = document.getElementsByTagName('dbms'); $tags = document.getElementsByTagName('dbms');
@@ -1440,7 +1508,7 @@ function change_dbms($form)
{ {
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1472,7 +1540,7 @@ function sql_display($value)
// show the dbms of type we have selected, hide all others except for non dbms specific // show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1520,7 +1588,7 @@ function sql_dropdown()
'mssql', 'mssql',
'oracle', 'oracle',
'postgres', 'postgres',
'sqllite' 'sqlite'
]; ];
$options = []; $options = [];
$ie_options = []; $ie_options = [];
@@ -1530,7 +1598,7 @@ function sql_dropdown()
// Show the dbms of type we have selected, hide all others except for non dbms specific // Show the dbms of type we have selected, hide all others except for non dbms specific
for ($i = 0; $i < $tags.length; $i++) for ($i = 0; $i < $tags.length; $i++)
{ {
if (!($dbms = $tags[$i].attributes['type'].nodeValue)) if (!($dbms = $tags[$i].attributes['type'].value))
{ {
continue; continue;
} }
@@ -1628,7 +1696,14 @@ function toggle_edit(o)
<div id="debug"></div> <div id="debug"></div>
<div id="wrap"> <div id="wrap">
<div id="page-header"> <div id="page-header">
<h1><span id="lang-h1">Installation instructions for</span> '<xsl:value-of select="$title" />' <span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" /></h1> <h1>
<span id="lang-h1">Installation instructions for</span>
<span class="hide-title" lang="{@lang}"> '<xsl:value-of select="$title" />' </span>
<xsl:for-each select="mod:header/mod:title">
<span class="hide-title" lang="{@lang}" id="title-{@lang}" style="display: none;"> '<xsl:value-of select="current()" />' </span>
</xsl:for-each>
<span id="lang-V">version</span>&nbsp;<xsl:value-of select="$version" />
</h1>
<form method="post" action="" id="lang-selector" style="display: none;"> <form method="post" action="" id="lang-selector" style="display: none;">
<fieldset class="nobg"> <fieldset class="nobg">
<label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select> <label for="language"><span id="lang-slg">Select language:</span></label>&nbsp;<select id="language" name="language" onclick="load_languages()"><option value="en" selected="selected">English</option></select>
@@ -1667,6 +1742,7 @@ function toggle_edit(o)
</html> </html>
</xsl:template> </xsl:template>
<xsl:template name="give-header"> <xsl:template name="give-header">
<fieldset> <fieldset>
<legend id="lang-atm">About this MOD</legend> <legend id="lang-atm">About this MOD</legend>
@@ -1750,6 +1826,12 @@ function toggle_edit(o)
</xsl:if> </xsl:if>
</dd> </dd>
</xsl:if> </xsl:if>
<xsl:if test="mod:github != 'N/A' and mod:github != 'n/a' and mod:github != ''">
<xsl:if test="contains(mod:github, 'https://github.com/')">
<dt id="lang-a-git[{generate-id()}]">Github:</dt>
<dd name="author-dd"><a href="{mod:github}" dir="ltr"><xsl:value-of select="mod:github" /></a></dd>
</xsl:if>
</xsl:if>
</dl> </dl>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1778,9 +1860,9 @@ function toggle_edit(o)
<xsl:for-each select="../mod:action-group"> <xsl:for-each select="../mod:action-group">
<xsl:call-template name="give-files-included"></xsl:call-template> <xsl:call-template name="give-files-included"></xsl:call-template>
</xsl:for-each> </xsl:for-each>
<h3 id="lang-addtl-modx">Additional MODX files</h3> <h3 id="lang-addtl-modx">Additional file(s)</h3>
<xsl:if test="count(mod:link-group/mod:link) = 0"> <xsl:if test="count(mod:link-group/mod:link) = 0">
<p id="lang-imn">This MOD has no additional MODX files.</p> <p id="lang-imn">This MOD has no additional file(s).</p>
</xsl:if> </xsl:if>
<ul class="link-group" id="link-group"> <ul class="link-group" id="link-group">
@@ -1823,7 +1905,7 @@ function toggle_edit(o)
<div class="mod-about"> <div class="mod-about">
<span class="corners-top"><span></span></span> <span class="corners-top"><span></span></span>
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-dclt">For security purposes, please check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></span></p> <p><span id="lang-dclt">For security purposes, please check: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered in our MODs database, located at: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></span></p>
<p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p> <p><span id="lang-ontt1">Before adding this MOD to your forum, you should back up all files and databases related to this MOD.</span></p>
<p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p> <p><span id="lang-ontt2">This MOD was designed for phpBB</span><xsl:text> </xsl:text><xsl:value-of select="mod:installation/mod:target-version" /><xsl:text> </xsl:text>&nbsp;<span id="lang-ontt3">and may not function as stated on other phpBB versions. MODs for phpBB 3.0 will <strong>not</strong> work on phpBB 2.0 and vice versa.</span></p>
<xsl:for-each select="./mod:mod-version"> <xsl:for-each select="./mod:mod-version">
@@ -1842,8 +1924,8 @@ function toggle_edit(o)
<div class="mod-about-padding"> <div class="mod-about-padding">
<p><span id="lang-lict">This MOD has been licensed under the following license:</span></p> <p><span id="lang-lict">This MOD has been licensed under the following license:</span></p>
<p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p> <p style='white-space:pre;'><a href="license.txt"><xsl:value-of select="mod:license" /></a></p>
<p><span id="lang-ispt">English support can be obtained at <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for released MODs.</span></p> <p><span id="lang-ispt">English support can be obtained at <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a> for released MODs.</span></p>
<p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="http://www.phpbb.com/support/intl/">international support site</a>.</span></p> <p><span id="lang-ispt-int">Support in your language <strong>might</strong> be available at a <a href="https://www.phpbb.com/support/intl/">international support site</a>.</span></p>
</div> </div>
<span class="corners-bottom"><span></span></span> <span class="corners-bottom"><span></span></span>
</div> </div>
@@ -1882,10 +1964,10 @@ function toggle_edit(o)
<xsl:with-param name="string-in" select="string($authorurl)"/> <xsl:with-param name="string-in" select="string($authorurl)"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$operaurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<dd name="author-dd"><a dir="ltr" href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd> <dd name="author-dd"><a dir="ltr" href="https://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;un={$authorurl}"><xsl:value-of select="$authorname" /></a></dd>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
@@ -2083,7 +2165,7 @@ function toggle_edit(o)
<option value="mssql">MSSQL</option> <option value="mssql">MSSQL</option>
<option value="oracle">Oracle</option> <option value="oracle">Oracle</option>
<option value="postgres">Postgres</option> <option value="postgres">Postgres</option>
<option value="sqllite">SQLLite</option> <option value="sqlite">SQLite</option>
</select> </select>
</fieldset> </fieldset>
</form> </form>
@@ -2652,4 +2734,4 @@ function toggle_edit(o)
</xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template> </xsl:with-param><xsl:with-param name="charsIn" select="'€'"/><xsl:with-param name="charsOut" select="'%E2%82%AC'"/></xsl:call-template>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@@ -192,7 +192,7 @@ class phpbb_ext_board3_portal_acp_portal_module
{ {
if ($submit && ((isset($null['type']) && $null['type'] == 'custom') || (isset($null['submit_type']) && $null['submit_type'] == 'custom'))) if ($submit && ((isset($null['type']) && $null['type'] == 'custom') || (isset($null['submit_type']) && $null['submit_type'] == 'custom')))
{ {
$func = array($c_class, $null['submit']); $func = array($this->c_class, $null['submit']);
if(method_exists($this->c_class, $null['submit'])) if(method_exists($this->c_class, $null['submit']))
{ {

View File

@@ -62,8 +62,8 @@ $lang = array_merge($lang, array(
'PORTAL_ANNOUNCEMENTS_LENGTH' => 'Maximale Länge der Bekanntmachungen', 'PORTAL_ANNOUNCEMENTS_LENGTH' => 'Maximale Länge der Bekanntmachungen',
'PORTAL_ANNOUNCEMENTS_LENGTH_EXP' => '0 bedeutet unbegrenzt', 'PORTAL_ANNOUNCEMENTS_LENGTH_EXP' => '0 bedeutet unbegrenzt',
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' => 'Foren der Bekanntmachungen', 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' => 'Foren der Bekanntmachungen',
'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXP' => 'Die ID des Forums, aus welchem die Bekanntmachungen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren aussschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren aussschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXP' => 'Die ID des Forums, aus welchem die Bekanntmachungen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren ausschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren ausschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE' => 'Foren aussschließen', 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE' => 'Foren ausschließen',
'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE_EXP'=> 'Wähle "Ja" wenn du die ausgewählten Foren vom Bekanntmachungen-Block ausschließen willst, und "Nein" wenn du nur die Bekanntmachungen aus den ausgewählten Foren im Bekanntmachungen-Block sehen willst.', 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE_EXP'=> 'Wähle "Ja" wenn du die ausgewählten Foren vom Bekanntmachungen-Block ausschließen willst, und "Nein" wenn du nur die Bekanntmachungen aus den ausgewählten Foren im Bekanntmachungen-Block sehen willst.',
'PORTAL_ANNOUNCEMENTS_PERMISSIONS' => 'Berechtigungen prüfen anschalten?', 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' => 'Berechtigungen prüfen anschalten?',
'PORTAL_ANNOUNCEMENTS_PERMISSIONS_EXP' => 'Berücksichtigt Berechtigungen beim Anzeigen der Bekanntmachungen', 'PORTAL_ANNOUNCEMENTS_PERMISSIONS_EXP' => 'Berücksichtigt Berechtigungen beim Anzeigen der Bekanntmachungen',

View File

@@ -42,13 +42,13 @@ $lang = array_merge($lang, array(
'PORTAL_ATTACHMENTS_NUMBER' => 'Anzahl der anzuzeigenden Dateianhänge', 'PORTAL_ATTACHMENTS_NUMBER' => 'Anzahl der anzuzeigenden Dateianhänge',
'PORTAL_ATTACHMENTS_NUMBER_EXP' => '0 bedeutet unbegrenzt', 'PORTAL_ATTACHMENTS_NUMBER_EXP' => '0 bedeutet unbegrenzt',
'PORTAL_ATTACHMENTS_FORUM_IDS' => 'Dateianhänge Foren', 'PORTAL_ATTACHMENTS_FORUM_IDS' => 'Dateianhänge Foren',
'PORTAL_ATTACHMENTS_FORUM_IDS_EXP' => 'Die Foren, aus welchen die Dateianhänge angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren aussschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren aussschließen" auf "Nein" steht, wähle die Foren aus, aus denen du die Dateianhänge sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_ATTACHMENTS_FORUM_IDS_EXP' => 'Die Foren, aus welchen die Dateianhänge angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren ausschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren ausschließen" auf "Nein" steht, wähle die Foren aus, aus denen du die Dateianhänge sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_ATTACHMENTS_FORUM_EXCLUDE' => 'Foren aussschließen', 'PORTAL_ATTACHMENTS_FORUM_EXCLUDE' => 'Foren ausschließen',
'PORTAL_ATTACHMENTS_FORUM_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die Dateianhänge der ausgewählten Foren im Dateianhänge-Block sehen willst.', 'PORTAL_ATTACHMENTS_FORUM_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die Dateianhänge der ausgewählten Foren im Dateianhänge-Block sehen willst.',
'PORTAL_ATTACHMENTS_MAX_LENGTH' => 'Maximal angezeigte Länge der Dateianhänge', 'PORTAL_ATTACHMENTS_MAX_LENGTH' => 'Maximal angezeigte Länge der Dateianhänge',
'PORTAL_ATTACHMENTS_MAX_LENGTH_EXP' => '0 bedeutet unbegrenzt', 'PORTAL_ATTACHMENTS_MAX_LENGTH_EXP' => '0 bedeutet unbegrenzt',
'PORTAL_ATTACHMENTS_FILETYPE' => 'Dateitypen', 'PORTAL_ATTACHMENTS_FILETYPE' => 'Dateitypen',
'PORTAL_ATTACHMENTS_FILETYPE_EXP' => 'Falls "Dateitypen ausschließen" auf "Ja" steht, wähle die Dateitypen die du ausschließen willst.<br />Falls "Dateitypen ausschließen" auf "Nein" steht, wähle die Dateitypen die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_ATTACHMENTS_FILETYPE_EXP' => 'Falls "Dateitypen ausschließen" auf "Ja" steht, wähle die Dateitypen die du ausschließen willst.<br />Falls "Dateitypen ausschließen" auf "Nein" steht, wähle die Dateitypen die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen aussschließen', 'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen ausschließen',
'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.', 'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.',
)); ));

View File

@@ -56,8 +56,8 @@ $lang = array_merge($lang, array(
'PORTAL_NEWS_LENGTH' => 'Maximal angezeigte Länge der Beiträge', 'PORTAL_NEWS_LENGTH' => 'Maximal angezeigte Länge der Beiträge',
'PORTAL_NEWS_LENGTH_EXP' => '0 bedeutet unbegrenzt', 'PORTAL_NEWS_LENGTH_EXP' => '0 bedeutet unbegrenzt',
'PORTAL_NEWS_FORUM' => 'Beiträge Foren', 'PORTAL_NEWS_FORUM' => 'Beiträge Foren',
'PORTAL_NEWS_FORUM_EXP' => 'Die Foren, aus welchen die Beiträge angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren aussschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren aussschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_NEWS_FORUM_EXP' => 'Die Foren, aus welchen die Beiträge angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren ausschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren ausschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_NEWS_EXCLUDE' => 'Foren aussschließen', 'PORTAL_NEWS_EXCLUDE' => 'Foren ausschließen',
'PORTAL_NEWS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Aktuelle Beiträge-Block ausschließen willst, und "Nein" wenn du nur die Beiträge aus den ausgewählten Foren im Aktuelle Beiträge-Block sehen willst.', 'PORTAL_NEWS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Aktuelle Beiträge-Block ausschließen willst, und "Nein" wenn du nur die Beiträge aus den ausgewählten Foren im Aktuelle Beiträge-Block sehen willst.',
'PORTAL_NEWS_PERMISSIONS' => 'Berechtigungen prüfen anschalten?', 'PORTAL_NEWS_PERMISSIONS' => 'Berechtigungen prüfen anschalten?',
'PORTAL_NEWS_PERMISSIONS_EXP' => 'Berücksichtigt Berechtigungen beim Anzeigen der aktuellen Beiträge', 'PORTAL_NEWS_PERMISSIONS_EXP' => 'Berücksichtigt Berechtigungen beim Anzeigen der aktuellen Beiträge',

View File

@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
'ACP_PORTAL_POLLS_SETTINGS' => 'Einstellungen für Umfragen', 'ACP_PORTAL_POLLS_SETTINGS' => 'Einstellungen für Umfragen',
'ACP_PORTAL_POLLS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für Umfragen ändern.', 'ACP_PORTAL_POLLS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für Umfragen ändern.',
'PORTAL_POLL_TOPIC_ID' => 'Umfragen Foren', 'PORTAL_POLL_TOPIC_ID' => 'Umfragen Foren',
'PORTAL_POLL_TOPIC_ID_EXP' => 'Die Foren, aus welchen die Umfragen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren aussschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren aussschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_POLL_TOPIC_ID_EXP' => 'Die Foren, aus welchen die Umfragen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren ausschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren ausschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_POLL_EXCLUDE_ID' => 'Foren ausschließen', 'PORTAL_POLL_EXCLUDE_ID' => 'Foren ausschließen',
'PORTAL_POLL_EXCLUDE_ID_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Umfragen-Block ausschließen willst, und "Nein" wenn du nur die Themen aus den ausgewählten Foren im Umfragen-Block sehen willst.', 'PORTAL_POLL_EXCLUDE_ID_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Umfragen-Block ausschließen willst, und "Nein" wenn du nur die Themen aus den ausgewählten Foren im Umfragen-Block sehen willst.',
'PORTAL_POLL_LIMIT' => 'Maximale Anzahl der Umfragen', 'PORTAL_POLL_LIMIT' => 'Maximale Anzahl der Umfragen',

View File

@@ -45,7 +45,7 @@ $lang = array_merge($lang, array(
'PORTAL_RECENT_TITLE_LIMIT' => 'Maximal angezeigte Länge der neuesten Themen', 'PORTAL_RECENT_TITLE_LIMIT' => 'Maximal angezeigte Länge der neuesten Themen',
'PORTAL_RECENT_TITLE_LIMIT_EXP' => '0 bedeutet unbegrenzt', 'PORTAL_RECENT_TITLE_LIMIT_EXP' => '0 bedeutet unbegrenzt',
'PORTAL_RECENT_FORUM' => 'Themen Foren', 'PORTAL_RECENT_FORUM' => 'Themen Foren',
'PORTAL_RECENT_FORUM_EXP' => 'Die Foren, aus welchen die Themen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren aussschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren aussschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.', 'PORTAL_RECENT_FORUM_EXP' => 'Die Foren, aus welchen die Themen angezeigt werden sollen. Frei lassen, um aus allen Foren anzeigen zu lassen. Falls "Foren ausschließen" auf "Ja" steht, wähle die Foren die du ausschließen willst.<br />Falls "Foren ausschließen" auf "Nein" steht, wähle die Foren die du sehen willst.<br />Wähle mehrere Foren aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
'PORTAL_EXCLUDE_FORUM' => 'Foren aussschließen', 'PORTAL_EXCLUDE_FORUM' => 'Foren ausschließen',
'PORTAL_EXCLUDE_FORUM_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Aktuelle Themen-Block ausschließen willst, und "Nein" wenn du nur die Themen aus den ausgewählten Foren im Aktuelle Themen-Block sehen willst.', 'PORTAL_EXCLUDE_FORUM_EXP' => 'Wähle "Ja" wenn du die ausgewählten Foren vom Aktuelle Themen-Block ausschließen willst, und "Nein" wenn du nur die Themen aus den ausgewählten Foren im Aktuelle Themen-Block sehen willst.',
)); ));

View File

@@ -527,39 +527,6 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
return $page_string; return $page_string;
} }
/**
* Format user date for the Birthday block
* Note: this function is used as we already added timezones, etc
*
* borrowed from Upcoming Birthday Mod
* @author: lefty
* changed to work outside session.php by B3P
* @function: format_dateucb
*/
function format_birthday($date, $format = false)
{
global $user;
$lang_dates = $user->lang['datetime'];
$format = (!$format) ? $user->data['user_dateformat'] : $format;
// Short representation of month in format
if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
{
$lang_dates['May'] = $lang_dates['May_short'];
}
unset($lang_dates['May_short']);
// We need to create a UNIX timestamp for date()
$day = substr($date, 0, strpos($date, '-'));
$month = substr($date, (strpos($date, '-')+1), 2);
$year = substr($date, -4);
$birthday_time = mktime(0, 0, 0, $month, $day, $year);
return strtr(@date(str_replace('|', '', $format), $birthday_time), $lang_dates);
}
/** /**
* Check if table exists * Check if table exists
* @copyright (c) 2007 phpBB Group * @copyright (c) 2007 phpBB Group

View File

@@ -218,8 +218,8 @@ class portal_upload
} }
else if (is_file($src . '/' . $src_entry) && !is_file($dest . '/' . $src_entry)) else if (is_file($src . '/' . $src_entry) && !is_file($dest . '/' . $src_entry))
{ {
copy($src . '/' . $src_entry, $dest . '/' . $src_entry); @copy($src . '/' . $src_entry, $dest . '/' . $src_entry);
chmod($dest . '/' . $src_entry, 0644); @chmod($dest . '/' . $src_entry, 0644);
} }
} }
} }
@@ -240,25 +240,25 @@ class portal_upload
if (!is_dir($dir) && is_file($dir)) if (!is_dir($dir) && is_file($dir))
{ {
phpbb_chmod($dir, CHMOD_ALL); @chmod($dir, 0644);
return unlink($dir); return @unlink($dir);
} }
foreach (scandir($dir) as $item) foreach (scandir($dir) as $item)
{ {
if ($item == '.' || $item == '..') if ($item == '.' || $item == '..')
{ {
continue; continue;
} }
if (!$this->directory_delete($dir . "/" . $item)) if (!$this->directory_delete($dir . "/" . $item))
{ {
phpbb_chmod($dir . "/" . $item, CHMOD_ALL); @chmod($dir . "/" . $item, 0644);
if (!$this->directory_delete($dir . "/" . $item)) if (!$this->directory_delete($dir . "/" . $item))
{ {
return false; return false;
} }
} }
} }
return @rmdir($dir); return @rmdir($dir);
} }
@@ -304,18 +304,18 @@ class portal_upload
// remove old backup file first // remove old backup file first
if(file_exists($to . '.bak')) if(file_exists($to . '.bak'))
{ {
phpbb_chmod($to . '.bak', CHMOD_ALL); @chmod($to . '.bak', 0644);
unlink($to . '.bak'); unlink($to . '.bak');
} }
@rename($to, $to . '.bak'); @rename($to, $to . '.bak');
phpbb_chmod($to, CHMOD_ALL); @chmod($to, 0644);
} }
if (!@copy($from, $to)) if (!@copy($from, $to))
{ {
return sprintf($user->lang['MODULE_COPY_FAILURE'], $to); return sprintf($user->lang['MODULE_COPY_FAILURE'], $to);
} }
phpbb_chmod($to, CHMOD_ALL); @chmod($to, 0644);
return true; return true;
} }
@@ -354,4 +354,4 @@ class portal_upload
} }
return true; return true;
} }
} }

View File

@@ -49,206 +49,12 @@ class portal_attachments_module
public function get_template_center($module_id) public function get_template_center($module_id)
{ {
global $config, $template, $db, $user, $auth, $phpEx, $phpbb_root_path; return $this->parse_template($module_id, 'center');
$attach_forums = false;
$where = '';
$filetypes = array();
// Get filetypes and put them into an array
if(isset($config['board3_attachments_filetype_' . $module_id]) && strlen($config['board3_attachments_filetype_' . $module_id]) > 0)
{
$filetypes = explode(',', $config['board3_attachments_filetype_' . $module_id]);
}
if($config['board3_attachments_forum_ids_' . $module_id] !== '')
{
$attach_forums_config = (strpos($config['board3_attachments_forum_ids_' . $module_id], ',') !== false) ? explode(',', $config['board3_attachments_forum_ids_' . $module_id]) : array($config['board3_attachments_forum_ids_' . $module_id]);
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
if($config['board3_attachments_forum_exclude_' . $module_id])
{
$forum_list = array_unique(array_diff($forum_list, $attach_forums_config));
}
else
{
$forum_list = array_unique(array_intersect($attach_forums_config, $forum_list));
}
}
else
{
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
}
if(sizeof($forum_list))
{
$attach_forums = true;
$where = 'AND ' . $db->sql_in_set('t.forum_id', $forum_list);
}
if(sizeof($filetypes))
{
if($config['board3_attachments_exclude_' . $module_id])
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes, true);
}
else
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes);
}
}
if($attach_forums === true)
{
// Just grab all attachment info from database
$sql = 'SELECT
a.*,
t.forum_id
FROM
' . ATTACHMENTS_TABLE . ' a,
' . TOPICS_TABLE . ' t
WHERE
a.topic_id <> 0
AND a.topic_id = t.topic_id
' . $where . '
ORDER BY
filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
$result = $db->sql_query_limit($sql, $config['board3_attachments_number_' . $module_id]);
while ($row = $db->sql_fetchrow($result))
{
$size_lang = ($row['filesize'] >= 1048576) ? $user->lang['MIB'] : (($row['filesize'] >= 1024) ? $user->lang['KIB'] : $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']);
$raw_filename = utf8_substr($row['real_filename'], 0, strrpos($row['real_filename'], '.'));
$replace = character_limit($raw_filename, $config['board3_attach_max_length_' . $module_id]);
$template->assign_block_vars('attach_center', array(
'FILESIZE' => $row['filesize'] . ' ' . $size_lang,
'FILETIME' => $user->format_date($row['filetime']),
'DOWNLOAD_COUNT' => (int) $row['download_count'], // grab downloads count
'FILENAME' => $replace,
'REAL_FILENAME' => $row['real_filename'],
'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']),
'U_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx, 'p='.$row['post_msg_id'].'#p'.$row['post_msg_id']),
));
}
$db->sql_freeresult($result);
$template->assign_var('S_DISPLAY_ATTACHMENTS', true);
}
else
{
$template->assign_var('S_DISPLAY_ATTACHMENTS', false);
}
return 'attachments_center.html';
} }
public function get_template_side($module_id) public function get_template_side($module_id)
{ {
global $config, $template, $db, $user, $auth, $phpEx, $phpbb_root_path; return $this->parse_template($module_id, 'side');
$attach_forums = false;
$where = '';
$filetypes = array();
// Get filetypes and put them into an array
if(isset($config['board3_attachments_filetype_' . $module_id]) && strlen($config['board3_attachments_filetype_' . $module_id]) > 0)
{
$filetypes = explode(',', $config['board3_attachments_filetype_' . $module_id]);
}
if($config['board3_attachments_forum_ids_' . $module_id] !== '')
{
$attach_forums_config = (strpos($config['board3_attachments_forum_ids_' . $module_id], ',') !== false) ? explode(',', $config['board3_attachments_forum_ids_' . $module_id]) : array($config['board3_attachments_forum_ids_' . $module_id]);
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
if($config['board3_attachments_forum_exclude_' . $module_id])
{
$forum_list = array_unique(array_diff($forum_list, $attach_forums_config));
}
else
{
$forum_list = array_unique(array_intersect($attach_forums_config, $forum_list));
}
}
else
{
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
}
if(sizeof($forum_list))
{
$attach_forums = true;
$where = 'AND ' . $db->sql_in_set('t.forum_id', $forum_list);
}
if(sizeof($filetypes))
{
if($config['board3_attachments_exclude_' . $module_id])
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes, true);
}
else
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes);
}
}
if($attach_forums === true)
{
// Just grab all attachment info from database
$sql = 'SELECT
a.*,
t.forum_id
FROM
' . ATTACHMENTS_TABLE . ' a,
' . TOPICS_TABLE . ' t
WHERE
a.topic_id <> 0
AND a.topic_id = t.topic_id
' . $where . '
ORDER BY
filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
$result = $db->sql_query_limit($sql, $config['board3_attachments_number_' . $module_id]);
while ($row = $db->sql_fetchrow($result))
{
$size_lang = ($row['filesize'] >= 1048576) ? $user->lang['MIB'] : (($row['filesize'] >= 1024) ? $user->lang['KIB'] : $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']);
$raw_filename = utf8_substr($row['real_filename'], 0, strrpos($row['real_filename'], '.'));
$replace = character_limit($raw_filename, $config['board3_attach_max_length_' . $module_id]);
$template->assign_block_vars('attach_side', array(
'FILESIZE' => $row['filesize'] . ' ' . $size_lang,
'FILETIME' => $user->format_date($row['filetime']),
'DOWNLOAD_COUNT' => (int) $row['download_count'], // grab downloads count
'FILENAME' => $replace,
'REAL_FILENAME' => $row['real_filename'],
'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']),
'U_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx, 'p='.$row['post_msg_id'].'#p'.$row['post_msg_id']),
));
}
$db->sql_freeresult($result);
$template->assign_var('S_DISPLAY_ATTACHMENTS', true);
}
else
{
$template->assign_var('S_DISPLAY_ATTACHMENTS', false);
}
return 'attachments_side.html';
} }
public function get_template_acp($module_id) public function get_template_acp($module_id)
@@ -379,4 +185,112 @@ class portal_attachments_module
$news = implode(',', $values); $news = implode(',', $values);
set_config($key, $news); set_config($key, $news);
} }
/**
* Parse template variables for module
*
* @param int $module_id Module ID
* @param string $type Module type (center or side)
*/
protected function parse_template($module_id, $type)
{
global $config, $template, $db, $user, $auth, $phpEx, $phpbb_root_path;
$attach_forums = false;
$where = '';
$filetypes = array();
// Get filetypes and put them into an array
if(isset($config['board3_attachments_filetype_' . $module_id]) && strlen($config['board3_attachments_filetype_' . $module_id]) > 0)
{
$filetypes = explode(',', $config['board3_attachments_filetype_' . $module_id]);
}
if($config['board3_attachments_forum_ids_' . $module_id] !== '')
{
$attach_forums_config = (strpos($config['board3_attachments_forum_ids_' . $module_id], ',') !== false) ? explode(',', $config['board3_attachments_forum_ids_' . $module_id]) : array($config['board3_attachments_forum_ids_' . $module_id]);
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
if($config['board3_attachments_forum_exclude_' . $module_id])
{
$forum_list = array_unique(array_diff($forum_list, $attach_forums_config));
}
else
{
$forum_list = array_unique(array_intersect($attach_forums_config, $forum_list));
}
}
else
{
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
}
if(sizeof($forum_list))
{
$attach_forums = true;
$where = 'AND ' . $db->sql_in_set('t.forum_id', $forum_list);
}
if(sizeof($filetypes))
{
if($config['board3_attachments_exclude_' . $module_id])
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes, true);
}
else
{
$where .= ' AND ' . $db->sql_in_set('a.extension', $filetypes);
}
}
if($attach_forums === true)
{
// Just grab all attachment info from database
$sql = 'SELECT
a.*,
t.forum_id
FROM
' . ATTACHMENTS_TABLE . ' a,
' . TOPICS_TABLE . ' t
WHERE
a.topic_id <> 0
AND a.topic_id = t.topic_id
' . $where . '
ORDER BY
filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
$result = $db->sql_query_limit($sql, $config['board3_attachments_number_' . $module_id]);
while ($row = $db->sql_fetchrow($result))
{
$size_lang = ($row['filesize'] >= 1048576) ? $user->lang['MIB'] : (($row['filesize'] >= 1024) ? $user->lang['KIB'] : $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']);
$raw_filename = utf8_substr($row['real_filename'], 0, strrpos($row['real_filename'], '.'));
$replace = character_limit($raw_filename, $config['board3_attach_max_length_' . $module_id]);
$template->assign_block_vars('attach_' . $type, array(
'FILESIZE' => $row['filesize'] . ' ' . $size_lang,
'FILETIME' => $user->format_date($row['filetime']),
'DOWNLOAD_COUNT' => (int) $row['download_count'], // grab downloads count
'FILENAME' => $replace,
'REAL_FILENAME' => $row['real_filename'],
'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']),
'U_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx, 'p='.$row['post_msg_id'].'#p'.$row['post_msg_id']),
));
}
$db->sql_freeresult($result);
$template->assign_var('S_DISPLAY_ATTACHMENTS', true);
}
else
{
$template->assign_var('S_DISPLAY_ATTACHMENTS', false);
}
return 'attachments_' . $type . '.html';
}
} }

View File

@@ -591,6 +591,11 @@ class portal_calendar_module
**/ **/
private function makeTimestamp($date) private function makeTimestamp($date)
{ {
<<<<<<< HEAD
=======
global $user;
>>>>>>> 36903cb... Display correct day of the week with negative UTC offset
$this->stamp = strtotime($date); $this->stamp = strtotime($date);
return ($this->stamp); return ($this->stamp);
} }

View File

@@ -55,72 +55,12 @@ class portal_custom_module
public function get_template_center($module_id) public function get_template_center($module_id)
{ {
global $config, $template, $portal_config, $user; return $this->parse_template($module_id);
/*
* Run generate_text_for_display if the user uses BBCode for designing his custom block
* HTML won't be parsed if the user chooses to use BBCodes in the ACP
* If BBCodes are turned off, the custom Block code will be directly assigned and HTML will be parsed
*/
if ($config['board3_custom_' . $module_id . '_bbcode'])
{
// Generate text for display and assign template vars
$uid = $config['board3_custom_' . $module_id . '_uid'];
$bitfield = $config['board3_custom_' . $module_id . '_bitfield'];
$bbcode_options = OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS;
$assign_code = generate_text_for_display($portal_config['board3_custom_' . $module_id . '_code'], $uid, $bitfield, $bbcode_options);
}
else
{
$assign_code = htmlspecialchars_decode($portal_config['board3_custom_' . $module_id . '_code'], ENT_QUOTES);
}
$title = (!empty($config['board3_custom_' . $module_id . '_title'])) ? ((isset($user->lang[$config['board3_custom_' . $module_id . '_title']])) ? $user->lang[$config['board3_custom_' . $module_id . '_title']] : $config['board3_custom_' . $module_id . '_title']) : $user->lang[$this->name];
if(!empty($assign_code))
{
return array(
'template' => 'custom_center.html',
'title' => $title,
'code' => $assign_code,
'image_src' => '', // no image for center blocks
);
}
} }
public function get_template_side($module_id) public function get_template_side($module_id)
{ {
global $config, $template, $portal_config, $user; return $this->parse_template($module_id, 'side');
/*
* Run generate_text_for_display if the user uses BBCode for designing his custom block
* HTML won't be parsed if the user chooses to use BBCodes in the ACP
* If BBCodes are turned off, the custom Block code will be directly assigned and HTML will be parsed
*/
if ($config['board3_custom_' . $module_id . '_bbcode'])
{
// Generate text for display and assign template vars
$uid = $config['board3_custom_' . $module_id . '_uid'];
$bitfield = $config['board3_custom_' . $module_id . '_bitfield'];
$bbcode_options = OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS;
$assign_code = generate_text_for_display($portal_config['board3_custom_' . $module_id . '_code'], $uid, $bitfield, $bbcode_options);
}
else
{
$assign_code = htmlspecialchars_decode($portal_config['board3_custom_' . $module_id . '_code'], ENT_QUOTES);
}
$title = (!empty($config['board3_custom_' . $module_id . '_title'])) ? ((isset($user->lang[$config['board3_custom_' . $module_id . '_title']])) ? $user->lang[$config['board3_custom_' . $module_id . '_title']] : $config['board3_custom_' . $module_id . '_title']) : $user->lang[$this->name];
if(!empty($assign_code))
{
return array(
'template' => 'custom_side.html',
'title' => $title,
'code' => $assign_code,
'image_src' => (!empty($config['board3_custom_' . $module_id . '_image_src'])) ? $config['board3_custom_' . $module_id . '_image_src'] : $this->image_src,
);
}
} }
public function get_template_acp($module_id) public function get_template_acp($module_id)
@@ -351,4 +291,48 @@ class portal_custom_module
{ {
$this->manage_custom('', $key, $module_id); $this->manage_custom('', $key, $module_id);
} }
/**
* Parse template for custom blocks
*
* @param int $module_id Module ID of current module
* @param string $type Type of module (center or side), default to
* center to not show module image unless wanted
* @return array An array containing the custom module data
*/
protected function parse_template($module_id, $type = 'center')
{
global $config, $template, $portal_config, $user;
/*
* Run generate_text_for_display if the user uses BBCode for designing his custom block
* HTML won't be parsed if the user chooses to use BBCodes in the ACP
* If BBCodes are turned off, the custom Block code will be directly assigned and HTML will be parsed
*/
if ($config['board3_custom_' . $module_id . '_bbcode'])
{
// Generate text for display and assign template vars
$uid = $config['board3_custom_' . $module_id . '_uid'];
$bitfield = $config['board3_custom_' . $module_id . '_bitfield'];
$bbcode_options = OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS;
$assign_code = generate_text_for_display($portal_config['board3_custom_' . $module_id . '_code'], $uid, $bitfield, $bbcode_options);
}
else
{
$assign_code = htmlspecialchars_decode($portal_config['board3_custom_' . $module_id . '_code'], ENT_QUOTES);
}
$title = (!empty($config['board3_custom_' . $module_id . '_title'])) ? ((isset($user->lang[$config['board3_custom_' . $module_id . '_title']])) ? $user->lang[$config['board3_custom_' . $module_id . '_title']] : $config['board3_custom_' . $module_id . '_title']) : $user->lang[$this->name];
if(!empty($assign_code))
{
return array(
'template' => 'custom_' . $type . '.html',
'title' => $title,
'code' => $assign_code,
// no image for center blocks
'image_src' => ($type === 'center') ? '' : ((!empty($config['board3_custom_' . $module_id . '_image_src'])) ? $config['board3_custom_' . $module_id . '_image_src'] : $this->image_src),
);
}
}
} }

View File

@@ -55,386 +55,102 @@ class portal_poll_module
public function get_template_center($module_id) public function get_template_center($module_id)
{ {
global $config, $template, $db, $user, $auth, $phpbb_root_path, $phpEx; return $this->parse_template($module_id);
$user->add_lang('viewtopic');
// check if we need to include the bbcode class
if(!class_exists('bbcode'))
{
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}
$view = request_var('view', '');
$update = request_var('update', false);
$poll_view = request_var('polls', '');
$poll_view_ar = (strpos($poll_view, ',') !== FALSE) ? explode(',', $poll_view) : (($poll_view != '') ? array($poll_view) : array());
if ($update && $config['board3_poll_allow_vote_' . $module_id])
{
$up_topic_id = request_var('t', 0);
$up_forum_id = request_var('f', 0);
$voted_id = request_var('vote_id', array('' => 0));
$cur_voted_id = array();
if ($user->data['is_registered'])
{
$sql = 'SELECT poll_option_id
FROM ' . POLL_VOTES_TABLE . '
WHERE topic_id = ' . $up_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_' . $up_topic_id]))
{
$cur_voted_id = explode(',', request_var($config['cookie_name'] . '_poll_' . $up_topic_id, 0, false, true));
$cur_voted_id = array_map('intval', $cur_voted_id);
}
}
$sql = 'SELECT t.poll_length, t.poll_start, t.poll_vote_change, t.topic_status, f.forum_status, t.poll_max_options
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.forum_id = f.forum_id AND t.topic_id = " . (int) $up_topic_id . " AND t.forum_id = " . (int) $up_forum_id;
$result = $db->sql_query_limit($sql, 1);
$topic_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$s_can_up_vote = (((!sizeof($cur_voted_id) && $auth->acl_get('f_vote', $up_forum_id)) ||
($auth->acl_get('f_votechg', $up_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;
if($s_can_up_vote)
{
if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id))
{
$redirect_url = append_sid("{$phpbb_root_path}portal.$phpEx");
meta_refresh(5, $redirect_url);
if (!sizeof($voted_id))
{
$message = 'NO_VOTE_OPTION';
}
else if (sizeof($voted_id) > $topic_data['poll_max_options'])
{
$message = 'TOO_MANY_VOTE_OPTIONS';
}
else
{
$message = 'VOTE_CONVERTED';
}
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_PORTAL'], '<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) $up_topic_id;
$db->sql_query($sql);
if ($user->data['is_registered'])
{
$sql_ary = array(
'topic_id' => (int) $up_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) $up_topic_id;
$db->sql_query($sql);
if ($user->data['is_registered'])
{
$sql = 'DELETE FROM ' . POLL_VOTES_TABLE . '
WHERE topic_id = ' . (int) $up_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_' . $up_topic_id, implode(',', $voted_id), time() + 31536000);
}
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET poll_last_vote = ' . time() . "
WHERE topic_id = $up_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}portal.$phpEx");
meta_refresh(5, $redirect_url);
trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_PORTAL'], '<a href="' . $redirect_url . '">', '</a>'));
}
}
$where = '';
$poll_forums = false;
// Get readable forums
$forum_list = array();
$forum_list = array_unique(array_keys($auth->acl_getf('f_read', true)));
if($config['board3_poll_topic_id_' . $module_id] !== '')
{
$poll_forums_config = explode(',' ,$config['board3_poll_topic_id_' . $module_id]);
if($config['board3_poll_exclude_id_' . $module_id])
{
$forum_list = array_unique(array_diff($forum_list, $poll_forums_config));
}
else
{
$forum_list = array_unique(array_intersect($poll_forums_config, $forum_list));
}
}
$where = '';
if(sizeof($forum_list))
{
$poll_forums = true;
$where = 'AND ' . $db->sql_in_set('t.forum_id', $forum_list);
}
if ($config['board3_poll_hide_' . $module_id])
{
$portal_poll_hide = "AND (t.poll_start + t.poll_length > ". time() ." OR t.poll_length = 0)";
}
else
{
$portal_poll_hide = '';
}
if ($poll_forums === true)
{
$sql = 'SELECT t.poll_title, t.poll_start, t.topic_id, t.topic_first_post_id, t.forum_id, t.poll_length, t.poll_vote_change, t.poll_max_options, t.topic_status, f.forum_status, p.bbcode_bitfield, p.bbcode_uid
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . " f
WHERE t.forum_id = f.forum_id AND t.topic_visibility = 1 AND t.poll_start > 0
{$where}
AND t.topic_moved_id = 0
AND p.post_id = t.topic_first_post_id
{$portal_poll_hide}
ORDER BY t.poll_start DESC";
$limit = (isset($config['board3_poll_limit_' . $module_id])) ? $config['board3_poll_limit_' . $module_id] : 3;
$result = $db->sql_query_limit($sql, $limit);
$has_poll = false;
if ($result)
{
while($data = $db->sql_fetchrow($result))
{
$has_poll = true;
$poll_has_options = false;
$topic_id = (int) $data['topic_id'];
$forum_id = (int) $data['forum_id'];
$cur_voted_id = array();
if($config['board3_poll_allow_vote_' . $module_id])
{
if ($user->data['is_registered'])
{
$vote_sql = 'SELECT poll_option_id
FROM ' . POLL_VOTES_TABLE . '
WHERE topic_id = ' . $topic_id . '
AND vote_user_id = ' . $user->data['user_id'];
$vote_result = $db->sql_query($vote_sql);
while ($row = $db->sql_fetchrow($vote_result))
{
$cur_voted_id[] = $row['poll_option_id'];
}
$db->sql_freeresult($vote_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(',', request_var($config['cookie_name'] . '_poll_' . $topic_id, 0, false, true));
$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) && $data['poll_vote_change'])) &&
(($data['poll_length'] != 0 && $data['poll_start'] + $data['poll_length'] > time()) || $data['poll_length'] == 0) &&
$data['topic_status'] != ITEM_LOCKED &&
$data['forum_status'] != ITEM_LOCKED) ? true : false;
}
else
{
$s_can_vote = false;
}
$s_display_results = (!$s_can_vote || ($s_can_vote && sizeof($cur_voted_id)) || ($view == 'viewpoll' && in_array($topic_id, $poll_view_ar))) ? true : false;
$poll_sql = 'SELECT po.poll_option_id, po.poll_option_text, po.poll_option_total
FROM ' . POLL_OPTIONS_TABLE . " po
WHERE po.topic_id = {$topic_id}
ORDER BY po.poll_option_id";
$poll_result = $db->sql_query($poll_sql);
$poll_total_votes = 0;
$poll_data = array();
if ($poll_result)
{
while($polls_data = $db->sql_fetchrow($poll_result))
{
$poll_has_options = true;
$poll_data[] = $polls_data;
$poll_total_votes += $polls_data['poll_option_total'];
}
}
$db->sql_freeresult($poll_result);
$make_poll_view = array();
if(in_array($topic_id, $poll_view_ar) === FALSE)
{
$make_poll_view[] = $topic_id;
$make_poll_view = array_merge($poll_view_ar, $make_poll_view);
}
$poll_view_str = urlencode(implode(',', $make_poll_view));
$portalpoll_url= append_sid("{$phpbb_root_path}portal.$phpEx", "polls=$poll_view_str");
$portalvote_url= append_sid("{$phpbb_root_path}portal.$phpEx", "f=$forum_id&amp;t=$topic_id");
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
$poll_end = $data['poll_length'] + $data['poll_start'];
// Parse BBCode title
if ($data['bbcode_bitfield'])
{
$poll_bbcode = new bbcode();
}
else
{
$poll_bbcode = false;
}
$data['poll_title'] = censor_text($data['poll_title']);
if ($poll_bbcode !== false)
{
$poll_bbcode->bbcode_second_pass($data['poll_title'], $data['bbcode_uid'], $data['bbcode_bitfield']);
}
$data['poll_title'] = bbcode_nl2br($data['poll_title']);
$data['poll_title'] = smiley_text($data['poll_title']);
unset($poll_bbcode);
$template->assign_block_vars('poll', array(
'S_POLL_HAS_OPTIONS' => $poll_has_options,
'POLL_QUESTION' => $data['poll_title'],
'U_POLL_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $topic_id . '&amp;f=' . $forum_id),
'POLL_LENGTH' => $data['poll_length'],
'TOPIC_ID' => $topic_id,
'TOTAL_VOTES' => $poll_total_votes,
'L_MAX_VOTES' => ($data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $data['poll_max_options']),
'L_POLL_LENGTH' => ($data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '',
'S_CAN_VOTE' => $s_can_vote,
'S_DISPLAY_RESULTS' => $s_display_results,
'S_IS_MULTI_CHOICE' => ($data['poll_max_options'] > 1) ? true : false,
'S_POLL_ACTION' => $portalvote_url,
'U_VIEW_RESULTS' => $portalpoll_url . '&amp;view=viewpoll#viewpoll',
'U_VIEW_TOPIC' => $viewtopic_url,
));
foreach($poll_data as $pd)
{
$option_pct = ($poll_total_votes > 0) ? $pd['poll_option_total'] / $poll_total_votes : 0;
$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
// Parse BBCode option text
if ($data['bbcode_bitfield'])
{
$poll_bbcode = new bbcode();
}
else
{
$poll_bbcode = false;
}
$pd['poll_option_text'] = censor_text($pd['poll_option_text']);
if ($poll_bbcode !== false)
{
$poll_bbcode->bbcode_second_pass($pd['poll_option_text'], $data['bbcode_uid'], $data['bbcode_bitfield']);
}
$pd['poll_option_text'] = bbcode_nl2br($pd['poll_option_text']);
$pd['poll_option_text'] = smiley_text($pd['poll_option_text']);
unset($poll_bbcode);
$template->assign_block_vars('poll.poll_option', array(
'POLL_OPTION_ID' => $pd['poll_option_id'],
'POLL_OPTION_CAPTION' => $pd['poll_option_text'],
'POLL_OPTION_RESULT' => $pd['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 * 250)),
'POLL_OPTION_VOTED' => (in_array($pd['poll_option_id'], $cur_voted_id)) ? true : false
));
}
}
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'S_HAS_POLL' => $has_poll,
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
'POLL_RIGHT_CAP_IMG' => $user->img('poll_right'),
));
}
return 'poll_center.html';
} }
public function get_template_side($module_id) public function get_template_side($module_id)
{
return $this->parse_template($module_id, 'side');
}
public function get_template_acp($module_id)
{
return array(
'title' => 'ACP_PORTAL_POLLS_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_POLLS_SETTINGS',
'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
'board3_poll_exclude_id_' . $module_id => array('lang' => 'PORTAL_POLL_EXCLUDE_ID' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_poll_limit_' . $module_id => array('lang' => 'PORTAL_POLL_LIMIT' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_poll_allow_vote_' . $module_id => array('lang' => 'PORTAL_POLL_ALLOW_VOTE' , 'validate' => 'ibool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_poll_hide_' . $module_id => array('lang' => 'PORTAL_POLL_HIDE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
}
/**
* API functions
*/
public function install($module_id)
{
set_config('board3_poll_allow_vote_' . $module_id, 1);
set_config('board3_poll_topic_id_' . $module_id, '');
set_config('board3_poll_exclude_id_' . $module_id, 0);
set_config('board3_poll_hide_' . $module_id, 0);
set_config('board3_poll_limit_' . $module_id, 3);
return true;
}
public function uninstall($module_id)
{
global $db;
$del_config = array(
'board3_poll_allow_vote_' . $module_id,
'board3_poll_topic_id_' . $module_id,
'board3_poll_exclude_id_' . $module_id,
'board3_poll_hide_' . $module_id,
'board3_poll_limit_' . $module_id,
);
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
WHERE ' . $db->sql_in_set('config_name', $del_config);
return $db->sql_query($sql);
}
// Create forum select box
public function select_forums($value, $key, $module_id)
{
global $user, $config;
$forum_list = make_forum_select(false, false, true, true, true, false, true);
$selected = array();
if(isset($config[$key]) && strlen($config[$key]) > 0)
{
$selected = explode(',', $config[$key]);
}
// Build forum options
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
foreach ($forum_list as $f_id => $f_row)
{
$s_forum_options .= '<option value="' . $f_id . '"' . ((in_array($f_id, $selected)) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
}
$s_forum_options .= '</select>';
return $s_forum_options;
}
// Store selected forums
public function store_selected_forums($key, $module_id)
{
global $db, $cache;
// Get selected forums
$values = request_var($key, array(0 => ''));
$news = implode(',', $values);
set_config($key, $news);
}
/**
* Parse template variables for module
*
* @param int $module_id Module ID
* @param string $type Module type (center or side)
*/
protected function parse_template($module_id, $type = '')
{ {
global $config, $template, $db, $user, $auth, $phpbb_root_path, $phpEx; global $config, $template, $db, $user, $auth, $phpbb_root_path, $phpEx;
@@ -621,7 +337,7 @@ class portal_poll_module
if ($config['board3_poll_hide_' . $module_id]) if ($config['board3_poll_hide_' . $module_id])
{ {
$portal_poll_hide = "AND (t.poll_start + t.poll_length > ". time() ." OR t.poll_length = 0)"; $portal_poll_hide = "AND (t.poll_start + t.poll_length > ". time() ." OR t.poll_length = 0)";
} }
else else
{ {
$portal_poll_hide = ''; $portal_poll_hide = '';
@@ -749,7 +465,7 @@ class portal_poll_module
$data['poll_title'] = smiley_text($data['poll_title']); $data['poll_title'] = smiley_text($data['poll_title']);
unset($poll_bbcode); unset($poll_bbcode);
$template->assign_block_vars('poll_side', array( $template->assign_block_vars(($type !== '') ? 'poll_' . $type : 'poll', array(
'S_POLL_HAS_OPTIONS' => $poll_has_options, 'S_POLL_HAS_OPTIONS' => $poll_has_options,
'POLL_QUESTION' => $data['poll_title'], 'POLL_QUESTION' => $data['poll_title'],
'U_POLL_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $topic_id . '&amp;f=' . $forum_id), 'U_POLL_TOPIC' => append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $topic_id . '&amp;f=' . $forum_id),
@@ -792,7 +508,7 @@ class portal_poll_module
$pd['poll_option_text'] = smiley_text($pd['poll_option_text']); $pd['poll_option_text'] = smiley_text($pd['poll_option_text']);
unset($poll_bbcode); unset($poll_bbcode);
$template->assign_block_vars('poll_side.poll_option', array( $template->assign_block_vars((($type !== '') ? 'poll_' . $type : 'poll') . '.poll_option', array(
'POLL_OPTION_ID' => $pd['poll_option_id'], 'POLL_OPTION_ID' => $pd['poll_option_id'],
'POLL_OPTION_CAPTION' => $pd['poll_option_text'], 'POLL_OPTION_CAPTION' => $pd['poll_option_text'],
'POLL_OPTION_RESULT' => $pd['poll_option_total'], 'POLL_OPTION_RESULT' => $pd['poll_option_total'],
@@ -812,88 +528,6 @@ class portal_poll_module
'POLL_RIGHT_CAP_IMG' => $user->img('poll_right'), 'POLL_RIGHT_CAP_IMG' => $user->img('poll_right'),
)); ));
} }
return 'poll_side.html'; return (($type !== '') ? 'poll_' . $type : 'poll_center') . '.html';
}
public function get_template_acp($module_id)
{
return array(
'title' => 'ACP_PORTAL_POLLS_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_POLLS_SETTINGS',
'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
'board3_poll_exclude_id_' . $module_id => array('lang' => 'PORTAL_POLL_EXCLUDE_ID' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_poll_limit_' . $module_id => array('lang' => 'PORTAL_POLL_LIMIT' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_poll_allow_vote_' . $module_id => array('lang' => 'PORTAL_POLL_ALLOW_VOTE' , 'validate' => 'ibool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_poll_hide_' . $module_id => array('lang' => 'PORTAL_POLL_HIDE' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
}
/**
* API functions
*/
public function install($module_id)
{
set_config('board3_poll_allow_vote_' . $module_id, 1);
set_config('board3_poll_topic_id_' . $module_id, '');
set_config('board3_poll_exclude_id_' . $module_id, 0);
set_config('board3_poll_hide_' . $module_id, 0);
set_config('board3_poll_limit_' . $module_id, 3);
return true;
}
public function uninstall($module_id)
{
global $db;
$del_config = array(
'board3_poll_allow_vote_' . $module_id,
'board3_poll_topic_id_' . $module_id,
'board3_poll_exclude_id_' . $module_id,
'board3_poll_hide_' . $module_id,
'board3_poll_limit_' . $module_id,
);
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
WHERE ' . $db->sql_in_set('config_name', $del_config);
return $db->sql_query($sql);
}
// Create forum select box
public function select_forums($value, $key, $module_id)
{
global $user, $config;
$forum_list = make_forum_select(false, false, true, true, true, false, true);
$selected = array();
if(isset($config[$key]) && strlen($config[$key]) > 0)
{
$selected = explode(',', $config[$key]);
}
// Build forum options
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
foreach ($forum_list as $f_id => $f_row)
{
$s_forum_options .= '<option value="' . $f_id . '"' . ((in_array($f_id, $selected)) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
}
$s_forum_options .= '</select>';
return $s_forum_options;
}
// Store selected forums
public function store_selected_forums($key, $module_id)
{
global $db, $cache;
// Get selected forums
$values = request_var($key, array(0 => ''));
$news = implode(',', $values);
set_config($key, $news);
} }
} }