Jump to content

Dead Topic Protection


Recommended Posts

Posted (edited)

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...
  • 1 month later...
Posted

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

Posted

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

Posted

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...
Posted
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...
Posted
On 4/13/2018 at 7:41 PM, Adriano Faria said:

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

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

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

weZORQF.png

Yes it.

  • 5 months later...
Posted

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...