Jump to content
Announcing Achievements! ×

Community

Dead Topic Protection


Adriano Faria
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

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

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.

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

Posted Images

  • 1 month later...
  • 2 months later...
  • 4 weeks later...
  • 5 months later...

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

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy