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

hi everybody

how can I show the number of all topics and all posts for each forum?

Spoiler

Untitled.thumb.png.8b6e9adc2fb6c289d6ab951fb98289bd.png

 

for example I want to show number of all topics and all posts for ipbmafia.ru forum In front of the title

 

 

turk шаблон forums > front > index > index

после <a href='{$category->url()}'>{$category->_title}</a> вставить:

					{{$all = \IPS\Db::i()->select( 'SUM(topics) as t, SUM(posts) as p', 'forums_forums', array( 'parent_id = ?', $category->_id ) )->first();}}
					Topics: {$all['t']} Posts: {$all['p']}

по желанию:

					{{$all = \IPS\Db::i()->select( 'SUM(topics) as t, SUM(posts) as p', 'forums_forums', array( 'parent_id = ?', $category->_id ) )->first();}}
					{{if $all['t'] > 0}}
						Topics: {$all['t']} Posts: {$all['p']}
					{{else}}
					{{endif}}

 

  • 2 недели спустя...
4 часа назад, turk сказал:

by_ix  thanks!

how can I add user follow button in comment controller section?

  Скрыть контент

Untitled.thumb.png.7d9c7bb12914d5da127c40d68ece840a.png

 

if user is not followed "fa-user-plus" anf if user in followed "fa-user-times"

 

with regards!

 

There is a free plugin on the Marketplace regarding your request:

https://invisioncommunity.com/files/file/10178-follow-post-author/

  • 5 недель спустя...
  • Author
On 1/3/2023 at 7:44 PM, by_ix said:

шаблон forums > front > index >  index

after <a href='{$category->url()}'>{$category->_title}</a> insert:

@by_ix thanks. everything good work. but this code doesn't show real status.

below image is one of my forums that shows 42 posts and 17 topics but your code shows 38 posts and 16 topics.

Spoiler

Firefox_Screenshot_2023-02-13T11-12-07_737Z.png.e9f128e111bc733af55876685440898d.png

 

Посчитай, сколько там на самом деле постов и топиков. Потом поймешь, что где неправильно. Например, удаленные посты и топики никуда из базы данных определенное администратором время не пропадают. Про удаленные данные в своем последнем сообщении ты не написал. Или невнимательно отвечал на мое сообщение, или скрываешь.

Edited by Zero108

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.