Jump to content

Dead Topic Protection

Featured Replies

Posted

About This File

This plugin will add a notice in topics that has more than X days of its last post. This is to avoid replies in old topics. You can also prohibit users from posting in the topic.

Settings:

  • Number of days
  • Allow posting
  • Groups
  • Forums
  • Message Type
  • Message

 

 

Edited by Adriano Faria

  • 2 weeks later...
  • Replies 64
  • Views 5.3k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Adriano Faria
    Adriano Faria

    What's New in Version 1.1.0: Compatibility with Post Before Registering. IPS 4.4 only!

  • Thanks, fair enough. I now edited your plugin to remove the top notice, so it just shows the bottom notice next to the quick reply dialog. I am aware that this is a quick fix and I have to look into

  • Adriano Faria
    Adriano Faria

    Here it goes, in case you want to do it. Download and open \plugins\deadtopicprotection\hooks\dtpTopicView.php and find: /* !Hook Data - DO NOT REMOVE */ public static function hookData() {

Posted Images

No message are displayed.

  • Author

Make sure you have selected proper forums and groups and have added the message and a number of days that meets the start date of the topic. 

  • 1 month later...

Hi Adriano,

another great plugin from you.

I imported the plugin to our 4.2. testbed and have a problem with it: The Banner with the dead topic protection text is shown next to the reply button, not below...

What is going wrong here?

Thanks,
Thomas

 

Screen Shot 2018-01-15 at 13.11.05.png

  • Author

Probably your theme is out of the pattern. I mean, when designer change things place this happen.

Please, test in default theme and let me know. 

Yes, you were right. On default it is where it should be as in your screenshot.

How can I change that on my theme... is there a place in the theme next to the button to change the hook line wrap...?

Thanks for your efforts

  • Author

It’s not a thing you can do. You should contact your designer and request “fix” in that area.

Thanks, fair enough. I now edited your plugin to remove the top notice, so it just shows the bottom notice next to the quick reply dialog.
I am aware that this is a quick fix and I have to look into this issue at a later time...

  • 2 months later...

It seems I cannot select certain forums for this to work on, while exempting other forums. It's all or nothing.

  • Author
10 hours ago, Robert Angle said:

It seems I cannot select certain forums for this to work on, while exempting other forums. It's all or nothing.

What's New in Version 1.0.1:

  • Fix error when selecting forums
  • 4 weeks later...

 

Notification is shown for all forum sections, even if one section is selected in the plugin settings.

  • Author

Notification?

On 4/9/2018 at 6:34 PM, Adriano Faria said:

Notification?

Banner with the dead topic protection text

  • Author

Banner?!? It doesn't has banner or notification.

Please, post a screenshot.

You mean this?

weZORQF.png

On 4/13/2018 at 7:41 PM, Adriano Faria said:

Баннер?!? У него нет баннера или уведомления.

Пожалуйста, разместите снимок экрана.

Вы имеете в виду это?

weZORQF.png

Yes it.

  • Author

Are you using the Default or 4.2 theme? If you’re in Default, switch to 4.2 and test it. 

  • 5 months later...

Is it possible to remove the top message (whilst keeping the bottom one)? If so, how, please?

  • Author
3 minutes ago, Millipede said:

Is it possible to remove the top message (whilst keeping the bottom one)? If so, how, please?

This one?

wjDs86n.jpg

  • Author

Just checked and you can't, unless you have FTP access, then I'll show you how to edit the hook file, rebuild cache and then it will show only above reply form.

Yes, that one. I have FTP access, that would be great, thanks! Would editing the hook file mean redoing it after updates?

  • Author
Just now, Millipede said:

Would editing the hook file mean redoing it after updates?

Yes. But this hasn't been update in a while, no bug, etc. So it's safe to make the edit.

Super, thanks!

  • Author

Here it goes, in case you want to do it.

Download and open \plugins\deadtopicprotection\hooks\dtpTopicView.php and find:

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
 return array_merge_recursive( array (
  'topic' => 
  array (
    0 => 
    array (
      'selector' => '#elClubContainer > div.ipsClearfix > ul.ipsToolList.ipsToolList_horizontal.ipsClearfix.ipsSpacer_both',
      'type' => 'add_after',
      'content' => '{{if $topic->deadTopicProtection()}}
	{template="deadtopicprotection" group="plugins" app="core" location="global" params="$topic"}
{{endif}}',
    ),
    1 => 
    array (
      'selector' => '#replyForm',
      'type' => 'add_before',
      'content' => '{{if $topic->deadTopicProtection()}}
	{template="deadtopicprotection" group="plugins" app="core" location="global" params="$topic"}
{{endif}}',
    ),
  ),
), parent::hookData() );
}
/* End Hook Data */

Change it to:

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
 return array_merge_recursive( array (
  'topic' => 
  array (
    0 => 
    array (
      'selector' => '#replyForm',
      'type' => 'add_before',
      'content' => '{{if $topic->deadTopicProtection()}}
	{template="deadtopicprotection" group="plugins" app="core" location="global" params="$topic"}
{{endif}}',
    ),
  ),
), parent::hookData() );
}
/* End Hook Data */
  1. Uploade the file.
  2. Go to ACP -> System -> Support -> Something isn't working correctly, click in the button to continue.

You'll get the message only above the editor:

7ymlyM7.png

Each message has a css class deadTopicProtection

So you can hide top message using css

.ipsToolList + .deadTopicProtection {
    display: none;
}

 

Edited by newbie LAC

Recently Browsing 0

  • No registered users viewing this page.