Posted 17 мартаMar 17 Подскажите, установил плагин WhoWasOnline, + добавил легенду групп, получился в плагине такой код:<h3 class='ipsType_reset ipsWidget_title'> {lang="block_whowasonline"} {{if $orientation == 'horizontal'}} <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> <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>Все работает хорошо, но легенда групп отображается вертикально:Как сделать чтобы отображалась горизонтально, по порядку друг за другом?
17 мартаMar 17 <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 17 мартаMar 17 by Desti
17 мартаMar 17 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.