Перейти к публикации
View in the app

A better way to browse. Learn more.

Дизайн и модификация 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.

Как вывести кол-во созданных тем

Опубликовано:

Всем привет. Подскажите, кто знает, как вывести в постконтейнере, под аватаром, количество созданных тем юзером/админом? На подобие того, как выводится кол-во созданных сообщений. Вроде не сложно, но мозг не поворачивается 

Изменено пользователем aLEX49566

Рекомендованные сообщения

Опубликовано:
  • Автор

Сделал так:

<a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks">

                       {{$where[] = "starter_id = " . $comment->author()->member_id;}}

{{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}}

<i class="fa fa-comment"></i>  {{$topics_count = count($author_topics);}} {$topics_count}    

                </a>


 

Но перекидывает при нажатии на темы, а в сообщения. При наведении тоже показывает не темы а сообщения.

Изменено пользователем Lesovsky

Опубликовано:
  • Автор

Если бы кто с этими двумя моментами помог, был бы приемного благодарен!

Опубликовано:
  • Автор

Сделал. Доведу до ума, скину итог 

Опубликовано:
  • Автор

Пишу с телефона, а тут кодом не вставить(

Для пк:

<li>

              {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }}

                <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks">

              {{endif}}

                <i class="fa fa-comments"></i> {number="$comment->author()->member_posts" format="short"}

              {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }}

                </a>

              {{endif}}

            </li>

                      

                        <li>

                            <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content&type=forums_topic&change_section=1" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="User_Created_Themes"}" data-ipsTooltip class="ipsType_blendLinks">

                              {{$where[] = "starter_id = " . $comment->author()->member_id;}}

                             {{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}}

                                <i class="fa fa-comment"></i>  {{$topics_count = count($author_topics);}} {$topics_count}    

                              </a>

                         </li>

 

для моб:

 

<h3 class='ipsComment_author ipsType_blendLinks'>

          {template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef(), NULL, $comment->isAnonymous()"}

     

                    {template="reputationBadge" group="global" app="core" params="$comment->author()"}

                  

                        {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }}

                <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks ipsRepBadge">

              {{endif}}

                <i class="fa fa-comments"></i> {number="$comment->author()->member_posts" format="short"}

              {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }}

                </a>

              {{endif}}

              

                             <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content&type=forums_topic&change_section=1" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="User_Created_Themes"}" data-ipsTooltip class="ipsType_blendLinks  ipsRepBadge">

                              {{$where[] = "starter_id = " . $comment->author()->member_id;}}

                             {{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}}

                                <i class="fa fa-comment"></i>  {{$topics_count = count($author_topics);}} {$topics_count}    

                              </a>     

          </h3>

 

В языки:

<word key="User_Created_Themes" js="0">Созданные темы пользователя</word>

 

Результат:

IMG_3938.jpeg.fcb254b76cd64e1461a094ee6d8295c1.jpeg

 

IMG_3939.jpeg.ac5580f185319d38da9209a74312ddde.jpeg

Изменено пользователем Lesovsky

Опубликовано:

Только по-хорошему нужно указывать в какие шаблоны нужно производить изменения.

Опубликовано:
  • Автор
5 часов назад, Lesovsky сказал:

Только по-хорошему нужно указывать в какие шаблоны нужно производить изменения.

Согласен. С телефона был. По человечески не вышло(. Как нибудь напишу по человечески : )

Изменено пользователем aLEX49566

Создайте аккаунт или войдите в него для комментирования

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу.

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.