mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
About: Increase block of top groups & add "Links"
Closes #510 Co-authored-by: Celestora <kitsuruko@gmail.com>
This commit is contained in:
parent
99344c5497
commit
28c66af133
5 changed files with 36 additions and 10 deletions
|
@ -45,7 +45,7 @@ class Clubs
|
|||
|
||||
function getPopularClubs(): \Traversable
|
||||
{
|
||||
$query = "SELECT ROW_NUMBER() OVER (ORDER BY `subscriptions` DESC) as `place`, `target` as `id`, COUNT(`follower`) as `subscriptions` FROM `subscriptions` WHERE `model` = \"openvk\\\Web\\\Models\\\Entities\\\Club\" GROUP BY `target` ORDER BY `subscriptions` DESC, `id` LIMIT 10;";
|
||||
$query = "SELECT ROW_NUMBER() OVER (ORDER BY `subscriptions` DESC) as `place`, `target` as `id`, COUNT(`follower`) as `subscriptions` FROM `subscriptions` WHERE `model` = \"openvk\\\Web\\\Models\\\Entities\\\Club\" GROUP BY `target` ORDER BY `subscriptions` DESC, `id` LIMIT 20;";
|
||||
$entries = DatabaseConnection::i()->getConnection()->query($query);
|
||||
|
||||
foreach($entries as $entry)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td width="250" {if sizeof($admins) > 0}style="padding-right: 10px;"{/if}>
|
||||
<td width="250"{if sizeof($admins) > 0} style="padding-right: 10px;"{/if}>
|
||||
<h4>{_statistics}</h4>
|
||||
<div style="margin-top: 5px;">
|
||||
{_on_this_instance_are}
|
||||
|
@ -21,6 +21,15 @@
|
|||
<li><span>{tr("about_wall_posts", $postsCount)|noescape}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['about']['links']}
|
||||
<h4>{_about_links}</h4>
|
||||
<div style="margin-top: 5px;">
|
||||
{_instance_links}
|
||||
<ul>
|
||||
<li n:foreach="OPENVK_ROOT_CONF['openvk']['preferences']['about']['links'] as $aboutLink"><a href="{$aboutLink['url']}" target="_blank" class="link">{$aboutLink["name"]}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
<td n:if="sizeof($admins) > 0">
|
||||
<h4>{_administrators}</h4>
|
||||
|
@ -44,14 +53,23 @@
|
|||
|
||||
{if sizeof($popularClubs) !== 0}
|
||||
<h4>{_most_popular_groups}</h4>
|
||||
<ol>
|
||||
<li n:foreach="$popularClubs as $entry" style="margin-top: 5px;">
|
||||
<a href="{$entry->club->getURL()}">{$entry->club->getName()}</a>
|
||||
<div>
|
||||
{tr("participants", $entry->subscriptions)}
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
{var $entries = array_chunk($popularClubs, 10, true)}
|
||||
<table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td n:foreach="$entries as $chunk">
|
||||
<ol>
|
||||
<li value="{$num+1}" style="margin-top: 5px;" n:foreach="$chunk as $num => $club">
|
||||
<a href="{$club->club->getURL()}">{$club->club->getName()}</a>
|
||||
<div>
|
||||
{tr("participants", $club->subscriptions)}
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<h4>{_rules}</h4>
|
||||
|
|
|
@ -853,6 +853,8 @@
|
|||
"rules" = "Rules";
|
||||
"most_popular_groups" = "Most popular groups";
|
||||
"on_this_instance_are" = "On this instance are:";
|
||||
"about_links" = "Links";
|
||||
"instance_links" = "Instance links:";
|
||||
|
||||
"about_users_one" = "<b>1</b> user";
|
||||
"about_users_other" = "<b>$1</b> users";
|
||||
|
|
|
@ -896,6 +896,8 @@
|
|||
"rules" = "Правила";
|
||||
"most_popular_groups" = "Самые популярные группы";
|
||||
"on_this_instance_are" = "На этой инстанции:";
|
||||
"about_links" = "Ссылки";
|
||||
"instance_links" = "Ссылки инстанции:";
|
||||
|
||||
"about_users_one" = "<b>1</b> пользователь";
|
||||
"about_users_few" = "<b>$1</b> пользователя";
|
||||
|
|
|
@ -57,6 +57,10 @@ openvk:
|
|||
links:
|
||||
- name: "@left_menu_donate"
|
||||
url: "/donate"
|
||||
about:
|
||||
links:
|
||||
- name: "Link caption"
|
||||
url: "https://example.org/"
|
||||
adPoster:
|
||||
enable: false
|
||||
src: "https://example.org/ad_poster.jpeg"
|
||||
|
|
Loading…
Reference in a new issue