aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/events.md8
-rw-r--r--phpBB/includes/acp/acp_extensions.php83
-rw-r--r--phpBB/styles/prosilver/template/index_body.html22
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html8
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html12
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html14
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html8
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html2
9 files changed, 105 insertions, 54 deletions
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 57c152c242..df7564be3c 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -154,6 +154,14 @@ index_body_linklist_before
* Since: 3.1.0-a3
* Purpose: Add content before the linklist above the forum list on Board index
+index_body_stat_blocks_after
+===
+* Locations:
+ + styles/prosilver/template/index_body.html
+ + styles/subsilver2/template/index_body.html
+* Since: 3.1.0-b3
+* Purpose: Add new statistic blocks below the Who Is Online and Board Statistics blocks
+
index_body_stat_blocks_before
===
* Locations:
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 2ff479d824..1de6987624 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -241,21 +241,15 @@ class acp_extensions
*/
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
{
+ $enabled_extension_meta_data = array();
+
foreach ($phpbb_extension_manager->all_enabled() as $name => $location)
{
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
try
{
- $this->template->assign_block_vars('enabled', array(
- 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
-
- 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
- ));
-
- $this->output_actions('enabled', array(
- 'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($name),
- ));
+ $enabled_extension_meta_data[$name] = $md_manager->get_metadata('display-name');
}
catch(\phpbb\extension\exception $e)
{
@@ -264,6 +258,21 @@ class acp_extensions
));
}
}
+
+ natcasesort($enabled_extension_meta_data);
+
+ foreach ($enabled_extension_meta_data as $name => $display_name)
+ {
+ $this->template->assign_block_vars('enabled', array(
+ 'META_DISPLAY_NAME' => $display_name,
+
+ 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('enabled', array(
+ 'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($name),
+ ));
+ }
}
/**
@@ -274,22 +283,15 @@ class acp_extensions
*/
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
{
+ $disabled_extension_meta_data = array();
+
foreach ($phpbb_extension_manager->all_disabled() as $name => $location)
{
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
try
{
- $this->template->assign_block_vars('disabled', array(
- 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
-
- 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
- ));
-
- $this->output_actions('disabled', array(
- 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
- 'DELETE_DATA' => $this->u_action . '&action=delete_data_pre&ext_name=' . urlencode($name),
- ));
+ $disabled_extension_meta_data[$name] = $md_manager->get_metadata('display-name');
}
catch(\phpbb\extension\exception $e)
{
@@ -298,6 +300,22 @@ class acp_extensions
));
}
}
+
+ natcasesort($disabled_extension_meta_data);
+
+ foreach ($disabled_extension_meta_data as $name => $display_name)
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $display_name,
+
+ 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('disabled', array(
+ 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
+ 'DELETE_DATA' => $this->u_action . '&action=delete_data_pre&ext_name=' . urlencode($name),
+ ));
+ }
}
/**
@@ -310,21 +328,15 @@ class acp_extensions
{
$uninstalled = array_diff_key($phpbb_extension_manager->all_available(), $phpbb_extension_manager->all_configured());
+ $available_extension_meta_data = array();
+
foreach ($uninstalled as $name => $location)
{
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
try
{
- $this->template->assign_block_vars('disabled', array(
- 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
-
- 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
- ));
-
- $this->output_actions('disabled', array(
- 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
- ));
+ $available_extension_meta_data[$name] = $md_manager->get_metadata('display-name');
}
catch(\phpbb\extension\exception $e)
{
@@ -333,6 +345,21 @@ class acp_extensions
));
}
}
+
+ natcasesort($available_extension_meta_data);
+
+ foreach ($available_extension_meta_data as $name => $display_name)
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $display_name,
+
+ 'U_DETAILS' => $this->u_action . '&action=details&ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('disabled', array(
+ 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
+ ));
+ }
}
/**
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index 50c7640e62..19552e1804 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -46,19 +46,27 @@
<!-- EVENT index_body_stat_blocks_before -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
- <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
- <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
- <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --></p>
+ <div class="stat-block online-list">
+ <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
+ <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
+ <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --></p>
+ </div>
<!-- ENDIF -->
<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
- <h3>{L_BIRTHDAYS}</h3>
- <p><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
+ <div class="stat-block birthday-list">
+ <h3>{L_BIRTHDAYS}</h3>
+ <p><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
+ </div>
<!-- ENDIF -->
<!-- IF NEWEST_USER -->
- <h3>{L_STATISTICS}</h3>
- <p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
+ <div class="stat-block statistics">
+ <h3>{L_STATISTICS}</h3>
+ <p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
+ </div>
<!-- ENDIF -->
+<!-- EVENT index_body_stat_blocks_after -->
+
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index d57c73217e..f14e4708e7 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -22,20 +22,20 @@
<!-- IF RANK_TITLE or RANK_IMG --><dd class="profile-rank">{RANK_TITLE}<!-- IF RANK_TITLE and RANK_IMG --><br /><!-- ENDIF -->{RANK_IMG}</dd><!-- ENDIF -->
- <dd><strong>{L_POSTS}{L_COLON}</strong> {AUTHOR_POSTS}</dd>
- <!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}{L_COLON}</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
+ <dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> {AUTHOR_POSTS}</dd>
+ <!-- IF AUTHOR_JOINED --><dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
<!-- EVENT ucp_pm_viewmessage_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF not custom_fields.S_PROFILE_CONTACT -->
- <dd><strong>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <dd class="profile-custom-field profile-{custom_fields.PROFILE_FIELD_IDENT}"><strong>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {custom_fields.PROFILE_FIELD_VALUE}</dd>
<!-- ENDIF -->
<!-- END custom_fields -->
<!-- EVENT ucp_pm_viewmessage_custom_fields_after -->
<!-- IF U_PM or U_EMAIL or U_JABBER -->
- <dd>
+ <dd class="profile-contact">
<ul class="profile-icons">
<!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
<!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index b464e18470..9848336b75 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -241,13 +241,17 @@
<!-- INCLUDE jumpbox.html -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
- <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
- <p>{LOGGED_IN_USER_LIST}</p>
+ <div class="stat-block online-list">
+ <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
+ <p>{LOGGED_IN_USER_LIST}</p>
+ </div>
<!-- ENDIF -->
<!-- IF S_DISPLAY_POST_INFO -->
- <h3>{L_FORUM_PERMISSIONS}</h3>
- <p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
+ <div class="stat-block permissions">
+ <h3>{L_FORUM_PERMISSIONS}</h3>
+ <p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
+ </div>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 8103ecda7f..e5fff02753 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -127,8 +127,8 @@
<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd class="profile-rank">{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
- <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}{L_COLON}</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
- <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
+ <!-- IF postrow.POSTER_POSTS != '' --><dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
+ <!-- IF postrow.POSTER_JOINED --><dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
<!-- IF postrow.S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
@@ -138,14 +138,14 @@
<!-- EVENT viewtopic_body_postrow_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
- <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <dd class="profile-custom-field profile-{postrow.custom_fields.PROFILE_FIELD_IDENT}"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
<!-- ENDIF -->
<!-- END custom_fields -->
<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
<!-- IF not S_IS_BOT -->
<!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER -->
- <dd>
+ <dd class="profile-contact">
<ul class="profile-icons">
<!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
@@ -343,8 +343,10 @@
<!-- ENDIF -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
- <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
- <p>{LOGGED_IN_USER_LIST}</p>
+ <div class="stat-block online-list">
+ <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
+ <p>{LOGGED_IN_USER_LIST}</p>
+ </div>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index 55a62fcf18..ea4cc76171 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -27,7 +27,7 @@
<!-- IF S_DISPLAY_ONLINE_LIST -->
<br clear="all" />
- <table class="tablebg" width="100%" cellspacing="1">
+ <table class="tablebg stat-block online-list" width="100%" cellspacing="1">
<tr>
<td class="cat" colspan="2"><!-- IF U_VIEWONLINE --><h4><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h4><!-- ELSE --><h4>{L_WHO_IS_ONLINE}</h4><!-- ENDIF --></td>
</tr>
@@ -50,7 +50,7 @@
<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
<br clear="all" />
- <table class="tablebg" width="100%" cellspacing="1">
+ <table class="tablebg stat-block birthday-list" width="100%" cellspacing="1">
<tr>
<td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>
</tr>
@@ -63,7 +63,7 @@
<br clear="all" />
-<table class="tablebg" width="100%" cellspacing="1">
+<table class="tablebg stat-block statistics" width="100%" cellspacing="1">
<tr>
<td class="cat" colspan="2"><h4>{L_STATISTICS}</h4></td>
</tr>
@@ -73,6 +73,8 @@
</tr>
</table>
+<!-- EVENT index_body_stat_blocks_after -->
+
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index af14fc0129..44e8f30ce4 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -293,7 +293,7 @@
<!-- IF S_DISPLAY_ONLINE_LIST -->
<br clear="all" />
- <table class="tablebg" width="100%" cellspacing="1">
+ <table class="tablebg stat-block online-list" width="100%" cellspacing="1">
<tr>
<td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index 6f2f1141a9..a5a50780fe 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -387,7 +387,7 @@
<!-- IF S_DISPLAY_ONLINE_LIST -->
<br clear="all" />
- <table class="tablebg" width="100%" cellspacing="1">
+ <table class="tablebg stat-block online-list" width="100%" cellspacing="1">
<tr>
<td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
</tr>