Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11842

Conflicts:
	phpBB/includes/acp/acp_groups.php
This commit is contained in:
Marc Alexander 2013-11-27 14:55:05 +01:00
commit 33f4d267ef
422 changed files with 5792 additions and 4879 deletions

View file

@ -10,18 +10,26 @@ env:
- DB=mysql
- DB=postgres
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
services:
- redis-server
install:
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
- sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
- travis/install-php-extensions.sh
- cd phpBB
- php ../composer.phar install --dev --no-interaction --prefer-source
- cd ..
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
script:
- cd build
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi"
- cd ..
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
notifications:

View file

@ -26,8 +26,8 @@ To be able to run an installation from the repo (and not from a pre-built packag
## AUTOMATED TESTING
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3)
develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3)
develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb)
develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb)
## LICENSE

View file

@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="3.1.0-a1" />
<property name="prevversion" value="3.0.12" />
<property name="olderversions" value="3.0.11" />
<property name="newversion" value="3.1.0-a2" />
<property name="prevversion" value="3.1.0-a1" />
<property name="olderversions" value="3.0.12" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@ -74,6 +74,40 @@
passthru="true" />
</target>
<target name="sniff">
<exec command="phpBB/vendor/bin/phpcs
-s
--extensions=php
--standard=build/code_sniffer/ruleset-php-strict.xml
--ignore=phpBB/phpbb/db/migration/data/v30x/*
phpBB/phpbb"
dir="." returnProperty="retval-php-strict" passthru="true" />
<exec command="phpBB/vendor/bin/phpcs
-s
--extensions=php
--standard=build/code_sniffer/ruleset-php-legacy.xml
--ignore=phpBB/cache/*
--ignore=phpBB/develop/*
--ignore=phpBB/includes/diff/*.php
--ignore=phpBB/includes/sphinxapi.php
--ignore=phpBB/includes/utf/data/*
--ignore=phpBB/install/data/*
--ignore=phpBB/install/database_update.php
--ignore=phpBB/phpbb/*
--ignore=phpBB/vendor/*
phpBB"
dir="." returnProperty="retval-php-legacy" passthru="true" />
<if>
<or>
<not><equals arg1="${retval-php-strict}" arg2="0" /></not>
<not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
</or>
<then>
<fail message="PHP Code Sniffer failed." />
</then>
</if>
</target>
<target name="docs">
<!-- only works if you setup phpdoctor:
git clone https://github.com/peej/phpdoctor.git

View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset name="phpBB Minimum Standard">
<description>phpBB minimum coding standard</description>
<!-- All code files MUST use only UTF-8 without BOM. -->
<rule ref="Generic.Files.ByteOrderMark" />
<!-- All code files MUST use the Unix LF (linefeed) line ending. -->
<rule ref="Generic.Files.LineEndings" />
<!-- Tabs MUST be used for indentation -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
</ruleset>

View file

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<ruleset name="phpBB PHP Legacy Standard">
<description>phpBB legacy coding standard for PHP files</description>
<rule ref="./ruleset-minimum.xml" />
<!-- "for (; bar; )" should be "while (bar)" instead -->
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
<!-- A method MUST not only call its parent -->
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
<!-- The body of each structure MUST be enclosed by braces. -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<!-- There MUST not be more than one statement per line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Call-time pass-by-reference MUST not be used. -->
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
<!-- Class constants MUST be declared in all upper case with underscore separators. -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
<!-- Only <?php, no short tags. -->
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound" />
<!-- Method arguments with default values MUST go at the end of the argument list. -->
<rule ref="PEAR.Functions.ValidDefaultValue" />
<!-- In the argument list, there MUST NOT be a space before each comma,
and there MUST be one space after each comma. -->
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
<rule ref="Zend.Files.ClosingTag" />
</ruleset>

View file

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<ruleset name="phpBB PHP Strict Standard">
<description>phpBB coding standard for PHP files</description>
<rule ref="./ruleset-php-legacy.xml" />
<!-- There SHOULD NOT be more than 80 characters per line
There MUST NOT be more than 120 characters per line -->
<!--
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="80"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
-->
<!-- The PHP constants true, false, and null MUST be in lower case. -->
<rule ref="Generic.PHP.LowerCaseConstant" />
<!-- PHP keywords MUST be in lower case. -->
<rule ref="Generic.PHP.LowerCaseKeyword" />
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<!-- There MUST NOT be whitespace before the first content of a file -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
<!-- There MUST NOT be whitespace after the last content of a file -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
<!-- Functions MUST NOT contain multiple empty lines in a row -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
<!-- Classes etc. MUST be namespaced -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<!-- A file MUST not contain more than one class/interface -->
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses" />
<!-- Files containing classes MUST not have any side-effects -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols" />
<!-- When present, all use declarations MUST go after the namespace declaration.
There MUST be one use keyword per declaration.
There MUST be one blank line after the use block. -->
<rule ref="PSR2.Namespaces.UseDeclaration" />
</ruleset>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 B

View file

@ -122,11 +122,11 @@
{
if (newimage == 'no_image')
{
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
document.getElementById('image_upload_icon').src = "{ROOT_PATH}images/spacer.gif";
}
else
{
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
document.getElementById('image_upload_icon').src = "{ROOT_PATH}{IMG_PATH}/" + newimage;
}
}
@ -192,7 +192,7 @@
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
</select></dd>
<dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
<dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
</dl>
<dl>
<dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}{L_COLON}</label></dt>
@ -224,7 +224,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>
@ -291,7 +291,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>
@ -331,7 +331,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_FILENAME}</th>
@ -389,7 +389,7 @@
<!-- ENDIF -->
</div>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_FILENAME}</th>

View file

@ -8,18 +8,14 @@
</select>&nbsp;<input type="submit" value="{L_GO}" name="avatar_local_go" class="button2" /></dd>
</dl>
<!-- IF AVATAR_LOCAL_SHOW -->
<table>
<ul id="gallery">
<!-- BEGIN avatar_local_row -->
<tr>
<!-- BEGIN avatar_local_col -->
<td class="row1" style="text-align: center;"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="{avatar_local_row.avatar_local_col.AVATAR_NAME}" title="{avatar_local_row.avatar_local_col.AVATAR_NAME}"/></td>
<li>
<label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br />
<input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label>
</li>
<!-- END avatar_local_col -->
</tr>
<tr>
<!-- BEGIN avatar_local_option -->
<td class="row2" style="text-align: center;"><input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_option.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_option.AVATAR_FILE}" /></td>
<!-- END avatar_local_option -->
</tr>
<!-- END avatar_local_row -->
</table>
</ul>
<!-- ENDIF -->

View file

@ -56,7 +56,7 @@
<br />
<table cellspacing="1" id="down">
<table class="table1" id="down">
<thead>
<tr>
<th colspan="2">{L_TOKENS}</th>
@ -90,7 +90,7 @@
<fieldset class="tabulated">
<legend>{L_ACP_BBCODES}</legend>
<table cellspacing="1" id="down">
<table class="table1" id="down">
<thead>
<tr>
<th>{L_BBCODE_TAG}</th>

View file

@ -62,7 +62,7 @@
<form id="acp_bots" method="post" action="{U_ACTION}">
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_BOT_NAME}</th>

View file

@ -5,35 +5,35 @@
<h1>{L_EXTENSIONS_ADMIN}</h1>
<p>{L_EXTENSIONS_EXPLAIN}</p>
<p>{L_PURGE_EXPLAIN}</p>
<p>{L_EXTENSION_DELETE_DATA_EXPLAIN}</p>
<!-- IF MIGRATOR_ERROR -->
<div class="errorbox">
<p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
<p>{MIGRATOR_ERROR}</p>
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
</div>
<!-- ELSEIF PRE -->
<div class="errorbox">
<p>{L_PURGE_CONFIRM}</p>
<p>{L_CONFIRM_MESSAGE}</p>
</div>
<form id="acp_extensions" method="post" action="{U_PURGE}">
<fieldset class="submit-buttons">
<legend>{L_PURGE}</legend>
<input class="button1" type="submit" name="purge" value="{L_PURGE}" />
<legend>{L_EXTENSION_DELETE_DATA}</legend>
<input class="button1" type="submit" name="delete_data" value="{L_EXTENSION_DELETE_DATA}" />
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
</fieldset>
</form>
<!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_PURGE_IN_PROGRESS}</p>
<p>{L_EXTENSION_DELETE_DATA_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox">
<p>{L_PURGE_SUCCESS}</p>
<p>{L_EXTENSION_DELETE_DATA_SUCCESS}</p>
<br />
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
</div>
<!-- ENDIF -->

View file

@ -5,29 +5,29 @@
<h1>{L_EXTENSIONS_ADMIN}</h1>
<p>{L_EXTENSIONS_EXPLAIN}</p>
<p>{L_DISABLE_EXPLAIN}</p>
<p>{L_EXTENSION_DISABLE_EXPLAIN}</p>
<!-- IF PRE -->
<div class="errorbox">
<p>{L_DISABLE_CONFIRM}</p>
<p>{L_CONFIRM_MESSAGE}</p>
</div>
<form id="acp_extensions" method="post" action="{U_DISABLE}">
<fieldset class="submit-buttons">
<legend>{L_DISABLE}</legend>
<input class="button1" type="submit" name="disable" value="{L_DISABLE}" />
<legend>{L_EXTENSION_DISABLE}</legend>
<input class="button1" type="submit" name="disable" value="{L_EXTENSION_DISABLE}" />
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
</fieldset>
</form>
<!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_DISABLE_IN_PROGRESS}</p>
<p>{L_EXTENSION_DISABLE_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox">
<p>{L_DISABLE_SUCCESS}</p>
<p>{L_EXTENSION_DISABLE_SUCCESS}</p>
<br />
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
</div>
<!-- ENDIF -->

View file

@ -5,35 +5,35 @@
<h1>{L_EXTENSIONS_ADMIN}</h1>
<p>{L_EXTENSIONS_EXPLAIN}</p>
<p>{L_ENABLE_EXPLAIN}</p>
<p>{L_EXTENSION_ENABLE_EXPLAIN}</p>
<!-- IF MIGRATOR_ERROR -->
<div class="errorbox">
<p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
<p>{MIGRATOR_ERROR}</p>
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
</div>
<!-- ELSEIF PRE -->
<div class="errorbox">
<p>{L_ENABLE_CONFIRM}</p>
<p>{L_CONFIRM_MESSAGE}</p>
</div>
<form id="acp_extensions" method="post" action="{U_ENABLE}">
<fieldset class="submit-buttons">
<legend>{L_ENABLE}</legend>
<input class="button1" type="submit" name="enable" value="{L_ENABLE}" />
<legend>{L_EXTENSION_ENABLE}</legend>
<input class="button1" type="submit" name="enable" value="{L_EXTENSION_ENABLE}" />
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
</fieldset>
</form>
<!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_ENABLE_IN_PROGRESS}</p>
<p>{L_EXTENSION_ENABLE_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox">
<p>{L_ENABLE_SUCCESS}</p>
<p>{L_EXTENSION_ENABLE_SUCCESS}</p>
<br />
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
<p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
</div>
<!-- ENDIF -->

View file

@ -6,7 +6,7 @@
<p>{L_EXTENSIONS_EXPLAIN}</p>
<table cellspacing="1">
<table class="table1">
<col class="row1" ><col class="row2" ><col class="row2" >
<thead>
<tr>
@ -18,17 +18,15 @@
<tbody>
<!-- IF .enabled -->
<tr>
<td class="row3" colspan="3">
<strong>{L_ENABLED} {L_EXTENSIONS}</strong>
</td>
<td class="row3" colspan="3"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
</tr>
<!-- BEGIN enabled -->
<tr class="ext_enabled">
<td><strong>{enabled.META_DISPLAY_NAME}</strong></a></td>
<td><strong>{enabled.META_DISPLAY_NAME}</strong></td>
<td style="text-align: center;"><a href="{enabled.U_DETAILS}">{L_DETAILS}</a></td>
<td style="text-align: center;">
<!-- BEGIN actions -->
<a href="{enabled.actions.U_ACTION}" alt="{enabled.actions.L_ACTION}">{enabled.actions.L_ACTION}</a>
<a href="{enabled.actions.U_ACTION}"<!-- IF enabled.actions.L_ACTION_EXPLAIN --> title="{enabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{enabled.actions.L_ACTION}</a>
<!-- IF not enabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
<!-- END actions -->
</td>
@ -38,17 +36,17 @@
<!-- IF .disabled -->
<tr>
<td class="row3" colspan="3"><strong>{L_DISABLED} {L_EXTENSIONS}</strong></td>
<td class="row3" colspan="3"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
</tr>
<!-- BEGIN disabled -->
<tr class="ext_disabled">
<td><strong>{disabled.META_DISPLAY_NAME}</strong></a></td>
<td><strong>{disabled.META_DISPLAY_NAME}</strong></td>
<td style="text-align: center;">
<!-- IF disabled.U_DETAILS --><a href="{disabled.U_DETAILS}">{L_DETAILS}</a><!-- ENDIF -->
</td>
<td style="text-align: center;">
<!-- BEGIN actions -->
<a href="{disabled.actions.U_ACTION}" alt="{disabled.actions.L_ACTION}">{disabled.actions.L_ACTION}</a>
<a href="{disabled.actions.U_ACTION}"<!-- IF disabled.actions.L_ACTION_EXPLAIN --> title="{disabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{disabled.actions.L_ACTION}</a>
<!-- IF not disabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
<!-- END actions -->
</td>

View file

@ -440,32 +440,23 @@
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->]<!-- ENDIF --></strong></p>
<!-- IF .forums -->
<table cellspacing="1">
<table class="table1 forums">
<col class="row1" /><col class="row1" /><col class="row2" />
<tbody>
<!-- BEGIN forums -->
<tr data-down="{forums.U_MOVE_DOWN}" data-up="{forums.U_MOVE_UP}">
<td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td>
<td>
<tr>
<td class="folder">{forums.FOLDER_IMAGE}</td>
<td class="forum-desc">
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}{L_COLON} <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}{L_COLON} <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
</td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
<td class="actions">
<span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
<span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
<span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
<span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ELSE -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ENDIF -->
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_FORUM_LINK -->
<a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
@ -501,14 +492,6 @@
</fieldset>
</form>
<div class="hidden">
<a class="template-up-img" href="#">{ICON_MOVE_UP}</a>
<span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span>
<a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a>
<span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span>
</div>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->

View file

@ -92,7 +92,12 @@
</dl>
<dl>
<dt><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /><!-- IF GROUP_COLOUR -->&nbsp;<span style="background-color: #{GROUP_COLOUR}">&nbsp; &nbsp;</span><!-- ENDIF -->&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
<dd>
<input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />
<!-- IF GROUP_COLOUR -->&nbsp;<span style="background-color: #{GROUP_COLOUR}">&nbsp; &nbsp;</span><!-- ENDIF -->&nbsp;&nbsp;<span>
[ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]</span>
<div id="color_palette_placeholder" style="display: none;" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div>
</dd>
</dl>
<dl>
<dt><label for="group_rank">{L_GROUP_RANK}{L_COLON}</label></dt>
@ -150,7 +155,7 @@
<a href="{U_DEFAULT_ALL}">&raquo; {L_MAKE_DEFAULT_FOR_ALL}</a>
</fieldset>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>
@ -261,7 +266,7 @@
<form id="acp_groups" method="post" action="{U_ACTION}">
<table cellspacing="1">
<table class="table1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@ -295,7 +300,7 @@
<p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
<table cellspacing="1">
<table class="table1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>

View file

@ -27,7 +27,7 @@
<p>{L_LEGEND_EXPLAIN}</p>
<table cellspacing="1">
<table class="table1">
<col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@ -38,23 +38,14 @@
</thead>
<tbody>
<!-- BEGIN legend -->
<tr data-down="{legend.U_MOVE_DOWN}" data-up="{legend.U_MOVE_UP}">
<tr>
<td><strong<!-- IF legend.GROUP_COLOUR --> style="color: {legend.GROUP_COLOUR}"<!-- ENDIF -->>{legend.GROUP_NAME}</strong></td>
<td style="text-align: center;">{legend.GROUP_TYPE}</td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF legend.S_FIRST_ROW && not legend.S_LAST_ROW -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF not legend.S_FIRST_ROW && not legend.S_LAST_ROW -->
<td class="actions">
<span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
<span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
<span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF legend.S_LAST_ROW && not legend.S_FIRST_ROW -->
<span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ELSE -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ENDIF -->
<a href="{legend.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
@ -115,7 +106,7 @@
<!-- IF S_TEAMPAGE_CATEGORY and CURRENT_CATEGORY_NAME --><p><strong><a href="{U_ACTION}">{L_TEAMPAGE}</a> &raquo; {CURRENT_CATEGORY_NAME}</strong></p><!-- ENDIF -->
<table cellspacing="1">
<table class="table1">
<col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@ -126,7 +117,7 @@
</thead>
<tbody>
<!-- BEGIN teampage -->
<tr data-down="{teampage.U_MOVE_DOWN}" data-up="{teampage.U_MOVE_UP}">
<tr>
<td>
<!-- IF teampage.U_CATEGORY -->
<a href="{teampage.U_CATEGORY}">{teampage.GROUP_NAME}</a>
@ -136,20 +127,11 @@
</td>
<td style="text-align: center;"><!-- IF teampage.GROUP_TYPE -->{teampage.GROUP_TYPE}<!-- ELSE -->-<!-- ENDIF -->
</td></td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF teampage.S_FIRST_ROW && not teampage.S_LAST_ROW -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF not teampage.S_FIRST_ROW && not teampage.S_LAST_ROW -->
<td class="actions">
<span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
<span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
<span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<!-- ELSEIF teampage.S_LAST_ROW && not teampage.S_FIRST_ROW -->
<span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ELSE -->
<span class="up">{ICON_MOVE_UP_DISABLED}</span>
<span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
<!-- ENDIF -->
<a href="{teampage.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
@ -186,12 +168,4 @@
</fieldset>
</form>
<div class="hidden">
<a class="template-up-img" href="#">{ICON_MOVE_UP}</a>
<span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span>
<a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a>
<span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span>
</div>
<!-- INCLUDE overall_footer.html -->

View file

@ -22,7 +22,7 @@
{
var use_element = smiley[newimage];
document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
document.getElementById('add_image_src').src = '{ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
document.getElementById('add_code').value = use_element['code'];
document.getElementById('add_emotion').value = use_element['emotion'];
document.getElementById('add_width').value = use_element['width'];
@ -74,7 +74,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1" id="smilies">
<table class="table1" id="smilies">
<thead>
<tr>
<th colspan="{COLSPAN}">{L_CONFIG}</th>
@ -218,7 +218,7 @@
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_TITLE}</th>

View file

@ -16,7 +16,7 @@
</div>
<!-- ENDIF -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>
@ -53,7 +53,7 @@
</table>
<fieldset class="display-options">
{L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination -->&nbsp;Users per page{L_COLON} <input class="inputbox autowidth" type="number" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
{L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination -->&nbsp;{L_USERS_PER_PAGE}{L_COLON} <input class="inputbox autowidth" type="number" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>

View file

@ -75,7 +75,7 @@
<form id="missing" method="post" action="{U_MISSING_ACTION}">
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_LANGUAGE_KEY}</th>
@ -129,7 +129,7 @@
</style>
<![endif]-->
<table cellspacing="1">
<table class="table1">
<thead>
<!-- IF S_EMAIL_FILE -->
<tr>
@ -211,7 +211,7 @@
<p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_LANGUAGE_PACK_NAME}</th>

View file

@ -22,7 +22,7 @@
<div><br style="clear: both;" /></div>
<!-- IF .log -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>

View file

@ -78,7 +78,7 @@
<!-- EVENT acp_main_notice_after -->
<table cellspacing="1">
<table class="table1 two-columns no-header" data-no-responsive-header="true">
<caption>{L_FORUM_STATS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
@ -168,21 +168,21 @@
</dl>
</form>
<form id="action_stats_form" method="post" action="{U_ACTION}" data-ajax="true">
<form id="action_stats_form" method="post" action="{U_ACTION}">
<dl>
<dt><label for="action_stats">{L_RESYNC_STATS}</label><br /><span>{L_RESYNC_STATS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd>
</dl>
</form>
<form id="action_user_form" method="post" action="{U_ACTION}" data-ajax="true">
<form id="action_user_form" method="post" action="{U_ACTION}">
<dl>
<dt><label for="action_user">{L_RESYNC_POSTCOUNTS}</label><br /><span>{L_RESYNC_POSTCOUNTS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="user" /><input class="button2" type="submit" id="action_user" name="action_user" value="{L_RUN}" /></dd>
</dl>
</form>
<form id="action_db_track_form" method="post" action="{U_ACTION}" data-ajax="true">
<form id="action_db_track_form" method="post" action="{U_ACTION}">
<dl>
<dt><label for="action_db_track">{L_RESYNC_POST_MARKING}</label><br /><span>{L_RESYNC_POST_MARKING_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="db_track" /><input class="button2" type="submit" id="action_db_track" name="action_db_track" value="{L_RUN}" /></dd>
@ -216,7 +216,7 @@
<div style="text-align: right;"><a href="{U_ADMIN_LOG}">&raquo; {L_VIEW_ADMIN_LOG}</a></div>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>
@ -249,7 +249,7 @@
<div style="text-align: right;"><a href="{U_INACTIVE_USERS}">&raquo; {L_VIEW_INACTIVE_USERS}</a></div>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>

View file

@ -132,7 +132,7 @@
</div>
<!-- ENDIF -->
<table cellspacing="1">
<table class="table1">
<tbody>
<tr>
<td class="row3">{NAVIGATION}<!-- IF S_NO_MODULES --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a> | <!-- IF MODULE_ENABLED --><a href="{U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->]<!-- ENDIF --></td>
@ -141,7 +141,7 @@
</table>
<!-- IF .modules -->
<table cellspacing="1">
<table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
<tbody>
<!-- BEGIN modules -->
@ -149,20 +149,11 @@
<td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
<td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
<!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ELSE -->
{ICON_MOVE_UP_DISABLED}
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<td class="actions">
<span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
<span class="up"><a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a></span>
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
<span class="down"><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a></span>
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
<a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>

View file

@ -90,9 +90,8 @@
</div>
<!-- BEGIN auth -->
<div class="permissions-panel" id="options00{auth.S_ROW_COUNT}"<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
<span class="corners-top"><span></span></span>
<div class="tablewrap">
<table id="table00{auth.S_ROW_COUNT}" cellspacing="1">
<table id="table00{auth.S_ROW_COUNT}" class="table1 not-responsive">
<colgroup>
<col class="permissions-name" />
<col class="permissions-yes" />
@ -120,7 +119,6 @@
</tbody>
</table>
</div>
<span class="corners-bottom"><span></span></span>
</div>
<!-- END auth -->
</div>
@ -144,7 +142,7 @@
<form id="acp_roles" method="post" action="{U_ACTION}">
<table cellspacing="1">
<table class="table1">
<col class="col2" /><col class="col2" /><col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>

View file

@ -110,7 +110,7 @@
<!-- ELSEIF S_SELECT_USERGROUP -->
<div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
<div class="column1">
<!-- IF S_CAN_SELECT_USER -->
@ -155,7 +155,7 @@
</div>
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
<div class="column2">
<!-- IF S_CAN_SELECT_GROUP -->
@ -200,7 +200,7 @@
<!-- ELSEIF S_SELECT_USERGROUP_VIEW -->
<div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
<div class="column1">
<h1>{L_USERS}</h1>
@ -241,7 +241,7 @@
</div>
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
<div class="column2">
<h1>{L_USERGROUPS}</h1>
@ -324,7 +324,7 @@
</form>
<!-- ENDIF -->
<br /><br />
<br class="responsive-hide" /><br class="responsive-hide" />
<!-- include tooltip file -->
<script type="text/javascript" src="style/tooltip.js"></script>
@ -340,7 +340,7 @@
<!-- INCLUDE permission_mask.html -->
<br /><br />
<br class="responsive-hide" /><br class="responsive-hide" />
<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
<input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" />
@ -348,7 +348,7 @@
{S_FORM_TOKEN}
</fieldset>
<br /><br />
<br class="responsive-hide" /><br class="responsive-hide" />
</form>

View file

@ -185,7 +185,7 @@
</div>
<!-- ENDIF -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_FIELD_IDENT}</th>

View file

@ -8,7 +8,7 @@
<p>{L_PRUNE_SUCCESS}</p>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_FORUM}</th>

View file

@ -65,7 +65,7 @@
<fieldset class="tabulated">
<legend>{L_ACP_MANAGE_RANKS}</legend>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_RANK_IMAGE}</th>

View file

@ -68,7 +68,7 @@
<legend>{L_ACP_REASONS}</legend>
<!-- IF .reasons -->
<table cellspacing="1">
<table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>

View file

@ -112,7 +112,7 @@
<legend>{L_INDEX_STATS}{L_COLON} {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend>
<table cellspacing="1">
<table class="table1">
<caption>{backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>

View file

@ -79,7 +79,7 @@
<!-- ENDIF -->
<!-- IF .styles_list -->
<table cellspacing="1">
<table class="table1 styles">
<thead>
<tr>
<th>{L_STYLE_NAME}</th>
@ -97,9 +97,9 @@
<!-- ELSE -->
<!-- IF $ROW_CLASS == 'row2a' --><!-- DEFINE $ROW_CLASS = 'row2b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row2a' --><!-- ENDIF -->
<!-- ENDIF -->
<td class="{$ROW_CLASS}" style="padding-left: {styles_list.PADDING}px;">
<td class="{$ROW_CLASS}" style="padding-{S_CONTENT_FLOW_BEGIN}: {styles_list.PADDING}px;">
<!-- IF styles_list.STYLE_ID and styles_list.COMMENT == '' and styles_list.STYLE_ACTIVE -->
<div class="default-style" style="display: none; float: right;">
<div class="default-style" style="display: none; float: {S_CONTENT_FLOW_END};">
<input class="radio" type="radio" name="default" value="{styles_list.STYLE_ID}"<!-- IF styles_list.DEFAULT --> checked="checked"<!-- ELSE --><!-- DEFINE $S_DEFAULT = 1 --><!-- ENDIF --> title="{L_STYLE_DEFAULT}" />
</div>
<!-- ENDIF -->
@ -117,9 +117,9 @@
<!-- ENDIF -->
</td>
<!-- IF not STYLES_LIST_HIDE_COUNT -->
<td class="{$ROW_CLASS}" style="text-align: center;">{styles_list.USERS}</td>
<td class="{$ROW_CLASS} users">{styles_list.USERS}</td>
<!-- ENDIF -->
<td class="{$ROW_CLASS}" style="text-align: center;">
<td class="{$ROW_CLASS} actions">
<!-- BEGIN actions -->
<!-- IF styles_list.actions.S_ROW_COUNT > 0 --> | <!-- ENDIF -->
<!-- IF styles_list.actions.U_ACTION -->
@ -129,7 +129,7 @@
<!-- END actions -->
</td>
{styles_list.EXTRA}
<td class="{$ROW_CLASS}" width="20" style="text-align: center;">
<td class="{$ROW_CLASS} mark" width="20">
<!-- IF styles_list.STYLE_ID -->
<input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
<!-- ELSE -->

View file

@ -125,7 +125,7 @@
<form id="user_groups" method="post" action="{U_ACTION}">
<table cellspacing="1">
<table class="table1">
<tbody>
<!-- BEGIN group -->
<!-- IF group.S_NEW_GROUP_TYPE -->
@ -164,7 +164,7 @@
</div>
<!-- IF .attach -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_FILENAME}</th>

View file

@ -7,7 +7,7 @@
</div>
<!-- IF .log -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_REPORT_BY}</th>

View file

@ -39,11 +39,6 @@
<dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="notifypm" value="0"<!-- IF not NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="popuppm">{L_POPUP_ON_PM}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="lang">{L_BOARD_LANGUAGE}{L_COLON}</label></dt>
<dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd>

View file

@ -3,6 +3,8 @@
var form_name = 'user_signature';
var text_name = 'signature';
var load_draft = false;
var upload = false;
// Define the bbCode tags
var bbcode = new Array();
@ -20,11 +22,11 @@
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
a: '{LA_BBCODE_A_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
y: '{LA_BBCODE_Y_HELP}',
d: '{LA_BBCODE_D_HELP}',
tip: '{L_STYLES_TIP}'
d: '{LA_BBCODE_D_HELP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
@ -32,7 +34,7 @@
// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<form id="user_signature" method="post" action="{U_ACTION}">
@ -48,52 +50,46 @@
<p>{L_SIGNATURE_EXPLAIN}</p>
<div id="format-buttons">
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('y')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
<!-- ENDIF -->
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
<input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
<!-- ENDIF -->
{L_FONT_SIZE}{L_COLON} <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_FONT_SIZE}" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
<option value="150">{L_FONT_LARGE}</option>
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
<option value="200">{L_FONT_HUGE}</option>
</select>
<!-- IF .custom_tags -->
<br /><br />
<!-- BEGIN custom_tags -->
<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
<!-- ENDIF -->
<!-- ENDIF -->
</select>
<!-- BEGIN custom_tags -->
<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
<!-- END custom_tags -->
</div>
<p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
<dl>
<dt style="width: 90px;">
<script type="text/javascript">
// <![CDATA[
colorPalette('v', 12, 10);
// ]]>
</script>
<dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
</dt>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px; margin-top: 5px;">
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
<!-- IF S_BBCODE_ALLOWED -->
<label><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label>
<!-- ENDIF -->
@ -104,7 +100,7 @@
<label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
<!-- ENDIF -->
</dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
</dl>
</fieldset>

View file

@ -1,7 +1,7 @@
<form id="list" method="post" action="{U_ACTION}">
<!-- IF .warn -->
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_REPORT_BY}</th>

View file

@ -47,7 +47,7 @@
<input class="button2" name="add" type="submit" value="{L_ADD_WORD}" />
</p>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th>{L_WORD}</th>

File diff suppressed because it is too large Load diff

246
phpBB/adm/style/admin.js Normal file
View file

@ -0,0 +1,246 @@
/**
* phpBB3 ACP functions
*/
/**
* Parse document block
*/
function parse_document(container)
{
var test = document.createElement('div'),
oldBrowser = (typeof test.style.borderRadius == 'undefined');
delete test;
/**
* Navigation
*/
container.find('#menu').each(function() {
var menu = $(this),
blocks = menu.children('.menu-block');
if (!blocks.length) {
return;
}
// Set onclick event
blocks.children('a.header').click(function() {
var parent = $(this).parent();
if (!parent.hasClass('active')) {
parent.siblings().removeClass('active');
}
parent.toggleClass('active');
});
// Set active menu
menu.find('#activemenu').parents('.menu-block').addClass('active');
// Check if there is active menu
if (!blocks.filter('.active').length) {
blocks.filter(':first').addClass('active');
}
});
/**
* Responsive tables
*/
container.find('table').not('.not-responsive').each(function() {
var $this = $(this),
th = $this.find('thead > tr > th'),
columns = th.length,
headers = [],
totalHeaders = 0,
i, headersLength;
// Find columns
$this.find('colgroup:first').children().each(function(i) {
var column = $(this);
$this.find('td:nth-child(' + (i + 1) + ')').addClass(column.prop('className'));
});
// Styles table
if ($this.hasClass('styles')) {
$this.find('td:first-child[style]').each(function() {
var style = $(this).attr('style');
if (style.length) {
$(this).parent('tr').attr('style', style.toLowerCase().replace('padding', 'margin')).addClass('responsive-style-row');
}
});
}
// Find each header
if (!$this.data('no-responsive-header'))
{
th.each(function(column) {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
dfn = cell.attr('data-dfn'),
text = dfn ? dfn : cell.text().trim();
if (text == '&nbsp;') text = '';
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
for (i=0; i<colspan; i++) {
headers.push(text);
}
totalHeaders ++;
if (dfn && !column) {
$this.addClass('show-header');
}
});
}
headersLength = headers.length;
// Add header text to each cell as <dfn>
$this.addClass('responsive');
if (totalHeaders < 2) {
$this.addClass('show-header');
return;
}
$this.find('tbody > tr').each(function() {
var row = $(this),
cells = row.children('td'),
column = 0;
if (cells.length == 1) {
row.addClass('big-column');
return;
}
cells.each(function() {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
text = cell.text().trim();
if (headersLength <= column) {
return;
}
if ((text.length && text !== '-') || cell.children().length) {
if (headers[column] != '') {
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
}
}
else {
cell.addClass('empty');
}
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
column += colspan;
});
});
// Remove <dfn> in disabled extensions list
$this.find('tr.ext_disabled > .empty:nth-child(2) + .empty').siblings(':first-child').children('dfn').remove();
});
/**
* Hide empty responsive tables
*/
container.find('table.responsive > tbody').each(function() {
var items = $(this).children('tr');
if (items.length == 0)
{
$(this).parent('table:first').addClass('responsive-hide');
}
});
/**
* Fieldsets with empty <span>
*/
container.find('fieldset dt > span:last-child').each(function() {
var $this = $(this);
if ($this.html() == '&nbsp;') {
$this.addClass('responsive-hide');
}
});
/**
* Responsive tabs
*/
container.find('#tabs').not('[data-skip-responsive]').each(function() {
var $this = $(this),
$body = $('body'),
ul = $this.children(),
tabs = ul.children().not('[data-skip-responsive]'),
links = tabs.children('a'),
item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
menu = item.find('.dropdown-contents'),
maxHeight = 0,
lastWidth = false,
responsive = false;
links.each(function() {
var link = $(this);
maxHeight = Math.max(maxHeight, Math.max(link.outerHeight(true), link.parent().outerHeight(true)));
})
function check() {
var width = $body.width(),
height = $this.height();
if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
return;
}
tabs.show();
item.hide();
lastWidth = width;
height = $this.height();
if (height <= maxHeight) {
responsive = false;
if (item.hasClass('dropdown-visible')) {
phpbb.toggleDropdown.call(item.find('a.responsive-tab-link').get(0));
}
return;
}
responsive = true;
item.show();
menu.html('');
var availableTabs = tabs.filter(':not(.activetab, .responsive-tab)'),
total = availableTabs.length,
i, tab;
for (i = total - 1; i >= 0; i --) {
tab = availableTabs.eq(i);
menu.prepend(tab.clone(true));
tab.hide();
if ($this.height() <= maxHeight) {
menu.find('a').click(function() { check(true); });
return;
}
}
menu.find('a').click(function() { check(true); });
}
phpbb.registerDropdown(item.find('a.responsive-tab-link'), item.find('.dropdown'), {visibleClass: 'activetab', verticalDirection: 'down'});
check(true);
$(window).resize(check);
});
}
/**
* Run onload functions
*/
(function($) {
$(document).ready(function() {
// Swap .nojs and .hasjs
$('body.nojs').toggleClass('nojs hasjs');
// Focus forms
$('form[data-focus]:first').each(function() {
$('#' + this.getAttribute('data-focus')).focus();
});
parse_document($('body'));
});
})(jQuery);

View file

@ -2,13 +2,6 @@
"use strict";
var imgTemplates = {
up: $('.template-up-img'),
upDisabled: $('.template-up-img-disabled'),
down: $('.template-down-img'),
downDisabled: $('.template-down-img-disabled')
};
/**
* The following callbacks are for reording items. row_down
* is triggered when an item is moved down, and row_up is triggered when
@ -20,43 +13,7 @@ phpbb.addAjaxCallback('row_down', function() {
tr = el.parents('tr'),
trSwap = tr.next();
/*
* If the element was the first one, we have to:
* - Add the up-link to the row we moved
* - Remove the up-link on the next row
*/
if (tr.is(':first-child')) {
var upImg = imgTemplates.up.clone().attr('href', tr.attr('data-up'));
tr.find('.up').html(upImg);
phpbb.ajaxify({
selector: tr.find('.up').children('a'),
callback: 'row_up',
overlay: false
});
trSwap.find('.up').html(imgTemplates.upDisabled.clone());
}
tr.insertAfter(trSwap);
/*
* As well as:
* - Remove the down-link on the moved row, if it is now the last row
* - Add the down-link to the next row, if it was the last row
*/
if (tr.is(':last-child')) {
tr.find('.down').html(imgTemplates.downDisabled.clone());
var downImg = imgTemplates.down.clone().attr('href', trSwap.attr('data-down'));
trSwap.find('.down').html(downImg);
phpbb.ajaxify({
selector: trSwap.find('.down').children('a'),
callback: 'row_down',
overlay: false
});
}
});
phpbb.addAjaxCallback('row_up', function() {
@ -64,43 +21,7 @@ phpbb.addAjaxCallback('row_up', function() {
tr = el.parents('tr'),
trSwap = tr.prev();
/*
* If the element was the last one, we have to:
* - Add the down-link to the row we moved
* - Remove the down-link on the next row
*/
if (tr.is(':last-child')) {
var downImg = imgTemplates.down.clone().attr('href', tr.attr('data-down'));
tr.find('.down').html(downImg);
phpbb.ajaxify({
selector: tr.find('.down').children('a'),
callback: 'row_down',
overlay: false
});
trSwap.find('.down').html(imgTemplates.downDisabled.clone());
}
tr.insertBefore(trSwap);
/*
* As well as:
* - Remove the up-link on the moved row, if it is now the first row
* - Add the up-link to the previous row, if it was the first row
*/
if (tr.is(':first-child')) {
tr.find('.up').html(imgTemplates.upDisabled.clone());
var upImg = imgTemplates.up.clone().attr('href', trSwap.attr('data-up'));
trSwap.find('.up').html(upImg);
phpbb.ajaxify({
selector: trSwap.find('.up').children('a'),
callback: 'row_up',
overlay: false
});
}
});
/**

View file

@ -14,7 +14,7 @@
<fieldset class="tabulated">
<legend>{L_QUESTIONS}</legend>
<table cellspacing="1">
<table class="table1">
<thead>
<tr>
<th colspan="3">{L_QUESTIONS}</th>

View file

@ -1,75 +0,0 @@
<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<title>{L_COLOUR_SWATCH}</title>
<style type="text/css">
/* <![CDATA[ */
body {
background-color: #404040;
color: #fff;
}
td {
border: solid 1px #333;
}
.over {
border-color: white;
}
.out {
border-color: #333333;
}
img {
border: 0;
}
/* ]]> */
</style>
</head>
<body>
<script type="text/javascript">
// <![CDATA[
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
numberList[0] = '00';
numberList[1] = '33';
numberList[2] = '66';
numberList[3] = '99';
numberList[4] = 'CC';
numberList[5] = 'FF';
document.writeln('<table cellspacing="0" cellpadding="0" border="0">');
for (r = 0; r < 6; r++)
{
document.writeln('<tr>');
for (g = 0; g < 6; g++)
{
for (b = 0; b < 6; b++)
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
document.write('<a href="#" onclick="cell(\'' + color + '\'); return false;"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
document.writeln('<\/td>');
}
}
document.writeln('<\/tr>');
}
document.writeln('<\/table>');
function cell(color)
{
opener.document.forms["{OPENER}"].{NAME}.value = color;
}
// ]]>
</script>
</body>
</html>

View file

@ -1,336 +0,0 @@
/**
* bbCode control by subBlue design [ www.subBlue.com ]
* Includes unixsafe colour palette selector by SHS`
*/
// Startup variables
var imageTag = false;
var theSelection = false;
// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion, 10); // Get browser version
var is_ie = ((clientPC.indexOf('msie') !== -1) && (clientPC.indexOf('opera') === -1));
var is_win = ((clientPC.indexOf('win') !== -1) || (clientPC.indexOf('16bit') !== -1));
var baseHeight;
/**
* Shows the help messages in the helpline window
*/
function helpline(help) {
document.forms[form_name].helpbox.value = help_line[help];
}
/**
* Fix a bug involving the TextRange object. From
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
*/
function initInsertions() {
var doc;
if (document.forms[form_name]) {
doc = document;
} else {
doc = opener.document;
}
var textarea = doc.forms[form_name].elements[text_name];
if (is_ie && typeof(baseHeight) !== 'number') {
textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHeight;
if (!document.forms[form_name]) {
document.body.focus();
}
}
}
/**
* bbstyle
*/
function bbstyle(bbnumber) {
if (bbnumber !== -1) {
bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
} else {
insert_text('[*]');
document.forms[form_name].elements[text_name].focus();
}
}
/**
* Apply bbcodes
*/
function bbfontstyle(bbopen, bbclose) {
theSelection = false;
var textarea = document.forms[form_name].elements[text_name];
textarea.focus();
if ((clientVer >= 4) && is_ie && is_win) {
// Get text selection
theSelection = document.selection.createRange().text;
if (theSelection) {
// Add tags around selection
document.selection.createRange().text = bbopen + theSelection + bbclose;
document.forms[form_name].elements[text_name].focus();
theSelection = '';
return;
}
} else if (document.forms[form_name].elements[text_name].selectionEnd
&& (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) {
mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
document.forms[form_name].elements[text_name].focus();
theSelection = '';
return;
}
//The new position for the cursor after adding the bbcode
var caret_pos = getCaretPosition(textarea).start;
var new_pos = caret_pos + bbopen.length;
// Open tag
insert_text(bbopen + bbclose);
// Center the cursor when we don't have a selection
// Gecko and proper browsers
if (!isNaN(textarea.selectionStart)) {
textarea.selectionStart = new_pos;
textarea.selectionEnd = new_pos;
}
// IE
else if (document.selection) {
var range = textarea.createTextRange();
range.move("character", new_pos);
range.select();
storeCaret(textarea);
}
textarea.focus();
return;
}
/**
* Insert text at position
*/
function insert_text(text, spaces, popup) {
var textarea;
if (!popup) {
textarea = document.forms[form_name].elements[text_name];
} else {
textarea = opener.document.forms[form_name].elements[text_name];
}
if (spaces) {
text = ' ' + text + ' ';
}
if (!isNaN(textarea.selectionStart)) {
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
mozWrap(textarea, text, '');
textarea.selectionStart = sel_start + text.length;
textarea.selectionEnd = sel_end + text.length;
} else if (textarea.createTextRange && textarea.caretPos) {
if (baseHeight !== textarea.caretPos.boundingHeight) {
textarea.focus();
storeCaret(textarea);
}
var caret_pos = textarea.caretPos;
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) === ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
} else {
textarea.value = textarea.value + text;
}
if (!popup) {
textarea.focus();
}
}
/**
* Add inline attachment at position
*/
function attach_inline(index, filename) {
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
document.forms[form_name].elements[text_name].focus();
}
/**
* Add quote text to message
*/
function addquote(post_id, username)
{
var message_name = 'message_' + post_id;
var theSelection = '';
var divarea = false;
if (document.all) {
divarea = document.all[message_name];
} else {
divarea = document.getElementById(message_name);
}
// Get text selection - not only the post content :(
if (window.getSelection) {
theSelection = window.getSelection().toString();
} else if (document.getSelection) {
theSelection = document.getSelection();
} else if (document.selection) {
theSelection = document.selection.createRange().text;
}
if (theSelection === '' || typeof theSelection === 'undefined' || theSelection === null) {
if (divarea.innerHTML) {
theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
theSelection = theSelection.replace(/<br\/>/ig, '\n');
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
} else if (document.all) {
theSelection = divarea.innerText;
} else if (divarea.textContent) {
theSelection = divarea.textContent;
} else if (divarea.firstChild.nodeValue) {
theSelection = divarea.firstChild.nodeValue;
}
}
if (theSelection) {
insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
}
return;
}
/**
* From http://www.massless.org/mozedit/
*/
function mozWrap(txtarea, open, close) {
var selLength = (typeof(txtarea.textLength) === 'undefined') ? txtarea.value.length : txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;
if (selEnd === 1 || selEnd === 2) {
selEnd = selLength;
}
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd);
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
txtarea.selectionStart = selStart + open.length;
txtarea.selectionEnd = selEnd + open.length;
txtarea.focus();
txtarea.scrollTop = scrollTop;
return;
}
/**
* Insert at Caret position. Code from
* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
*/
function storeCaret(textEl) {
if (textEl.createTextRange) {
textEl.caretPos = document.selection.createRange().duplicate();
}
}
/**
* Color pallette
*/
function colorPalette(dir, width, height) {
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
var color = '';
numberList[0] = '00';
numberList[1] = '40';
numberList[2] = '80';
numberList[3] = 'BF';
numberList[4] = 'FF';
document.writeln('<table class="type2">');
for (r = 0; r < 5; r++) {
if (dir === 'h') {
document.writeln('<tr>');
}
for (g = 0; g < 5; g++) {
if (dir === 'v') {
document.writeln('<tr>');
}
for (b = 0; b < 5; b++) {
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
if (dir === 'v') {
document.writeln('</tr>');
}
}
if (dir === 'h') {
document.writeln('</tr>');
}
}
document.writeln('</table>');
}
/**
* Caret Position object
*/
function caretPosition() {
var start = null;
var end = null;
}
/**
* Get the caret position in an textarea
*/
function getCaretPosition(txtarea) {
var caretPos = new caretPosition();
// simple Gecko/Opera way
if (txtarea.selectionStart || txtarea.selectionStart === 0) {
caretPos.start = txtarea.selectionStart;
caretPos.end = txtarea.selectionEnd;
}
// dirty and slow IE way
else if (document.selection) {
// get current selection
var range = document.selection.createRange();
// a new selection of the whole textarea
var range_all = document.body.createTextRange();
range_all.moveToElementText(txtarea);
// calculate selection start point by moving beginning of range_all to beginning of range
var sel_start;
for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) {
range_all.moveStart('character', 1);
}
txtarea.sel_start = sel_start;
// we ignore the end value for IE, this is already dirty enough and we don't need it
caretPos.start = txtarea.sel_start;
caretPos.end = txtarea.sel_start;
}
return caretPos;
}

View file

@ -22,7 +22,7 @@
<!-- ENDIF -->
<!-- IF S_LIST -->
<table cellspacing="1">
<table class="table1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>

View file

@ -1,10 +1,7 @@
</div>
</div>
<span class="corners-bottom"><span></span></span>
<div class="clear"></div>
</div>
</div><!-- /#main -->
</div>
</div><!-- /#acp -->
</div>
<div id="page-footer">
@ -14,6 +11,8 @@
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
</body>
</html>

View file

@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
@ -34,7 +35,7 @@ function dE(n, s, type)
</head>
<body class="{S_CONTENT_DIRECTION}">
<body class="{S_CONTENT_DIRECTION} nojs">
<div id="wrap">
<div id="page-header">
<h1>{L_INSTALL_PANEL}</h1>
@ -54,16 +55,15 @@ function dE(n, s, type)
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
<li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<!-- END t_block1 -->
</ul>
</div>
<div id="acp">
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
<div id="menu">
<div class="menu-block no-header">
<ul>
<!-- BEGIN l_block1 -->
<li<!-- IF l_block1.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li>
@ -73,5 +73,7 @@ function dE(n, s, type)
<!-- END l_block2 -->
</ul>
</div>
</div>
<div id="main" class="install-body">
<div class="main">

View file

@ -395,7 +395,7 @@
<p>{L_MAPPING_FILE_STRUCTURE}</p>
<table cellspacing="1">
<table class="table1">
<col class="row1" /><col class="row2" /><col class="row1" />
<thead>
<tr>

View file

@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
@ -33,7 +34,7 @@ window.onresize = resize_panel;
<style type="text/css">
/* <![CDATA[ */
#main {
#main, .rtl #main {
font-size: 1em;
line-height: 0.7em;
margin: 0;
@ -43,6 +44,7 @@ window.onresize = resize_panel;
#diff_content {
padding: 30px 10px 10px;
overflow: hidden;
}
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
@ -238,14 +240,12 @@ table.hrdiff caption span {
<div id="page-body">
<div id="acp">
<div class="panel" id="codepanel">
<span class="corners-top"><span></span></span>
<div id="codepanel">
<div id="diff_content">
<div id="main">
{DIFF_CONTENT}
</div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
</div>

View file

@ -1,10 +1,7 @@
</div>
</div>
<span class="corners-bottom"><span></span></span>
<div class="clear"></div>
</div>
</div><!-- /#main -->
</div>
</div><!-- /#acp -->
</div>
<div id="page-footer">
@ -20,8 +17,8 @@
<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
<div id="darken">&nbsp;</div>
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>
<div id="loading_indicator"></div>
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
<a href="#" class="alert_close"></a>
@ -38,6 +35,7 @@
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
<!-- EVENT acp_overall_footer_after -->

View file

@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
@ -14,9 +15,6 @@ var on_page = '{ON_PAGE}';
var per_page = '{PER_PAGE}';
var base_url = '{BASE_URL|e('js')}';
var menu_state = 'shown';
/**
* Jump to page
*/
@ -103,62 +101,12 @@ function popup(url, width, height, name)
return false;
}
/**
* Hiding/Showing the side menu
*/
function switch_menu()
{
var menu = document.getElementById('menu');
var main = document.getElementById('main');
var toggle = document.getElementById('toggle');
var handle = document.getElementById('toggle-handle');
switch (menu_state)
{
// hide
case 'shown':
main.style.width = '93%';
menu_state = 'hidden';
menu.style.display = 'none';
toggle.style.width = '20px';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundRepeat = 'no-repeat';
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
handle.style.backgroundPosition = '0% 50%';
toggle.style.left = '96%';
<!-- ELSE -->
handle.style.backgroundPosition = '100% 50%';
toggle.style.left = '0';
<!-- ENDIF -->
break;
// show
case 'hidden':
main.style.width = '76%';
menu_state = 'shown';
menu.style.display = 'block';
toggle.style.width = '5%';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundRepeat = 'no-repeat';
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
handle.style.backgroundPosition = '100% 50%';
toggle.style.left = '75%';
<!-- ELSE -->
handle.style.backgroundPosition = '0% 50%';
toggle.style.left = '15%';
<!-- ENDIF -->
break;
}
}
// ]]>
</script>
<!-- EVENT acp_overall_header_head_append -->
</head>
<body class="{S_CONTENT_DIRECTION}">
<body class="{S_CONTENT_DIRECTION} nojs">
<div id="wrap">
<div id="page-header">
@ -171,29 +119,25 @@ function switch_menu()
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
<li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<!-- END t_block1 -->
</ul>
</div>
<div id="acp">
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
<!-- IF not S_USER_NOTICE -->
<div id="toggle">
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<!-- ENDIF -->
<div id="menu">
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;][&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<ul>
<!-- DEFINE $LI_USED = 0 -->
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
<!-- BEGIN l_block2 -->
<!-- IF .l_block1.l_block2.l_block3 -->
<li class="header">{l_block1.l_block2.L_TITLE}</li>
<!-- IF $LI_USED --></ul></div><!-- ENDIF -->
<div class="menu-block">
<a class="header" href="javascript:void(0);">{l_block1.l_block2.L_TITLE}</a>
<ul>
<!-- DEFINE $LI_USED = 1 -->
<!-- ENDIF -->
@ -205,10 +149,11 @@ function switch_menu()
<!-- ENDIF -->
<!-- END l_block1 -->
<!-- IF not $LI_USED -->
<li></li>
<!-- ENDIF -->
<!-- IF $LI_USED -->
</ul>
</div>
<!-- ENDIF -->
</div>
<div id="main">
<div class="main">

View file

@ -75,9 +75,8 @@
<!-- BEGIN category -->
<div class="permissions-panel" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" <!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
<span class="corners-top"><span></span></span>
<div class="tablewrap">
<table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" cellspacing="1">
<table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" class="table1 not-responsive">
<colgroup>
<col class="permissions-name" />
<col class="permissions-yes" />
@ -128,7 +127,6 @@
<!-- ENDIF -->
<span class="corners-bottom"><span></span></span>
</div>
<!-- END category -->
<div class="clearfix"></div>

View file

@ -1,7 +1,7 @@
<!-- BEGIN role_mask -->
<table cellspacing="1">
<table class="table1">
<caption><!-- IF role_mask.FORUM_ID -->{L_FORUM}{L_COLON} <!-- ENDIF -->{role_mask.NAME}</caption>
<tbody>
<tr>

View file

@ -8,7 +8,7 @@
<br />
<table cellspacing="1" class="type1">
<table class="table1">
<thead>
<tr>
<th>{L_TRACE_WHO}</th>

View file

@ -1,50 +0,0 @@
<?php
/**
*
* @package phpBB3
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
define('ADMIN_START', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin(false);
$auth->acl($user->data);
$user->setup();
// Set custom template for admin area
$template->set_custom_style('adm', $phpbb_admin_path . 'style');
$template->set_filenames(array(
'body' => 'colour_swatch.html')
);
$form = request_var('form', '');
$name = request_var('name', '');
// We validate form and name here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
$template->assign_vars(array(
'OPENER' => $form,
'NAME' => $name,
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
'S_CONTENT_ENCODING' => 'UTF-8',
));
$template->display('body');
garbage_collection();

View file

@ -12,31 +12,28 @@ var keymap = {
};
var dark = $('#darkenwrapper');
var loadingAlert = $('#loadingalert');
var loadingIndicator = $('#loading_indicator');
var phpbbAlertTimer = null;
var isTouch = (window && typeof window.ontouchstart !== 'undefined');
/**
* Display a loading screen
*
* @returns object Returns loadingAlert.
* @returns object Returns loadingIndicator.
*/
phpbb.loadingAlert = function() {
if (dark.is(':visible')) {
loadingAlert.fadeIn(phpbb.alertTime);
} else {
loadingAlert.show();
dark.fadeIn(phpbb.alertTime, function() {
// Wait five seconds and display an error if nothing has been returned by then.
phpbb.loadingIndicator = function() {
if (!loadingIndicator.is(':visible')) {
loadingIndicator.fadeIn(phpbb.alertTime);
// Wait fifteen seconds and display an error if nothing has been returned by then.
phpbbAlertTimer = setTimeout(function() {
if (loadingAlert.is(':visible')) {
if (loadingIndicator.is(':visible')) {
phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
}
}, 5000);
});
}, 15000);
}
return loadingAlert;
return loadingIndicator;
};
/**
@ -66,6 +63,10 @@ phpbb.alert = function(title, msg, fadedark) {
div.find('.alert_title').html(title);
div.find('.alert_text').html(msg);
if (!dark.is(':visible')) {
dark.fadeIn(phpbb.alertTime);
}
div.bind('click', function(e) {
e.stopPropagation();
});
@ -97,8 +98,8 @@ phpbb.alert = function(title, msg, fadedark) {
e.preventDefault();
});
if (loadingAlert.is(':visible')) {
loadingAlert.fadeOut(phpbb.alertTime, function() {
if (loadingIndicator.is(':visible')) {
loadingIndicator.fadeOut(phpbb.alertTime, function() {
dark.append(div);
div.fadeIn(phpbb.alertTime);
});
@ -131,6 +132,10 @@ phpbb.confirm = function(msg, callback, fadedark) {
var div = $('#phpbb_confirm');
div.find('.alert_text').html(msg);
if (!dark.is(':visible')) {
dark.fadeIn(phpbb.alertTime);
}
div.bind('click', function(e) {
e.stopPropagation();
});
@ -184,8 +189,8 @@ phpbb.confirm = function(msg, callback, fadedark) {
e.preventDefault();
});
if (loadingAlert.is(':visible')) {
loadingAlert.fadeOut(phpbb.alertTime, function() {
if (loadingIndicator.is(':visible')) {
loadingIndicator.fadeOut(phpbb.alertTime, function() {
dark.append(div);
div.fadeIn(phpbb.alertTime);
});
@ -326,12 +331,12 @@ phpbb.ajaxify = function(options) {
// If confirmation is required, display a dialog to the user.
phpbb.confirm(res.MESSAGE_BODY, function(del) {
if (del) {
phpbb.loadingAlert();
phpbb.loadingIndicator();
data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
$.ajax({
url: res.S_CONFIRM_ACTION,
type: 'POST',
data: data + '&confirm=' + res.YES_VALUE,
data: data + '&confirm=' + res.YES_VALUE + '&' + $('#phpbb_confirm form').serialize(),
success: returnHandler,
error: errorHandler
});
@ -369,16 +374,19 @@ phpbb.ajaxify = function(options) {
}
if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') === 'true')) {
phpbb.loadingAlert();
phpbb.loadingIndicator();
}
$.ajax({
var request = $.ajax({
url: action,
type: method,
data: data,
success: returnHandler,
error: errorHandler
});
request.always(function() {
loadingIndicator.fadeOut(phpbb.alertTime);
});
event.preventDefault();
});
@ -616,8 +624,9 @@ phpbb.resizeTextArea = function(items, options) {
resetCallback: function(item) { }
};
if (arguments.length > 1)
{
if (isTouch) return;
if (arguments.length > 1) {
configuration = $.extend(configuration, options);
}
@ -829,6 +838,219 @@ phpbb.applyCodeEditor = function(textarea) {
});
};
/**
* List of classes that toggle dropdown menu,
* list of classes that contain visible dropdown menu
*
* Add your own classes to strings with comma (probably you
* will never need to do that)
*/
phpbb.dropdownHandles = '.dropdown-container.dropdown-visible .dropdown-toggle';
phpbb.dropdownVisibleContainers = '.dropdown-container.dropdown-visible';
/**
* Dropdown toggle event handler
* This handler is used by phpBB.registerDropdown() and other functions
*/
phpbb.toggleDropdown = function() {
var $this = $(this),
options = $this.data('dropdown-options'),
parent = options.parent,
visible = parent.hasClass('dropdown-visible');
if (!visible) {
// Hide other dropdown menus
$(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
// Figure out direction of dropdown
var direction = options.direction,
verticalDirection = options.verticalDirection,
offset = $this.offset();
if (direction == 'auto') {
if (($(window).width() - $this.outerWidth(true)) / 2 > offset.left) {
direction = 'right';
}
else {
direction = 'left';
}
}
parent.toggleClass(options.leftClass, direction == 'left').toggleClass(options.rightClass, direction == 'right');
if (verticalDirection == 'auto') {
var height = $(window).height(),
top = offset.top - $(window).scrollTop();
if (top < height * 0.7) {
verticalDirection = 'down';
}
else {
verticalDirection = 'up';
}
}
parent.toggleClass(options.upClass, verticalDirection == 'up').toggleClass(options.downClass, verticalDirection == 'down');
}
options.dropdown.toggle();
parent.toggleClass(options.visibleClass, !visible).toggleClass('dropdown-visible', !visible);
// Check dimensions when showing dropdown
// !visible because variable shows state of dropdown before it was toggled
if (!visible) {
options.dropdown.find('.dropdown-contents').each(function() {
var $this = $(this),
windowWidth = $(window).width();
$this.css({
marginLeft: 0,
left: 0,
maxWidth: (windowWidth - 4) + 'px'
});
var offset = $this.offset().left,
width = $this.outerWidth(true);
if (offset < 2) {
$this.css('left', (2 - offset) + 'px');
}
else if ((offset + width + 2) > windowWidth) {
$this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
}
});
}
// Prevent event propagation
if (arguments.length > 0) {
try {
var e = arguments[0];
e.preventDefault();
e.stopPropagation();
}
catch (error) { }
}
return false;
};
/**
* Register dropdown menu
* Shows/hides dropdown, decides which side to open to
*
* @param {jQuery} toggle Link that toggles dropdown.
* @param {jQuery} dropdown Dropdown menu.
* @param {Object} options List of options. Optional.
*/
phpbb.registerDropdown = function(toggle, dropdown, options)
{
var ops = {
parent: toggle.parent(), // Parent item to add classes to
direction: 'auto', // Direction of dropdown menu. Possible values: auto, left, right
verticalDirection: 'auto', // Vertical direction. Possible values: auto, up, down
visibleClass: 'visible', // Class to add to parent item when dropdown is visible
leftClass: 'dropdown-left', // Class to add to parent item when dropdown opens to left side
rightClass: 'dropdown-right', // Class to add to parent item when dropdown opens to right side
upClass: 'dropdown-up', // Class to add to parent item when dropdown opens above menu item
downClass: 'dropdown-down' // Class to add to parent item when dropdown opens below menu item
};
if (options) {
ops = $.extend(ops, options);
}
ops.dropdown = dropdown;
ops.parent.addClass('dropdown-container');
toggle.addClass('dropdown-toggle');
toggle.data('dropdown-options', ops);
toggle.click(phpbb.toggleDropdown);
};
/**
* Get the HTML for a color palette table.
*
* @param string dir Palette direction - either v or h
* @param int width Palette cell width.
* @param int height Palette cell height.
*/
phpbb.colorPalette = function(dir, width, height) {
var r = 0,
g = 0,
b = 0,
numberList = new Array(6),
color = '',
html = '';
numberList[0] = '00';
numberList[1] = '40';
numberList[2] = '80';
numberList[3] = 'BF';
numberList[4] = 'FF';
html += '<table style="width: auto;">';
for (r = 0; r < 5; r++) {
if (dir == 'h') {
html += '<tr>';
}
for (g = 0; g < 5; g++) {
if (dir == 'v') {
html += '<tr>';
}
for (b = 0; b < 5; b++) {
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
html += '<a href="#" data-color="' + color + '" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
html += '</td>';
}
if (dir == 'v') {
html += '</tr>';
}
}
if (dir == 'h') {
html += '</tr>';
}
}
html += '</table>';
return html;
}
/**
* Register a color palette.
*
* @param object el jQuery object for the palette container.
*/
phpbb.registerPalette = function(el) {
var orientation = el.attr('data-orientation'),
height = el.attr('data-height'),
width = el.attr('data-width'),
target = el.attr('data-target'),
bbcode = el.attr('data-bbcode');
// Insert the palette HTML into the container.
el.html(phpbb.colorPalette(orientation, width, height));
// Add toggle control.
$('#color_palette_toggle').click(function(e) {
el.toggle();
e.preventDefault();
});
// Attach event handler when a palette cell is clicked.
$(el).on('click', 'a', function(e) {
var color = $(this).attr('data-color');
if (bbcode) {
bbfontstyle('[color=#' + color + ']', '[/color]');
} else {
$(target).val(color);
}
e.preventDefault();
});
}
/**
* Apply code editor to all textarea elements with data-bbcode attribute
*/
@ -836,6 +1058,18 @@ $(document).ready(function() {
$('textarea[data-bbcode]').each(function() {
phpbb.applyCodeEditor(this);
});
// Hide active dropdowns when click event happens outside
$('body').click(function(e) {
var parents = $(e.target).parents();
if (!parents.is(phpbb.dropdownVisibleContainers)) {
$(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
}
});
$('#color_palette_placeholder').each(function() {
phpbb.registerPalette($(this));
});
});
})(jQuery); // Avoid conflicts with other libraries

View file

@ -294,63 +294,6 @@ function storeCaret(textEl) {
}
}
/**
* Color pallette
*/
function colorPalette(dir, width, height) {
var r = 0,
g = 0,
b = 0,
numberList = new Array(6),
color = '',
html = '';
numberList[0] = '00';
numberList[1] = '40';
numberList[2] = '80';
numberList[3] = 'BF';
numberList[4] = 'FF';
html += '<table>';
for (r = 0; r < 5; r++) {
if (dir == 'h') {
html += '<tr>';
}
for (g = 0; g < 5; g++) {
if (dir == 'v') {
html += '<tr>';
}
for (b = 0; b < 5; b++) {
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
html += '<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
html += '</td>';
}
if (dir == 'v') {
html += '</tr>';
}
}
if (dir == 'h') {
html += '</tr>';
}
}
html += '</table>';
return html;
}
(function($) {
$(document).ready(function() {
$('#color_palette_placeholder').each(function() {
$(this).html(colorPalette('h', 15, 12));
});
});
})(jQuery);
/**
* Caret Position object
*/

36
phpBB/bin/phpbbcli.php Executable file
View file

@ -0,0 +1,36 @@
#!/usr/bin/env php
<?php
/**
*
* @package phpBB3
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if (php_sapi_name() != 'cli')
{
echo 'This program must be run from the command line.' . PHP_EOL;
exit(1);
}
define('IN_PHPBB', true);
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'includes/startup.' . $phpEx);
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
$phpbb_class_loader->register();
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
$phpbb_class_loader_ext->register();
$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config");
$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION);
$application->register_container_commands($phpbb_container);
$application->run();

View file

@ -3,6 +3,7 @@
"require": {
"lusitanian/oauth": "0.2.*",
"symfony/config": "2.3.*",
"symfony/console": "2.3.*",
"symfony/dependency-injection": "2.3.*",
"symfony/event-dispatcher": "2.3.*",
"symfony/http-kernel": "2.3.*",
@ -14,6 +15,7 @@
"fabpot/goutte": "1.0.*",
"phpunit/dbunit": "1.2.*",
"phpunit/phpunit": "3.7.*",
"phing/phing": "2.4.*"
"phing/phing": "2.4.*",
"squizlabs/php_codesniffer": "1.*"
}
}

127
phpBB/composer.lock generated
View file

@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "0bc0fd0d784720629ae0ba6d4be6a577",
"hash": "cc83663b780856890f787b9b4d6ea474",
"packages": [
{
"name": "lusitanian/oauth",
@ -154,6 +154,59 @@
"homepage": "http://symfony.com",
"time": "2013-08-06 05:49:23"
},
{
"name": "symfony/console",
"version": "v2.3.6",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
"reference": "f880062d56edefb25b36f2defa65aafe65959dc7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7",
"reference": "f880062d56edefb25b36f2defa65aafe65959dc7",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/event-dispatcher": "~2.1"
},
"suggest": {
"symfony/event-dispatcher": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Console\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
"time": "2013-09-25 06:04:15"
},
{
"name": "symfony/debug",
"version": "v2.3.4",
@ -302,7 +355,7 @@
"Symfony\\Component\\EventDispatcher\\": ""
}
},
"notification-url": "http://packagist.org/downloads/",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@ -1375,6 +1428,76 @@
],
"time": "2013-01-13 10:24:48"
},
{
"name": "squizlabs/php_codesniffer",
"version": "1.5.0RC4",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
"reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.1.2"
},
"suggest": {
"phpunit/php-timer": "dev-master"
},
"bin": [
"scripts/phpcs"
],
"type": "library",
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/CommentParser/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
"CodeSniffer/Standards/AbstractScopeSniff.php",
"CodeSniffer/Standards/AbstractVariableSniff.php",
"CodeSniffer/Standards/IncorrectPatternException.php",
"CodeSniffer/Standards/Generic/Sniffs/",
"CodeSniffer/Standards/MySource/Sniffs/",
"CodeSniffer/Standards/PEAR/Sniffs/",
"CodeSniffer/Standards/PSR1/Sniffs/",
"CodeSniffer/Standards/PSR2/Sniffs/",
"CodeSniffer/Standards/Squiz/Sniffs/",
"CodeSniffer/Standards/Zend/Sniffs/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2013-09-26 00:14:02"
},
{
"name": "symfony/browser-kit",
"version": "v2.3.4",

35
phpBB/config/console.yml Normal file
View file

@ -0,0 +1,35 @@
services:
console.command.extension.disable:
class: phpbb\console\command\extension\disable
arguments:
- @ext.manager
tags:
- { name: console.command }
console.command.extension.enable:
class: phpbb\console\command\extension\enable
arguments:
- @ext.manager
tags:
- { name: console.command }
console.command.extension.purge:
class: phpbb\console\command\extension\purge
arguments:
- @ext.manager
tags:
- { name: console.command }
console.command.extension.show:
class: phpbb\console\command\extension\show
arguments:
- @ext.manager
tags:
- { name: console.command }
console.command.fixup.recalculate_email_hash:
class: phpbb\console\command\fixup\recalculate_email_hash
arguments:
- @dbal.conn
tags:
- { name: console.command }

View file

@ -266,7 +266,7 @@ services:
- { name: notification.type }
notification.type.report_post_closed:
class: phpbb\notification\type\report_post
class: phpbb\notification\type\report_post_closed
scope: prototype # scope MUST be prototype for this to work!
arguments:
- @user_loader
@ -319,6 +319,24 @@ services:
tags:
- { name: notification.type }
notification.type.admin_activate_user:
class: phpbb\notification\type\admin_activate_user
scope: prototype # scope MUST be prototype for this to work!
arguments:
- @user_loader
- @dbal.conn
- @cache.driver
- @user
- @auth
- @config
- %core.root_path%
- %core.php_ext%
- %tables.notification_types%
- %tables.notifications%
- %tables.user_notifications%
tags:
- { name: notification.type }
notification.method.email:
class: phpbb\notification\method\email
scope: prototype # scope MUST be prototype for this to work!

View file

@ -6,6 +6,7 @@ imports:
- { resource: avatars.yml }
- { resource: feed.yml }
- { resource: auth_providers.yml }
- { resource: console.yml }
services:
acl.permissions:
@ -22,7 +23,6 @@ services:
arguments:
- @config
- @avatar.driver_collection
- @service_container
cache:
class: phpbb\cache\service
@ -141,10 +141,17 @@ services:
class: phpbb\event\extension_subscriber_loader
arguments:
- @dispatcher
- @ext.manager
- @event.listener_collection
calls:
- [load, []]
event.listener_collection:
class: phpbb\di\service_collection
arguments:
- @service_container
tags:
- { name: service_collection, tag: event.listener }
ext.manager:
class: phpbb\extension\manager
arguments:
@ -237,6 +244,7 @@ services:
- @notification.method_collection
- @service_container
- @user_loader
- @config
- @dbal.conn
- @cache
- @user

View file

@ -0,0 +1,307 @@
<?php
/**
*
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if (php_sapi_name() != 'cli')
{
die("This program must be run from the command line.\n");
}
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = __DIR__ . '/../';
function usage()
{
echo "Usage: export_events_for_wiki.php COMMAND\n";
echo "\n";
echo "acp:\n";
echo " Export all events for files in the acp style.\n";
echo "\n";
echo "styles:\n";
echo " Export all events for files in the prosilver and subsilver2 styles.\n";
echo "\n";
echo "php:\n";
echo " Export all events for php-files.\n";
exit(2);
}
function export_from_eventsmd($phpbb_root_path, $filter)
{
$file_content = file_get_contents($phpbb_root_path . 'docs/events.md');
$events = explode("\n\n", $file_content);
foreach ($events as $event)
{
// Last row of the file
if (strpos($event, "\n===\n") === false) continue;
list($event_name, $details) = explode("\n===\n", $event);
if ($filter == 'acp' && strpos($event_name, 'acp_') !== 0) continue;
if ($filter == 'styles' && strpos($event_name, 'acp_') === 0) continue;
list($file_details, $details) = explode("\n* Since: ", $details);
list($version, $explanition) = explode("\n* Purpose: ", $details);
echo "|- id=\"{$event_name}\"\n";
echo "| [[#{$event_name}|{$event_name}]] || ";
if (strpos($file_details, "* Locations:\n + ") === 0)
{
$file_details = substr($file_details, strlen("* Locations:\n + "));
$files = explode("\n + ", $file_details);
$prosilver = $subsilver2 = array();
foreach ($files as $file)
{
if (strpos($file, 'styles/prosilver/template/') === 0)
{
$prosilver[] = substr($file, strlen('styles/prosilver/template/'));
}
if (strpos($file, 'styles/subsilver2/template/') === 0)
{
$subsilver2[] = substr($file, strlen('styles/subsilver2/template/'));
}
}
echo implode(', ', $prosilver) . ' || ' . implode(', ', $subsilver2);
}
else if ($filter == 'acp')
{
echo substr($file_details, strlen("* Location: adm/style/"));
}
echo " || {$version} || " . str_replace("\n", ' ', $explanition) . "\n";
}
}
function export_from_php($phpbb_root_path)
{
$files = get_file_list($phpbb_root_path);
$events = array();
foreach ($files as $file)
{
$file_events = check_for_events($phpbb_root_path, $file);
if (!empty($file_events))
{
$events = array_merge($events, $file_events);
}
}
ksort($events);
foreach ($events as $event)
{
echo '|- id="' . $event['event'] . '"' . "\n";
echo '| [[#' . $event['event'] . '|' . $event['event'] . ']] || ' . $event['file'] . ' || ' . implode(', ', $event['arguments']) . ' || ' . $event['since'] . ' || ' . $event['description'] . "\n";
}
}
function check_for_events($phpbb_root_path, $file)
{
$events = array();
$content = file_get_contents($phpbb_root_path . $file);
if (strpos($content, "phpbb_dispatcher->trigger_event('") || strpos($content, "phpbb_dispatcher->dispatch('"))
{
$lines = explode("\n", $content);
for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++)
{
$event_line = 0;
if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('"))
{
$event_line = $i;
$event_name = $lines[$event_line];
$event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('"));
$event_name = substr($event_name, 0, strpos($event_name, "'"));
// Find $vars array lines
$find_varsarray_line = 1;
while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false)
{
$find_varsarray_line++;
if ($find_varsarray_line > min(50, $event_line))
{
throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"');
}
}
$varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3);
$arguments = explode("', '", $varsarray);
// Validate $vars array with @var
$find_vars_line = 3;
$doc_vars = array();
while (strpos(trim($lines[$event_line - $find_vars_line]), '*') === 0)
{
$var_line = trim($lines[$event_line - $find_vars_line]);
$var_line = preg_replace('!\s+!', ' ', $var_line);
if (strpos($var_line, '* @var ') === 0)
{
$doc_line = explode(' ', $var_line);
if (isset($doc_line[3]))
{
$doc_vars[] = $doc_line[3];
}
}
$find_vars_line++;
}
if (sizeof($arguments) !== sizeof($doc_vars) && array_intersect($arguments, $doc_vars))
{
throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"');
}
}
else if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('"))
{
$event_line = $i;
$event_name = $lines[$event_line];
$event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('"));
$event_name = substr($event_name, 0, strpos($event_name, "'"));
$arguments = array();
}
if ($event_line)
{
// Validate @event name
$find_event_line = 1;
while (strpos($lines[$event_line - $find_event_line], '* @event ') === false)
{
$find_event_line++;
if ($find_event_line > min(50, $event_line))
{
throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"');
}
}
$event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event '));
if ($event_name_tag !== $event_name)
{
throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"');
}
// Find @since
$find_since_line = 1;
while (strpos($lines[$event_line - $find_since_line], '* @since ') === false)
{
$find_since_line++;
if ($find_since_line > min(50, $event_line))
{
throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"');
}
}
$since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since '));
$since = ($since == '3.1-A1') ? '3.1.0-a1' : $since;
// Find event description line
$find_description_line = 3;
while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0)
{
$find_description_line++;
if ($find_description_line > min(50, $event_line))
{
throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"');
}
}
$description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* '));
$events[$event_name] = array(
'event' => $event_name,
'file' => $file,
'arguments' => $arguments,
'since' => $since,
'description' => $description,
);
}
}
}
return $events;
}
/**
* Returns a list of files in that directory
*
* Works recursive with any depth
*
* @param string $dir Directory to go through
* @return array List of files (including directories from within $dir
*/
function get_file_list($dir, $path = '')
{
try
{
$iterator = new \DirectoryIterator($dir);
}
catch (Exception $e)
{
return array();
}
$files = array();
foreach ($iterator as $file_info)
{
if ($file_info->isDot())
{
continue;
}
// Do not scan some directories
if ($file_info->isDir() && (
($path == '' && in_array($file_info->getFilename(), array('cache', 'develop', 'ext', 'files', 'language', 'store', 'vendor')))
|| ($path == '/includes' && in_array($file_info->getFilename(), array('utf')))
|| ($path == '/phpbb/db/migration' && in_array($file_info->getFilename(), array('data')))
|| ($path == '/phpbb' && in_array($file_info->getFilename(), array('event')))
))
{
continue;
}
else if ($file_info->isDir())
{
$sub_dir = get_file_list($file_info->getPath() . '/' . $file_info->getFilename(), $path . '/' . $file_info->getFilename());
foreach ($sub_dir as $file)
{
$files[] = $file_info->getFilename() . '/' . $file;
}
}
else if ($file_info->getExtension() == 'php')
{
$files[] = $file_info->getFilename();
}
}
return $files;
}
function validate_argument_count($arguments, $count)
{
if ($arguments <= $count)
{
usage();
}
}
validate_argument_count($argc, 1);
$action = $argv[1];
switch ($action)
{
case 'acp':
export_from_eventsmd($phpbb_root_path, 'acp');
break;
case 'styles':
export_from_eventsmd($phpbb_root_path, 'styles');
break;
case 'php':
export_from_php($phpbb_root_path);
break;
default:
usage();
}

View file

@ -1,129 +0,0 @@
<?php
/**
*
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = __DIR__.'/../';
include($phpbb_root_path . 'common.'.$phpEx);
function usage()
{
echo "Usage: extensions.php COMMAND [OPTION]...\n";
echo "Console extension manager.\n";
echo "\n";
echo "list:\n";
echo " Lists all extensions in the database and the filesystem.\n";
echo "\n";
echo "enable NAME:\n";
echo " Enables the specified extension.\n";
echo "\n";
echo "disable NAME:\n";
echo " Disables the specified extension.\n";
echo "\n";
echo "purge NAME:\n";
echo " Purges the specified extension.\n";
exit(2);
}
function list_extensions()
{
global $phpbb_extension_manager;
$phpbb_extension_manager->load_extensions();
$all = array_keys($phpbb_extension_manager->all_available());
if (empty($all))
{
echo "There were no extensions found.\n";
exit(3);
}
echo "Enabled:\n";
$enabled = array_keys($phpbb_extension_manager->all_enabled());
print_extensions($enabled);
echo "\n";
echo "Disabled:\n";
$disabled = array_keys($phpbb_extension_manager->all_disabled());
print_extensions($disabled);
echo "\n";
echo "Available:\n";
$purged = array_diff($all, $enabled, $disabled);
print_extensions($purged);
}
function print_extensions($exts)
{
foreach ($exts as $ext)
{
echo "- $ext\n";
}
}
function enable_extension($name)
{
global $phpbb_extension_manager;
$phpbb_extension_manager->enable($name);
}
function disable_extension($name)
{
global $phpbb_extension_manager;
$phpbb_extension_manager->disable($name);
}
function purge_extension($name)
{
global $phpbb_extension_manager;
$phpbb_extension_manager->purge($name);
}
function validate_argument_count($count)
{
global $argv;
if (count($argv) <= $count)
{
usage();
}
}
validate_argument_count(1);
$action = $argv[1];
switch ($action)
{
case 'list':
list_extensions();
break;
case 'enable':
validate_argument_count(2);
enable_extension($argv[2]);
break;
case 'disable':
validate_argument_count(2);
disable_extension($argv[2]);
break;
case 'purge':
validate_argument_count(2);
purge_extension($argv[2]);
break;
default:
usage();
}

View file

@ -46,6 +46,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#v310a1">Changes since 3.1.0-a1</a></li>
<li><a href="#v30x">Changes since 3.0.x</a></li>
<li><a href="#v3011">Changes since 3.0.11</a></li>
<li><a href="#v3010">Changes since 3.0.10</a></li>
@ -87,7 +88,83 @@
<div class="content">
<a name="v30x"></a><h3>1.i. Changes since 3.0.x</h3>
<a name="v310a1"></a><h3>1.i. Changes since 3.1.0-a1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-4776">PHPBB3-4776</a>] - Long post gets hidden behind posting profile</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10449">PHPBB3-10449</a>] - Lines spilling in subscriptions view</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10948">PHPBB3-10948</a>] - Color swatch in 3.1 does not display properly</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11030">PHPBB3-11030</a>] - I beam cursor in prosilver when hovering on browse button for uploading attachments</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11073">PHPBB3-11073</a>] - Reported/Unapproved moderator information in viewtopic is striked through instead of underlined</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11138">PHPBB3-11138</a>] - Resync features in ACP should not use AJAX</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11280">PHPBB3-11280</a>] - Double clicking &quot;mark topics read&quot; produces an error the second time</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11525">PHPBB3-11525</a>] - phpbb_avatar_manager::clean_row collapses user_id and group_id</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11534">PHPBB3-11534</a>] - Remote avatar does not properly check if remote file is an image</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11626">PHPBB3-11626</a>] - Auth ACP options should be moved to separate html file</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11663">PHPBB3-11663</a>] - In generate_text_for_storage the function does not check for errors of parse_message:parse() and act accordingly</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11691">PHPBB3-11691</a>] - Soft delete migration conversion should be staggered</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11739">PHPBB3-11739</a>] - Wrong name for UCP Module &quot;Edit &quot;Remember Me&quot; login keys&quot;</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11842">PHPBB3-11842</a>] - Create a new group Error with avatar driver</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11857">PHPBB3-11857</a>] - Avatar manager must not depend on entire container</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11872">PHPBB3-11872</a>] - MCP: Users with most warnings list is invalid</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11896">PHPBB3-11896</a>] - &quot;Mark all notifications read&quot; does not work</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11899">PHPBB3-11899</a>] - New ajax poll vote should give feedback while waiting for servers response</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11916">PHPBB3-11916</a>] - Remove files from hidden attach list after deletion</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11922">PHPBB3-11922</a>] - Migrator fails to remove columns on MSSQL when they have/had an index</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11923">PHPBB3-11923</a>] - UCP avatar error when user has no permissions to change his/her avatar</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11924">PHPBB3-11924</a>] - Add a script to export the events in wiki format</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11926">PHPBB3-11926</a>] - Plupload Migration has a broken dependency.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11927">PHPBB3-11927</a>] - Missing Files after 3.1.0-A1 Automatic Updater</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11930">PHPBB3-11930</a>] - Avatar paths are incorrect when using app.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11935">PHPBB3-11935</a>] - Invalid HTML in &quot;Sort By&quot; form elements in Prosilver</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11936">PHPBB3-11936</a>] - Fixes to Notifications Window</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11939">PHPBB3-11939</a>] - Quick reply editor has unnecessary data-ajax attribute</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11943">PHPBB3-11943</a>] - $VAR = false has unexpected result</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11945">PHPBB3-11945</a>] - Focused buttons are hard to notice</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11947">PHPBB3-11947</a>] - Notification popup does not appear when clicking number in text</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11948">PHPBB3-11948</a>] - Extensions should be allowed to have more then 1 routing file</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11949">PHPBB3-11949</a>] - cannot upgrade to 3.1</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11960">PHPBB3-11960</a>] - Responsive design removed teampage names</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11972">PHPBB3-11972</a>] - Add template event posting_editor_subject_after</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11977">PHPBB3-11977</a>] - Ajax delete should disable moving options</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11982">PHPBB3-11982</a>] - Navigation is shown above AJAX background in ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11983">PHPBB3-11983</a>] - Subscriptions argument missing from docblock in ucp_notifications</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11986">PHPBB3-11986</a>] - Undefined index: poster_id in file.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11987">PHPBB3-11987</a>] - {ROOT_PATH} in ACP leads to adm/</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11990">PHPBB3-11990</a>] - Remove result_mssqlnative from acp_database</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11991">PHPBB3-11991</a>] - PHP notices when closing reported posts entries in MCP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11992">PHPBB3-11992</a>] - Wrong variable to close &quot;Users with most warnings&quot; block at MCP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11994">PHPBB3-11994</a>] - Admin options for extensions are bad/misleading</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11995">PHPBB3-11995</a>] - Reverting a config.remove fails</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12002">PHPBB3-12002</a>] - Extension management page should use generate/check link hash</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12007">PHPBB3-12007</a>] - Default last_result of callable steps must be integer instead of false</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12008">PHPBB3-12008</a>] - &quot;Prune notifications&quot; cron task always ran, blocking others</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12016">PHPBB3-12016</a>] - Event listeners should be services</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12017">PHPBB3-12017</a>] - Extension tests are broken on current develop</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12018">PHPBB3-12018</a>] - Use path_helper for admin style CSS in sql report</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12023">PHPBB3-12023</a>] - New css files missing after update</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11552">PHPBB3-11552</a>] - Responsive design for prosilver</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11746">PHPBB3-11746</a>] - Add &quot;account activation required&quot; notification for Administrators</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11921">PHPBB3-11921</a>] - Improve Notifications and PMs in the header</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11928">PHPBB3-11928</a>] - Replace AJAX loading info pop up with animation</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11957">PHPBB3-11957</a>] - Responsive design for admin control panel</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11973">PHPBB3-11973</a>] - Remove logic from language files where possible</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11974">PHPBB3-11974</a>] - All timezones should be translatable</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11975">PHPBB3-11975</a>] - Add ACP link next to MCP</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11031">PHPBB3-11031</a>] - Bring phpBB2 converter up to speed with 3.1 changes</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11980">PHPBB3-11980</a>] - Setup PHP Code Sniffer</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11981">PHPBB3-11981</a>] - Review/Fix Code Sniffer complaints</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li>
</ul>
<a name="v30x"></a><h3>1.ii. Changes since 3.0.x</h3>
<h4>Bug</h4>
<ul>
@ -768,7 +845,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
</ul>
<a name="v3011"></a><h3>1.ii. Changes since 3.0.11</h3>
<a name="v3011"></a><h3>1.iii. Changes since 3.0.11</h3>
<h4>Bug</h4>
<ul>
@ -923,7 +1000,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
</ul>
<a name="v3010"></a><h3>1.iii. Changes since 3.0.10</h3>
<a name="v3010"></a><h3>1.iv. Changes since 3.0.10</h3>
<h4>Bug</h4>
<ul>
@ -1048,7 +1125,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
</ul>
<a name="v309"></a><h3>1.iv. Changes since 3.0.9</h3>
<a name="v309"></a><h3>1.v. Changes since 3.0.9</h3>
<h4>Bug</h4>
<ul>
@ -1184,7 +1261,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
</ul>
<a name="v308"></a><h3>1.v. Changes since 3.0.8</h3>
<a name="v308"></a><h3>1.vi. Changes since 3.0.8</h3>
<h4> Bug
</h4>
@ -1552,7 +1629,7 @@
</ul>
<a name="v307-PL1"></a><h3>1.vi. Changes since 3.0.7-PL1</h3>
<a name="v307-PL1"></a><h3>1.vii. Changes since 3.0.7-PL1</h3>
<h4> Security
</h4>
<ul>
@ -2010,13 +2087,13 @@
</ul>
<a name="v307"></a><h3>1.vii. Changes since 3.0.7</h3>
<a name="v307"></a><h3>1.viii. Changes since 3.0.7</h3>
<ul>
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
</ul>
<a name="v306"></a><h3>1.viii. Changes since 3.0.6</h3>
<a name="v306"></a><h3>1.ix. Changes since 3.0.6</h3>
<ul>
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
@ -2120,7 +2197,7 @@
</ul>
<a name="v305"></a><h3>1.ix. Changes since 3.0.5</h3>
<a name="v305"></a><h3>1.x. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@ -2342,7 +2419,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
<a name="v304"></a><h3>1.x. Changes since 3.0.4</h3>
<a name="v304"></a><h3>1.xi. Changes since 3.0.4</h3>
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
@ -2431,7 +2508,7 @@
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul>
<a name="v303"></a><h3>1.xi. Changes since 3.0.3</h3>
<a name="v303"></a><h3>1.xii. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@ -2463,7 +2540,7 @@
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul>
<a name="v302"></a><h3>1.xii. Changes since 3.0.2</h3>
<a name="v302"></a><h3>1.xiii. Changes since 3.0.2</h3>
<ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
@ -2562,7 +2639,7 @@
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
</ul>
<a name="v301"></a><h3>1.xiii. Changes since 3.0.1</h3>
<a name="v301"></a><h3>1.xiv. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@ -2610,7 +2687,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
<a name="v300"></a><h3>1.xiv Changes since 3.0.0</h3>
<a name="v300"></a><h3>1.xv Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@ -2681,7 +2758,7 @@
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul>
<a name="v30rc8"></a><h3>1.xv. Changes since 3.0.RC8</h3>
<a name="v30rc8"></a><h3>1.xvi. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@ -2690,7 +2767,7 @@
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
<a name="v30rc7"></a><h3>1.xvi. Changes since 3.0.RC7</h3>
<a name="v30rc7"></a><h3>1.xvii. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@ -2725,7 +2802,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
<a name="v30rc6"></a><h3>1.xvii. Changes since 3.0.RC6</h3>
<a name="v30rc6"></a><h3>1.xviii. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@ -2735,7 +2812,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
<a name="v30rc5"></a><h3>1.xviii. Changes since 3.0.RC5</h3>
<a name="v30rc5"></a><h3>1.xix. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@ -2798,7 +2875,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
<a name="v30rc4"></a><h3>1.xix. Changes since 3.0.RC4</h3>
<a name="v30rc4"></a><h3>1.xx. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@ -2849,7 +2926,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
<a name="v30rc3"></a><h3>1.xx. Changes since 3.0.RC3</h3>
<a name="v30rc3"></a><h3>1.xxi. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@ -2958,7 +3035,7 @@
</ul>
<a name="v30rc2"></a><h3>1.xxi. Changes since 3.0.RC2</h3>
<a name="v30rc2"></a><h3>1.xxii. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@ -3004,7 +3081,7 @@
</ul>
<a name="v30rc1"></a><h3>1.xxii. Changes since 3.0.RC1</h3>
<a name="v30rc1"></a><h3>1.xxiii. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>

View file

@ -1,41 +1,49 @@
acp_forums_normal_settings_append
===
* Location: adm/style/acp_forums.html
* Since: 3.1.0-a1
* Purpose: Add settings to forums
acp_main_actions_append
===
* Location: adm/style/acp_main.html
* Since: 3.1.0-a1
* Purpose: Add actions to the ACP main page below the cache purge action
acp_main_notice_after
===
* Location: adm/style/acp_main.html
* Since: 3.1.0-a1
* Purpose: Add notices or other blocks in the ACP below other configuration notices
acp_overall_footer_after
===
* Location: adm/style/overall_footer.html
* Since: 3.1.0-a1
* Purpose: Add content below the footer in the ACP
acp_overall_header_head_append
===
* Location: adm/style/overall_header.html
* Add assets within the `<head>` tags in the ACP
* Since: 3.1.0-a1
* Purpose: Add assets within the `<head>` tags in the ACP
acp_simple_footer_after
===
* Location: adm/style/simple_footer.html
* Since: 3.1.0-a1
* Purpose: Add content below the simple footer in the ACP
acp_simple_header_head_append
===
* Location: adm/style/overall_header.html
* Add assets within the `<head>` tags in the simple header of the ACP
* Since: 3.1.0-a1
* Purpose: Add assets within the `<head>` tags in the simple header of the ACP
acp_users_overview_options_append
===
* Location: adm/style/acp_users.html
* Since: 3.1.0-a1
* Purpose: Add options and settings on user overview page
forumlist_body_last_post_title_prepend
@ -43,6 +51,7 @@ forumlist_body_last_post_title_prepend
* Locations:
+ styles/prosilver/template/forumlist_body.html
+ styles/subsilver2/template/forumlist_body.html
* Since: 3.1.0-a1
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
index_body_stat_blocks_before
@ -50,6 +59,7 @@ index_body_stat_blocks_before
* Locations:
+ styles/prosilver/template/index_body.html
+ styles/subsilver2/template/index_body.html
* Since: 3.1.0-a1
* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
memberlist_body_username_append
@ -57,6 +67,7 @@ memberlist_body_username_append
* Locations:
+ styles/prosilver/template/memberlist_body.html
+ styles/subsilver2/template/memberlist_body.html
* Since: 3.1.0-a1
* Purpose: Add information after every username in the memberlist. Works in
all display modes (leader, group and normal memberlist).
@ -65,6 +76,7 @@ memberlist_body_username_prepend
* Locations:
+ styles/prosilver/template/memberlist_body.html
+ styles/subsilver2/template/memberlist_body.html
* Since: 3.1.0-a1
* Purpose: Add information before every username in the memberlist. Works in
all display modes (leader, group and normal memberlist).
@ -73,6 +85,7 @@ memberlist_view_user_statistics_after
* Locations:
+ styles/prosilver/template/memberlist_view.html
+ styles/subsilver2/template/memberlist_view.html
* Since: 3.1.0-a1
* Purpose: Add entries after the user statistics part of any user profile
memberlist_view_user_statistics_before
@ -80,6 +93,7 @@ memberlist_view_user_statistics_before
* Locations:
+ styles/prosilver/template/memberlist_view.html
+ styles/subsilver2/template/memberlist_view.html
* Since: 3.1.0-a1
* Purpose: Add entries before the user statistics part of any user profile
overall_footer_after
@ -87,18 +101,30 @@ overall_footer_after
* Locations:
+ styles/prosilver/template/overall_footer.html
+ styles/subsilver2/template/overall_footer.html
* Since: 3.1.0-a1
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
overall_footer_breadcrumb_append
===
* Location: styles/prosilver/template/overall_footer.html
* Locations:
+ styles/prosilver/template/overall_footer.html
* Since: 3.1.0-a1
* Purpose: Add links to the list of breadcrumbs in the footer
overall_footer_content_after
===
* Locations:
+ styles/prosilver/template/overall_footer.html
+ styles/subsilver2/template/overall_footer.html
* Since: 3.1.0-a3
* Purpose: Add content on all pages after the main content, before the footer
overall_footer_copyright_append
===
* Locations:
+ styles/prosilver/template/overall_footer.html
+ styles/subsilver2/template/overall_footer.html
* Since: 3.1.0-a1
* Purpose: Add content after the copyright line (no new line by default), before the ACP link
overall_footer_copyright_prepend
@ -106,6 +132,7 @@ overall_footer_copyright_prepend
* Locations:
+ styles/prosilver/template/overall_footer.html
+ styles/subsilver2/template/overall_footer.html
* Since: 3.1.0-a1
* Purpose: Add content before the copyright line
overall_header_breadcrumb_append
@ -113,35 +140,84 @@ overall_header_breadcrumb_append
* Locations:
+ styles/prosilver/template/overall_header.html
+ styles/subsilver2/template/breadcrumbs.html
* Since: 3.1.0-a1
* Purpose: Add links to the list of breadcrumbs in the header
overall_header_content_before
===
* Locations:
+ styles/prosilver/template/overall_header.html
+ styles/subsilver2/template/overall_header.html
* Since: 3.1.0-a3
* Purpose: Add content on all pages before the main content, after the header
overall_header_head_append
===
* Locations:
+ styles/prosilver/template/overall_header.html
+ styles/subsilver2/template/overall_header.html
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag
overall_header_navigation_append
===
* Location: styles/prosilver/template/overall_header.html
* Locations:
+ styles/prosilver/template/overall_header.html
* Since: 3.1.0-a1
* Purpose: Add links after the navigation links in the header
overall_header_navigation_prepend
===
* Location: styles/prosilver/template/overall_header.html
* Locations:
+ styles/prosilver/template/overall_header.html
* Since: 3.1.0-a1
* Purpose: Add links before the navigation links in the header
posting_editor_message_after
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen after the message
posting_editor_message_before
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen before the message
posting_editor_options_prepend
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/prosilver/template/posting_body.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a1
* Purpose: Add posting options on the posting screen
posting_editor_subject_after
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen after the subject
posting_editor_subject_before
===
* Locations:
+ styles/prosilver/template/posting_editor.html
+ styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen before the subject
simple_footer_after
===
* Location: styles/prosilver/template/simple_footer.html
* Locations:
+ styles/prosilver/template/simple_footer.html
* Since: 3.1.0-a1
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
topiclist_row_prepend
@ -151,6 +227,7 @@ topiclist_row_prepend
+ styles/prosilver/template/viewforum_body.html
+ styles/subsilver2/template/search_results.html
+ styles/subsilver2/template/viewforum_body.html
* Since: 3.1.0-a1
* Purpose: Add content into topic rows (inside the elements containing topic titles)
topiclist_row_append
@ -160,23 +237,30 @@ topiclist_row_append
+ styles/prosilver/template/viewforum_body.html
+ styles/subsilver2/template/search_results.html
+ styles/subsilver2/template/viewforum_body.html
* Since: 3.1.0-a1
* Purpose: Add content into topic rows (inside the elements containing topic titles)
ucp_pm_viewmessage_custom_fields_after
===
* Location: styles/prosilver/template/ucp_pm_viewmessage.html
* Locations:
+ styles/prosilver/template/ucp_pm_viewmessage.html
* Since: 3.1.0-a1
* Purpose: Add data after the custom fields on the user profile when viewing
a private message
ucp_pm_viewmessage_custom_fields_before
===
* Location: styles/prosilver/template/ucp_pm_viewmessage.html
* Locations:
+ styles/prosilver/template/ucp_pm_viewmessage.html
* Since: 3.1.0-a1
* Purpose: Add data before the custom fields on the user profile when viewing
a private message
ucp_pm_viewmessage_print_head_append
===
* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html
* Locations:
+ styles/prosilver/template/ucp_pm_viewmessage_print.html
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
ucp_prefs_personal_prepend
@ -184,6 +268,7 @@ ucp_prefs_personal_prepend
* Locations:
+ styles/prosilver/template/ucp_prefs_personal.html
+ styles/subsilver2/template/ucp_prefs_personal.html
* Since: 3.1.0-a1
* Purpose: Add user options to the top of the Edit Global Settings block
ucp_prefs_personal_append
@ -191,6 +276,7 @@ ucp_prefs_personal_append
* Locations:
+ styles/prosilver/template/ucp_prefs_personal.html
+ styles/subsilver2/template/ucp_prefs_personal.html
* Since: 3.1.0-a1
* Purpose: Add user options to the bottom of the Edit Global Settings block
ucp_prefs_post_prepend
@ -198,6 +284,7 @@ ucp_prefs_post_prepend
* Locations:
+ styles/prosilver/template/ucp_prefs_post.html
+ styles/subsilver2/template/ucp_prefs_post.html
* Since: 3.1.0-a1
* Purpose: Add user options to the top of the Edit Posting Defaults block
ucp_prefs_post_append
@ -205,6 +292,7 @@ ucp_prefs_post_append
* Locations:
+ styles/prosilver/template/ucp_prefs_post.html
+ styles/subsilver2/template/ucp_prefs_post.html
* Since: 3.1.0-a1
* Purpose: Add user options to the bottom of the Edit Posting Defaults block
ucp_prefs_view_radio_buttons_prepend
@ -212,6 +300,7 @@ ucp_prefs_view_radio_buttons_prepend
* Locations:
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
* Purpose: Add options to the top of the radio buttons block of the Edit
Display Options screen
@ -220,6 +309,7 @@ ucp_prefs_view_radio_buttons_append
* Locations:
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
* Purpose: Add options to the bottom of the radio buttons block of the Edit
Display Options screen
@ -228,6 +318,7 @@ ucp_prefs_view_select_menu_prepend
* Locations:
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
* Purpose: Add options to the top of the drop-down lists block of the Edit
Display Options screen
@ -236,12 +327,15 @@ ucp_prefs_view_select_menu_append
* Locations:
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
* Purpose: Add options to the bottom of the drop-down lists block of the Edit
Display Options screen
viewtopic_print_head_append
===
* Location: styles/prosilver/template/viewtopic_print.html
* Locations:
+ styles/prosilver/template/viewtopic_print.html
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
viewtopic_body_footer_before
@ -249,6 +343,7 @@ viewtopic_body_footer_before
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add content to the bottom of the View topic screen below the posts
and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in
Subsilver2.
@ -258,6 +353,7 @@ viewtopic_body_post_buttons_after
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add post button to posts (next to edit, quote etc), at the end of
the list.
@ -266,6 +362,7 @@ viewtopic_body_post_buttons_before
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add post button to posts (next to edit, quote etc), at the start of
the list.
@ -274,6 +371,7 @@ viewtopic_body_postrow_custom_fields_after
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add data after the custom fields on the user profile when viewing
a post
@ -282,6 +380,7 @@ viewtopic_body_postrow_custom_fields_before
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add data before the custom fields on the user profile when viewing
a post
@ -290,4 +389,5 @@ viewtopic_topic_title_prepend
* Locations:
+ styles/prosilver/template/viewtopic_body.html
+ styles/subsilver2/template/viewtopic_body.html
* Since: 3.1.0-a1
* Purpose: Add content directly before the topic title link on the View topic screen

View file

@ -181,7 +181,7 @@ else
trigger_error('NO_ATTACHMENT_SELECTED');
}
$sql = 'SELECT attach_id, post_msg_id, topic_id, in_message, is_orphan, physical_filename, real_filename, extension, mimetype, filesize, filetime
$sql = 'SELECT attach_id, post_msg_id, topic_id, in_message, poster_id, is_orphan, physical_filename, real_filename, extension, mimetype, filesize, filetime
FROM ' . ATTACHMENTS_TABLE . "
WHERE $sql_where";
$result = $db->sql_query($sql);

View file

@ -748,7 +748,6 @@ class acp_attachments
}
$template->assign_vars(array(
'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,

View file

@ -108,11 +108,12 @@ class acp_bbcodes
'DISPLAY_ON_POSTING' => $display_on_posting)
);
foreach ($user->lang['tokens'] as $token => $token_explain)
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
foreach ($bbcode_tokens as $token)
{
$template->assign_block_vars('token', array(
'TOKEN' => '{' . $token . '}',
'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain,
'EXPLAIN' => ($token === 'LOCAL_URL') ? $user->lang(array('tokens', $token), generate_board_url() . '/') : $user->lang(array('tokens', $token)),
));
}

View file

@ -94,29 +94,29 @@ class acp_database
case 'mysqli':
case 'mysql4':
case 'mysql':
$extractor = new mysql_extractor($download, $store, $format, $filename, $time);
$extractor = new mysql_extractor($format, $filename, $time, $download, $store);
break;
case 'sqlite':
$extractor = new sqlite_extractor($download, $store, $format, $filename, $time);
$extractor = new sqlite_extractor($format, $filename, $time, $download, $store);
break;
case 'postgres':
$extractor = new postgres_extractor($download, $store, $format, $filename, $time);
$extractor = new postgres_extractor($format, $filename, $time, $download, $store);
break;
case 'oracle':
$extractor = new oracle_extractor($download, $store, $format, $filename, $time);
$extractor = new oracle_extractor($format, $filename, $time, $download, $store);
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
$extractor = new mssql_extractor($download, $store, $format, $filename, $time);
$extractor = new mssql_extractor($format, $filename, $time, $download, $store);
break;
case 'firebird':
$extractor = new firebird_extractor($download, $store, $format, $filename, $time);
$extractor = new firebird_extractor($format, $filename, $time, $download, $store);
break;
}
@ -488,7 +488,7 @@ class base_extractor
var $format;
var $run_comp = false;
function base_extractor($download = false, $store = false, $format, $filename, $time)
function base_extractor($format, $filename, $time, $download = false, $store = false)
{
global $request;
@ -1607,16 +1607,17 @@ class mssql_extractor extends base_extractor
return;
}
$sql = "SELECT * FROM $table_name";
$result_fields = $db->sql_query_limit($sql, 1);
$sql = "SELECT COLUMN_NAME, DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = '" . $db->sql_escape($table_name) . "'";
$result_fields = $db->sql_query($sql);
$row = new result_mssqlnative($result_fields);
$i_num_fields = $row->num_fields();
for ($i = 0; $i < $i_num_fields; $i++)
$i_num_fields = 0;
while ($row = $db->sql_fetchrow($result_fields))
{
$ary_type[$i] = $row->field_type($i);
$ary_name[$i] = $row->field_name($i);
$ary_type[$i_num_fields] = $row['DATA_TYPE'];
$ary_name[$i_num_fields] = $row['COLUMN_NAME'];
$i_num_fields++;
}
$db->sql_freeresult($result_fields);

View file

@ -55,6 +55,11 @@ class acp_extensions
$ext_name = '';
}
if (in_array($action, array('enable', 'disable', 'delete_data')) && !check_link_hash($request->variable('hash', ''), $action . '.' . $ext_name))
{
trigger_error('FORM_INVALID', E_USER_WARNING);
}
// If they've specified an extension, let's load the metadata manager and validate it.
if ($ext_name)
{
@ -66,7 +71,7 @@ class acp_extensions
}
catch(\phpbb\extension\exception $e)
{
trigger_error($e);
trigger_error($e, E_USER_WARNING);
}
}
@ -97,7 +102,8 @@ class acp_extensions
$template->assign_vars(array(
'PRE' => true,
'U_ENABLE' => $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name),
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')),
'U_ENABLE' => $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name),
));
break;
@ -116,7 +122,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name));
meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name));
}
}
}
@ -142,7 +148,8 @@ class acp_extensions
$template->assign_vars(array(
'PRE' => true,
'U_DISABLE' => $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name),
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DISABLE_CONFIRM', $md_manager->get_metadata('display-name')),
'U_DISABLE' => $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name),
));
break;
@ -154,7 +161,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name));
meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name));
}
}
@ -165,16 +172,21 @@ class acp_extensions
));
break;
case 'purge_pre':
$this->tpl_name = 'acp_ext_purge';
case 'delete_data_pre':
if ($phpbb_extension_manager->enabled($ext_name))
{
redirect($this->u_action);
}
$this->tpl_name = 'acp_ext_delete_data';
$template->assign_vars(array(
'PRE' => true,
'U_PURGE' => $this->u_action . '&amp;action=purge&amp;ext_name=' . urlencode($ext_name),
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')),
'U_PURGE' => $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name),
));
break;
case 'purge':
case 'delete_data':
try
{
while ($phpbb_extension_manager->purge_step($ext_name))
@ -184,7 +196,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=purge&amp;ext_name=' . urlencode($ext_name));
meta_refresh(0, $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name));
}
}
}
@ -193,7 +205,7 @@ class acp_extensions
$template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
}
$this->tpl_name = 'acp_ext_purge';
$this->tpl_name = 'acp_ext_delete_data';
$template->assign_vars(array(
'U_RETURN' => $this->u_action . '&amp;action=list',
@ -233,7 +245,6 @@ class acp_extensions
$this->output_actions('enabled', array(
'DISABLE' => $this->u_action . '&amp;action=disable_pre&amp;ext_name=' . urlencode($name),
'PURGE' => $this->u_action . '&amp;action=purge_pre&amp;ext_name=' . urlencode($name),
));
}
catch(\phpbb\extension\exception $e)
@ -267,7 +278,7 @@ class acp_extensions
$this->output_actions('disabled', array(
'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($name),
'PURGE' => $this->u_action . '&amp;action=purge_pre&amp;ext_name=' . urlencode($name),
'DELETE_DATA' => $this->u_action . '&amp;action=delete_data_pre&amp;ext_name=' . urlencode($name),
));
}
catch(\phpbb\extension\exception $e)
@ -325,7 +336,8 @@ class acp_extensions
foreach ($actions as $lang => $url)
{
$this->template->assign_block_vars($block . '.actions', array(
'L_ACTION' => $this->user->lang($lang),
'L_ACTION' => $this->user->lang('EXTENSION_' . $lang),
'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '',
'U_ACTION' => $url,
));
}

View file

@ -1470,7 +1470,7 @@ class acp_forums
/**
* Event when we move content from one forum to another
*
* @event core.acp_manage_forums_move_children
* @event core.acp_manage_forums_move_content
* @var int from_id If of the current parent forum
* @var int to_id If of the new parent forum
* @var bool sync Shall we sync the "to"-forum's data

View file

@ -324,7 +324,7 @@ class acp_groups
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
// This is normalised data, without the group_ prefix
$avatar_data = \phpbb\avatar\manager::clean_row($group_row);
$avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
if (!isset($avatar_data['id']))
{
$avatar_data['id'] = 'g' . $group_id;
@ -661,7 +661,6 @@ class acp_groups
'GROUP_HIDDEN' => $type_hidden,
'U_BACK' => $u_back,
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));

View file

@ -307,7 +307,6 @@ class acp_icons
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
'IMG_PATH' => $img_path,
'PHPBB_ROOT_PATH' => $phpbb_root_path,
'CODE' => $default_row['code'],
'EMOTION' => $default_row['emotion'],

View file

@ -888,7 +888,11 @@ class acp_styles
protected function list_style(&$style, $level)
{
// Mark row as shown
if (!empty($style['_shown'])) return;
if (!empty($style['_shown']))
{
return;
}
$style['_shown'] = true;
// Generate template variables

View file

@ -396,6 +396,9 @@ class acp_users
{
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
@ -1509,7 +1512,6 @@ class acp_users
'hideonline' => request_var('hideonline', !$user_row['user_allow_viewonline']),
'notifymethod' => request_var('notifymethod', $user_row['user_notify_type']),
'notifypm' => request_var('notifypm', $user_row['user_notify_pm']),
'popuppm' => request_var('popuppm', $this->optionget($user_row, 'popuppm')),
'allowpm' => request_var('allowpm', $user_row['user_allow_pm']),
'topic_sk' => request_var('topic_sk', ($user_row['user_topic_sortby_type']) ? $user_row['user_topic_sortby_type'] : 't'),
@ -1553,7 +1555,6 @@ class acp_users
if (!sizeof($error))
{
$this->optionset($user_row, 'popuppm', $data['popuppm']);
$this->optionset($user_row, 'viewimg', $data['view_images']);
$this->optionset($user_row, 'viewflash', $data['view_flash']);
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
@ -1696,7 +1697,6 @@ class acp_users
'NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
'NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
'NOTIFY_PM' => $data['notifypm'],
'POPUP_PM' => $data['popuppm'],
'BBCODE' => $data['bbcode'],
'SMILIES' => $data['smilies'],
'ATTACH_SIG' => $data['sig'],
@ -1742,7 +1742,7 @@ class acp_users
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
// This is normalised data, without the user_ prefix
$avatar_data = \phpbb\avatar\manager::clean_row($user_row);
$avatar_data = \phpbb\avatar\manager::clean_row($user_row, 'user');
if ($submit)
{

View file

@ -506,7 +506,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
unset($content_array[$ug_id]);
}
@ -593,7 +593,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
@ -1099,7 +1099,7 @@ class auth_admin extends \phpbb\auth\auth
* Assign category to template
* used by display_mask()
*/
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
{
global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;

View file

@ -26,7 +26,6 @@ class captcha
var $width = 360;
var $height = 96;
/**
* Create the image containing $code with a seed of $seed
*/
@ -69,7 +68,6 @@ class captcha
$bounding_boxes[$i] = $box;
}
// Redistribute leftover x-space
$offset = array();
for ($i = 0; $i < $code_len; ++$i)
@ -99,12 +97,12 @@ class captcha
imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
}
}
if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
{
$this->wave($img);
}
if ($config['captcha_gd_3d_noise'])
{
$xoffset = mt_rand(0,9);
@ -127,6 +125,7 @@ class captcha
$xoffset += $dimm[2];
}
}
$xoffset = 5;
for ($i = 0; $i < $code_len; ++$i)
{
@ -137,14 +136,17 @@ class captcha
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
if ($config['captcha_gd_wave'])
{
$this->wave($img);
}
if ($config['captcha_gd_foreground_noise'])
{
$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
}
// Send image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
@ -233,7 +235,6 @@ class captcha
imagesetthickness($img, 1);
}
function captcha_noise_bg_bitmaps()
{
return array(

View file

@ -184,7 +184,7 @@ class captcha
for ($x = 1; $x <= $full_x; ++$x)
{
$cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid);
$cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, $x_grid, $y_grid, 1);
// height is a z-factor, not a y-factor
$offset = $cur_height - $prev_height;
@ -264,7 +264,7 @@ class captcha
return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak);
}
function grid_height($x, $y, $factor = 1, $x_grid, $y_grid)
function grid_height($x, $y, $x_grid, $y_grid, $factor = 1)
{
return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0);
}

View file

@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
define('PHPBB_VERSION', '3.1.0-a2-dev');
define('PHPBB_VERSION', '3.1.0-a3-dev');
// QA-related
// define('PHPBB_QA', 1);

View file

@ -1318,18 +1318,12 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
$tz_dates .= '<option value="' . $timezone['offest'] . ' - ' . $timezone['current'] . '"' . $selected . '>' . $timezone['offest'] . ' - ' . $timezone['current'] . '</option>';
}
if (isset($user->lang['timezones'][$timezone['tz']]))
$label = $timezone['tz'];
if (isset($user->lang['timezones'][$label]))
{
$title = $label = $user->lang['timezones'][$timezone['tz']];
$label = $user->lang['timezones'][$label];
}
else
{
// No label, we'll figure one out
$bits = explode('/', str_replace('_', ' ', $timezone['tz']));
$label = implode(' - ', $bits);
$title = $timezone['offest'] . ' - ' . $label;
}
if ($truncate)
{
@ -1478,7 +1472,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$sql = 'SELECT forum_id
FROM ' . FORUMS_TRACK_TABLE . "
WHERE user_id = {$user->data['user_id']}
AND mark_time < $post_time
AND " . $db->sql_in_set('forum_id', $forum_id);
$result = $db->sql_query($sql);
@ -5365,7 +5358,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup'),
'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
'U_LOGIN_LOGOUT' => $u_login_logout,
@ -5393,7 +5385,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false,
'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false,
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
'S_USER_LANG' => $user_lang,
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
'S_USERNAME' => $user->data['username'],
@ -5597,14 +5588,14 @@ function garbage_collection()
global $cache, $db;
global $phpbb_dispatcher;
if (!empty($phpbb_dispatcher))
{
/**
* Unload some objects, to free some memory, before we finish our task
*
* @event core.garbage_collection
* @since 3.1-A1
*/
if (!empty($phpbb_dispatcher))
{
$phpbb_dispatcher->dispatch('core.garbage_collection');
}

View file

@ -67,7 +67,8 @@ function adm_page_header($page_title)
'SID' => $SID,
'_SID' => $_SID,
'SESSION_ID' => $user->session_id,
'ROOT_PATH' => $phpbb_admin_path,
'ROOT_PATH' => $phpbb_root_path,
'ADMIN_ROOT_PATH' => $phpbb_admin_path,
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),

View file

@ -46,7 +46,7 @@ class compress
if (is_file($phpbb_root_path . $src))
{
$this->data($src_path, file_get_contents("$phpbb_root_path$src"), false, stat("$phpbb_root_path$src"));
$this->data($src_path, file_get_contents("$phpbb_root_path$src"), stat("$phpbb_root_path$src"), false);
}
else if (is_dir($phpbb_root_path . $src))
{
@ -86,7 +86,7 @@ class compress
continue;
}
$this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), false, stat("$phpbb_root_path$src$path$file"));
$this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), stat("$phpbb_root_path$src$path$file"), false);
}
}
}
@ -109,7 +109,7 @@ class compress
return false;
}
$this->data($filename, file_get_contents($src), false, stat($src));
$this->data($filename, file_get_contents($src), stat($src), false);
return true;
}
@ -123,7 +123,7 @@ class compress
$stat[4] = $stat[5] = 0;
$stat[7] = strlen($src);
$stat[9] = time();
$this->data($name, $src, false, $stat);
$this->data($name, $src, $stat, false);
return true;
}
@ -395,7 +395,7 @@ class compress_zip extends compress
/**
* Create the structures ... note we assume version made by is MSDOS
*/
function data($name, $data, $is_dir = false, $stat)
function data($name, $data, $stat, $is_dir = false)
{
$name = str_replace('\\', '/', $name);
$name = $this->unique_filename($name);
@ -669,7 +669,7 @@ class compress_tar extends compress
/**
* Create the structures
*/
function data($name, $data, $is_dir = false, $stat)
function data($name, $data, $stat, $is_dir = false)
{
$name = $this->unique_filename($name);
$this->wrote = true;

View file

@ -481,6 +481,16 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
* For parsing custom parsed text to be stored within the database.
* This function additionally returns the uid and bitfield that needs to be stored.
* Expects $text to be the value directly from request_var() and in it's non-parsed form
*
* @param string $text The text to be replaced with the parsed one
* @param string $uid The BBCode uid for this parse
* @param string $bitfield The BBCode bitfield for this parse
* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.
* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)
* @param bool $allow_urls If urls is allowed
* @param bool $allow_smilies If smilies are allowed
*
* @return array An array of string with the errors that occurred while parsing
*/
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false)
{
@ -542,7 +552,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
$vars = array('text', 'uid', 'bitfield', 'flags');
extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));
return;
return $message_parser->warn_msg;
}
/**

View file

@ -1027,7 +1027,6 @@ function set_user_options()
'attachsig' => array('bit' => 6, 'default' => 0),
'bbcode' => array('bit' => 8, 'default' => 1),
'smilies' => array('bit' => 9, 'default' => 1),
'popuppm' => array('bit' => 10, 'default' => 0),
'sig_bbcode' => array('bit' => 15, 'default' => 1),
'sig_smilies' => array('bit' => 16, 'default' => 1),
'sig_links' => array('bit' => 17, 'default' => 1),
@ -1117,7 +1116,7 @@ function words_unique(&$words)
* Adds a user to the specified group and optionally makes them a group leader
* This function does not create the group if it does not exist and so should only be called after the groups have been created
*/
function add_user_group($group_id, $user_id, $group_leader=false)
function add_user_group($group_id, $user_id, $group_leader = false)
{
global $convert, $phpbb_root_path, $config, $user, $db;
@ -1719,7 +1718,7 @@ function add_default_groups()
'GUESTS' => array('', 0, 0),
'REGISTERED' => array('', 0, 0),
'REGISTERED_COPPA' => array('', 0, 0),
'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
'GLOBAL_MODERATORS' => array('00AA00', 2, 0),
'ADMINISTRATORS' => array('AA0000', 1, 1),
'BOTS' => array('9E8DA7', 0, 0),
'NEWLY_REGISTERED' => array('', 0, 0),
@ -1748,7 +1747,7 @@ function add_default_groups()
'group_type' => GROUP_SPECIAL,
'group_colour' => (string) $data[0],
'group_legend' => (int) $data[1],
'group_founder_manage' => (int) $data[2]
'group_founder_manage' => (int) $data[2],
);
}
@ -1758,6 +1757,38 @@ function add_default_groups()
}
}
function add_groups_to_teampage()
{
global $db;
$teampage_groups = array(
'ADMINISTRATORS' => 1,
'GLOBAL_MODERATORS' => 2,
);
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('group_name', array_keys($teampage_groups));
$result = $db->sql_query($sql);
$teampage_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$teampage_ary[] = array(
'group_id' => (int) $row['group_id'],
'teampage_name' => '',
'teampage_position' => (int) $teampage_groups[$row['group_name']],
'teampage_parent' => 0,
);
}
$db->sql_freeresult($result);
if (sizeof($teampage_ary))
{
$db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_ary);
}
}
/**
* Sync post count. We might need to do this in batches.

View file

@ -1352,7 +1352,7 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
*/
function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false)
{
$row = \phpbb\avatar\manager::clean_row($user_row);
$row = \phpbb\avatar\manager::clean_row($user_row, 'user');
return phpbb_get_avatar($row, $alt, $ignore_config);
}
@ -1367,7 +1367,7 @@ function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config =
*/
function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false)
{
$row = \phpbb\avatar\manager::clean_row($user_row);
$row = \phpbb\avatar\manager::clean_row($user_row, 'group');
return phpbb_get_avatar($row, $alt, $ignore_config);
}

View file

@ -533,3 +533,51 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
return $config_data;
}
/**
* Check whether a file should be ignored on update
*
* We ignore new files in some circumstances:
* 1. The file is a language file, but the language is not installed
* 2. The file is a style file, but the style is not installed
* 3. The file is a style language file, but the language is not installed
*
* @param string $phpbb_root_path phpBB root path
* @param string $file File including path from phpbb root
* @return bool Should we ignore the new file or add it to the board?
*/
function phpbb_ignore_new_file_on_update($phpbb_root_path, $file)
{
$ignore_new_file = false;
// We ignore new files in some circumstances:
// 1. The file is a language file, but the language is not installed
if (!$ignore_new_file && strpos($file, 'language/') === 0)
{
list($language_dir, $language_iso) = explode('/', $file);
$ignore_new_file = !file_exists($phpbb_root_path . $language_dir . '/' . $language_iso);
}
// 2. The file is a style file, but the style is not installed
if (!$ignore_new_file && strpos($file, 'styles/') === 0)
{
list($styles_dir, $style_name) = explode('/', $file);
$ignore_new_file = !file_exists($phpbb_root_path . $styles_dir . '/' . $style_name);
}
// 3. The file is a style language file, but the language is not installed
if (!$ignore_new_file && strpos($file, 'styles/') === 0)
{
$dirs = explode('/', $file);
if (sizeof($dirs) >= 5)
{
list($styles_dir, $style_name, $template_component, $language_iso) = explode('/', $file);
if ($template_component == 'theme' && $language_iso !== 'images')
{
$ignore_new_file = !file_exists($phpbb_root_path . 'language/' . $language_iso);
}
}
}
return $ignore_new_file;
}

View file

@ -1414,7 +1414,7 @@ class smtp_class
$result = false;
$stream_meta = stream_get_meta_data($this->socket);
if (socket_set_blocking($this->socket, 1));
if (socket_set_blocking($this->socket, 1))
{
$result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
socket_set_blocking($this->socket, (int) $stream_meta['blocked']);

View file

@ -22,7 +22,6 @@ class ucp_pm_info
'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),
),
);
}

Some files were not shown because too many files have changed in this diff Show more