Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Disallow Comments (http://www.bvlist.com/showthread.php?t=1924)

sagus 1st February 2009 16:57

Disallow Comments
 
First sorry for my bad english.
I need mod for disallow comments in torrent for TBDEV.Can anybody help me with this mod. Thanx

krelac 11th July 2009 17:08

I would like to have this mod to.
Have option to give Moderators option to enable or again disable torrents comments.
If sombady can help.
Thanx.

Moh.ElBaz 4th October 2009 05:25

@Elvira They don't ask ( Do you have this mod ? )
They Said ( They need this mod )

Anyway

It's simple to add it

SQL
PHP Code:

ALTER TABLE `torrentsADD `comnts_enabledenum('yes','no'NOT NULL default 'yes'

In details.php
replace
PHP Code:

    print("<p><a name=\"startcomments\"></a></p>\n");

    
$commentbar "<p align=center><a class=index href=comment.php?action=add&tid=$id>Add a comment</a></p>\n";

    
$subres mysql_query("SELECT COUNT(*) FROM comments WHERE torrent = $id");
    
$subrow mysql_fetch_array($subres,MYSQL_NUM);
    
$count $subrow[0]; 

With
PHP Code:

print("<p><a name=\"startcomments\"></a></p>\n");
if(
$arr['comnts_enabled']) {

$commentbar "<p align=center><a class=index href=comment.php?action=add&tid=$id>Napisi komentar</a></p>\n";

$subres mysql_query("SELECT COUNT(*) FROM comments WHERE torrent = $id");
$subrow mysql_fetch_array($subres,MYSQL_NUM);
$count $subrow[0];
}
else 
echo 
"<p>Sorry, Comments have been disabled by Staff.</p>"



   
        }
    // ===end
and details.php add

Code:

torrents.allow_comments
and

Code:

   
if ($row["allow_comments"] == "yes" || get_user_class() >= UC_MODERATOR) {
        print($commentbar);
        print($quickcomment);}
        else {
        print("

You are not able to comment on this torrent.

");
        }

What is wrong not working for me

use a TBDev 08
elvira 31st December 2015 19:38

First I add a this

Code:

ALTER TABLE `torrents` ADD `allow_comments` enum('yes','no') NOT NULL default 'yes';
in edit.php add this

Code:

    // ===allow comments?
    if (get_user_class() >= UC_MODERATOR) {
        if ($row["allow_comments"] == "yes")
            $mess = " Comments are allowed for everyone on this torrent!";
        else
            $mess = " Only staff members are able to comment on this torrent!";

        ?>
   
*Komentar:


All times are GMT +2. The time now is 11:54.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.