Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Легенда групп отображается вертикально

Featured Replies

Posted

Подскажите, установил плагин WhoWasOnline, + добавил легенду групп, получился в плагине такой код:

<h3 class='ipsType_reset ipsWidget_title'>

{lang="block_whowasonline"}

{{if $orientation == 'horizontal'}}

&nbsp;<span class='ipsType_light ipsType_unbold ipsType_medium'>{lang="who_was_online_last_x" sprintf="$hour" pluralize="$memberCount"}</span>

{{endif}}

</h3>

<div class='ipsWidget_inner ipsPad'>

{{if $memberCount}}

<ul class='ipsList_inline ipsList_csv ipsList_noSpacing'>

{{if \IPS\Settings::i()->who_was_online_photo}}

{{if \IPS\Settings::i()->who_was_online_photo_size == 0}}

{{foreach $members as $row}}

{template="userPhoto" app="core" params="\IPS\Member::load( $row['member_id'] ), 'tiny'" group="global"}

{{endforeach}}

{{endif}}

{{if \IPS\Settings::i()->who_was_online_photo_size == 1}}

{{foreach $members as $row}}

{template="userPhoto" app="core" params="\IPS\Member::load( $row['member_id'] ), 'medium'" group="global"}

{{endforeach}}

{{endif}}

{{else}}

{{foreach $members as $row}}

<li>{template="userLinkFromData" group="global" app="core" params="$row['member_id'], $row['name'], $row['members_seo_name'], $row['member_group_id']"}</li>

{{endforeach}}

{{endif}}

</ul>

{{if $orientation == 'vertical' and $memberCount > 60}}

<p class='ipsType_medium ipsType_reset'>

<a href='{url="app=core&module=online&controller=online" seoTemplate="online"}'>{lang="and_x_others" pluralize="$memberCount - 60"}</a>

</p>

{{endif}}

{{if $stat !== false && $orientation!='vertical'}}

<hr>

&nbsp;&nbsp;<span class='ipsType_light ipsType_unbold ipsType_medium'>{$stat|raw}</span>

{{endif}}

{{else}}

<p class='ipsType_reset ipsType_medium ipsType_light'>{lang="who_was_online_users_empty"}</p>

{{endif}}

<hr class="ipsHr">

{{$groups = \IPS\Member::loggedIn()->groupNameIndicator();}}

{{if \count( $groups )}}

<center><div>

{{foreach $groups as $group}}

{{$url = \IPS\Http\Url::internal( "app=core&module=search&controller=search" );}}

{{$url = (string) $url . "&type=core_members&group%5B" . $group->g_id . "%5D=1&q=";}}

<div class="gni"><a href='{$url}'>{$group->formattedName|raw}</a></div>

{{endforeach}}

</div></center>

{{endif}}

</div>

Все работает хорошо, но легенда групп отображается вертикально:

image.png

Как сделать чтобы отображалась горизонтально, по порядку друг за другом?

<div class="gni">
{{foreach $groups as $group}}
{{$url = \IPS\Http\Url::internal( "app=core&module=search&controller=search" );}}
{{$url = (string) $url . "&type=core_members&group%5B" . $group->g_id . "%5D=1&q=";}}
<a href='{$url}'>{$group->formattedName|raw}</a>
{{endforeach}}
</div>

Edited by Desti

  • Author
5 минут назад, Desti said:

<div class="gni">
{{foreach $groups as $group}}
{{$url = \IPS\Http\Url::internal( "app=core&module=search&controller=search" );}}
{{$url = (string) $url . "&type=core_members&group%5B" . $group->g_id . "%5D=1&q=";}}
<a href='{$url}'>{$group->formattedName|raw}</a>
{{endforeach}}
</div>

Благодарочка огромная!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.