Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c2c4f9224 | ||
|
|
866393e1b4 | ||
|
|
66ba25b3dd | ||
|
|
190ac7075e | ||
|
|
736cb1c9f4 | ||
|
|
215868acfd | ||
|
|
182d570195 | ||
|
|
14c181bd06 | ||
|
|
4e91379691 | ||
|
|
1f60e3daad | ||
|
|
620db4e9e8 | ||
|
|
e52d009593 | ||
|
|
332b4e4d0a | ||
|
|
f6db836926 | ||
|
|
df93a27587 | ||
|
|
9bb57606b3 | ||
|
|
7eb5a169c1 | ||
|
|
8946ead961 | ||
|
|
5035a29129 | ||
|
|
8c0f6c1bfc | ||
|
|
365b6c6965 | ||
|
|
166465b8c2 | ||
|
|
e5f44f98ed | ||
|
|
5efe1d6b7c | ||
|
|
853ffaa69f | ||
|
|
7b8d5f0cb6 | ||
|
|
810aa0bbee | ||
|
|
e223d2ce63 | ||
|
|
d3a4b3d395 | ||
|
|
0009f1de1d | ||
|
|
a3c23052bf | ||
|
|
ff8f71fc60 | ||
|
|
02233a88c4 | ||
|
|
7803e58d2f | ||
|
|
337adc1bbf | ||
|
|
a0395966c8 | ||
|
|
0efc2493f1 | ||
|
|
7f16a3f2ac | ||
|
|
b17a77d152 | ||
|
|
391bbdee5c | ||
|
|
bbc9bb3043 | ||
|
|
a18a0166e6 | ||
|
|
8eaa1b0629 | ||
|
|
619eb19342 | ||
|
|
05c426b3b8 | ||
|
|
7810d55702 | ||
|
|
4dc0f2d505 | ||
|
|
c3c9d59267 | ||
|
|
edd20076ed | ||
|
|
ffeb0a39f3 | ||
|
|
59a0ab6d90 | ||
|
|
dc5c9aacf0 | ||
|
|
d15900ba85 | ||
|
|
4cb8c9dbb1 | ||
|
|
491e3f35ef | ||
|
|
b9c0d7b9c8 | ||
|
|
9db0baf400 | ||
|
|
45372fe769 | ||
|
|
3d37f531a5 | ||
|
|
92034a009d | ||
|
|
208e5fd254 |
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
|
||||
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<header>
|
||||
<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.0a1</title>
|
||||
<title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0a1</title>
|
||||
<title lang="en">board3 Portal - German Language Update for 2.0.0b1</title>
|
||||
<title lang="de">board3 Portal - Deutsche Sprache Aktualisiering für 2.0.0b1</title>
|
||||
|
||||
<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.
|
||||
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
@@ -6,8 +6,8 @@
|
||||
<header>
|
||||
<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.0a1</title>
|
||||
<title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.0a1</title>
|
||||
<title lang="en">board3 Portal - Update subsilver2 style for 2.0.0b1</title>
|
||||
<title lang="de">board3 Portal - Aktualisiere das subsilver2 style für 2.0.0b1</title>
|
||||
|
||||
<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.
|
||||
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
@@ -108,7 +108,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<file name="styles/subsilver2/template/portal/portal_center.html" />
|
||||
<file name="styles/subsilver2/template/portal/portal_left.html" />
|
||||
<file name="styles/subsilver2/template/portal/portal_right.html" />
|
||||
<file name="styles/subsilver2/template/portal/block/" />
|
||||
<file name="styles/subsilver2/template/portal/block/*.*" />
|
||||
<file name="styles/subsilver2/theme/images/portal/mini_cal_icon_left_arrow.png" />
|
||||
<file name="styles/subsilver2/theme/images/portal/mini_cal_icon_right_arrow.png" />
|
||||
<file name="styles/subsilver2/theme/images/portal/portal_login.png" />
|
||||
@@ -6,8 +6,8 @@
|
||||
<header>
|
||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||
|
||||
<title lang="en">board3 Portal - Convert from Board3 Portal 1.0.6</title>
|
||||
<title lang="de">board3 Portal - Konvertiere von Board3 Portal 1.0.6</title>
|
||||
<title lang="en">board3 Portal 2.0.0b1 - Convert from Board3 Portal 1.0.6</title>
|
||||
<title lang="de">board3 Portal 2.0.0b1 - Konvertiere von Board3 Portal 1.0.6</title>
|
||||
|
||||
<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.
|
||||
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
@@ -97,10 +97,10 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<link-group>
|
||||
<link type="parent" lang="de" href="../../install.xml">Installations-Anleitung</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.0a1</link>
|
||||
<link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.0a1</link>
|
||||
<link type="language" lang="en" href="contrib/subsilver2.xml">Update German language to Board3 Portal 2.0.0a1</link>
|
||||
<link type="language" lang="de" href="contrib/subsilver2.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0a1</link>
|
||||
<link type="template" lang="en" href="contrib/subsilver2.xml">Update subsilver2 to Board3 Portal 2.0.0a2</link>
|
||||
<link type="template" lang="de" href="contrib/subsilver2.xml">Aktualisiere subsilver2 für Board3 Portal 2.0.0a2</link>
|
||||
<link type="language" lang="en" href="contrib/de.xml">Update German language to Board3 Portal 2.0.0a2</link>
|
||||
<link type="language" lang="de" href="contrib/de.xml">Aktualisiere deutsche Sprachdateien für Board3 Portal 2.0.0a2</link>
|
||||
</link-group>
|
||||
</header>
|
||||
<action-group>
|
||||
@@ -129,7 +129,7 @@ Weitere Sprachen kannst in unseren International Forum finden: http://www.board3
|
||||
<file name="styles/prosilver/template/portal/portal_center.html" />
|
||||
<file name="styles/prosilver/template/portal/portal_left.html" />
|
||||
<file name="styles/prosilver/template/portal/portal_right.html" />
|
||||
<file name="styles/prosilver/template/portal/block/" />
|
||||
<file name="styles/prosilver/template/portal/block/*.*" />
|
||||
<file name="styles/prosilver/theme/images/portal/mini_cal_icon_left_arrow.png" />
|
||||
<file name="styles/prosilver/theme/images/portal/mini_cal_icon_right_arrow.png" />
|
||||
<file name="styles/prosilver/theme/images/portal/portal_login.png" />
|
||||
120
install.xml
120
install.xml
@@ -6,8 +6,8 @@
|
||||
<header>
|
||||
<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
|
||||
|
||||
<title lang="en">board3 Portal 2.0.0 - Alpha 1</title>
|
||||
<title lang="de">board3 Portal 2.0.0 - Alpha 1</title>
|
||||
<title lang="en">board3 Portal 2.0.0 - Beta 1</title>
|
||||
<title lang="de">board3 Portal 2.0.0 - Beta 1</title>
|
||||
|
||||
<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.
|
||||
@@ -33,30 +33,6 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
</author-notes>
|
||||
|
||||
<author-group>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Marc Alexander</realname>
|
||||
<username>marc1706</username>
|
||||
@@ -71,6 +47,30 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
<email>nickvergessen@gmx.de</email>
|
||||
<username>nickvergessen</username>
|
||||
<homepage>http://mods.flying-bits.org/</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Kevin</realname>
|
||||
<username>saint_hh</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="current" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Ice</realname>
|
||||
<username>avaren</username>
|
||||
<homepage>http://www.board3.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
</author>
|
||||
<author>
|
||||
<realname>Christian</realname>
|
||||
<username>Christian_N</username>
|
||||
<homepage>http://www.phpbb-projekt.de</homepage>
|
||||
<contributions-group>
|
||||
<contributions status="past" position="Developer"></contributions>
|
||||
</contributions-group>
|
||||
@@ -86,7 +86,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
</author>
|
||||
</author-group>
|
||||
|
||||
<mod-version>2.0.0a1</mod-version>
|
||||
<mod-version>2.0.0b1</mod-version>
|
||||
|
||||
<installation>
|
||||
<level>easy</level>
|
||||
@@ -101,12 +101,72 @@ 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="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="contrib" lang="en" href="contrib/update_106_to_200a1/update.xml">Manual for Updating B3P 1.0.6 to 2.0.0a1</link>
|
||||
<link type="contrib" lang="de" href="contrib/update_106_to_200a1/update.xml">Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0a1</link>
|
||||
<link type="contrib" lang="en" href="contrib/update_106_to_200b1/update.xml">Manual for Updating B3P 1.0.6 to 2.0.0b1</link>
|
||||
<link type="contrib" lang="de" href="contrib/update_106_to_200b1/update.xml">Anleitung für das Aktualisieren von B3P 1.0.6 zu 2.0.0b1</link>
|
||||
</link-group>
|
||||
<history>
|
||||
<entry>
|
||||
<date>2011-05-01</date>
|
||||
<date>2011-06-08</date>
|
||||
<rev-version>2.0.0b1</rev-version>
|
||||
<changelog lang="en">
|
||||
<change>Added missing IF $S_BLOCK_ICON</change>
|
||||
<change>Fixed select for displaying events </change>
|
||||
<change>Add feature to disable modules without having to remove them</change>
|
||||
<change>Fixed typo in title of Latest Bots block</change>
|
||||
<change>Applied patch for folders with special characters (upload module)</change>
|
||||
<change>Reworked parts of calendar block</change>
|
||||
<change>Fixed missing CSS for li-tags of calendar</change>
|
||||
<change>Added error handling to installation of modules</change>
|
||||
<change>Fixed timezone handling of calendar</change>
|
||||
<change>Fixed incorrect handling of links</change>
|
||||
<change>Fixed mixup with td and tr in subsilver2 calendar block</change>
|
||||
<change>Added missing HTML file for center block of attachments module</change>
|
||||
<change>Fixed missing check for correct column when moving a module left or right</change>
|
||||
<change>Added possibility to add forumlist to top and bottom column</change>
|
||||
<change>Corrected language var for module image as suggested by archivar</change>
|
||||
<change>Moved link constants into module files</change>
|
||||
<change>Remove php closing tag</change>
|
||||
<change>Rewrote basic uploader for module zips</change>
|
||||
<change>Modified class files for PHP5 -- PHP5 is now a requirement</change>
|
||||
<change>Added check to prevent adding a module more than once</change>
|
||||
<change>Added feature to hide portal name on acp configuration page for all modules (was only for latest bots module)</change>
|
||||
<change>Added adm folder to allowed upload folders</change>
|
||||
<change>Replace chmod with phpbb_chmod in uploader where needed</change>
|
||||
<change>Added feature to open external links in a new window</change>
|
||||
<change>Merged nickvergessen's phpbb3-tools-trim-message replacing old get_sub_taged_string function</change>
|
||||
<change>Random members block will not be installed by default</change>
|
||||
</changelog>
|
||||
<changelog lang="de">
|
||||
<change>Fehlendes IF $S_BLOCK_ICON hinzugefügt</change>
|
||||
<change>Auswahl für das Anzeigen von Events repariert</change>
|
||||
<change>Fähigkeit hinzugefügt um Module zu deaktivieren ohne sie zu entfernen</change>
|
||||
<change>Schreibfehler in "Letzte Bots" Block beseitigt</change>
|
||||
<change>Patch für Ordner mit Spezialcharaktern hinzugefügt (Upload Modul)</change>
|
||||
<change>Teile des Kalender Blocks überarbeitet</change>
|
||||
<change>Fehlendes CSS für li-tags des Kalenders hinzugefügt</change>
|
||||
<change>Fehlerbehandlung zu Installation von Modulen hinzugefügt</change>
|
||||
<change>Zeitzonenbehandlung in Kalender korrigiert</change>
|
||||
<change>Falsche Behandlung von Links korrigiert</change>
|
||||
<change>Falsche Benutzung von td und tr im subsilver2 Kalender Block beseitigt</change>
|
||||
<change>Fehlende HTML Datei des Dateianhänge Moduls für die mittlere Spalte hinzugefügt</change>
|
||||
<change>Fehlende Überprüfung auf richtige Spalte beim Verschieben der Module</change>
|
||||
<change>Möglichkeit hinzugefügt die Forenliste in die obere und untere Modulezeile hinzuzufügen</change>
|
||||
<change>Sprachvariable für Modulbild, wie von archivar vorgeschlagen, abgeändert</change>
|
||||
<change>Link Konstanten in Module verschoben</change>
|
||||
<change>Schließenden Tag von PHP Dateien entfernt</change>
|
||||
<change>Hochlade-Module für Modul Zips komplett neu geschrieben</change>
|
||||
<change>Klassen Dateien für PHP5 modifiziert -- PHP5 ist jetzt eine Vorraussetzung</change>
|
||||
<change>Überprüfung hinzugefügt, damit ein Modul nicht mehrmals hinzugefügt werden kann</change>
|
||||
<change>Möglichkeits hinzugefügt den Modultitel auf der Konfigurationsseite im ACP zu verstecken</change>
|
||||
<change>adm Ordner zu erlaubten upload Ordnern hinzugefügt</change>
|
||||
<change>chmod mit phpbb_chmod ersetzt in Upload Modul</change>
|
||||
<change>Möglichkeit externe Links in einem neuen Fenster zu öffnen hinzugefügt</change>
|
||||
<change>nickvergessen's phpbb3-tools-trim-message hinzugefügt - ersetzt die alte Funktion get_sub_taged_string()</change>
|
||||
<change>Zufällige Mitglieder Block wird standardmäßig nicht installiert</change>
|
||||
</changelog>
|
||||
</entry>
|
||||
<entry>
|
||||
<date>2011-03-08</date>
|
||||
<rev-version>2.0.0a1</rev-version>
|
||||
<changelog lang="en">
|
||||
<change>First alpha release</change>
|
||||
|
||||
@@ -18,7 +18,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
class board3_portal_check_version
|
||||
{
|
||||
function version()
|
||||
public function version()
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -31,5 +31,3 @@ class board3_portal_check_version
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -24,7 +24,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="event_desc">{L_EVENT_DESC}:</label></dt>
|
||||
<dd><input name="event_desc" type="text" id="event_desc" value="{EVENT_DESC}" maxlength="255" /></dd>
|
||||
<dd><textarea id="event_desc" rows="6" cols="6" name="event_desc">{EVENT_DESC}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
@@ -121,6 +121,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
|
||||
@@ -177,7 +184,7 @@
|
||||
<td style="text-align: center;">{events.EVENT_TITLE}</td>
|
||||
<td style="text-align: center;">{events.EVENT_DESC}</td>
|
||||
<td style="text-align: center;"><!-- IF events.EVENT_END -->{L_EVENT_START}: {events.EVENT_START} | {L_EVENT_END}: {events.EVENT_END}<!-- ELSE -->{L_EVENT_TIME}: {events.EVENT_START}<!-- IF events.EVENT_ALL_DAY --> | {L_EVENT_ALL_DAY}<!-- ENDIF --><!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{events.EVENT_URL}</td>
|
||||
<td style="text-align: center;"><a href="{events.EVENT_URL}" alt="{events.EVENT_TITLE}">{events.EVENT_URL_RAW}</td>
|
||||
<td style="text-align: center;">
|
||||
<a href="{events.U_EDIT}">{ICON_EDIT}</a> <a href="{events.U_DELETE}">{ICON_DELETE}</a>
|
||||
</td>
|
||||
|
||||
@@ -67,6 +67,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_ACP_PORTAL_CUSTOM_PERMISSION}:</label><br /><span>{L_ACP_PORTAL_CUSTOM_PERMISSION_EXP}</span></dt>
|
||||
|
||||
@@ -90,6 +90,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
|
||||
@@ -104,7 +111,24 @@
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
|
||||
<dl>
|
||||
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dd>{options.CONTENT}</dd>
|
||||
</dl>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<fieldset>
|
||||
<!-- END options -->
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_ACP_PORTAL_LINKS}</legend>
|
||||
|
||||
@@ -144,6 +168,7 @@
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -97,6 +97,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
|
||||
@@ -111,7 +118,24 @@
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
|
||||
<dl>
|
||||
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dd>{options.CONTENT}</dd>
|
||||
</dl>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<fieldset>
|
||||
<!-- END options -->
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_ACP_PORTAL_LINKS}</legend>
|
||||
|
||||
@@ -151,6 +175,7 @@
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<th style="text-align: center;" colspan="3">{L_MODULE_POS_TOP}</th>
|
||||
</tr>
|
||||
<!-- BEGIN modules_top -->
|
||||
<!-- IF modules_top.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<!-- IF not modules_top.MODULE_ENABLED --><tr class="row3"><!-- ELSEIF modules_top.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td colspan="3">
|
||||
{modules_top.MODULE_IMAGE} {modules_top.MODULE_NAME}<br />
|
||||
<br />
|
||||
@@ -63,13 +63,13 @@
|
||||
<th>{L_MODULE_POS_LEFT}</th>
|
||||
</tr>
|
||||
<!-- BEGIN modules_left -->
|
||||
<!-- IF modules_left.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<!-- IF not modules_left.MODULE_ENABLED --><tr class="row3"><!-- ELSEIF modules_left.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td>
|
||||
{modules_left.MODULE_IMAGE} {modules_left.MODULE_NAME}<br />
|
||||
<br />
|
||||
<!-- IF modules_left.S_FIRST_ROW -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{modules_left.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||
<!-- IF modules_left.U_MOVE_RIGHT --><a href="{modules_left.U_MOVE_RIGHT}">{ICON_MOVE_RIGHT}</a><!-- ELSE -->{ICON_MOVE_RIGHT_DISABLED}<!-- ENDIF -->
|
||||
<a href="{modules_left.U_EDIT}">{ICON_EDIT}</a> <a href="{modules_left.U_DELETE}">{ICON_DELETE}</a><br/>
|
||||
<a href="{modules_left.U_EDIT}">{ICON_EDIT}</a> <a href="{modules_left.U_DELETE}">{ICON_DELETE}</a><br />
|
||||
{ICON_MOVE_LEFT_DISABLED}
|
||||
<!-- IF modules_left.S_LAST_ROW -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{modules_left.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||
</td>
|
||||
@@ -90,7 +90,7 @@
|
||||
<th style="text-align: center;">{L_MODULE_POS_CENTER}</th>
|
||||
</tr>
|
||||
<!-- BEGIN modules_center -->
|
||||
<!-- IF modules_center.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<!-- IF not modules_center.MODULE_ENABLED --><tr class="row3"><!-- ELSEIF modules_center.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td>
|
||||
{modules_center.MODULE_IMAGE} {modules_center.MODULE_NAME}<br />
|
||||
<br />
|
||||
@@ -117,7 +117,7 @@
|
||||
<th>{L_MODULE_POS_RIGHT}</th>
|
||||
</tr>
|
||||
<!-- BEGIN modules_right -->
|
||||
<!-- IF modules_right.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<!-- IF not modules_right.MODULE_ENABLED --><tr class="row3"><!-- ELSEIF modules_right.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td>
|
||||
{modules_right.MODULE_IMAGE} {modules_right.MODULE_NAME}<br />
|
||||
<br />
|
||||
@@ -147,7 +147,7 @@
|
||||
<th style="text-align: center;" colspan="3">{L_MODULE_POS_BOTTOM}</th>
|
||||
</tr>
|
||||
<!-- BEGIN modules_bottom -->
|
||||
<!-- IF modules_bottom.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<!-- IF not modules_bottom.MODULE_ENABLED --><tr class="row3"><!-- ELSEIF modules_bottom.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td colspan="3">
|
||||
{modules_bottom.MODULE_IMAGE} {modules_bottom.MODULE_NAME}<br />
|
||||
<br />
|
||||
|
||||
@@ -31,18 +31,18 @@
|
||||
<div class="successbox">
|
||||
<p>{MESSAGE}</p>
|
||||
<br />
|
||||
<p><a href="{U_RETURN}">{L_RETURN_MODS}</a></p>
|
||||
<p><a href="{U_RETURN}">{L_BACK}</a></p>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>{L_NEW_FILES}</legend>
|
||||
<legend>{L_PORTAL_NEW_FILES}</legend>
|
||||
|
||||
<table cellspacing="1">
|
||||
<col class="row1" /><col class="row1" /><col class="row2" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_SOURCE}</th>
|
||||
<th>{L_TARGET}</th>
|
||||
<th>{L_STATUS}</th>
|
||||
<th>{L_PORTAL_MODULE_SOURCE}</th>
|
||||
<th>{L_PORTAL_MODULE_TARGET}</th>
|
||||
<th>{L_PORTAL_MODULE_STATUS}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -51,7 +51,7 @@
|
||||
<td><strong>{new_files.SOURCE}<!-- IF new_files.S_MISSING_FILE --> <strong><font color="red">({L_FILE_MISSING})</font><!-- ENDIF --></strong></td>
|
||||
<td>{new_files.TARGET}</td>
|
||||
<!-- IF S_INSTALL -->
|
||||
<td><!-- IF new_files.S_SUCCESS --><font color="green">{L_SUCCESS}</font><!-- ELSEIF new_files.S_NO_COPY_ATTEMPT -->{L_MANUAL_COPY}<!-- ELSE --><font color="red">{L_ERROR}</font><!-- ENDIF --></td>
|
||||
<td style="<!-- IF new_files.S_SUCCESS -->color: green;">{L_PORTAL_MODULE_SUCCESS}<!-- ELSE -->color: red;">{L_PORTAL_MODULE_ERROR}<!-- ENDIF --></td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- END new_files -->
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
<dt><label for="module_reset">{L_MODULE_RESET}:</label><br /><span style="color: #BC2A4D;">{L_MODULE_RESET_EXP}</span></dt>
|
||||
<dd><input id="module_reset" type="checkbox" value="1" name="module_reset" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="module_status">{L_MODULE_STATUS}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="module_status" value="1" id="module_status"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="module_status" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF permission_setting -->
|
||||
<dl>
|
||||
<dt><label for="permission-setting">{L_MODULE_PERMISSIONS}:</label><br /><span>{L_MODULE_PERMISSIONS_EXP}</span></dt>
|
||||
|
||||
@@ -17,10 +17,10 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
class acp_portal
|
||||
{
|
||||
var $u_action;
|
||||
var $new_config = array();
|
||||
public $u_action;
|
||||
public $new_config = array();
|
||||
|
||||
function main($id, $mode)
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $cache, $template, $display_vars;
|
||||
global $config, $phpbb_root_path, $portal_root_path, $phpbb_admin_path, $phpEx;
|
||||
@@ -104,11 +104,12 @@ class acp_portal
|
||||
$module_name = $user->lang[$c_class->name];
|
||||
$display_vars = $c_class->get_template_acp($module_id);
|
||||
$template->assign_vars(array(
|
||||
'MODULE_NAME' => ($module_data['module_classname'] != 'latest_bots')? $module_data['module_name'] : '',
|
||||
'MODULE_NAME' => (isset($c_class->hide_name) && $c_class->hide_name == true)? '' : $module_data['module_name'],
|
||||
'MODULE_IMAGE' => $module_data['module_image_src'],
|
||||
'MODULE_IMAGE_WIDTH' => $module_data['module_image_width'],
|
||||
'MODULE_IMAGE_HEIGHT' => $module_data['module_image_height'],
|
||||
'MODULE_IMAGE_SRC' => ($module_data['module_image_src']) ? $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $module_data['module_image_src'] : '',
|
||||
'MODULE_ENABLED' => ($module_data['module_status']) ? true : false,
|
||||
));
|
||||
|
||||
if($module_data['module_classname'] != 'custom')
|
||||
@@ -170,6 +171,7 @@ class acp_portal
|
||||
'module_group_ids' => '',
|
||||
'module_image_height' => 16,
|
||||
'module_image_width' => 16,
|
||||
'module_status' => B3_MODULE_ENABLED,
|
||||
);
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
@@ -259,12 +261,17 @@ class acp_portal
|
||||
|
||||
$sql_ary = array(
|
||||
'module_image_src' => request_var('module_image', ''),
|
||||
'module_name' => request_var('module_name', '', true),
|
||||
'module_image_width' => request_var('module_img_width', 0),
|
||||
'module_image_height' => request_var('module_img_height', 0),
|
||||
'module_group_ids' => $module_permission,
|
||||
'module_status' => request_var('module_status', B3_MODULE_ENABLED),
|
||||
);
|
||||
|
||||
if(!(isset($c_class->hide_name) && $c_class->hide_name == true))
|
||||
{
|
||||
$sql_ary['module_name'] = utf8_normalize_nfc(request_var('module_name', '', true));
|
||||
}
|
||||
|
||||
// check if module image file actually exists
|
||||
check_file_src($sql_ary['module_image_src'], '', $module_id);
|
||||
|
||||
@@ -377,8 +384,9 @@ class acp_portal
|
||||
{
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order + 1
|
||||
WHERE module_order = ' . ($module_data['module_order'] - 1) . '
|
||||
AND module_column = ' . $module_data['module_column'];
|
||||
WHERE module_order = ' . (int) ($module_data['module_order'] - 1) . '
|
||||
AND module_column = ' . (int) $module_data['module_column'];
|
||||
|
||||
$db->sql_query($sql);
|
||||
$updated = $db->sql_affectedrows();
|
||||
if ($updated)
|
||||
@@ -405,8 +413,8 @@ class acp_portal
|
||||
{
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order - 1
|
||||
WHERE module_order = ' . ($module_data['module_order'] + 1) . '
|
||||
AND module_column = ' . $module_data['module_column'];
|
||||
WHERE module_order = ' . (int) ($module_data['module_order'] + 1) . '
|
||||
AND module_column = ' . (int) $module_data['module_column'];
|
||||
$db->sql_query($sql);
|
||||
$updated = $db->sql_affectedrows();
|
||||
if ($updated)
|
||||
@@ -446,8 +454,8 @@ class acp_portal
|
||||
{
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order + 1
|
||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . ($module_data['module_column'] + 1);
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] + 1);
|
||||
$db->sql_query($sql);
|
||||
$updated = $db->sql_affectedrows();
|
||||
|
||||
@@ -458,8 +466,8 @@ class acp_portal
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order - 1
|
||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . $module_data['module_column'];
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) $module_data['module_column'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
// the module that needs to moved is in the last row
|
||||
@@ -467,12 +475,13 @@ class acp_portal
|
||||
{
|
||||
$sql = 'SELECT MAX(module_order) as new_order
|
||||
FROM ' . PORTAL_MODULES_TABLE . '
|
||||
WHERE module_order < ' . $module_data['module_order'];
|
||||
WHERE module_order < ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] + 1);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = ' . $new_order . '
|
||||
SET module_order = ' . (int) $new_order . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@@ -484,8 +493,8 @@ class acp_portal
|
||||
{
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order + 1
|
||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . ($module_data['module_column'] + 2);
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] + 2);
|
||||
$db->sql_query($sql);
|
||||
$updated = $db->sql_affectedrows();
|
||||
|
||||
@@ -496,8 +505,8 @@ class acp_portal
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = module_order - 1
|
||||
WHERE module_order >= ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . $module_data['module_column'];
|
||||
WHERE module_order >= ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) $module_data['module_column'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
// the module that needs to moved is in the last row
|
||||
@@ -505,12 +514,13 @@ class acp_portal
|
||||
{
|
||||
$sql = 'SELECT MAX(module_order) as new_order
|
||||
FROM ' . PORTAL_MODULES_TABLE . '
|
||||
WHERE module_order < ' . $module_data['module_order'];
|
||||
WHERE module_order < ' . (int) $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] + 2);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
$sql = 'UPDATE ' . PORTAL_MODULES_TABLE . '
|
||||
SET module_order = ' . $new_order . '
|
||||
SET module_order = ' . (int) $new_order . '
|
||||
WHERE module_id = ' . (int) $module_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@@ -571,7 +581,8 @@ class acp_portal
|
||||
{
|
||||
$sql = 'SELECT MAX(module_order) as new_order
|
||||
FROM ' . PORTAL_MODULES_TABLE . '
|
||||
WHERE module_order < ' . $module_data['module_order'];
|
||||
WHERE module_order < ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] - 1);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
@@ -609,7 +620,8 @@ class acp_portal
|
||||
{
|
||||
$sql = 'SELECT MAX(module_order) as new_order
|
||||
FROM ' . PORTAL_MODULES_TABLE . '
|
||||
WHERE module_order < ' . $module_data['module_order'];
|
||||
WHERE module_order < ' . $module_data['module_order'] . '
|
||||
AND module_column = ' . (int) ($module_data['module_column'] - 2);
|
||||
$db->sql_query($sql);
|
||||
$new_order = $db->sql_fetchfield('new_order') + 1;
|
||||
|
||||
@@ -696,11 +708,26 @@ class acp_portal
|
||||
{
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$directory = $phpbb_root_path . 'portal/modules/';
|
||||
|
||||
// Create an array of already installed modules
|
||||
$portal_modules = obtain_portal_modules();
|
||||
$installed_modules = array();
|
||||
|
||||
foreach($portal_modules as $cur_module)
|
||||
{
|
||||
$installed_modules[] = $cur_module['module_classname'];
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$module_classname = request_var('module_classname', '');
|
||||
$class = 'portal_' . $module_classname . '_module';
|
||||
|
||||
if(in_array($module_classname, $installed_modules) && $module_classname != 'custom')
|
||||
{
|
||||
trigger_error($user->lang['MODULE_ADD_ONCE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!class_exists($class))
|
||||
{
|
||||
include($directory . 'portal_' . $module_classname . '.' . $phpEx);
|
||||
@@ -729,16 +756,37 @@ class acp_portal
|
||||
'module_group_ids' => '',
|
||||
'module_image_height' => 16,
|
||||
'module_image_width' => 16,
|
||||
'module_status' => B3_MODULE_ENABLED,
|
||||
);
|
||||
$sql = 'INSERT INTO ' . PORTAL_MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$module_id = $db->sql_nextid();
|
||||
|
||||
$c_class->install($module_id);
|
||||
$error = $c_class->install($module_id);
|
||||
|
||||
$cache->purge(); // make sure we don't get errors after re-adding a module
|
||||
|
||||
// if something went wrong, handle the errors accordingly and undo the above query
|
||||
if (sizeof($error) && $error != true)
|
||||
{
|
||||
if (is_array($error))
|
||||
{
|
||||
foreach($error as $cur_error)
|
||||
{
|
||||
$error_output = $cur_error . '<br />';
|
||||
}
|
||||
}
|
||||
else if($error != false)
|
||||
{
|
||||
$error_output = $error;
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE . ' WHERE module_id = ' . (int) $module_id;
|
||||
|
||||
trigger_error($error_output . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
meta_refresh(3, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id));
|
||||
|
||||
trigger_error($user->lang['SUCCESS_ADD'] . adm_back_link($this->u_action));
|
||||
@@ -759,6 +807,11 @@ class acp_portal
|
||||
if (preg_match('/^portal_.+\.' . $phpEx . '$/', $file))
|
||||
{
|
||||
$class = str_replace(".$phpEx", '', $file) . '_module';
|
||||
if(in_array(str_replace(array('portal_', '_module'), '', $class), $installed_modules) && $class != 'portal_custom_module')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!class_exists($class))
|
||||
{
|
||||
include($directory . $file);
|
||||
@@ -852,6 +905,7 @@ class acp_portal
|
||||
$template->assign_block_vars('modules_' . $template_column, array(
|
||||
'MODULE_NAME' => (isset($user->lang[$row['module_name']])) ? $user->lang[$row['module_name']] : $row['module_name'],
|
||||
'MODULE_IMAGE' => ($row['module_image_src']) ? '<img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/' . $row['module_image_src'] . '" alt="' . $row['module_name'] . '" />' : '',
|
||||
'MODULE_ENABLED' => ($row['module_status']) ? true : false,
|
||||
|
||||
'U_DELETE' => $this->u_action . '&module_id=' . $row['module_id'] . '&module_classname=' . $row['module_classname'] . '&action=delete',
|
||||
'U_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=config&module_id=' . $row['module_id']),
|
||||
@@ -877,227 +931,28 @@ class acp_portal
|
||||
$error = array();
|
||||
if($submit)
|
||||
{
|
||||
if(!check_form_key('acp_portal_module_upload'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
include($phpbb_root_path . 'portal/includes/functions_upload.' . $phpEx);
|
||||
// Default upload path is portal/upload/
|
||||
$upload_path = $phpbb_root_path . 'portal/upload/';
|
||||
// Upload part
|
||||
$user->add_lang('posting'); // For error messages
|
||||
include($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
||||
$upload = new fileupload();
|
||||
// Only allow ZIP files
|
||||
$upload->set_allowed_extensions(array('zip'));
|
||||
|
||||
$file = $upload->form_upload('modupload');
|
||||
$portal_upload = new portal_upload($upload_path, $this->u_action);
|
||||
|
||||
if (empty($file->filename))
|
||||
{
|
||||
trigger_error($user->lang['NO_UPLOAD_FILE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$file->init_error && !sizeof($file->error))
|
||||
{
|
||||
$file->clean_filename('real');
|
||||
$file->move_file(str_replace($phpbb_root_path, '', $upload_path), true, true);
|
||||
|
||||
if (!sizeof($file->error))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
|
||||
$mod_dir = $upload_path . str_replace('.zip', '', $file->get('realname'));
|
||||
// make sure we don't already have the new folder
|
||||
if(is_dir($mod_dir))
|
||||
{
|
||||
$this->directory_delete($mod_dir);
|
||||
}
|
||||
$compress = new compress_zip('r', $file->destination_file);
|
||||
$compress->extract($mod_dir . '_tmp/');
|
||||
$compress->close();
|
||||
$folder_contents = scandir($mod_dir . '_tmp/', 1); // This ensures dir is at index 0
|
||||
|
||||
// We need to check if there's a main directory inside the temp MOD directory
|
||||
if (sizeof($folder_contents) == 3)
|
||||
{
|
||||
// We need to move that directory then
|
||||
$this->directory_move($mod_dir . '_tmp/' . $folder_contents[0], $upload_path . '/' . $folder_contents[0]);
|
||||
|
||||
}
|
||||
else if (!is_dir($mod_dir))
|
||||
{
|
||||
// Change the name of the directory by moving to directory without _tmp in it
|
||||
$this->directory_move($mod_dir . '_tmp/', $mod_dir);
|
||||
|
||||
}
|
||||
|
||||
$this->directory_delete($mod_dir . '_tmp/');
|
||||
|
||||
// if we got until here set $actions['NEW_FILES']
|
||||
$actions['NEW_FILES'] = array();
|
||||
|
||||
// Now we need to get the files inside the folders
|
||||
$folder_contents = scandir($mod_dir);
|
||||
$cut_array = array('.', '..');
|
||||
|
||||
$folder_contents = array_diff($folder_contents, $cut_array);
|
||||
|
||||
/*
|
||||
* This will tell us what files we need to copy incl. the path
|
||||
* In loving memory of PHP 4.x .... NOT
|
||||
*/
|
||||
foreach($folder_contents as $cur_content)
|
||||
{
|
||||
$cur_folder_content = array();
|
||||
switch($cur_content)
|
||||
{
|
||||
case 'language':
|
||||
// there are more foreach to come .....
|
||||
$cur_folder_content = scandir($mod_dir . '/language/');
|
||||
$cur_folder_content = array_diff($cur_folder_content, $cut_array);
|
||||
$langs = array();
|
||||
|
||||
foreach($cur_folder_content as $copy_file)
|
||||
{
|
||||
$langs[] = $copy_file;
|
||||
}
|
||||
|
||||
foreach($langs as $cur_lang)
|
||||
{
|
||||
$lang_content = scandir($mod_dir . '/language/' . $cur_lang . '/');
|
||||
$lang_content = array_diff($lang_content, $cut_array);
|
||||
|
||||
foreach($lang_content as $new_file)
|
||||
{
|
||||
$actions['NEW_FILES'][$mod_dir . '/language/' . $cur_lang . '/' . $new_file] = $phpbb_root_path . 'language/' . $cur_lang . '/mods/portal/' . $new_file;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'module':
|
||||
$cur_folder_content = scandir($mod_dir . '/module/');
|
||||
$cur_folder_content = array_diff($cur_folder_content, $cut_array);
|
||||
|
||||
foreach($cur_folder_content as $copy_file)
|
||||
{
|
||||
$actions['NEW_FILES'][$mod_dir . '/module/' . $copy_file] = $phpbb_root_path . 'portal/modules/' . $copy_file;
|
||||
}
|
||||
break;
|
||||
case 'styles':
|
||||
// there are more foreach to come .....
|
||||
$cur_folder_content = scandir($mod_dir . '/styles/');
|
||||
$cur_folder_content = array_diff($cur_folder_content, $cut_array);
|
||||
$styles = array();
|
||||
|
||||
foreach($cur_folder_content as $copy_file)
|
||||
{
|
||||
$styles[] = $copy_file;
|
||||
}
|
||||
|
||||
foreach($styles as $cur_style)
|
||||
{
|
||||
$style_content = scandir($mod_dir . '/styles/' . $cur_style);
|
||||
$style_content = array_diff($style_content, $cut_array);
|
||||
|
||||
foreach($style_content as $new_file)
|
||||
{
|
||||
$actions['NEW_FILES'][$mod_dir . '/styles/' . $cur_style . '/' . $new_file] = $phpbb_root_path . 'styles/' . $cur_style . '/template/portal/modules/' . $new_file;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// there shouldn't be other files ...
|
||||
trigger_error($user->lang['MODULE_CORRUPTED'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules')), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($file->error))
|
||||
{
|
||||
include("{$phpbb_root_path}includes/functions_transfer.$phpEx");
|
||||
include("{$phpbb_root_path}includes/editor.$phpEx");
|
||||
include("{$phpbb_root_path}includes/functions_mods.$phpEx");
|
||||
include("{$phpbb_root_path}includes/mod_parser.$phpEx");
|
||||
|
||||
if(!function_exists('determine_write_method') || !class_exists('editor') || !class_exists('parser'))
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTOMOD_INSTALLED'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules')), E_USER_WARNING);
|
||||
}
|
||||
|
||||
// start the page
|
||||
$user->add_lang(array('install', 'acp/mods'));
|
||||
|
||||
// Let's start moving our files where they belong
|
||||
$write_method = 'editor_' . determine_write_method(false);
|
||||
$editor = new $write_method();
|
||||
|
||||
foreach ($actions['NEW_FILES'] as $source => $target)
|
||||
{
|
||||
$status = $editor->copy_content($source, $target);
|
||||
|
||||
if ($status !== true && !is_null($status))
|
||||
{
|
||||
$module_installed = false;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('new_files', array(
|
||||
'S_SUCCESS' => ($status === true) ? true : false,
|
||||
'S_NO_COPY_ATTEMPT' => (is_null($status)) ? true : false,
|
||||
'SOURCE' => $source,
|
||||
'TARGET' => $target,
|
||||
));
|
||||
}
|
||||
|
||||
$editor->commit_changes($mod_dir . '_edited', '');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_MOD_SUCCESSBOX' => true,
|
||||
'MESSAGE' => $user->lang['INSTALLED'],
|
||||
'U_RETURN' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules'),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
$file->remove();
|
||||
if ($file->init_error || sizeof($file->error))
|
||||
{
|
||||
trigger_error((sizeof($file->error) ? implode('<br />', $file->error) : $user->lang['MOD_UPLOAD_INIT_FAIL']) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['ACP_PORTAL_UPLOAD'],
|
||||
'L_TITLE_EXPLAIN' => '',
|
||||
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'ERROR_MSG' => implode('<br />', $error),
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
));
|
||||
}
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !@extension_loaded('zlib'))
|
||||
{
|
||||
trigger_error($user->lang['NO_MODULE_UPLOAD'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules')), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if(!isset($config['am_file_perms']))
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTOMOD_INSTALLED'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules')), E_USER_WARNING);
|
||||
}
|
||||
|
||||
include("{$phpbb_root_path}includes/functions_transfer.$phpEx");
|
||||
include("{$phpbb_root_path}includes/editor.$phpEx");
|
||||
include("{$phpbb_root_path}includes/functions_mods.$phpEx");
|
||||
include("{$phpbb_root_path}includes/mod_parser.$phpEx");
|
||||
|
||||
// start the page
|
||||
$user->add_lang(array('install', 'acp/mods'));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_UPLOAD' => $this->u_action,
|
||||
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
||||
));
|
||||
|
||||
add_form_key('acp_mods_upload');
|
||||
add_form_key('acp_portal_module_upload');
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
@@ -1118,65 +973,4 @@ class acp_portal
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function directory_move($src, $dest)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$src_contents = scandir($src);
|
||||
|
||||
if (!is_dir($dest) && is_dir($src))
|
||||
{
|
||||
mkdir($dest . '/', octdec($config['am_dir_perms']));
|
||||
}
|
||||
|
||||
foreach ($src_contents as $src_entry)
|
||||
{
|
||||
if ($src_entry != '.' && $src_entry != '..')
|
||||
{
|
||||
if (is_dir($src . '/' . $src_entry) && !is_dir($dest . '/' . $src_entry))
|
||||
{
|
||||
$this->directory_move($src . '/' . $src_entry, $dest . '/' . $src_entry);
|
||||
}
|
||||
else if (is_file($src . '/' . $src_entry) && !is_file($dest . '/' . $src_entry))
|
||||
{
|
||||
copy($src . '/' . $src_entry, $dest . '/' . $src_entry);
|
||||
chmod($dest . '/' . $src_entry, octdec($config['am_file_perms']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function directory_delete($dir)
|
||||
{
|
||||
if (!file_exists($dir))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!is_dir($dir) && is_file($dir))
|
||||
{
|
||||
phpbb_chmod($dir, CHMOD_ALL);
|
||||
return unlink($dir);
|
||||
}
|
||||
|
||||
foreach (scandir($dir) as $item)
|
||||
{
|
||||
if ($item == '.' || $item == '..')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!$this->directory_delete($dir . "/" . $item))
|
||||
{
|
||||
phpbb_chmod($dir . "/" . $item, CHMOD_ALL);
|
||||
if (!$this->directory_delete($dir . "/" . $item))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rmdir($dir);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -17,7 +17,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class acp_portal_info
|
||||
{
|
||||
function module()
|
||||
public function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_portal',
|
||||
@@ -31,5 +31,3 @@ class acp_portal_info
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -94,7 +94,7 @@ $versions = array(
|
||||
),
|
||||
|
||||
'table_add' => array(
|
||||
array('phpbb_portal_config', array(
|
||||
array(PORTAL_CONFIG_TABLE, array(
|
||||
'COLUMNS' => array(
|
||||
'config_name' => array('VCHAR:255', ''),
|
||||
'config_value'=> array('MTEXT', ''),
|
||||
@@ -267,7 +267,7 @@ $versions = array(
|
||||
),
|
||||
|
||||
'table_add' => array(
|
||||
array('phpbb_portal_modules', array(
|
||||
array(PORTAL_MODULES_TABLE, array(
|
||||
'COLUMNS' => array(
|
||||
'module_id' => array('UINT:3', NULL, 'auto_increment'),
|
||||
'module_classname' => array('VCHAR:64', ''),
|
||||
@@ -347,6 +347,13 @@ $versions = array(
|
||||
'custom' => array('board3_basic_install'),
|
||||
|
||||
),
|
||||
|
||||
'2.0.0a2' => array(
|
||||
'table_column_add' => array(
|
||||
array(PORTAL_MODULES_TABLE, 'module_status', array('TINT:1', 1)),
|
||||
),
|
||||
),
|
||||
'2.0.0b1' => array(),
|
||||
);
|
||||
|
||||
// Include the UMIL Auto file, it handles the rest
|
||||
|
||||
@@ -53,7 +53,7 @@ $lang = array_merge($lang, array(
|
||||
'MOVE_LEFT' => 'Nach links',
|
||||
'B3P_FILE_NOT_FOUND' => 'Die angegebene Datei konnte nicht gefunden werden',
|
||||
'UNABLE_TO_MOVE' => 'Es ist nicht möglich den Block in die gewählte Spalte zu verschieben.',
|
||||
'DELETE_MODULE_CONFIRM' => 'Bist du sicher, dass du das Module "%1$s" löschen möchtest?',
|
||||
'DELETE_MODULE_CONFIRM' => 'Bist du sicher, dass du das Modul "%1$s" löschen möchtest?',
|
||||
'MODULE_RESET_SUCCESS' => 'Modul Einstellungen erfolgreich zurückgesetzt.',
|
||||
'MODULE_RESET_CONFIRM' => 'Bist du sicher, dass du die Einstellungen des Moduls "%1$s" zurücksetzen willst?',
|
||||
|
||||
@@ -61,7 +61,7 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_NAME' => 'Modul Name',
|
||||
'MODULE_NAME_EXP' => 'Gebe den Namen ein der für das Modul in der Modul Konfiguration angezeigt werden soll.',
|
||||
'MODULE_IMAGE' => 'Modul Bild',
|
||||
'MODULE_IMAGE_EXP' => 'Gebe den Dateinamen des Modul Bildes ein. Bilder müssen sich in styles/*yourstyle*/theme/images/portal/ befinden.',
|
||||
'MODULE_IMAGE_EXP' => 'Gebe den Dateinamen des Modul Bildes ein. Das Bild muss sich in allen styles/*yourstyle*/theme/images/portal/ Ordnern befinden.',
|
||||
'MODULE_PERMISSIONS' => 'Modul Berechtigungen',
|
||||
'MODULE_PERMISSIONS_EXP' => 'Wähle die Gruppen aus, die berechtigt sein sollen, das Modul zu sehen. Sollen alle Benutzer das Modul sehen können, wähle nichts aus.<br />An- / abwählen mehrerer Gruppen indem man <samp>Strg</samp> gedrückt hält und klickt.',
|
||||
'MODULE_IMAGE_WIDTH' => 'Modul Bild Breite',
|
||||
@@ -70,6 +70,8 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_IMAGE_HEIGHT_EXP' => 'Gebe die Höhe des Modul Bildes in Pixeln ein',
|
||||
'MODULE_RESET' => 'Modul Einstellungen zurücksetzen',
|
||||
'MODULE_RESET_EXP' => 'Dies wird alle Einstellungen des Moduls auf die Standardeinstellungen zurücksetzen!',
|
||||
'MODULE_STATUS' => 'Aktiviere Modul',
|
||||
'MODULE_ADD_ONCE' => 'Diese Modul kann nur ein Mal hinzugefügt werden.',
|
||||
|
||||
// general
|
||||
'ACP_PORTAL' => 'Portal',
|
||||
@@ -104,12 +106,21 @@ $lang = array_merge($lang, array(
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Portal-Einstellungen geändert</strong><br />» Termin geändert: %s ',
|
||||
|
||||
// Upload Module
|
||||
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
|
||||
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
|
||||
'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst:',
|
||||
'MODULE_UPLOAD_GO' => 'Hochladen',
|
||||
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
|
||||
'NO_AUTOMOD_INSTALLED' => 'Du hast AutoMOD nicht installiert, AutoMOD ist für dieses Feature aber zwingend erforderlich.',
|
||||
'ACP_PORTAL_UPLOAD' => 'Modul hochladen',
|
||||
'MODULE_UPLOAD' => 'Lade ein Modul hoch',
|
||||
'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst:',
|
||||
'MODULE_UPLOAD_GO' => 'Hochladen',
|
||||
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
|
||||
'MODULE_UPLOADED' => 'Modul erfolgreich hochgeladen.',
|
||||
'MODULE_UPLOAD_MKDIR_FAILURE' => 'Es konnte kein Ordner erstellt werden.',
|
||||
'MODULE_COPY_FAILURE' => 'Die folgende Datei konnte nicht kopiert werden: %1$s',
|
||||
'MODULE_CORRUPTED' => 'Das Modul das du hochladen willst, scheint defekt zu sein.',
|
||||
'PORTAL_NEW_FILES' => 'Neue Dateien',
|
||||
'PORTAL_MODULE_SOURCE' => 'Quelle',
|
||||
'PORTAL_MODULE_TARGET' => 'Ziel',
|
||||
'PORTAL_MODULE_STATUS' => 'Status',
|
||||
'PORTAL_MODULE_SUCCESS' => 'Erfolgreich kopiert.',
|
||||
'PORTAL_MODULE_ERROR' => 'Datei exisitert schon oder konnte nicht kopiert werden.',
|
||||
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Füge Basismodule hinzu',
|
||||
@@ -137,4 +148,3 @@ $lang = array_merge($lang, array(
|
||||
'acl_u_view_portal' => array('lang' => 'Kann das Portal sehen', 'cat' => 'misc'),
|
||||
|
||||
));
|
||||
?>
|
||||
@@ -38,4 +38,3 @@ $lang = array_merge($lang, array(
|
||||
'VIEWING_PORTAL' => 'Betrachtet das Portal',
|
||||
'BACK' => 'Zurück',
|
||||
));
|
||||
?>
|
||||
@@ -72,5 +72,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -52,5 +52,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen aussschließ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.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_BIRTHDAYS_AHEAD' => 'Anstehende Geburtstage',
|
||||
'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'Zeitraum für die Geburtstagsvorschau (Tage).<br />"0" deaktiviert die Anzeige der bevorstehenden Geburtstage.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -116,22 +116,20 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_END_INCORRECT' => 'Die eingegebene End-Zeit ist nicht korrekt. Bitte folge genau den Anweisungen.',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_PAST' => 'Die Start-zeit der Veranstaltung muss in der Zukunft liegen.',
|
||||
'ACP_PORTAL_EVENT_START_DAY' => 'Start-Datum der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung beginnt. Das Datum muss in folgendem Format sein: JJJJ-MM-TT',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung beginnt. Das Datum muss in folgendem Format sein: TT-MM-JJJJ',
|
||||
'ACP_PORTAL_EVENT_START_TIME' => 'Start-Zeit der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_START_TIME_EXP' => 'Gebe die Zeit ein, zu der die Veranstaltung beginnt. Die Zeit muss im 24 Stunden Format sein, z.B. 23:12',
|
||||
'ACP_PORTAL_EVENT_END_DAY' => 'End-Datum der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung endet. Das Datum muss in folgendem Format sein: JJJJ-MM-TT',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Gebe das Datum ein, an dem die Veranstaltung endet. Das Datum muss in folgendem Format sein: TT-MM-JJJJ',
|
||||
'ACP_PORTAL_EVENT_END_TIME' => 'End-Zeit der Veranstaltung',
|
||||
'ACP_PORTAL_EVENT_END_TIME_EXP' => 'Gebe die Zeit ein, zu der die Veranstaltung endet. Die Zeit muss im 24 Stunden Forrmat sein, z.B. 23:12',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_START_FIRST' => 'Das Ende der Veranstaltung muss nach dem Beginn der Veranstaltung liegen.',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION' => 'Berechtigungen für die Veranstaltung',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION_EXP' => 'Wähle die Gruppen aus, denen es erlaubt sein soll die Veranstaltung zu sehen. Falls alle Benutzer die Veranstaltung sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab, indem du beim Klicken die <samp>Strg</samp>-Taste drückst.',
|
||||
|
||||
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Öffne externe Veranstaltungsverknüpfungen in einem neuen Fenster',
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Veranstaltung aktualisiert</strong><br />» %s',
|
||||
'LOG_PORTAL_EVENT_ADDED' => '<strong>Veranstaltung hinzugefügt</strong><br />» %s',
|
||||
'LOG_PORTAL_EVENT_REMOVED' => '<strong>Veranstaltung entfernt</strong><br />» %s',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CLOCK_SRC' => 'Uhr',
|
||||
'ACP_PORTAL_CLOCK_SRC_EXP' => 'Gebe den Dateinamen der Uhr ein. Die Uhr muss unter folgendem Pfad gespeichert sein: styles/*yourstyle*/theme/images/portal/.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -46,5 +46,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CUSTOM_BBCODE' => 'BBCode für den eigenen Block aktivieren',
|
||||
'ACP_PORTAL_CUSTOM_BBCODE_EXP' => 'BBCode kann dann in diesem Block benutzt werden. Ansonsten wird HTML direkt geparst.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -66,5 +66,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_PAY_ACC' => 'Paypal Account',
|
||||
'PORTAL_PAY_ACC_EXP' => 'Gib deine e-mail-Adresse an, die du bei Paypal benutzt, z.B. xxx@xxx.com',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -34,5 +34,3 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_FORUMLIST' => 'Forumliste',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -45,5 +45,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MAX_ONLINE_FRIENDS' => 'Limitierung der Anzeige Freunde online',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS_EXP' => 'Limitiert die Anzeige Freunde online auf den angegebenen Wert.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -32,8 +32,10 @@ if (empty($lang) || !is_array($lang))
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_BOTS' => 'Lezte Bots',
|
||||
'LAST_VISITED_BOTS' => 'Die letzten %s Bots',
|
||||
'LATEST_BOTS' => 'Letzte Bots',
|
||||
'LAST_VISITED_BOTS' => 'Die letzten Bots',
|
||||
'LAST_VISITED_BOTS_CNT' => 'Die letzten %s Bots',
|
||||
'LAST_VISITED_BOT' => 'Der letzte Bot',
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Einstellungen für Bot-Besuche',
|
||||
@@ -41,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER' => 'Anzahl der anzuzeigenden Bots',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER_EXP' => '0 bedeutet unbegrenzt',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MAX_LAST_MEMBER' => 'Anzahl der anzuzeigenden Mitglieder',
|
||||
'PORTAL_MAX_LAST_MEMBER_EXP' => '0 bedeutet unbegrenzt',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_LEADERS_EXT' => 'Erweiterter Team-Block',
|
||||
'PORTAL_LEADERS_EXT_EXP' => 'Der standard Block listet alle Admins und Moderatoren auf, der erweiterte Team-Block listet zusätzlich alle nicht-versteckten Gruppen inklusive Legende auf.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -35,5 +35,3 @@ $lang = array_merge($lang, array(
|
||||
'LINK_US' => 'Link zu uns ',
|
||||
'LINK_US_TXT' => 'Benutze bitte diesen Link um <strong>%s</strong> bei dir zu verlinken:',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -48,6 +48,5 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_LINK_URL_EXP' => 'Externe Links:<br />Alle Links sollten mit einem http:// eingegeben werden.<br /><br />Interne Links:<br />Gebe nur die PHP Datei als Link URL ein, z.B. index.php?style=4.',
|
||||
'ACP_PORTAL_LINK_PERMISSION' => 'Link Berechtigungen',
|
||||
'ACP_PORTAL_LINK_PERMISSION_EXP'=> 'Wähle die Gruppen aus die berechtigt sein sollen den Link zu sehen. Falls alle Benutzer den Link sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab indem du <samp>STRG</samp> gedrückt hältst und klickst.',
|
||||
'ACP_PORTAL_LINKS_NEW_WINDOW' => 'Öffne externe Verknüpfungen in einem neuen Fenster',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -61,6 +61,5 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_MENU_URL_EXP' => 'Externe Links:<br />Alle Links sollten mit einem http:// eingegeben werden.<br /><br />Interne Links:<br />Gebe nur die PHP Datei als Link URL ein, z.B. index.php?style=4.',
|
||||
'ACP_PORTAL_MENU_PERMISSION' => 'Link Berechtigungen',
|
||||
'ACP_PORTAL_MENU_PERMISSION_EXP'=> 'Wähle die Gruppen aus die berechtigt sein sollen den Link zu sehen. Falls alle Benutzer den Link sehen sollen, dann wähle nichts aus.<br />Wähle mehrere Gruppen aus/ab indem du <samp>STRG</samp> gedrückt hältst und klickst.',
|
||||
'ACP_PORTAL_MENU_EXT_NEW_WINDOW'=> 'Öffne externe Verknüpfungen in einem neuen Fenster',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -68,5 +68,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.<br />Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -51,5 +51,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_POLL_ALLOW_VOTE_EXP' => 'Verfügt der Benutzer über entsprechende Berechtigungen, kann er direkt auf der Portal-Seite abstimmen.',
|
||||
'PORTAL_POLL_HIDE' => 'Abgelaufene Umfragen verbergen?',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -39,5 +39,3 @@ $lang = array_merge($lang, array(
|
||||
'RND_FROM' => 'Wohnort',
|
||||
'RND_WWW' => 'Webseite',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -49,5 +49,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_EXCLUDE_FORUM' => 'Foren aussschließ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.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SEARCH_ENGINE' => 'Suchmaschinen',
|
||||
'PORTAL_SEARCH_ADV' => 'erweiterte Suche',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -49,5 +49,3 @@ $lang = array_merge($lang, array(
|
||||
'POSTS_PER_TOPIC_OTHER' => 'Beiträge pro Thema: <strong>%d</strong>',
|
||||
'POSTS_PER_TOPIC_ZERO' => 'Beiträge pro Thema: <strong>0</strong>',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -35,5 +35,3 @@ $lang = array_merge($lang, array(
|
||||
'BOARD_STYLE' => 'Mein Board-Style',
|
||||
'STYLE_CHOOSE' => 'Wähle einen Style',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -36,5 +36,3 @@ $lang = array_merge($lang, array(
|
||||
'TOPPOSTERS_CONFIG' => 'Einstellungen zu Top Poster',
|
||||
'NUM_TOPPOSTERS' => 'Anzahl der Top Poster',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'USER_MENU_SETTINGS' => 'Benutzer-Menü Einstellungen',
|
||||
'USER_MENU_REGISTER' => 'Zeige Registrierungs-Link in Benutzer-Menü',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -41,5 +41,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_WELCOME_MESSAGE' => 'Willkommens-Nachricht',
|
||||
'ACP_PORTAL_WELCOME_MESSAGE_EXP' => 'Du kannst die Willkommens-Nachricht in der Textbox verändern. BBCode, Bilder und Links sind erlaubt.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -34,5 +34,3 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_WHOIS_ONLINE' => 'Wer ist online?',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -60,7 +60,7 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_NAME' => 'Module name',
|
||||
'MODULE_NAME_EXP' => 'Enter the name of the Module that should be displayed in the Module configuration.',
|
||||
'MODULE_IMAGE' => 'Module image',
|
||||
'MODULE_IMAGE_EXP' => 'Enter the filename of the module image. Images need to be in styles/*yourstyle*/theme/images/portal/',
|
||||
'MODULE_IMAGE_EXP' => 'Enter the filename of the module image. Images need to be in all styles/*yourstyle*/theme/images/portal/ folders',
|
||||
'MODULE_PERMISSIONS' => 'Module permissions',
|
||||
'MODULE_PERMISSIONS_EXP' => 'Select the groups that should be authorized to view the module. If you want all users to be able to view the module, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'MODULE_IMAGE_WIDTH' => 'Module image width',
|
||||
@@ -69,6 +69,8 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_IMAGE_HEIGHT_EXP' => 'Enter the height of the module image in pixels',
|
||||
'MODULE_RESET' => 'Reset module configuration',
|
||||
'MODULE_RESET_EXP' => 'This will reset all settings to the default!',
|
||||
'MODULE_STATUS' => 'Enable module',
|
||||
'MODULE_ADD_ONCE' => 'This module can only be added once.',
|
||||
|
||||
// general
|
||||
'ACP_PORTAL' => 'Portal',
|
||||
@@ -101,12 +103,21 @@ $lang = array_merge($lang, array(
|
||||
'LOG_PORTAL_EVENT_UPDATED' => '<strong>Altered Portal settings</strong><br />» Event updated: %s ',
|
||||
|
||||
// Upload Module
|
||||
'ACP_PORTAL_UPLOAD' => 'Upload module',
|
||||
'MODULE_UPLOAD' => 'Upload a module',
|
||||
'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload:',
|
||||
'MODULE_UPLOAD_GO' => 'Upload',
|
||||
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
|
||||
'NO_AUTOMOD_INSTALLED' => 'You don’t have AutoMOD installed, but AutoMOD is required for this module.',
|
||||
'ACP_PORTAL_UPLOAD' => 'Upload module',
|
||||
'MODULE_UPLOAD' => 'Upload a module',
|
||||
'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload:',
|
||||
'MODULE_UPLOAD_GO' => 'Upload',
|
||||
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
|
||||
'MODULE_UPLOADED' => 'Module uploaded successfully.',
|
||||
'MODULE_UPLOAD_MKDIR_FAILURE' => 'Unable to create a folder.',
|
||||
'MODULE_COPY_FAILURE' => 'Unable to copy the following file: %1$s',
|
||||
'MODULE_CORRUPTED' => 'The module you are trying to upload seems to be corrupted.',
|
||||
'PORTAL_NEW_FILES' => 'New files',
|
||||
'PORTAL_MODULE_SOURCE' => 'Source',
|
||||
'PORTAL_MODULE_TARGET' => 'Target',
|
||||
'PORTAL_MODULE_STATUS' => 'Status',
|
||||
'PORTAL_MODULE_SUCCESS' => 'Success',
|
||||
'PORTAL_MODULE_ERROR' => 'Error',
|
||||
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Adding basic set of modules',
|
||||
@@ -119,18 +130,17 @@ $lang = array_merge($lang, array(
|
||||
/**
|
||||
* A copy of Handyman` s MOD version check, to view it on the portal overview
|
||||
*/
|
||||
'ANNOUNCEMENT_TOPIC' => 'Release Ankündigung',
|
||||
'CURRENT_VERSION' => 'Derzeitige Version',
|
||||
'DOWNLOAD_LATEST' => 'Neueste Version herunterladen',
|
||||
'LATEST_VERSION' => 'Neueste Version',
|
||||
'NO_INFO' => 'Der Server konnte nicht erreicht werden',
|
||||
'NOT_UP_TO_DATE' => '%s ist nicht aktuell',
|
||||
'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema',
|
||||
'UP_TO_DATE' => '%s ist aktuell',
|
||||
'ANNOUNCEMENT_TOPIC' => 'Release Announcement',
|
||||
'CURRENT_VERSION' => 'Current Version',
|
||||
'DOWNLOAD_LATEST' => 'Download Latest Version',
|
||||
'LATEST_VERSION' => 'Latest Version',
|
||||
'NO_INFO' => 'Version server could not be contacted',
|
||||
'NOT_UP_TO_DATE' => '%s is not up to date',
|
||||
'RELEASE_ANNOUNCEMENT' => 'Annoucement Topic',
|
||||
'UP_TO_DATE' => '%s is up to date',
|
||||
'VERSION_CHECK' => 'MOD Version Check',
|
||||
|
||||
// Adding the permissions
|
||||
'acl_a_manage_portal' => array('lang' => 'Can alter Portal settings', 'cat' => 'misc'),
|
||||
'acl_u_view_portal' => array('lang' => 'Can view the Portal', 'cat' => 'misc'),
|
||||
));
|
||||
?>
|
||||
@@ -38,4 +38,3 @@ $lang = array_merge($lang, array(
|
||||
'VIEWING_PORTAL' => 'Portal page',
|
||||
'BACK' => 'Back',
|
||||
));
|
||||
?>
|
||||
@@ -72,5 +72,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SHOW_REPLIES_VIEWS' => 'Display the number of replies and views',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'This setting pertains to the compact block.<br />When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -53,5 +53,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_ATTACHMENTS_EXCLUDE' => 'Exclude filetypes',
|
||||
'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Select "Yes" if you want to exlude the selected filetypes from the attachments block, and "No" if you want to see only the selected filetypes in the attachments block.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_BIRTHDAYS_AHEAD' => 'Birthdays ahead days',
|
||||
'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'How many days to look ahead for future birthdays.<br />"0" will disable the ahead birthdays list.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -116,16 +116,17 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CALENDAR_END_INCORRECT' => 'The end time you entered was incorrect. Please follow the instructions carefully.',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_PAST' => 'The event start time needs to be in the future.',
|
||||
'ACP_PORTAL_EVENT_START_DAY' => 'Event start date',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: YYYY-MM-DD',
|
||||
'ACP_PORTAL_EVENT_START_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: DD-MM-YYYY',
|
||||
'ACP_PORTAL_EVENT_START_TIME' => 'Event start time',
|
||||
'ACP_PORTAL_EVENT_START_TIME_EXP' => 'Enter the time when the event starts. The time has to be in a 24 hour format, i.e. 23:12',
|
||||
'ACP_PORTAL_EVENT_END_DAY' => 'Event end date',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Enter the date when the event starts. The date has to be in this format: YYYY-MM-DD',
|
||||
'ACP_PORTAL_EVENT_END_DAY_EXP' => 'Enter the date when the event ends. The date has to be in this format: DD-MM-YYYY',
|
||||
'ACP_PORTAL_EVENT_END_TIME' => 'Event end time',
|
||||
'ACP_PORTAL_EVENT_END_TIME_EXP' => 'Enter the time when the event starts. The time has to be in a 24 hour format, i.e. 23:12',
|
||||
'ACP_PORTAL_EVENT_END_TIME_EXP' => 'Enter the time when the event ends. The time has to be in a 24 hour format, i.e. 23:12',
|
||||
'ACP_PORTAL_CALENDAR_EVENT_START_FIRST' => 'The end of the event has to be after the start of the event.',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION' => 'Event permissions',
|
||||
'ACP_PORTAL_CALENDAR_PERMISSION_EXP' => 'Select the groups that should be authorized to view the event. If you want all users to be able to view the event, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'PORTAL_EVENTS_URL_NEW_WINDOW' => 'Open external event links in a new window',
|
||||
|
||||
|
||||
// Logs
|
||||
@@ -133,5 +134,3 @@ $lang = array_merge($lang, array(
|
||||
'LOG_PORTAL_EVENT_ADDED' => '<strong>Added Event</strong><br />» %s',
|
||||
'LOG_PORTAL_EVENT_REMOVED' => '<strong>Removed Event</strong><br />» %s',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CLOCK_SRC' => 'Clock',
|
||||
'ACP_PORTAL_CLOCK_SRC_EXP' => 'Enter the filename of your clock. The clock needs to be located in styles/*yourstyle*/theme/images/portal/.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -46,5 +46,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_CUSTOM_BBCODE' => 'Activate BBCode for the custom block',
|
||||
'ACP_PORTAL_CUSTOM_BBCODE_EXP' => 'BBCode could be used in this box. If BBCode is not activated, HTML will be parsed.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -66,5 +66,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_PAY_ACC' => 'Paypal account to use',
|
||||
'PORTAL_PAY_ACC_EXPLAIN' => 'Enter your Paypal e-mail address eg. xxx@xxx.com',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -34,5 +34,3 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_FORUMLIST' => 'Forumlist',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -45,5 +45,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MAX_ONLINE_FRIENDS' => 'Limit of displayed friends',
|
||||
'PORTAL_MAX_ONLINE_FRIENDS_EXP' => 'The maximum number of friends displayed.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -33,7 +33,9 @@ if (empty($lang) || !is_array($lang))
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
$lang = array_merge($lang, array(
|
||||
'LATEST_BOTS' => 'Latest Bots',
|
||||
'LAST_VISITED_BOTS' => 'Last %s visited bots',
|
||||
'LAST_VISITED_BOTS' => 'Last visited bots',
|
||||
'LAST_VISITED_BOTS_CNT' => 'Last %s visited bots',
|
||||
'LAST_VISITED_BOT' => 'Last visited bot',
|
||||
|
||||
// ACP
|
||||
'ACP_PORTAL_BOTS_SETTINGS' => 'Visiting bots settings',
|
||||
@@ -41,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER' => 'How many bots to display',
|
||||
'PORTAL_LAST_VISITED_BOTS_NUMBER_EXP' => '0 means infinite',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_MAX_LAST_MEMBER' => 'Maximum number of newest members shown',
|
||||
'PORTAL_MAX_LAST_MEMBER_EXP' => '0 means infinite',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_LEADERS_EXT' => 'Extended Leaders / Team',
|
||||
'PORTAL_LEADERS_EXT_EXP' => 'The standard block lists all admins/mods, while the extended block includes all non-hidden groups with a legend.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -35,5 +35,3 @@ $lang = array_merge($lang, array(
|
||||
'LINK_US' => 'Link to us',
|
||||
'LINK_US_TXT' => 'Please feel free to link to <strong>%s</strong>. Use the following HTML:',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -48,6 +48,5 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_LINK_URL_EXP' => 'External links:<br />All links should be entered with a http://<br /><br />Internal links:<br />Only enter the php file as link url, i.e. index.php?style=4.',
|
||||
'ACP_PORTAL_LINK_PERMISSION' => 'Link permissions',
|
||||
'ACP_PORTAL_LINK_PERMISSION_EXP'=> 'Select the groups that should be authorized to view the link. If you want all users to be able to view the link, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'ACP_PORTAL_LINKS_NEW_WINDOW' => 'Open external links in a new window',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -61,6 +61,5 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_MENU_URL_EXP' => 'External links:<br />All links should be entered with a http://<br /><br />Internal links:<br />Only enter the php file as link url, i.e. index.php?style=4.',
|
||||
'ACP_PORTAL_MENU_PERMISSION' => 'Link permissions',
|
||||
'ACP_PORTAL_MENU_PERMISSION_EXP'=> 'Select the groups that should be authorized to view the link. If you want all users to be able to view the link, don’t select anything.<br />Select/Deselect multiple groups by holding <samp>CTRL</samp> and clicking.',
|
||||
'ACP_PORTAL_MENU_EXT_NEW_WINDOW'=> 'Open external links in a new window',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -69,5 +69,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SHOW_REPLIES_VIEWS' => 'Display the number of replies and views',
|
||||
'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'This setting pertains to the compact block.<br />When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -53,5 +53,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_POLL_ALLOW_VOTE_EXP' => 'Allow users with the required permissions to vote from the portal page.',
|
||||
'PORTAL_POLL_HIDE' => 'Hide expired polls?',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -39,5 +39,3 @@ $lang = array_merge($lang, array(
|
||||
'RND_FROM' => 'Location',
|
||||
'RND_WWW' => 'Web page',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -49,5 +49,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_EXCLUDE_FORUM' => 'Exclude Forums',
|
||||
'PORTAL_EXCLUDE_FORUM_EXP' => 'Select "Yes" if you want to exlude the selected forums from the recent topics block, and "No" if you want to see only the selected forums in the recent topics block.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -40,5 +40,3 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SEARCH_ENGINE' => 'Search engines',
|
||||
'PORTAL_SEARCH_ADV' => 'Advanced search',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -49,5 +49,3 @@ $lang = array_merge($lang, array(
|
||||
'POSTS_PER_TOPIC_OTHER' => 'Posts per topic: <strong>%d</strong>',
|
||||
'POSTS_PER_TOPIC_ZERO' => 'Posts per topic: <strong>0</strong>',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -35,5 +35,3 @@ $lang = array_merge($lang, array(
|
||||
'BOARD_STYLE' => 'Board style',
|
||||
'STYLE_CHOOSE' => 'Select a style',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -39,5 +39,3 @@ $lang = array_merge($lang, array(
|
||||
'NUM_TOPPOSTERS' => 'Number of Top Posters',
|
||||
'NUM_TOPPOSTERS_EXP' => 'Enter how many users should be displayed in the top posters block.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ $lang = array_merge($lang, array(
|
||||
'USER_MENU_SETTINGS' => 'User menu settings',
|
||||
'USER_MENU_REGISTER' => 'Show registration link in user menu',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -41,5 +41,3 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_WELCOME_MESSAGE' => 'Welcome Message',
|
||||
'ACP_PORTAL_WELCOME_MESSAGE_EXP' => 'You can change the welcome message in the textbox. BBCode, Images and URLs are allowed.',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -34,5 +34,3 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'PORTAL_WHOIS_ONLINE' => 'Who is online?',
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -61,6 +61,11 @@ $module_count = array(
|
||||
*/
|
||||
foreach ($portal_modules as $row)
|
||||
{
|
||||
if($row['module_status'] == B3_MODULE_DISABLED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$class_name = 'portal_' . $row['module_classname'] . '_module';
|
||||
if (!class_exists($class_name))
|
||||
{
|
||||
@@ -176,5 +181,3 @@ $template->set_filenames(array(
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
||||
|
||||
page_footer();
|
||||
|
||||
?>
|
||||
@@ -15,13 +15,10 @@ if (!defined('IN_PHPBB'))
|
||||
global $table_prefix;
|
||||
|
||||
// Config constants
|
||||
define('B3_LINKS_CAT', 0);
|
||||
define('B3_LINKS_INT', 1);
|
||||
define('B3_LINKS_EXT', 2);
|
||||
define('B3_MODULE_DISABLED', 0);
|
||||
define('B3_MODULE_ENABLED', 1);
|
||||
|
||||
// Tables and paths
|
||||
define('PORTAL_ROOT_PATH', 'portal/');
|
||||
define('PORTAL_MODULES_TABLE', $table_prefix . 'portal_modules');
|
||||
define('PORTAL_CONFIG_TABLE', $table_prefix . 'portal_config');
|
||||
|
||||
?>
|
||||
@@ -390,151 +390,30 @@ function character_limit(&$title, $limit = 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Don't let them mess up the complete portal layout in cut messages and do some real AP magic
|
||||
function is_valid_bbtag($str, $bbuid)
|
||||
/**
|
||||
* Cut post text to given length
|
||||
*
|
||||
* @param $message string post text
|
||||
* @param $bbcode_uid string bbcode uid
|
||||
* @param $length int The desired length
|
||||
*/
|
||||
function get_sub_taged_string($message, $bbcode_uid, $length)
|
||||
{
|
||||
return (substr($str,0,1) == '[') && (strpos($str, ':'.$bbuid.']') > 0);
|
||||
}
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
function get_end_bbtag($tag, $bbuid)
|
||||
{
|
||||
$etag = '';
|
||||
for ($i=0;$i<strlen($tag);++$i)
|
||||
if(!class_exists('phpbb_trim_message'))
|
||||
{
|
||||
if ($tag[$i] == '[')
|
||||
{
|
||||
$etag .= $tag[$i] . '/';
|
||||
}
|
||||
else if (($tag[$i] == '=') || ($tag[$i] == ':'))
|
||||
{
|
||||
if ($tag[1] == '*')
|
||||
{
|
||||
$etag .= ':m:'.$bbuid.']';
|
||||
}
|
||||
else if (substr($tag, 0, 6) == '[list=')
|
||||
{
|
||||
$etag .= ':o:'.$bbuid.']';
|
||||
}
|
||||
else if (substr($tag, 0, 5) == '[list')
|
||||
{
|
||||
$etag .= ':u:'.$bbuid.']';
|
||||
}
|
||||
else
|
||||
{
|
||||
$etag .= ':'.$bbuid.']';
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$etag .= $tag[$i];
|
||||
}
|
||||
include(PORTAL_ROOT_PATH . 'includes/trim_message/trim_message.' . $phpEx);
|
||||
}
|
||||
return $etag;
|
||||
}
|
||||
|
||||
function get_next_word($str)
|
||||
{
|
||||
$ret = '';
|
||||
for ($i=0;$i<strlen($str);++$i)
|
||||
|
||||
if(!class_exists('phpbb_trim_message_bbcodes'))
|
||||
{
|
||||
switch ($str[$i])
|
||||
{
|
||||
case ' ': //$ret .= ' '; break; break;
|
||||
return $ret . ' ';
|
||||
case '\\':
|
||||
if ($str[$i+1] == 'n') return $ret . '\n';
|
||||
case '[': if ($i != 0) return $ret;
|
||||
default: $ret .= $str[$i];
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function get_next_bbhtml_part($str)
|
||||
{
|
||||
$lim = substr($str,0,strpos($str,'>')+1);
|
||||
return substr($str,0,strpos($str, $lim, strlen($lim))+strlen($lim));
|
||||
}
|
||||
|
||||
function get_sub_taged_string($str, $bbuid, $maxlen)
|
||||
{
|
||||
$sl = $str;
|
||||
$ret = '';
|
||||
$ntext = '';
|
||||
$lret = '';
|
||||
$i = 0;
|
||||
$cnt = $maxlen;
|
||||
$last = '';
|
||||
$arr = array();
|
||||
|
||||
while ((strlen($ntext) < $cnt) && (strlen($sl) > 0))
|
||||
{
|
||||
$sr = '';
|
||||
if (substr($sl, 0, 1) == '[')
|
||||
{
|
||||
$sr = substr($sl,0,strpos($sl,']')+1);
|
||||
}
|
||||
/* GESCHLOSSENE HTML-TAGS BEACHTEN */
|
||||
if (substr($sl, 0, 2) == '<!')
|
||||
{
|
||||
$sr = get_next_bbhtml_part($sl);
|
||||
$ret .= $sr;
|
||||
}
|
||||
else if (substr($sl, 0, 1) == '<')
|
||||
{
|
||||
$sr = substr($sl,0,strpos($sl,'>')+1);
|
||||
$ret .= $sr;
|
||||
}
|
||||
else if (is_valid_bbtag($sr, $bbuid))
|
||||
{
|
||||
if ($sr[1] == '/')
|
||||
{
|
||||
/* entfernt das endtag aus dem tag array */
|
||||
$tarr = array();
|
||||
$j = 0;
|
||||
foreach ($arr as $elem)
|
||||
{
|
||||
if (strcmp($elem[1],$sr) != 0)
|
||||
{
|
||||
$tarr[++$j] = $elem;
|
||||
}
|
||||
}
|
||||
$arr = $tarr;
|
||||
}
|
||||
else
|
||||
{
|
||||
$arr[$i][0] = $sr;
|
||||
$arr[++$i][1] = get_end_bbtag($sr, $bbuid);
|
||||
}
|
||||
$ret .= $sr;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sr = get_next_word($sl);
|
||||
$ret .= $sr;
|
||||
$ntext .= $sr;
|
||||
$last = $sr;
|
||||
}
|
||||
$sl = substr($sl, strlen($sr), strlen($sl)-strlen($sr));
|
||||
include(PORTAL_ROOT_PATH . 'includes/trim_message/bbcodes.' . $phpEx);
|
||||
}
|
||||
|
||||
$ap = '';
|
||||
|
||||
foreach ($arr as $elem)
|
||||
{
|
||||
$ap = $elem[1] . $ap;
|
||||
}
|
||||
|
||||
$ret .= $ap;
|
||||
$ret = trim($ret);
|
||||
if (substr($ret, -4) == '<!--')
|
||||
{
|
||||
$ret .= ' -->';
|
||||
}
|
||||
$ret = add_endtag($ret);
|
||||
$ret = $ret . '...';
|
||||
return $ret;
|
||||
$object = new phpbb_trim_message($message, $bbcode_uid, $length);
|
||||
// Ready to get parsed:
|
||||
return $object->message();
|
||||
}
|
||||
|
||||
function ap_validate($str)
|
||||
@@ -693,22 +572,6 @@ function sql_table_exists($table_name)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* check for invalid link tag at the end of a cut string
|
||||
*/
|
||||
function add_endtag ($message = '')
|
||||
{
|
||||
$check = (int) strrpos($message, '<!-- m --><a '); // @todo: add strripos back if we move to PHP5 !!
|
||||
$check_2 = (int) strrpos($message, '</a><!--'); // @todo: add strripos back if we move to PHP5 !!
|
||||
|
||||
if (((isset($check) && $check > 0) && ($check_2 <= $check)) || ((isset($check) && $check > 0) && !isset($check_2)))
|
||||
{
|
||||
$message .= '</a><!-- m -->';
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* get topic tracking info for news
|
||||
* based on get_complete_tracking_info of phpBB3
|
||||
@@ -718,8 +581,6 @@ function get_portal_tracking_info($fetch_news)
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
$time1 = microtime();
|
||||
|
||||
$last_read = $topic_ids = $forum_ids = $tracking_info = array();
|
||||
|
||||
/**
|
||||
@@ -884,7 +745,6 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
'portal_birthday_list' => array(1, 3),
|
||||
'portal_clock' => array(1, 4),
|
||||
'portal_search' => array(1, 5),
|
||||
'portal_random_member' => array(1, 6),
|
||||
'portal_attachments' => array(1, 7),
|
||||
'portal_topposters' => array(1, 8),
|
||||
'portal_latest_members' => array(1, 9),
|
||||
@@ -936,6 +796,9 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
|
||||
$c_class->install($db->sql_nextid());
|
||||
}
|
||||
|
||||
// Make sure we get rid of old data
|
||||
$cache->destroy('portal_modules');
|
||||
|
||||
if ($mode == 'update')
|
||||
{
|
||||
@@ -1039,6 +902,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
set_config('board3_max_topics_' . $row['module_id'], $portal_config['portal_max_topics']);
|
||||
set_config('board3_recent_title_limit_' . $row['module_id'], $portal_config['portal_recent_title_limit']);
|
||||
set_config('board3_recent_forum_' . $row['module_id'], $portal_config['portal_recent_forum']);
|
||||
set_config('board3_recent_exclude_forums_' . $row['module_id'], $portal_config['portal_exclude_forums']);
|
||||
break;
|
||||
|
||||
case 'topposters':
|
||||
@@ -1053,6 +917,11 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
// Now that we are done, delete all data that seems useless to us
|
||||
$sql = 'DELETE FROM ' . PORTAL_CONFIG_TABLE . '
|
||||
WHERE config_name ' . $db->sql_like_expression(utf8_clean_string('portal_') . $db->any_char);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
return $user->lang['PORTAL_CONVERT_SUCCESS'];
|
||||
}
|
||||
@@ -1075,7 +944,7 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
'board3_phpbb_menu',
|
||||
'board3_display_jumpbox',
|
||||
);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE config_name ' . str_replace('\\', '', $db->sql_like_expression('board3_%')) . '
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE config_name ' . $db->sql_like_expression(utf8_clean_string('board3_') . $db->any_char) . '
|
||||
AND ' . $db->sql_in_set('config_name', $skip_entries, true);
|
||||
$db->sql_query($sql);
|
||||
|
||||
@@ -1112,8 +981,6 @@ function check_file_src($value, $key, $module_id)
|
||||
|
||||
if (!empty($error))
|
||||
{
|
||||
trigger_error($error . adm_back_link(append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)));
|
||||
trigger_error($error . adm_back_link(append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)), E_USER_WARNING );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -66,5 +66,3 @@ function column_string_const($column)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
348
root/portal/includes/functions_upload.php
Normal file
348
root/portal/includes/functions_upload.php
Normal file
@@ -0,0 +1,348 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal v2
|
||||
* @copyright (c) Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
class portal_upload
|
||||
{
|
||||
/*
|
||||
* pre-defined vars
|
||||
*/
|
||||
private $upload_path;
|
||||
private $u_action;
|
||||
|
||||
/*
|
||||
* constructor function
|
||||
*/
|
||||
public function __construct($path, $u_action)
|
||||
{
|
||||
// This shouldn't happen, but we check for it anyways
|
||||
if(is_dir($path))
|
||||
{
|
||||
$this->upload_path = $path;
|
||||
$this->u_action = $u_action;
|
||||
|
||||
$this->upload_file();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* upload module zip
|
||||
*/
|
||||
private function upload_file()
|
||||
{
|
||||
global $user, $phpbb_root_path, $phpEx, $phpbb_admin_path, $template;
|
||||
// Upload part
|
||||
$user->add_lang('posting'); // For error messages
|
||||
include($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
||||
$upload = new fileupload();
|
||||
// Only allow ZIP files
|
||||
$upload->set_allowed_extensions(array('zip'));
|
||||
|
||||
$file = $upload->form_upload('modupload');
|
||||
|
||||
if (empty($file->filename))
|
||||
{
|
||||
trigger_error($user->lang['NO_UPLOAD_FILE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$file->init_error && !sizeof($file->error))
|
||||
{
|
||||
$file->clean_filename('real');
|
||||
$file->move_file(str_replace($phpbb_root_path, '', $this->upload_path), true, true);
|
||||
|
||||
if (!sizeof($file->error))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
|
||||
$mod_dir = $this->upload_path . str_replace('.zip', '', $file->get('realname'));
|
||||
// make sure we don't already have the new folder
|
||||
if(is_dir($mod_dir))
|
||||
{
|
||||
$this->directory_delete($mod_dir);
|
||||
}
|
||||
|
||||
$compress = new compress_zip('r', $file->destination_file);
|
||||
$compress->extract($mod_dir . '_tmp/');
|
||||
$compress->close();
|
||||
$folder_contents = $this->cut_folder(scandir($mod_dir . '_tmp/', 1)); // This ensures dir is at index 0
|
||||
|
||||
// We need to check if there's a main directory inside the temp MOD directory
|
||||
if (sizeof($folder_contents) == 1)
|
||||
{
|
||||
// We need to move that directory then
|
||||
$this->directory_move($mod_dir . '_tmp/' . $folder_contents[0], $this->upload_path . $folder_contents[0]);
|
||||
$new_mod_dir = $this->upload_path . $folder_contents[0];
|
||||
|
||||
}
|
||||
else if (!is_dir($mod_dir))
|
||||
{
|
||||
// Change the name of the directory by moving to directory without _tmp in it
|
||||
$this->directory_move($mod_dir . '_tmp/', $mod_dir);
|
||||
$new_mod_dir = $mod_dir;
|
||||
}
|
||||
|
||||
$this->directory_delete($mod_dir . '_tmp/');
|
||||
|
||||
// make sure we set $mod_dir to the correct folder after the above step
|
||||
$mod_dir = (isset($new_mod_dir)) ? $new_mod_dir : $mod_dir;
|
||||
|
||||
// if we got until here set $actions['NEW_FILES']
|
||||
$actions['NEW_FILES'] = array();
|
||||
|
||||
// Now we need to get the files inside the folders
|
||||
//$folder_contents = $this->cut_folder(scandir($mod_dir));
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($mod_dir)); // requires PHP 5
|
||||
|
||||
foreach($iterator as $cur_file)
|
||||
{
|
||||
$cur_path = $cur_file->getPathname();
|
||||
$cur_path = str_replace('\\', '/', $cur_path); // we want unix-like paths
|
||||
$cur_path = str_replace($mod_dir . '/', '', $cur_path);
|
||||
$cut_pos = strpos($cur_path, '/');
|
||||
|
||||
// Only allow files in adm, language, portal and styles folder
|
||||
if(!in_array(substr($cur_path, 0, $cut_pos), array('adm', 'language', 'portal', 'styles')) && $cur_file->getFilename() != 'license.txt')
|
||||
{
|
||||
$file->remove();
|
||||
$this->directory_delete($mod_dir);
|
||||
trigger_error($user->lang['MODULE_CORRUPTED'] . adm_back_link(append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules')), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
$actions['NEW_FILES'][$mod_dir . '/' . $cur_path] = $phpbb_root_path . $cur_path;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($file->error))
|
||||
{
|
||||
// Let's start moving our files where they belong
|
||||
foreach ($actions['NEW_FILES'] as $source => $target)
|
||||
{
|
||||
$status = $this->copy_content($source, $target);
|
||||
|
||||
if ($status !== true && !is_null($status))
|
||||
{
|
||||
$module_installed = false;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('new_files', array(
|
||||
'S_SUCCESS' => ($status === true) ? true : false,
|
||||
'S_NO_COPY_ATTEMPT' => (is_null($status)) ? true : false,
|
||||
'SOURCE' => $source,
|
||||
'TARGET' => $target,
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_MOD_SUCCESSBOX' => true,
|
||||
'MESSAGE' => $user->lang['MODULE_UPLOADED'],
|
||||
'U_RETURN' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=modules'),
|
||||
'S_INSTALL' => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
$file->remove();
|
||||
$this->directory_delete($mod_dir);
|
||||
if ($file->init_error || sizeof($file->error))
|
||||
{
|
||||
trigger_error((sizeof($file->error) ? implode('<br />', $file->error) : $user->lang['MOD_UPLOAD_INIT_FAIL']) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'portal/acp_portal_upload_module';
|
||||
$this->page_title = $user->lang['ACP_PORTAL_UPLOAD'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['ACP_PORTAL_UPLOAD'],
|
||||
'L_TITLE_EXPLAIN' => '',
|
||||
|
||||
'S_ERROR' => false, // if we get here, there was no error or we can ignore it
|
||||
'ERROR_MSG' => '',
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cuts the unneeded '.' and '..' from the folder content info scandir returns
|
||||
*
|
||||
* @return: cut array
|
||||
*/
|
||||
private function cut_folder($folder_content)
|
||||
{
|
||||
$cut_array = array('.', '..');
|
||||
$folder_content = array_diff($folder_content, $cut_array);
|
||||
|
||||
return $folder_content;
|
||||
}
|
||||
|
||||
private function directory_move($src, $dest)
|
||||
{
|
||||
$src_contents = scandir($src);
|
||||
|
||||
if (!is_dir($dest) && is_dir($src))
|
||||
{
|
||||
mkdir($dest . '/', 0755);
|
||||
}
|
||||
|
||||
foreach ($src_contents as $src_entry)
|
||||
{
|
||||
if ($src_entry != '.' && $src_entry != '..')
|
||||
{
|
||||
if (is_dir($src . '/' . $src_entry) && !is_dir($dest . '/' . $src_entry))
|
||||
{
|
||||
$this->directory_move($src . '/' . $src_entry, $dest . '/' . $src_entry);
|
||||
}
|
||||
else if (is_file($src . '/' . $src_entry) && !is_file($dest . '/' . $src_entry))
|
||||
{
|
||||
copy($src . '/' . $src_entry, $dest . '/' . $src_entry);
|
||||
chmod($dest . '/' . $src_entry, 0644);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* the following functions are from the AutoMOD package
|
||||
* @copyright (c) 2008 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
||||
*/
|
||||
|
||||
private function directory_delete($dir)
|
||||
{
|
||||
if (!file_exists($dir))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!is_dir($dir) && is_file($dir))
|
||||
{
|
||||
phpbb_chmod($dir, CHMOD_ALL);
|
||||
return unlink($dir);
|
||||
}
|
||||
|
||||
foreach (scandir($dir) as $item)
|
||||
{
|
||||
if ($item == '.' || $item == '..')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!$this->directory_delete($dir . "/" . $item))
|
||||
{
|
||||
phpbb_chmod($dir . "/" . $item, CHMOD_ALL);
|
||||
if (!$this->directory_delete($dir . "/" . $item))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return @rmdir($dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves files or complete directories
|
||||
*
|
||||
* @param $from string Can be a file or a directory. Will move either the file or all files within the directory
|
||||
* @param $to string Where to move the file(s) to. If not specified then will get moved to the root folder
|
||||
* @param $strip Used for FTP only
|
||||
* @return mixed: Bool true on success, error string on failure, NULL if no action was taken
|
||||
*
|
||||
* NOTE: function should preferably not return in case of failure on only one file.
|
||||
* The current method makes error handling difficult
|
||||
*/
|
||||
private function copy_content($from, $to = '', $strip = '')
|
||||
{
|
||||
global $phpbb_root_path, $user, $config;
|
||||
|
||||
if (strpos($from, $phpbb_root_path) !== 0)
|
||||
{
|
||||
$from = $phpbb_root_path . $from;
|
||||
}
|
||||
|
||||
if (strpos($to, $phpbb_root_path) !== 0)
|
||||
{
|
||||
$to = $phpbb_root_path . $to;
|
||||
}
|
||||
|
||||
$dirname_check = dirname($to);
|
||||
|
||||
if (!is_dir($dirname_check))
|
||||
{
|
||||
if ($this->recursive_mkdir($dirname_check) === false)
|
||||
{
|
||||
return sprintf($user->lang['MODULE_UPLOAD_MKDIR_FAILURE'], $dirname_check);
|
||||
}
|
||||
}
|
||||
|
||||
// leave a backup file if it already exists
|
||||
if(file_exists($to))
|
||||
{
|
||||
// remove old backup file first
|
||||
if(file_exists($to . '.bak'))
|
||||
{
|
||||
phpbb_chmod($to . '.bak', CHMOD_ALL);
|
||||
unlink($to . '.bak');
|
||||
}
|
||||
rename($to, $to . '.bak');
|
||||
phpbb_chmod($to, CHMOD_ALL);
|
||||
}
|
||||
|
||||
if (!@copy($from, $to))
|
||||
{
|
||||
return sprintf($user->lang['MODULE_COPY_FAILURE'], $to);
|
||||
}
|
||||
@chmod($to, octdec(0644));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Michal Nazarewicz (from the php manual)
|
||||
* Creates all non-existant directories in a path
|
||||
* @param $path - path to create
|
||||
* @param $mode - CHMOD the new dir to these permissions
|
||||
* @return bool
|
||||
*/
|
||||
private function recursive_mkdir($path, $mode = false)
|
||||
{
|
||||
if (!$mode)
|
||||
{
|
||||
$mode = octdec(0777);
|
||||
}
|
||||
|
||||
$dirs = explode('/', $path);
|
||||
$count = sizeof($dirs);
|
||||
$path = '.';
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
{
|
||||
$path .= '/' . $dirs[$i];
|
||||
|
||||
if (!is_dir($path))
|
||||
{
|
||||
@mkdir($path, $mode);
|
||||
@chmod($path, $mode);
|
||||
|
||||
if (!is_dir($path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -186,5 +186,3 @@ function mvc_setup_array($xml)
|
||||
}
|
||||
return $ary;
|
||||
}
|
||||
|
||||
?>
|
||||
422
root/portal/includes/trim_message/bbcodes.php
Normal file
422
root/portal/includes/trim_message/bbcodes.php
Normal file
@@ -0,0 +1,422 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file contains a class, to manage the bbcodes of a given phpbb
|
||||
* message_parser message.
|
||||
*
|
||||
* @author Joas Schilling <nickvergessen at gmx dot de>
|
||||
* @package trim_message
|
||||
* @copyright 2011
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* phpbb_trim_message_bbcodes class
|
||||
*/
|
||||
class phpbb_trim_message_bbcodes
|
||||
{
|
||||
/**
|
||||
* Variables
|
||||
*/
|
||||
private $message = '';
|
||||
private $bbcode_uid = '';
|
||||
private $bbcode_list = array();
|
||||
private $array_size = 0;
|
||||
private $max_content_length = 0;
|
||||
private $cur_content_length = 0;
|
||||
private $cur_position = 0;
|
||||
public $trim_position = 0;
|
||||
public $is_trimmed = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message parsed message you want to trim
|
||||
* @param string $bbcode_uid bbcode_uid of the post
|
||||
*/
|
||||
public function __construct($message, $bbcode_uid, $content_length)
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->bbcode_uid = $bbcode_uid;
|
||||
$this->max_content_length = $content_length;
|
||||
$this->array_size = 0;
|
||||
}
|
||||
|
||||
public function get_bbcodes()
|
||||
{
|
||||
$bbcode_end_length = utf8_strlen(':' . $this->bbcode_uid . ']');
|
||||
$quote_end_length = utf8_strlen('":' . $this->bbcode_uid . ']');
|
||||
|
||||
$possible_bbcodes = explode('[', $this->message);
|
||||
$content_length = $this->get_content_length($possible_bbcodes[0]);
|
||||
if ($content_length >= $this->max_content_length)
|
||||
{
|
||||
$allowed_content_position = $this->get_content_position($possible_bbcodes[0], $this->max_content_length);
|
||||
$this->trim_position = $this->cur_position + $allowed_content_position;
|
||||
// As we did not touch any bbcodes yet, we can just skip all that.
|
||||
if (!$this->max_content_length || ($content_length > $this->max_content_length))
|
||||
{
|
||||
$this->is_trimmed = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
$this->cur_position += utf8_strlen($possible_bbcodes[0]) + 1;
|
||||
$this->cur_content_length += $content_length;
|
||||
|
||||
// Skip the first one.
|
||||
array_shift($possible_bbcodes);
|
||||
$num_possible_bbcodes = sizeof($possible_bbcodes);
|
||||
$num_tested_bbcodes = 0;
|
||||
$start_of_last_part = 0;
|
||||
|
||||
$allow_close_quote = false;
|
||||
|
||||
foreach ($possible_bbcodes as $part)
|
||||
{
|
||||
$num_tested_bbcodes++;
|
||||
$exploded_parts = explode(':' . $this->bbcode_uid . ']', $part);
|
||||
$num_parts = sizeof($exploded_parts);
|
||||
|
||||
/**
|
||||
* One element means we do not match an end before the next opening:
|
||||
* String: [quote="[bbcode:uid]foobar[/bbcode:uid]":uid]
|
||||
* Keys: ^^^^^^^ = 0
|
||||
*/
|
||||
if ($num_parts == 1)
|
||||
{
|
||||
// 1 means, we are in [quote="":uid] and found another bbcode here.
|
||||
if (utf8_strpos($exploded_parts[0], 'quote="') === 0)
|
||||
{
|
||||
$open_end_quote = utf8_strpos($this->message, '":' . $this->bbcode_uid . ']', $this->cur_position);
|
||||
if ($open_end_quote !== false)
|
||||
{
|
||||
$close_quote = utf8_strpos($this->message, '[/quote:' . $this->bbcode_uid . ']', $open_end_quote);
|
||||
if ($close_quote !== false)
|
||||
{
|
||||
$open_end_quote += $quote_end_length;
|
||||
$this->open_bbcode('quote', $this->cur_position);
|
||||
$this->bbcode_action('quote', 'open_end', $open_end_quote);
|
||||
$this->cur_position += utf8_strlen($exploded_parts[0]);
|
||||
|
||||
// We allow the 3-keys special-case, when we have found a beginning before...
|
||||
$allow_close_quote = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Two element is hte normal case:
|
||||
* String: [bbcode:uid]foobar
|
||||
* Keys: ^^^^^^ = 0 ^^^^^^ = 1
|
||||
* String: [/bbcode:uid]foobar
|
||||
* Keys: ^^^^^^^ = 0 ^^^^^^ = 1
|
||||
*/
|
||||
elseif ($num_parts == 2)
|
||||
{
|
||||
// We matched it something ;)
|
||||
if ($exploded_parts[0][0] != '/')
|
||||
{
|
||||
// Open BBCode-tag
|
||||
$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);
|
||||
|
||||
$this->open_bbcode($bbcode_tag, $this->cur_position);
|
||||
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
|
||||
$this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position);
|
||||
|
||||
if (!$allow_close_quote)
|
||||
{
|
||||
// If we allow a closing quote, we are in the username.
|
||||
// We do not count that as content-length.
|
||||
$content_length = $this->get_content_length($exploded_parts[1]);
|
||||
$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
|
||||
if (($content_length >= $max_content_allowed) && !$this->trim_position)
|
||||
{
|
||||
$allowed_content_position = $this->get_content_position($exploded_parts[1], $max_content_allowed);
|
||||
$this->trim_position = $this->cur_position + $allowed_content_position;
|
||||
}
|
||||
$this->cur_content_length += $content_length;
|
||||
}
|
||||
$this->cur_position += utf8_strlen($exploded_parts[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Close BBCode-tag
|
||||
$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);
|
||||
$bbcode_tag_extended = $this->filter_bbcode_tag($exploded_parts[0], false);
|
||||
if ($bbcode_tag_extended == $bbcode_tag)
|
||||
{
|
||||
$bbcode_tag_extended = '';
|
||||
}
|
||||
|
||||
$this->bbcode_action($bbcode_tag, 'close_start', $this->cur_position);
|
||||
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
|
||||
$this->bbcode_action($bbcode_tag, 'close_end', $this->cur_position, $bbcode_tag_extended);
|
||||
|
||||
if (!$allow_close_quote)
|
||||
{
|
||||
// If we allow a closing quote, we are in the username.
|
||||
// We do not count that as content-length.
|
||||
$content_length = $this->get_content_length($exploded_parts[1]);
|
||||
$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
|
||||
if (($content_length >= $max_content_allowed) && !$this->trim_position)
|
||||
{
|
||||
$allowed_content_position = $this->get_content_position($exploded_parts[1], $max_content_allowed);
|
||||
$this->trim_position = $this->cur_position + $allowed_content_position;
|
||||
}
|
||||
$this->cur_content_length += $content_length;
|
||||
}
|
||||
$this->cur_position += utf8_strlen($exploded_parts[1]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Three elements means we are closing the opening-quote and the BBCode from inside:
|
||||
* String: [quote="[bbcode:uid]foo[/bbcode:uid]bar":uid]quotehere
|
||||
* Keys: ^^^^^^^ = 0 ^^^^ = 1 ^^^^^^^^^ = 2
|
||||
*/
|
||||
elseif ($num_parts == 3)
|
||||
{
|
||||
if (($exploded_parts[0][0] == '/') && (utf8_substr($exploded_parts[1], -6) == '"') && $allow_close_quote)
|
||||
{
|
||||
$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);
|
||||
|
||||
$this->bbcode_action($bbcode_tag, 'close_start', $this->cur_position);
|
||||
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
|
||||
$this->bbcode_action($bbcode_tag, 'close_end', $this->cur_position);
|
||||
$this->cur_position += utf8_strlen($exploded_parts[1]) + $bbcode_end_length;
|
||||
|
||||
$content_length = $this->get_content_length($exploded_parts[2]);
|
||||
$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
|
||||
if (($content_length >= $max_content_allowed) && !$this->trim_position)
|
||||
{
|
||||
$allowed_content_position = $this->get_content_position($exploded_parts[2], $max_content_allowed);
|
||||
$this->trim_position = $this->cur_position + $allowed_content_position;
|
||||
}
|
||||
$this->cur_position += utf8_strlen($exploded_parts[2]);
|
||||
$this->cur_content_length += $content_length;
|
||||
|
||||
$allow_close_quote = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Increase by one for the [ we explode on.
|
||||
$this->cur_position++;
|
||||
}
|
||||
|
||||
if ($this->cur_content_length > $this->max_content_length)
|
||||
{
|
||||
$this->is_trimmed = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a bbcode to the bbcode-list
|
||||
*
|
||||
* @param string $tag BBCode-tag, Exp: code
|
||||
* @param int $open_start start-position of the bbcode-open-tag
|
||||
* (Exp: >[<code]) in the message
|
||||
*/
|
||||
private function open_bbcode($tag, $open_start)
|
||||
{
|
||||
$this->bbcode_list[] = array(
|
||||
'bbcode_tag' => $tag,
|
||||
'open_start' => $open_start,
|
||||
'open_end' => 0,
|
||||
'close_start' => 0,
|
||||
'close_end' => 0,
|
||||
);
|
||||
$this->array_size++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add position to a listed bbcode
|
||||
*
|
||||
* @param string $tag BBCode-tag, Exp: code
|
||||
* @param string $part part can be one of the following:
|
||||
* i) open_end => [code>]<[/code]
|
||||
* ii) close_open => [code]>[</code]
|
||||
* iii) close_end => [code][/code>]<
|
||||
* @param int $position start-position of the bbcode-open-tag
|
||||
* @param int $tag_extended with the list-bbcode we get some
|
||||
* information about the bbcode at the end
|
||||
* of it. So we need to readd that.
|
||||
*/
|
||||
private function bbcode_action($tag, $part, $position, $tag_extended = false)
|
||||
{
|
||||
for ($i = 1; $i <= $this->array_size; $i++)
|
||||
{
|
||||
if ($this->bbcode_list[$this->array_size - $i]['bbcode_tag'] == $tag)
|
||||
{
|
||||
if (!$this->bbcode_list[$this->array_size - $i][$part])
|
||||
{
|
||||
$this->bbcode_list[$this->array_size - $i][$part] = $position;
|
||||
if ($tag_extended)
|
||||
{
|
||||
$this->bbcode_list[$this->array_size - $i]['bbcode_tag'] = $tag_extended;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all BBcodes after a given position
|
||||
*/
|
||||
public function remove_bbcodes_after()
|
||||
{
|
||||
for ($i = 1; $i <= $this->array_size; $i++)
|
||||
{
|
||||
if ($this->bbcode_list[$this->array_size - $i]['open_start'] >= $this->trim_position)
|
||||
{
|
||||
unset($this->bbcode_list[$this->array_size - $i]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->array_size = sizeof($this->bbcode_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with BBCodes that need to be closed, after the position.
|
||||
*/
|
||||
public function get_open_bbcodes_after($position)
|
||||
{
|
||||
$bbcodes = array();
|
||||
for ($i = 1; $i <= $this->array_size; $i++)
|
||||
{
|
||||
if (($this->bbcode_list[$this->array_size - $i]['open_start'] < $position) &&
|
||||
($this->bbcode_list[$this->array_size - $i]['close_start'] >= $position))
|
||||
{
|
||||
$bbcodes[] = $this->bbcode_list[$this->array_size - $i]['bbcode_tag'];
|
||||
}
|
||||
}
|
||||
return $bbcodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the length of the content (substract code for smilie and url parsing)
|
||||
*
|
||||
* @param string $content Message to get the content length from
|
||||
* Exp: <markup>text<markup2>
|
||||
* Content: ^^^^
|
||||
*
|
||||
* @return int length of content without special markup
|
||||
*/
|
||||
static public function get_content_length($content)
|
||||
{
|
||||
$content_length = utf8_strlen($content);
|
||||
$last_html_opening = $last_html_closing = $last_smiley = false;
|
||||
while (($last_html_opening = utf8_strpos($content, '<', $last_html_closing)) !== false)
|
||||
{
|
||||
$last_html_closing = utf8_strpos($content, '>', $last_html_opening);
|
||||
if (($smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11))) != '--')
|
||||
{
|
||||
if ($last_smiley == $smiley_code)
|
||||
{
|
||||
$content_length += utf8_strlen($smiley_code);
|
||||
$last_smiley = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_smiley = $smiley_code;
|
||||
}
|
||||
}
|
||||
$content_length -= ($last_html_closing - $last_html_opening) + 1;
|
||||
}
|
||||
return $content_length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the position in the text, where we need to cut the message.
|
||||
*
|
||||
* Exp: sample<markup>text<markup2> AL = 8
|
||||
* Content: ^^^^^^^^^^^^^^^^ Text-Position = 16
|
||||
*
|
||||
* @param string $content Message to get the position in
|
||||
* @param int $allowed_length Content length we are allowed to add.
|
||||
*
|
||||
* @return int position in the markup-text where we cut the text
|
||||
*/
|
||||
static public function get_content_position($content, $allowed_length)
|
||||
{
|
||||
if (utf8_strpos(utf8_substr($content, 0, $allowed_length), '<') === false)
|
||||
{
|
||||
/**
|
||||
* If we did not find any HTML in our section, we can cut it.
|
||||
* Exp: sample<markup>text<markup2> AL = 3
|
||||
* Content: ^^^ Text-Position = 3
|
||||
*/
|
||||
return $allowed_length;
|
||||
}
|
||||
|
||||
$content_length = $allowed_length;
|
||||
$start_position = 0;
|
||||
$last_smiley = false;
|
||||
while (($last_html_opening = utf8_strpos(utf8_substr($content, 0, $content_length), '<', $start_position)) !== false)
|
||||
{
|
||||
// foreach markup we find in the string, we enlarge our text-size.
|
||||
$last_html_closing = utf8_strpos($content, '>', $last_html_opening);
|
||||
$content_length += ($last_html_closing - $last_html_opening) + 1;
|
||||
|
||||
$smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11));
|
||||
if (($smiley_code != '--') && (utf8_strpos($smiley_code, 'c="{SMILIES_PATH}/') === false))
|
||||
{
|
||||
if ($last_smiley == $smiley_code)
|
||||
{
|
||||
$content_length -= utf8_strlen($smiley_code);
|
||||
$last_smiley = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_smiley = $smiley_code;
|
||||
}
|
||||
}
|
||||
|
||||
$start_position = $last_html_opening + 1;
|
||||
}
|
||||
|
||||
return $content_length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter BBCode-Tags:
|
||||
*
|
||||
* Exp: [/*:m] <= automatically added end of [*]
|
||||
* Exp: [/list:x] <= end of [list] tag with list-style-element
|
||||
* Exp: [bbcode=param1;param2] <= start of bbcode-tag with parameters
|
||||
*
|
||||
* @return string plain bbcode-tag
|
||||
*/
|
||||
static public function filter_bbcode_tag($bbcode_tag, $strip_information = true)
|
||||
{
|
||||
if ($bbcode_tag[0] == '/')
|
||||
{
|
||||
$bbcode_tag = utf8_substr($bbcode_tag, 1);
|
||||
}
|
||||
|
||||
if ($strip_information && ($bbcode_tag == '*:m'))
|
||||
{
|
||||
return '*';
|
||||
}
|
||||
|
||||
if ($strip_information && (utf8_substr($bbcode_tag, 0, 5) == 'list:'))
|
||||
{
|
||||
return 'list';
|
||||
}
|
||||
|
||||
if ($strip_information && (($equals = utf8_strpos($bbcode_tag, '=')) !== false))
|
||||
{
|
||||
$bbcode_tag = utf8_substr($bbcode_tag, 0, $equals);
|
||||
}
|
||||
|
||||
return $bbcode_tag;
|
||||
}
|
||||
}
|
||||
190
root/portal/includes/trim_message/trim_message.php
Normal file
190
root/portal/includes/trim_message/trim_message.php
Normal file
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file contains a class, that is able to trim a message from the phpbb
|
||||
* message_parser to a maximum length without breaking the bbcodes/smilies and
|
||||
* links.
|
||||
*
|
||||
* @author Joas Schilling <nickvergessen at gmx dot de>
|
||||
* @package trim_message
|
||||
* @copyright 2011
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* phpbb_trim_message class
|
||||
*/
|
||||
class phpbb_trim_message
|
||||
{
|
||||
/**
|
||||
* Variables
|
||||
*/
|
||||
private $message = '';
|
||||
private $trimmed_message = '';
|
||||
private $bbcode_uid = '';
|
||||
private $append_str = '';
|
||||
private $length = 0;
|
||||
private $length_tolerance = 0;
|
||||
private $is_trimmed = null;
|
||||
private $bbcodes = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message parsed message you want to trim
|
||||
* @param string $bbcode_uid bbcode_uid of the post
|
||||
* @param int $length length the code should be trimmed to
|
||||
* @param string $append_str text that is appended after trimmed message
|
||||
* @param int $tolerance tolerance for the message: we don't trim it
|
||||
* if it is shorter than length + tolerance.
|
||||
*/
|
||||
public function __construct($message, $bbcode_uid, $length, $append_str = ' [...]', $tolerance = 25)
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->bbcode_uid = $bbcode_uid;
|
||||
$this->append_str = $append_str;
|
||||
$this->length = (int) $length;
|
||||
$this->length_tolerance = (int) $tolerance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Did we trim the message, or was it short enough?
|
||||
*/
|
||||
public function is_trimmed()
|
||||
{
|
||||
return (bool) $this->is_trimmed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message, trimmed or in full length
|
||||
*/
|
||||
public function message($force_full_length = false)
|
||||
{
|
||||
if (is_null($this->is_trimmed) && !$force_full_length)
|
||||
{
|
||||
$this->is_trimmed = $this->trim();
|
||||
}
|
||||
|
||||
return ($this->is_trimmed && !$force_full_length) ? $this->trimmed_message : $this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter some easy cases where we can return the result easily
|
||||
*
|
||||
* @return bool Returns whether the message was trimmed or not.
|
||||
*/
|
||||
private function trim()
|
||||
{
|
||||
if (utf8_strlen($this->message) <= ($this->length + $this->length_tolerance))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->bbcode_uid)
|
||||
{
|
||||
$this->trimmed_message = utf8_substr($this->message, 0, $this->length) . $this->append_str;
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->trim_action();
|
||||
return $this->bbcodes->is_trimmed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do some magic... uhhh
|
||||
*/
|
||||
private function trim_action()
|
||||
{
|
||||
/**
|
||||
* Prepare the difficult action
|
||||
*/
|
||||
$this->trimmed_message = $this->message;
|
||||
$this->bbcodes = new phpbb_trim_message_bbcodes($this->trimmed_message, $this->bbcode_uid, $this->length);
|
||||
|
||||
/**
|
||||
* Step 1: Get a list of all BBCodes
|
||||
*/
|
||||
$this->bbcodes->get_bbcodes();
|
||||
|
||||
/**
|
||||
* Step 2: Remove all bbcodes from the list, that are opened after
|
||||
* the trim-position
|
||||
*/
|
||||
$this->bbcodes->remove_bbcodes_after();
|
||||
|
||||
/**
|
||||
* Step 3: Trim message
|
||||
*/
|
||||
$this->trimmed_message = utf8_substr($this->message, 0, $this->bbcodes->trim_position);
|
||||
|
||||
/**
|
||||
* Step 4: i) Remove links/emails/smilies that are cut, somewhere
|
||||
* in the middle
|
||||
* ii) Renew trim-position if we did something
|
||||
* iii) Append the message that is provided
|
||||
*/
|
||||
$this->remove_broken_links();
|
||||
$text_length = utf8_strlen($this->trimmed_message);
|
||||
if ($this->bbcodes->is_trimmed)
|
||||
{
|
||||
$this->trimmed_message .= $this->append_str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 5: Close open BBCodes
|
||||
*/
|
||||
$open_bbcodes = $this->bbcodes->get_open_bbcodes_after($text_length);
|
||||
$this->close_bbcodes($open_bbcodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes broken smilies, emails and links without the URL-tag.
|
||||
*/
|
||||
private function remove_broken_links()
|
||||
{
|
||||
$open_brakets = substr_count($this->trimmed_message, '<');
|
||||
$closing_brakets = substr_count($this->trimmed_message, '>');
|
||||
if ($open_brakets != $closing_brakets)
|
||||
{
|
||||
/**
|
||||
* There was an open braket for an unparsed link
|
||||
* Example: <{cut}!-- l -->
|
||||
*/
|
||||
$this->trimmed_message = utf8_substr($this->trimmed_message, 0, utf8_strrpos($this->trimmed_message, '<'));
|
||||
}
|
||||
|
||||
$open_link = substr_count($this->trimmed_message, '<!-- ');
|
||||
if (($open_link % 2) == 1)
|
||||
{
|
||||
/**
|
||||
* We did not close all links we opened, so we cut off the message
|
||||
* before the last open tag ;)
|
||||
* Example: <!-- l -->{cut}<!-- l -->
|
||||
*/
|
||||
$this->trimmed_message = utf8_substr($this->trimmed_message, 0, utf8_strrpos($this->trimmed_message, '<!-- '));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all open bbcodes
|
||||
*
|
||||
* @param array $open_bbcodes Array of all open bbcodes
|
||||
*/
|
||||
private function close_bbcodes($open_bbcodes)
|
||||
{
|
||||
foreach ($open_bbcodes as $bbcode_tag)
|
||||
{
|
||||
$this->trimmed_message .= '[/' . $bbcode_tag . ':' . $this->bbcode_uid . ']';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,26 +28,26 @@ class portal_announcements_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 21;
|
||||
public $columns = 21;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'GLOBAL_ANNOUNCEMENTS';
|
||||
public $name = 'GLOBAL_ANNOUNCEMENTS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = '';
|
||||
public $image_src = '';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_announcements_module';
|
||||
public $language = 'portal_announcements_module';
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user, $auth, $cache, $phpEx, $phpbb_root_path;
|
||||
|
||||
@@ -352,7 +352,6 @@ class portal_announcements_module
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_DISPLAY_ANNOUNCEMENTS' => true,
|
||||
'S_DISPLAY_ANNOUNCEMENTS_RVS' => ($config['board3_show_announcements_replies_views_' . $module_id]) ? true : false,
|
||||
'S_TOPIC_ICONS' => $topic_icons,
|
||||
));
|
||||
@@ -367,7 +366,7 @@ class portal_announcements_module
|
||||
}
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_ANNOUNCE_SETTINGS',
|
||||
@@ -389,7 +388,7 @@ class portal_announcements_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_announcements_style_' . $module_id, 0);
|
||||
set_config('board3_number_of_announcements_' . $module_id, 1);
|
||||
@@ -404,7 +403,7 @@ class portal_announcements_module
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -425,7 +424,7 @@ class portal_announcements_module
|
||||
}
|
||||
|
||||
// Create forum select box
|
||||
function select_forums($value, $key, $module_id)
|
||||
public function select_forums($value, $key, $module_id)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
@@ -449,7 +448,7 @@ class portal_announcements_module
|
||||
}
|
||||
|
||||
// Store selected forums
|
||||
function store_selected_forums($key, $module_id)
|
||||
public function store_selected_forums($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
@@ -462,5 +461,3 @@ class portal_announcements_module
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_attachments_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 31;
|
||||
public $columns = 31;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'PORTAL_ATTACHMENTS';
|
||||
public $name = 'PORTAL_ATTACHMENTS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_attach.png';
|
||||
public $image_src = 'portal_attach.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_attachments_module';
|
||||
public $language = 'portal_attachments_module';
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user, $auth, $phpEx, $phpbb_root_path;
|
||||
|
||||
@@ -145,10 +145,10 @@ class portal_attachments_module
|
||||
$template->assign_var('S_DISPLAY_ATTACHMENTS', false);
|
||||
}
|
||||
|
||||
return 'attachments.html';
|
||||
return 'attachments_center.html';
|
||||
}
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user, $auth, $phpEx, $phpbb_root_path;
|
||||
|
||||
@@ -246,10 +246,10 @@ class portal_attachments_module
|
||||
$template->assign_var('S_DISPLAY_ATTACHMENTS', false);
|
||||
}
|
||||
|
||||
return 'attachments.html';
|
||||
return 'attachments_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_ATTACHMENTS_NUMBER_SETTINGS',
|
||||
@@ -268,7 +268,7 @@ class portal_attachments_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_attachments_number_' . $module_id, 8);
|
||||
set_config('board3_attach_max_length_' . $module_id, 15);
|
||||
@@ -279,7 +279,7 @@ class portal_attachments_module
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -297,7 +297,7 @@ class portal_attachments_module
|
||||
}
|
||||
|
||||
// Create select box for attachment filetype
|
||||
function select_filetype($value, $key, $module_id)
|
||||
public function select_filetype($value, $key, $module_id)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
|
||||
@@ -330,7 +330,7 @@ class portal_attachments_module
|
||||
}
|
||||
|
||||
// Store selected filetypes
|
||||
function store_filetypes($key, $module_id)
|
||||
public function store_filetypes($key, $module_id)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
@@ -344,7 +344,7 @@ class portal_attachments_module
|
||||
}
|
||||
|
||||
// Create forum select box
|
||||
function select_forums($value, $key)
|
||||
public function select_forums($value, $key)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
@@ -368,7 +368,7 @@ class portal_attachments_module
|
||||
}
|
||||
|
||||
// Store selected forums
|
||||
function store_selected_forums($key)
|
||||
public function store_selected_forums($key)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
@@ -381,5 +381,3 @@ class portal_attachments_module
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_birthday_list_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'BIRTHDAYS';
|
||||
public $name = 'BIRTHDAYS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_birthday.png';
|
||||
public $image_src = 'portal_birthday.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_birthday_list_module';
|
||||
public $language = 'portal_birthday_list_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user, $phpbb_root_path;
|
||||
|
||||
@@ -124,7 +124,7 @@ class portal_birthday_list_module
|
||||
return 'birthdays_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_BIRTHDAYS_SETTINGS',
|
||||
@@ -138,13 +138,13 @@ class portal_birthday_list_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_birthdays_ahead_' . $module_id, 30);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -156,5 +156,3 @@ class portal_birthday_list_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,37 @@ class portal_calendar_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'PORTAL_CALENDAR';
|
||||
public $name = 'PORTAL_CALENDAR';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_calendar.png';
|
||||
public $image_src = 'portal_calendar.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_calendar_module';
|
||||
public $language = 'portal_calendar_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = 'acp_portal_calendar';
|
||||
public $custom_acp_tpl = 'acp_portal_calendar';
|
||||
|
||||
/**
|
||||
* additional variables
|
||||
*/
|
||||
private $mini_cal_fdow;
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -62,18 +67,18 @@ class portal_calendar_module
|
||||
// 0 = Sunday first - 1 = Monday first. ;-)
|
||||
if ($config['board3_sunday_first_' . $module_id])
|
||||
{
|
||||
define('MINI_CAL_FDOW', 0);
|
||||
$this->mini_cal_fdow = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
define('MINI_CAL_FDOW', 1);
|
||||
$this->mini_cal_fdow = 1;
|
||||
}
|
||||
|
||||
// get the calendar month
|
||||
$mini_cal_month = 0;
|
||||
if(isset($_GET['m']) || isset($_POST['m']))
|
||||
if(isset($_GET['m' . $module_id]) || isset($_POST['m' . $module_id]))
|
||||
{
|
||||
$mini_cal_month = request_var('m', 0);
|
||||
$mini_cal_month = request_var('m' . $module_id, 0);
|
||||
}
|
||||
|
||||
// initialise some variables
|
||||
@@ -81,19 +86,43 @@ class portal_calendar_module
|
||||
$mini_cal_today = date('Ymd', time() + $user->timezone + $user->dst - date('Z'));
|
||||
$s_cal_month = ($mini_cal_month != 0) ? $mini_cal_month . ' month' : $mini_cal_today;
|
||||
$this->getMonth($s_cal_month);
|
||||
$mini_cal_count = MINI_CAL_FDOW;
|
||||
$mini_cal_count = $this->mini_cal_fdow;
|
||||
$mini_cal_this_year = $this->dateYYYY;
|
||||
$mini_cal_this_month = $this->dateMM;
|
||||
$mini_cal_this_day = $this->dateDD;
|
||||
$mini_cal_month_days = $this->daysMonth;
|
||||
|
||||
// output our general calendar bits
|
||||
$down = $mini_cal_month - 1;
|
||||
$up = $mini_cal_month + 1;
|
||||
$prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m$module_id=$down#minical$module_id") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_left_arrow.png' . '" title="' . $user->lang['VIEW_PREVIOUS_MONTH'] . '" height="16" width="16" alt="<<" /></a>';
|
||||
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m$module_id=$up#minical$module_id") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_right_arrow.png' . '" title="' . $user->lang['VIEW_NEXT_MONTH'] . '" height="16" width="16" alt=">>" /></a>';
|
||||
|
||||
$template->assign_block_vars('minical', array(
|
||||
'S_SUNDAY_FIRST' => ($config['board3_sunday_first_' . $module_id]) ? true : false,
|
||||
'L_MINI_CAL_MONTH' => (($config['board3_long_month_' . $module_id]) ? $user->lang['mini_cal']['long_month'][$this->day[0][1]] : $user->lang['mini_cal']['month'][$this->day[0][1]]) . " " . $this->day[0][2],
|
||||
'L_MINI_CAL_SUN' => '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $user->lang['mini_cal']['day'][1] . '</span>',
|
||||
'L_MINI_CAL_MON' => $user->lang['mini_cal']['day'][2],
|
||||
'L_MINI_CAL_TUE' => $user->lang['mini_cal']['day'][3],
|
||||
'L_MINI_CAL_WED' => $user->lang['mini_cal']['day'][4],
|
||||
'L_MINI_CAL_THU' => $user->lang['mini_cal']['day'][5],
|
||||
'L_MINI_CAL_FRI' => $user->lang['mini_cal']['day'][6],
|
||||
'L_MINI_CAL_SAT' => $user->lang['mini_cal']['day'][7],
|
||||
'U_PREV_MONTH' => $prev_month,
|
||||
'U_NEXT_MONTH' => $next_month,
|
||||
'S_DISPLAY_EVENTS' => ($config['board3_display_events_' . $module_id]) ? true : false,
|
||||
'MODULE_ID' => $module_id,
|
||||
));
|
||||
|
||||
// output the days for the current month
|
||||
for($i=0; $i < $mini_cal_month_days;)
|
||||
{
|
||||
// is this the first day of the week?
|
||||
if($mini_cal_count == MINI_CAL_FDOW)
|
||||
if($mini_cal_count == $this->mini_cal_fdow)
|
||||
{
|
||||
$template->assign_block_vars('mini_cal_row', array());
|
||||
$template->assign_block_vars('minical.mini_cal_row', array(
|
||||
'MODULE_ID' => $module_id,
|
||||
));
|
||||
}
|
||||
|
||||
// is this a valid weekday?
|
||||
@@ -104,7 +133,7 @@ class portal_calendar_module
|
||||
$d_mini_cal_today = $mini_cal_this_year . (($mini_cal_this_month <= 9) ? '0' . $mini_cal_this_month : $mini_cal_this_month) . (($mini_cal_this_day <= 9) ? '0' . $mini_cal_this_day : $mini_cal_this_day);
|
||||
$mini_cal_day = ($mini_cal_today == $d_mini_cal_today) ? '<span style="font-weight: bold; color: ' . $config['board3_calendar_today_color_' . $module_id] . ';">' . $mini_cal_this_day . '</span>' : $mini_cal_this_day;
|
||||
|
||||
$template->assign_block_vars('mini_cal_row.mini_cal_days', array(
|
||||
$template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
|
||||
'MINI_CAL_DAY' => ($mini_cal_count == 0) ? '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $mini_cal_day . '</span>' : $mini_cal_day)
|
||||
);
|
||||
$i++;
|
||||
@@ -112,7 +141,7 @@ class portal_calendar_module
|
||||
// no day
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars('mini_cal_row.mini_cal_days', array(
|
||||
$template->assign_block_vars('minical.mini_cal_row.mini_cal_days', array(
|
||||
'MINI_CAL_DAY' => ' ')
|
||||
);
|
||||
}
|
||||
@@ -130,34 +159,13 @@ class portal_calendar_module
|
||||
}
|
||||
}
|
||||
|
||||
// output our general calendar bits
|
||||
$down = $mini_cal_month - 1;
|
||||
$up = $mini_cal_month + 1;
|
||||
$prev_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$down#minical") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_left_arrow.png' . '" title="' . $user->lang['VIEW_PREVIOUS_MONTH'] . '" height="16" width="16" alt="<<" /></a>';
|
||||
$next_month = '<a href="' . append_sid("{$phpbb_root_path}portal.$phpEx", "m=$up#minical") . '"><img src="' . $phpbb_root_path . 'styles/' . $user->theme['theme_path'] . '/theme/images/portal/cal_icon_right_arrow.png' . '" title="' . $user->lang['VIEW_NEXT_MONTH'] . '" height="16" width="16" alt=">>" /></a>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_MINICAL' => true,
|
||||
'S_SUNDAY_FIRST' => ($config['board3_sunday_first_' . $module_id]) ? true : false,
|
||||
'L_MINI_CAL_MONTH' => (($config['board3_long_month_' . $module_id]) ? $user->lang['mini_cal']['long_month'][$this->day[0][1]] : $user->lang['mini_cal']['month'][$this->day[0][1]]) . " " . $this->day[0][2],
|
||||
'L_MINI_CAL_SUN' => '<span style="color: ' . $config['board3_calendar_sunday_color_' . $module_id] . ';">' . $user->lang['mini_cal']['day'][1] . '</span>',
|
||||
'L_MINI_CAL_MON' => $user->lang['mini_cal']['day'][2],
|
||||
'L_MINI_CAL_TUE' => $user->lang['mini_cal']['day'][3],
|
||||
'L_MINI_CAL_WED' => $user->lang['mini_cal']['day'][4],
|
||||
'L_MINI_CAL_THU' => $user->lang['mini_cal']['day'][5],
|
||||
'L_MINI_CAL_FRI' => $user->lang['mini_cal']['day'][6],
|
||||
'L_MINI_CAL_SAT' => $user->lang['mini_cal']['day'][7],
|
||||
'U_PREV_MONTH' => $prev_month,
|
||||
'U_NEXT_MONTH' => $next_month)
|
||||
);
|
||||
|
||||
/*
|
||||
* Let's start displaying the events
|
||||
* make sure we only display events in the future
|
||||
*/
|
||||
$events = $this->utf_unserialize($portal_config['board3_calendar_events_' . $module_id]);
|
||||
|
||||
if(!empty($events))
|
||||
if(!empty($events) && $config['board3_display_events_' . $module_id])
|
||||
{
|
||||
// we sort the $events array by the start time
|
||||
foreach($events as $key => $cur_event)
|
||||
@@ -168,30 +176,42 @@ class portal_calendar_module
|
||||
|
||||
foreach($events as $key => $cur_event)
|
||||
{
|
||||
if($cur_event['start_time'] >= $today_timestamp || $cur_event['end_time'] >= $today_timestamp)
|
||||
if($cur_event['start_time'] >= $today_timestamp || $cur_event['end_time'] >= $today_timestamp || (($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']))
|
||||
{
|
||||
// current events
|
||||
if(($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] <= $cur_event['start_time']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
|
||||
// check if this is an external link
|
||||
if (isset($cur_event['url']) && strpos($cur_event['url'], generate_board_url()) === false)
|
||||
{
|
||||
$template->assign_block_vars('cur_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
|
||||
$is_external = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_external = false;
|
||||
}
|
||||
// current events
|
||||
if((($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
|
||||
{
|
||||
$template->assign_block_vars('minical.cur_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
|
||||
'EVENT_TITLE' => $cur_event['title'],
|
||||
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
|
||||
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
|
||||
'END_TIME' => (!empty($cur_event['end_time'])) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : false,
|
||||
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
|
||||
'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false,
|
||||
'ALL_DAY' => ($cur_event['all_day']) ? true : false,
|
||||
'MODULE_ID' => $module_id,
|
||||
'EVENT_URL_NEW_WINDOW' => ($is_external && $config['board3_events_url_new_window_' . $module_id]) ? true : false,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars('upcoming_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
|
||||
$template->assign_block_vars('minical.upcoming_events', array(
|
||||
'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
|
||||
'EVENT_TITLE' => $cur_event['title'],
|
||||
'CUR_EVENT' => ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp) ? true : false,
|
||||
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
|
||||
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
|
||||
'EVENT_DESC' => (isset($cur_event['desc']) && $cur_event['desc'] != '') ? $cur_event['desc'] : '',
|
||||
'ALL_DAY' => (($cur_event['start_time'] - $cur_event['end_time']) == 1) ? true : false,
|
||||
'MODULE_ID' => $module_id,
|
||||
'EVENT_URL_NEW_WINDOW' => ($is_external && $config['board3_events_url_new_window_' . $module_id]) ? true : false,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -201,7 +221,7 @@ class portal_calendar_module
|
||||
return 'calendar_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_CALENDAR',
|
||||
@@ -212,6 +232,7 @@ class portal_calendar_module
|
||||
'board3_long_month_' . $module_id => array('lang' => 'PORTAL_LONG_MONTH' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_sunday_first_' . $module_id => array('lang' => 'PORTAL_SUNDAY_FIRST' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_display_events_' . $module_id => array('lang' => 'PORTAL_DISPLAY_EVENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board3_events_url_new_window_' . $module_id => array('lang' => 'PORTAL_EVENTS_URL_NEW_WINDOW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'board3_events_' . $module_id => array('lang' => 'PORTAL_EVENTS_MANAGE', 'validate' => 'string', 'type' => 'custom', 'explain' => false, 'method' => 'manage_events', 'submit' => 'update_events'),
|
||||
),
|
||||
);
|
||||
@@ -220,7 +241,7 @@ class portal_calendar_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_sunday_first_' . $module_id, 1);
|
||||
set_config('board3_calendar_today_color_' . $module_id, '#000000');
|
||||
@@ -228,12 +249,13 @@ class portal_calendar_module
|
||||
set_config('board3_long_month_' . $module_id, 0);
|
||||
set_config('board3_display_events_' . $module_id, 0);
|
||||
set_config('board3_events_' . $module_id, '');
|
||||
set_config('board3_events_url_new_window_' . $module_id, 0);
|
||||
|
||||
set_portal_config('board3_calendar_events_' . $module_id, '');
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -252,13 +274,14 @@ class portal_calendar_module
|
||||
'board3_long_month_' . $module_id,
|
||||
'board3_display_events_' . $module_id,
|
||||
'board3_events_' . $module_id,
|
||||
'board3_events_url_new_window_' . $module_id,
|
||||
);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
|
||||
function manage_events($value, $key, $module_id)
|
||||
public function manage_events($value, $key, $module_id)
|
||||
{
|
||||
global $db, $portal_config, $config, $template, $user, $phpEx, $phpbb_admin_path;
|
||||
|
||||
@@ -296,7 +319,7 @@ class portal_calendar_module
|
||||
* parse the event time
|
||||
* first check for obvious errors, we don't want to waste server resources
|
||||
*/
|
||||
if(strlen($event_start_day) < 9 || strlen($event_start_day) > 10 || strlen($event_start_time) < 4 || strlen($event_start_time) > 5)
|
||||
if(strlen($event_start_day) < 9 || strlen($event_start_day) > 10 || (strlen($event_start_time) < 4 && !$event_all_day) || strlen($event_start_time) > 5)
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CALENDAR_START_INCORRECT']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -310,9 +333,9 @@ class portal_calendar_module
|
||||
$start_colon_pos = strpos($event_start_time, ':', 0);
|
||||
$start_day_length = strlen($event_start_day);
|
||||
$start_time_length = strlen($event_start_time);
|
||||
$start_year = (int) substr($event_start_day, 0, $first_start_hyphen);
|
||||
$start_day = (int) substr($event_start_day, 0, $first_start_hyphen);
|
||||
$start_month = (int) substr($event_start_day, $first_start_hyphen + 1, ($second_start_hyphen - $first_start_hyphen - 1));
|
||||
$start_day = (int) substr($event_start_day, $second_start_hyphen + 1, $start_day_length - $second_start_hyphen);
|
||||
$start_year = (int) substr($event_start_day, $second_start_hyphen + 1, $start_day_length - $second_start_hyphen);
|
||||
$start_hour = (int) substr($event_start_time, 0, $start_colon_pos);
|
||||
$start_minute = (int) substr($event_start_time, $start_colon_pos + 1, ($start_time_length - $start_colon_pos) - 1);
|
||||
|
||||
@@ -323,17 +346,18 @@ class portal_calendar_module
|
||||
$end_colon_pos = strpos($event_end_time, ':', 0);
|
||||
$end_day_length = strlen($event_end_day);
|
||||
$end_time_length = strlen($event_end_time);
|
||||
$end_year = (int) substr($event_end_day, 0, 4);
|
||||
$end_month = (int) substr($event_end_day, 5, 2);
|
||||
$end_day = (int) substr($event_end_day, 8, 2);
|
||||
$end_hour = (int) substr($event_end_time, 0, 2);
|
||||
$end_minute = (int) substr($event_end_time, 3, 2);
|
||||
$end_day = (int) substr($event_end_day, 0, $first_end_hyphen);
|
||||
$end_month = (int) substr($event_end_day, $first_end_hyphen + 1, ($second_end_hyphen - $first_end_hyphen - 1));
|
||||
$end_year = (int) substr($event_end_day, $second_end_hyphen + 1, $end_day_length - $second_end_hyphen);
|
||||
$end_hour = (int) substr($event_end_time, 0, $end_colon_pos);
|
||||
$end_minute = (int) substr($event_end_time, $end_colon_pos + 1, ($end_time_length - $end_colon_pos) - 1);
|
||||
}
|
||||
|
||||
// UNIX timestamps
|
||||
$start_time = mktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year);
|
||||
$end_time = (!$event_all_day) ? mktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year) : ($start_time - 1);
|
||||
if($start_time <= time())
|
||||
$start_time = gmmktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year) - $user->timezone - $user->dst;
|
||||
$end_time = (!$event_all_day) ? gmmktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year) - $user->timezone - $user->dst : '';
|
||||
|
||||
if(($end_time) <= time() && !(($start_time + 86400) >= time() && $event_all_day))
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_CALENDAR_EVENT_PAST']. adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -377,6 +401,7 @@ class portal_calendar_module
|
||||
'desc' => $event_desc,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => $end_time,
|
||||
'all_day' => $event_all_day,
|
||||
'permission' => $event_permission,
|
||||
'url' => htmlspecialchars_decode($event_url),
|
||||
);
|
||||
@@ -392,6 +417,7 @@ class portal_calendar_module
|
||||
'desc' => $event_desc,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => $end_time,
|
||||
'all_day' => $event_all_day,
|
||||
'permission' => $event_permission,
|
||||
'url' => $event_url, // optional
|
||||
);
|
||||
@@ -444,14 +470,16 @@ class portal_calendar_module
|
||||
// Edit or add menu item
|
||||
case 'edit':
|
||||
case 'add':
|
||||
$event_all_day = (isset($events[$link_id]['all_day']) && $events[$link_id]['all_day'] == true) ? true : false;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'EVENT_TITLE' => (isset($events[$link_id]['title']) && $action != 'add') ? $events[$link_id]['title'] : '',
|
||||
'EVENT_DESC' => (isset($events[$link_id]['desc']) && $action != 'add') ? $events[$link_id]['desc'] : '',
|
||||
'EVENT_START_DAY' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'], 'Y-m-d') : '',
|
||||
'EVENT_START_DAY' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'], 'd-m-Y') : '',
|
||||
'EVENT_START_TIME' => ($action != 'add') ? $user->format_date($events[$link_id]['start_time'], 'G:i') : '',
|
||||
'EVENT_END_DAY' => ($action != 'add' && ($events[$link_id]['start_time'] - $events[$link_id]['end_time']) != true) ? $user->format_date($events[$link_id]['end_time'], 'Y-m-d') : '',
|
||||
'EVENT_END_TIME' => ($action != 'add' && ($events[$link_id]['start_time'] - $events[$link_id]['end_time']) != true) ? $user->format_date($events[$link_id]['end_time'], 'G:i') : '',
|
||||
'EVENT_ALL_DAY' => (isset($events[$link_id]['start_time']) && ($events[$link_id]['start_time'] - $events[$link_id]['end_time'])) ? true : false,
|
||||
'EVENT_END_DAY' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$link_id]['end_time'], 'd-m-Y') : '',
|
||||
'EVENT_END_TIME' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$link_id]['end_time'], 'G:i') : '',
|
||||
'EVENT_ALL_DAY' => (isset($events[$link_id]['all_day']) && $events[$link_id]['all_day'] == true) ? true : false,
|
||||
'EVENT_URL' => (isset($events[$link_id]['url']) && $action != 'add') ? $events[$link_id]['url'] : '',
|
||||
|
||||
//'U_BACK' => $u_action,
|
||||
@@ -484,37 +512,42 @@ class portal_calendar_module
|
||||
|
||||
for ($i = 0; $i < sizeof($events); $i++)
|
||||
{
|
||||
$event_all_day = ($events[$i]['all_day'] == true) ? true : false;
|
||||
$start_time_format = (!intval($user->format_date($events[$i]['start_time'], 'H')) && !intval($user->format_date($events[$i]['start_time'], 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
$end_time_format = (!intval($user->format_date($events[$i]['end_time'], 'H')) && !intval($user->format_date($events[$i]['end_time'], 'i'))) ? 'j. M Y' : 'j. M Y, H:i';
|
||||
|
||||
$template->assign_block_vars('events', array(
|
||||
'EVENT_TITLE' => ($action != 'add') ? ((isset($user->lang[$events[$i]['title']])) ? $user->lang[$events[$i]['title']] : $events[$i]['title']) : '',
|
||||
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
|
||||
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'], 'j. M Y, H:i') : '',
|
||||
'EVENT_END' => ($action != 'add' && ($events[$i]['start_time'] - $events[$i]['end_time']) != 1) ? $user->format_date($events[$i]['end_time'], 'j. M Y, H:i') : '',
|
||||
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? str_replace('&', '&', $events[$i]['url']) : '',
|
||||
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'], $start_time_format) : '',
|
||||
'EVENT_END' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$i]['end_time'], $end_time_format) : '',
|
||||
'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $this->validate_url($events[$i]['url']) : '',
|
||||
'EVENT_URL_RAW' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $events[$i]['url'] : '',
|
||||
'U_EDIT' => $u_action . '&action=edit&id=' . $i,
|
||||
'U_DELETE' => $u_action . '&action=delete&id=' . $i,
|
||||
'EVENT_ALL_DAY' => ($events[$i]['end_time'] - $events[$i]['start_time']) ? true : false,
|
||||
'EVENT_ALL_DAY' => $event_all_day,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function update_events($key, $module_id)
|
||||
public function update_events($key, $module_id)
|
||||
{
|
||||
$this->manage_events('', $key, $module_id);
|
||||
}
|
||||
|
||||
var $dateYYY; // year in numeric format (YYYY)
|
||||
var $dateMM; // month in numeric format (MM)
|
||||
var $dateDD; // day in numeric format (DD)
|
||||
var $ext_dateMM; // extended month (e.g. February)
|
||||
var $daysMonth; // count of days in month
|
||||
var $stamp; // timestamp
|
||||
var $day; // return array s.a.
|
||||
private $dateYYY; // year in numeric format (YYYY)
|
||||
private $dateMM; // month in numeric format (MM)
|
||||
private $dateDD; // day in numeric format (DD)
|
||||
private $ext_dateMM; // extended month (e.g. February)
|
||||
private $daysMonth; // count of days in month
|
||||
private $stamp; // timestamp
|
||||
private $day; // return array s.a.
|
||||
|
||||
/**
|
||||
* convert date->timestamp
|
||||
**/
|
||||
function makeTimestamp($date)
|
||||
private function makeTimestamp($date)
|
||||
{
|
||||
$this->stamp = strtotime($date);
|
||||
return ($this->stamp);
|
||||
@@ -523,7 +556,7 @@ class portal_calendar_module
|
||||
/**
|
||||
* get date listed in array
|
||||
**/
|
||||
function getMonth($callDate)
|
||||
private function getMonth($callDate)
|
||||
{
|
||||
|
||||
$this->makeTimestamp($callDate);
|
||||
@@ -546,7 +579,7 @@ class portal_calendar_module
|
||||
}
|
||||
|
||||
// Unserialize links array
|
||||
function utf_unserialize($serial_str)
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
@@ -555,12 +588,13 @@ class portal_calendar_module
|
||||
/**
|
||||
* validate URLs and execute apppend_sid if necessary
|
||||
*/
|
||||
function validate_url($url)
|
||||
private function validate_url($url)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$url = str_replace("\r\n", "\n", str_replace('\"', '"', trim($url)));
|
||||
$url = str_replace(' ', '%20', $url);
|
||||
$url = str_replace('&', '&', $url);
|
||||
|
||||
// if there is no scheme, then add http schema
|
||||
if (!preg_match('#^[a-z][a-z\d+\-.]*:/{2}#i', $url))
|
||||
@@ -568,8 +602,8 @@ class portal_calendar_module
|
||||
$url = 'http://' . $url;
|
||||
}
|
||||
|
||||
// Is this a link to somewhere inside this board? If so then remove the session id from the url
|
||||
if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
|
||||
// Is this a link to somewhere inside this board? If so then run reapply_sid()
|
||||
if (strpos($url, generate_board_url()) !== false)
|
||||
{
|
||||
$url = reapply_sid($url);
|
||||
}
|
||||
@@ -577,5 +611,3 @@ class portal_calendar_module
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_clock_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'CLOCK';
|
||||
public $name = 'CLOCK';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_clock.png';
|
||||
public $image_src = 'portal_clock.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_clock_module';
|
||||
public $language = 'portal_clock_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
@@ -58,7 +58,7 @@ class portal_clock_module
|
||||
return 'clock_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_CLOCK_SETTINGS',
|
||||
@@ -72,13 +72,13 @@ class portal_clock_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_clock_src_' . $module_id, 'board3clock.swf');
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -90,5 +90,3 @@ class portal_clock_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,32 @@ class portal_custom_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 31;
|
||||
public $columns = 31;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'PORTAL_CUSTOM';
|
||||
public $name = 'PORTAL_CUSTOM';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_custom.png';
|
||||
public $image_src = 'portal_custom.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_custom_module';
|
||||
public $language = 'portal_custom_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = 'acp_portal_custom';
|
||||
public $custom_acp_tpl = 'acp_portal_custom';
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template, $portal_config, $user;
|
||||
|
||||
@@ -88,7 +88,7 @@ class portal_custom_module
|
||||
}
|
||||
}
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $portal_config, $user;
|
||||
|
||||
@@ -123,7 +123,7 @@ class portal_custom_module
|
||||
}
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'PORTAL_CUSTOM',
|
||||
@@ -137,7 +137,7 @@ class portal_custom_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_portal_config('board3_custom_' . $module_id . '_code', '');
|
||||
set_config('board3_custom_' . $module_id . '_code', '');
|
||||
@@ -150,7 +150,7 @@ class portal_custom_module
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -175,7 +175,7 @@ class portal_custom_module
|
||||
return ((!$check) ? $check : $db->sql_query($sql)); // if something went wrong, make sure we are aware of the first query
|
||||
}
|
||||
|
||||
function manage_custom($value, $key, $module_id)
|
||||
public function manage_custom($value, $key, $module_id)
|
||||
{
|
||||
global $db, $portal_config, $config, $template, $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
||||
|
||||
@@ -348,10 +348,8 @@ class portal_custom_module
|
||||
}
|
||||
}
|
||||
|
||||
function update_custom($key, $module_id)
|
||||
public function update_custom($key, $module_id)
|
||||
{
|
||||
$this->manage_custom('', $key, $module_id);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,37 @@ class portal_modulename_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 0;
|
||||
public $columns = 0;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'MODULENAME';
|
||||
public $name = 'MODULENAME';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'modulename.png';
|
||||
public $image_src = 'modulename.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = '';
|
||||
public $language = '';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = '';
|
||||
public $custom_acp_tpl = '';
|
||||
|
||||
/**
|
||||
* hide module name in ACP configuration page
|
||||
*/
|
||||
public $hide_name = false;
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
@@ -64,7 +69,7 @@ class portal_modulename_module
|
||||
return 'modulename_center.html';
|
||||
}
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
@@ -75,7 +80,7 @@ class portal_modulename_module
|
||||
return 'modulename_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_CONFIG_MODULENAME',
|
||||
@@ -90,14 +95,14 @@ class portal_modulename_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_configname_' . $module_id, 'Hello World!');
|
||||
set_config('board3_configname2_' . $module_id, 1337);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -110,5 +115,3 @@ class portal_modulename_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_donation_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 31;
|
||||
public $columns = 31;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'DONATION';
|
||||
public $name = 'DONATION';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_donation.png';
|
||||
public $image_src = 'portal_donation.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_donation_module';
|
||||
public $language = 'portal_donation_module';
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
@@ -56,7 +56,7 @@ class portal_donation_module
|
||||
return 'donation_center.html';
|
||||
}
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template;
|
||||
|
||||
@@ -65,7 +65,7 @@ class portal_donation_module
|
||||
return 'donation_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_PAYPAL_SETTINGS',
|
||||
@@ -79,13 +79,13 @@ class portal_donation_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_pay_acc_' . $module_id, 'your@paypal.com');
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -97,5 +97,3 @@ class portal_donation_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,32 @@ class portal_forumlist_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 4;
|
||||
public $columns = 21;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'PORTAL_FORUMLIST';
|
||||
public $name = 'PORTAL_FORUMLIST';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = '';
|
||||
public $image_src = '';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_forumlist_module';
|
||||
public $language = 'portal_forumlist_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = '';
|
||||
public $custom_acp_tpl = '';
|
||||
|
||||
function get_template_center($module_id)
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
global $config, $template, $user, $auth, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -64,7 +64,6 @@ class portal_forumlist_module
|
||||
'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
|
||||
'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
|
||||
'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
|
||||
'S_DISPLAY_PORTAL_FORUM_INDEX' => true,
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
|
||||
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '',
|
||||
));
|
||||
@@ -72,7 +71,7 @@ class portal_forumlist_module
|
||||
return 'forumlist.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'PORTAL_FORUMLIST',
|
||||
@@ -83,15 +82,13 @@ class portal_forumlist_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_friends_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'FRIENDS';
|
||||
public $name = 'FRIENDS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_friends.png';
|
||||
public $image_src = 'portal_friends.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_friends_module';
|
||||
public $language = 'portal_friends_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user;
|
||||
|
||||
@@ -97,13 +97,12 @@ class portal_friends_module
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_FRIENDS' => $s_display_friends,
|
||||
'S_ZEBRA_ENABLED' => true,
|
||||
));
|
||||
|
||||
return 'friends_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_FRIENDS_SETTINGS',
|
||||
@@ -117,13 +116,13 @@ class portal_friends_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_max_online_friends_' . $module_id, 8);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -135,5 +134,3 @@ class portal_friends_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,32 @@ class portal_latest_bots_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'LATEST_BOTS';
|
||||
public $name = 'LATEST_BOTS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_bots.png';
|
||||
public $image_src = 'portal_bots.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_latest_bots_module';
|
||||
public $language = 'portal_latest_bots_module';
|
||||
|
||||
/**
|
||||
* hide module name in ACP configuration page
|
||||
*/
|
||||
public $hide_name = true;
|
||||
|
||||
function get_template_side($module_id)
|
||||
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user;
|
||||
|
||||
@@ -55,45 +61,50 @@ class portal_latest_bots_module
|
||||
$sql = 'SELECT username, user_colour, user_lastvisit
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type = ' . USER_IGNORE . '
|
||||
AND user_lastvisit > 0
|
||||
ORDER BY user_lastvisit DESC';
|
||||
$result = $db->sql_query_limit($sql, $config['board3_last_visited_bots_number_' . $module_id]);
|
||||
$first = true;
|
||||
|
||||
$show_module = false;
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$row['user_lastvisit'] && $first == true)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_DISPLAY_LAST_BOTS' => false,
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_var('S_DISPLAY_LAST_BOTS', true);
|
||||
|
||||
if($row['user_lastvisit'] > 0)
|
||||
{
|
||||
$template->assign_block_vars('last_visited_bots', array(
|
||||
'BOT_NAME' => get_username_string('full', '', $row['username'], $row['user_colour']),
|
||||
'LAST_VISIT_DATE' => $user->format_date($row['user_lastvisit']),
|
||||
));
|
||||
}
|
||||
}
|
||||
$first = false;
|
||||
$template->assign_block_vars('last_visited_bots', array(
|
||||
'BOT_NAME' => get_username_string('full', '', $row['username'], $row['user_colour']),
|
||||
'LAST_VISIT_DATE' => $user->format_date($row['user_lastvisit']),
|
||||
));
|
||||
$show_module = true;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if($config['board3_last_visited_bots_number_' . $module_id] != 0)
|
||||
{
|
||||
if($config['board3_last_visited_bots_number_' . $module_id] == 1)
|
||||
{
|
||||
$last_visited_bots = $user->lang['LAST_VISITED_BOT'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_visited_bots = sprintf($user->lang['LAST_VISITED_BOTS_CNT'], $config['board3_last_visited_bots_number_' . $module_id]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_visited_bots = $user->lang['LAST_VISITED_BOTS'];
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'LAST_VISITED_BOTS' => sprintf($user->lang['LAST_VISITED_BOTS'], $config['board3_last_visited_bots_number_' . $module_id]),
|
||||
'LAST_VISITED_BOTS' => $last_visited_bots,
|
||||
));
|
||||
|
||||
if(!empty($row))
|
||||
if($show_module)
|
||||
{
|
||||
return 'latest_bots_side.html';
|
||||
}
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_BOTS_SETTINGS',
|
||||
@@ -107,13 +118,13 @@ class portal_latest_bots_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_last_visited_bots_number_' . $module_id, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -125,5 +136,3 @@ class portal_latest_bots_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_latest_members_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'LATEST_MEMBERS';
|
||||
public $name = 'LATEST_MEMBERS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_members.png';
|
||||
public $image_src = 'portal_members.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_latest_members_module';
|
||||
public $language = 'portal_latest_members_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $db, $user;
|
||||
|
||||
@@ -70,7 +70,7 @@ class portal_latest_members_module
|
||||
return 'latest_members_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_MEMBERS_SETTINGS',
|
||||
@@ -84,13 +84,13 @@ class portal_latest_members_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
set_config('board3_max_last_member_' . $module_id, 8);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -102,5 +102,3 @@ class portal_latest_members_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_leaders_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'THE_TEAM';
|
||||
public $name = 'THE_TEAM';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_team.png';
|
||||
public $image_src = 'portal_team.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_leaders_module';
|
||||
public $language = 'portal_leaders_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user, $auth, $db, $phpEx, $phpbb_root_path;
|
||||
|
||||
@@ -204,7 +204,7 @@ class portal_leaders_module
|
||||
}
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_LEADERS',
|
||||
@@ -218,14 +218,14 @@ class portal_leaders_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
// Show normal team block by default
|
||||
set_config('board3_leaders_ext_' . $module_id, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -237,5 +237,3 @@ class portal_leaders_module
|
||||
return $db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,26 +28,26 @@ class portal_link_us_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'LINK_US';
|
||||
public $name = 'LINK_US';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_link_us.png';
|
||||
public $image_src = 'portal_link_us.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_link_us_module';
|
||||
public $language = 'portal_link_us_module';
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $user;
|
||||
|
||||
@@ -63,7 +63,7 @@ class portal_link_us_module
|
||||
return 'link_us_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'LINK_US',
|
||||
@@ -74,15 +74,13 @@ class portal_link_us_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,38 @@ class portal_links_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'PORTAL_LINKS';
|
||||
public $name = 'PORTAL_LINKS';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_links.png';
|
||||
public $image_src = 'portal_links.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_links_module';
|
||||
public $language = 'portal_links_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = 'acp_portal_links';
|
||||
public $custom_acp_tpl = 'acp_portal_links';
|
||||
|
||||
/**
|
||||
* constants
|
||||
*/
|
||||
const LINK_INT = 1;
|
||||
const LINK_EXT = 2;
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $phpEx, $phpbb_root_path, $user, $db;
|
||||
|
||||
@@ -77,7 +83,7 @@ class portal_links_module
|
||||
|
||||
for ($i = 0; $i < sizeof($links); $i++)
|
||||
{
|
||||
if($links[$i]['type'] == B3_LINKS_INT)
|
||||
if($links[$i]['type'] == self::LINK_INT)
|
||||
{
|
||||
$links[$i]['url'] = str_replace('&', '&', $links[$i]['url']); // we need to do this in order to prevent XHTML validation errors
|
||||
$cur_url = append_sid($phpbb_root_path . $links[$i]['url']); // the user should know what kind of file it is
|
||||
@@ -96,6 +102,7 @@ class portal_links_module
|
||||
'LINK_TITLE' => (isset($user->lang[$links[$i]['title']])) ? $user->lang[$links[$i]['title']] : $links[$i]['title'],
|
||||
'LINK_URL' => $cur_url,
|
||||
'MODULE_ID' => $module_id,
|
||||
'NEW_WINDOW' => ($links[$i]['type'] != self::LINK_INT && $config['board3_links_url_new_window_' . $module_id]) ? true : false,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -103,14 +110,15 @@ class portal_links_module
|
||||
return 'links_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
// do not remove this as it is needed in order to run manage_links
|
||||
return array(
|
||||
'title' => 'ACP_PORTAL_LINKS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_MENU',
|
||||
'legend1' => 'ACP_PORTAL_LINKS',
|
||||
'board3_links_' . $module_id => array('lang' => 'ACP_PORTAL_MENU_MANAGE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'manage_links', 'submit' => 'update_links'),
|
||||
'board3_links_url_new_window_' . $module_id => array('lang' => 'ACP_PORTAL_LINKS_NEW_WINDOW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -118,7 +126,7 @@ class portal_links_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
global $phpbb_root_path, $db;
|
||||
|
||||
@@ -130,8 +138,8 @@ class portal_links_module
|
||||
);
|
||||
|
||||
$links_types = array(
|
||||
B3_LINKS_EXT,
|
||||
B3_LINKS_EXT,
|
||||
self::LINK_EXT,
|
||||
self::LINK_EXT,
|
||||
);
|
||||
|
||||
$links_urls = array(
|
||||
@@ -157,11 +165,12 @@ class portal_links_module
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_links_array_' . $module_id, $board3_menu_array);
|
||||
set_config('board3_links_' . $module_id, '');
|
||||
set_config('board3_links_url_new_window_' . $module_id, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -175,6 +184,7 @@ class portal_links_module
|
||||
|
||||
$del_config = array(
|
||||
'board3_links_' . $module_id,
|
||||
'board3_links_url_new_window_' . $module_id
|
||||
);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
@@ -182,7 +192,7 @@ class portal_links_module
|
||||
}
|
||||
|
||||
// Manage the menu links
|
||||
function manage_links($value, $key, $module_id)
|
||||
public function manage_links($value, $key, $module_id)
|
||||
{
|
||||
global $config, $phpbb_admin_path, $user, $phpEx, $db, $template;
|
||||
|
||||
@@ -360,7 +370,7 @@ class portal_links_module
|
||||
'U_ACTION' => $u_action . '&id=' . $link_id,
|
||||
|
||||
'S_EDIT' => true,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == B3_LINKS_INT) ? true : false,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == self::LINK_INT) ? true : false,
|
||||
));
|
||||
|
||||
$groups_ary = (isset($links[$link_id]['permission'])) ? explode(',', $links[$link_id]['permission']) : array();
|
||||
@@ -399,17 +409,15 @@ class portal_links_module
|
||||
}
|
||||
}
|
||||
|
||||
function update_links($key, $module_id)
|
||||
public function update_links($key, $module_id)
|
||||
{
|
||||
$this->manage_links('', $key, $module_id);
|
||||
}
|
||||
|
||||
// Unserialize links array
|
||||
function utf_unserialize($serial_str)
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -28,32 +28,39 @@ class portal_main_menu_module
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
var $columns = 10;
|
||||
public $columns = 10;
|
||||
|
||||
/**
|
||||
* Default modulename
|
||||
*/
|
||||
var $name = 'M_MENU';
|
||||
public $name = 'M_MENU';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
var $image_src = 'portal_menu.png';
|
||||
public $image_src = 'portal_menu.png';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
var $language = 'portal_main_menu_module';
|
||||
public $language = 'portal_main_menu_module';
|
||||
|
||||
/**
|
||||
* custom acp template
|
||||
* file must be in "adm/style/portal/"
|
||||
*/
|
||||
var $custom_acp_tpl = 'acp_portal_menu';
|
||||
public $custom_acp_tpl = 'acp_portal_menu';
|
||||
|
||||
/**
|
||||
* constants
|
||||
*/
|
||||
const LINK_CAT = 0;
|
||||
const LINK_INT = 1;
|
||||
const LINK_EXT = 2;
|
||||
|
||||
function get_template_side($module_id)
|
||||
public function get_template_side($module_id)
|
||||
{
|
||||
global $config, $template, $phpEx, $phpbb_root_path, $user, $db;
|
||||
|
||||
@@ -77,7 +84,7 @@ class portal_main_menu_module
|
||||
|
||||
for ($i = 0; $i < sizeof($links); $i++)
|
||||
{
|
||||
if($links[$i]['type'] == B3_LINKS_CAT)
|
||||
if($links[$i]['type'] == self::LINK_CAT)
|
||||
{
|
||||
$template->assign_block_vars('portalmenu', array(
|
||||
'CAT_TITLE' => (isset($user->lang[$links[$i]['title']])) ? $user->lang[$links[$i]['title']] : $links[$i]['title'],
|
||||
@@ -86,7 +93,7 @@ class portal_main_menu_module
|
||||
}
|
||||
else
|
||||
{
|
||||
if($links[$i]['type'] == B3_LINKS_INT)
|
||||
if($links[$i]['type'] == self::LINK_INT)
|
||||
{
|
||||
$links[$i]['url'] = str_replace('&', '&', $links[$i]['url']); // we need to do this in order to prevent XHTML validation errors
|
||||
$cur_url = append_sid($phpbb_root_path . $links[$i]['url']); // the user should know what kind of file it is
|
||||
@@ -104,6 +111,7 @@ class portal_main_menu_module
|
||||
$template->assign_block_vars('portalmenu.links', array(
|
||||
'LINK_TITLE' => (isset($user->lang[$links[$i]['title']])) ? $user->lang[$links[$i]['title']] : $links[$i]['title'],
|
||||
'LINK_URL' => $cur_url,
|
||||
'NEW_WINDOW' => ($links[$i]['type'] != self::LINK_INT && $config['board3_menu_url_new_window_' . $module_id]) ? true : false,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -112,7 +120,7 @@ class portal_main_menu_module
|
||||
return 'main_menu_side.html';
|
||||
}
|
||||
|
||||
function get_template_acp($module_id)
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
// do not remove this as it is needed in order to run manage_links
|
||||
return array(
|
||||
@@ -120,6 +128,7 @@ class portal_main_menu_module
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_PORTAL_MENU',
|
||||
'board3_menu_' . $module_id => array('lang' => 'ACP_PORTAL_MENU_MANAGE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'manage_links', 'submit' => 'update_links'),
|
||||
'board3_menu_url_new_window_' . $module_id => array('lang' => 'ACP_PORTAL_MENU_EXT_NEW_WINDOW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -127,7 +136,7 @@ class portal_main_menu_module
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
function install($module_id)
|
||||
public function install($module_id)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $db;
|
||||
|
||||
@@ -158,17 +167,17 @@ class portal_main_menu_module
|
||||
);
|
||||
|
||||
$links_types = array(
|
||||
B3_LINKS_CAT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_CAT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
B3_LINKS_INT,
|
||||
self::LINK_CAT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_CAT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
self::LINK_INT,
|
||||
);
|
||||
|
||||
$links_urls = array(
|
||||
@@ -212,11 +221,12 @@ class portal_main_menu_module
|
||||
$board3_menu_array = serialize($links);
|
||||
set_portal_config('board3_menu_array_' . $module_id, $board3_menu_array);
|
||||
set_config('board3_menu_' . $module_id, '');
|
||||
set_config('board3_menu_url_new_window_' . $module_id, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function uninstall($module_id)
|
||||
public function uninstall($module_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -230,6 +240,7 @@ class portal_main_menu_module
|
||||
|
||||
$del_config = array(
|
||||
'board3_menu_' . $module_id,
|
||||
'board3_menu_url_new_window_' . $module_id,
|
||||
);
|
||||
$sql = 'DELETE FROM ' . CONFIG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('config_name', $del_config);
|
||||
@@ -237,7 +248,7 @@ class portal_main_menu_module
|
||||
}
|
||||
|
||||
// Manage the menu links
|
||||
function manage_links($value, $key, $module_id)
|
||||
public function manage_links($value, $key, $module_id)
|
||||
{
|
||||
global $config, $phpbb_admin_path, $user, $phpEx, $db, $template;
|
||||
|
||||
@@ -263,8 +274,8 @@ class portal_main_menu_module
|
||||
}
|
||||
|
||||
$link_title = utf8_normalize_nfc(request_var('link_title', ' ', true));
|
||||
$link_is_cat = request_var('link_is_cat', 0);
|
||||
$link_type = (!$link_is_cat) ? request_var('link_type', 0) : B3_LINKS_CAT;
|
||||
$link_is_cat = request_var('link_is_cat', false);
|
||||
$link_type = (!$link_is_cat) ? request_var('link_type', self::LINK_INT) : self::LINK_CAT;
|
||||
$link_url = ($link_is_cat) ? ' ' : request_var('link_url', ' ');
|
||||
$link_url = str_replace('&', '&', $link_url);
|
||||
$link_permission = request_var('permission-setting-menu', array(0 => ''));
|
||||
@@ -313,7 +324,7 @@ class portal_main_menu_module
|
||||
{
|
||||
$message = $user->lang['LINK_ADDED'];
|
||||
|
||||
if($link_type != B3_LINKS_CAT && sizeof($links) < 1)
|
||||
if($link_type != self::LINK_CAT && sizeof($links) < 1)
|
||||
{
|
||||
trigger_error($user->lang['ACP_PORTAL_MENU_CREATE_CAT'] . adm_back_link($u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -414,14 +425,14 @@ class portal_main_menu_module
|
||||
case 'add':
|
||||
$template->assign_vars(array(
|
||||
'LINK_TITLE' => (isset($links[$link_id]['title']) && $action != 'add') ? $links[$link_id]['title'] : '',
|
||||
'LINK_URL' => (isset($links[$link_id]['url']) && $links[$link_id]['type'] != B3_LINKS_CAT && $action != 'add') ? str_replace('&', '&', $links[$link_id]['url']) : '',
|
||||
'LINK_URL' => (isset($links[$link_id]['url']) && $links[$link_id]['type'] != self::LINK_CAT && $action != 'add') ? str_replace('&', '&', $links[$link_id]['url']) : '',
|
||||
|
||||
//'U_BACK' => $u_action,
|
||||
'U_ACTION' => $u_action . '&id=' . $link_id,
|
||||
|
||||
'S_EDIT' => true,
|
||||
'S_LINK_IS_CAT' => (!isset($links[$link_id]['type']) || $links[$link_id]['type'] == B3_LINKS_CAT) ? true : false,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == B3_LINKS_INT) ? true : false,
|
||||
'S_LINK_IS_CAT' => (!isset($links[$link_id]['type']) || $links[$link_id]['type'] == self::LINK_CAT) ? true : false,
|
||||
'S_LINK_IS_INT' => (isset($links[$link_id]['type']) && $links[$link_id]['type'] == self::LINK_INT) ? true : false,
|
||||
));
|
||||
|
||||
$groups_ary = (isset($links[$link_id]['permission'])) ? explode(',', $links[$link_id]['permission']) : array();
|
||||
@@ -457,22 +468,20 @@ class portal_main_menu_module
|
||||
'U_MOVE_UP' => $u_action . '&action=move_up&id=' . $i,
|
||||
'U_MOVE_DOWN' => $u_action . '&action=move_down&id=' . $i,
|
||||
|
||||
'S_LINK_IS_CAT' => ($links[$i]['type'] == B3_LINKS_CAT) ? true : false,
|
||||
'S_LINK_IS_CAT' => ($links[$i]['type'] == self::LINK_CAT) ? true : false,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
function update_links($key, $module_id)
|
||||
public function update_links($key, $module_id)
|
||||
{
|
||||
$this->manage_links('', $key, $module_id);
|
||||
}
|
||||
|
||||
// Unserialize links array
|
||||
function utf_unserialize($serial_str)
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user