Jump to content

Featured Replies

Posted
comment_110957

Read That Topic/Announcement 2.0.3


С помощью данного приложения можно отобразить всплывающее сообщение для определённых групп, которое будет "заставлять" прочитать какую-то тему перед использованием форума.

У всплывающего окна имеется только один вариант для закрытия → перейти в требуемую тему)

Настройка проста и интуитивно понятна


  • Добавил
  • Добавлено
    03.08.2016
  • Категория
  • Язык
    Язык: Английский
  • 5 years later...
  • 1 месяц спустя...
comment_179770
2 hours ago, by_ix said:

avangcom BlackShot в чём проблема?

A few things:

  • The message uses an old IPS style, which makes the background blueish instead of white
  • There's no button to "Force users to read topic/announcement" in topics or announcements, like in the app's screenshots
  • CSFR protection needs to be added to its code (which can easily be done, but...)

Edit:

Actually, I just realized the button shows under the moderator tools, not under the common post options, lol

Edit 2:

Okay, the button does show correctly, but it throws an error message when we try to use it. 🙃

Edited by BlackShot

comment_179773

@by_ix I think I found the culprit for that error. It's the "SELECT_SQL_CALC_FOUND_ROWS" command on line 120 in read.php. It is a deprecated function and doesn't work anymore. This is the current expression:

$select	= \IPS\Db::i()->select( '*', 'core_members', $_SESSION['rtta_pside'], 'member_id ASC', array( is_array( $data ) ? $data['done'] : 0, $cycle ), NULL, NULL, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS );

$total	= $select->count( TRUE );

Do you know how to replace SELECT_SQL_CALC_FOUND_ROWS with a working method?

References:

https://invisioncommunity.com/developers/docs/fundamentals/accessing-the-database-r166/
https://invisioncommunity.com/forums/topic/459696-flag-ipsdbselect_sql_calc_found_rows-not-working/?do=findComment&comment=2839109

comment_179777
38 minutes ago, by_ix said:

Thanks!! That version seems to work just fine! Would be a great idea if you posted this for others under Files. 😄

comment_179779
1 minute ago, by_ix said:

BlackShot if the main admin wants, he will update this one. I see no reason to create another one.

True, but he hasn't logged in since 2020, lol

It's okay though, whoever is looking for an updated version will come through your post.

Edited by BlackShot

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.