Enable/Disable/Stop Comments Plugin v2.5

Download plugins, language packs and stuff.

Enable/Disable/Stop Comments Plugin v2.5

Postby DarkSlim » Thu Nov 26, 2009 3:14 pm

Hi all, I have just made some updates and fixes to the Enable/Disable Comments
plugin, my new version contains:

* Fixed the [comheader] tag (wasn't working for some)

* Adds new tag to full and active news [comm-na] whatever found between the tag would not be shown
if comments are disabled (comheader also checks if there are no comments or something
which caused me some problems with my template)

*Adds new tag to comment form [comm-stop] - now when stoping comments, the existing
comments will remain, and with the new [comm-stop] tag you can choose only the comment
form itself to disappear so you can still use the rest of the comment form template, as I am using
it to complete my comments table.

So if you are planing to use enable/disable and stop comments checkboxes this new
version should be very helpfull! :)

Installation
1. Download the .rar file
2. Put it in the plugins/ folder, that's it!

Edit: For anyone that's intrested, a few comments below there is
an add of a new tag [comm-na-comment] for showing a comment (or whatever) in case of comment not allowed.

Hope it helps, would be glad to hear what you think,

DarkSlim
Attachments
enable-disable-comments-v2.5.rar
Enable/Disable/Stop Comments Plugin v2.5!
(1.7 KiB) Downloaded 127 times
Last edited by DarkSlim on Sun Jan 17, 2010 4:30 pm, edited 2 times in total.
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby Astramak » Sun Jan 17, 2010 2:19 am

Thx for [comm-na], really needed tag
Astramak
 
Posts: 18
Joined: Sun Jan 17, 2010 2:17 am

Postby DarkSlim » Sun Jan 17, 2010 8:22 am

Astramak wrote:Thx for [comm-na], really needed tag


No problem, glad it helped, it is very useful :)
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby Astramak » Sun Jan 17, 2010 1:26 pm

what are you think about this func?

add new tag, for view some text, when comments are off.

i add
Code: Select all
[comm-na]<a href="{link=home/post}#comments">comm</a> {comments} / view {views}
<br/><br/>[/comm-na]
and dont see anythink, when comments off.

with new tag i can add
Code: Select all
[blah-blah]Comments are turned off by the author[/blah-blah]
, or somethink else.

hm? :)
Astramak
 
Posts: 18
Joined: Sun Jan 17, 2010 2:17 am

Postby DarkSlim » Sun Jan 17, 2010 4:28 pm

Yup, here I made this for you, this one adds a new tag called [comm-na-comment]
which shows a comment or whatever you want if comments are disabled. :)

Find:
Code: Select all
   if ($allow['allow'] == 'on'){$output = preg_replace('/\[comm-na\](.*?)\[\/comm-na\]/is', '\\1', $output);}
   else {$output = preg_replace('/\[comm-na\](.*?)\[\/comm-na\]/is', '', $output);}


Replace with:
Code: Select all
   if ($allow['allow'] == 'on'){
           $output = preg_replace('/\[comm-na\](.*?)\[\/comm-na\]/is', '\\1', $output);
           $output = preg_replace('/\[comm-na-comment\](.*?)\[\/comm-na-comment\]/is', '', $output);
        }
   else {
           $output = preg_replace('/\[comm-na\](.*?)\[\/comm-na\]/is', '', $output);
           $output = preg_replace('/\[comm-na-comment\](.*?)\[\/comm-na-comment\]/is', '\\1', $output);
        }


Find:
Code: Select all
              $variables["[comm-na] ... [/comm-na]"] = "Only displayed if there is comments are allowed.";


After Add
:
Code: Select all
              $variables["[comm-na-comment] ... [/comm-na-comment]]"] = "Only displayed if comments are not allowed.";


That's it, wasn't tested but should work the same. ;)

Hope it helps!
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL


Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron