Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 1st February 2009, 16:57
sagus's Avatar
sagus sagus is offline
Member
 
Join Date: Oct 2008
Posts: 5
Default 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
Reply With Quote
  #2  
Old 11th July 2009, 17:08
krelac's Avatar
krelac krelac is offline
Member
 
Join Date: Nov 2008
Posts: 3
Default
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.
Reply With Quote
  #3  
Old 4th October 2009, 05:25
Moh.ElBaz's Avatar
Moh.ElBaz Moh.ElBaz is offline
Senior Member
 
Join Date: Jul 2008
Egypt
Posts: 145
Default
@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&amp;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&amp;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>"
__________________
$ Coding and Development
Reply With Quote
  #4  
Old 31st December 2015, 19:38
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 171
Default
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!";

        ?>
    <tr><td align="right"><font color="red">*</font><b>Komentar:</b></td>
    <td><select name="allow_comments">
    <option value="<?=htmlspecialchars($row["allow_comments"])?>"><?=htmlspecialchars($row["allow_comments"])?></option>
    <option value="yes"> Yes </option><option value="no"> No </option></select> <?=$mess?></td></tr>
    <?php
    }
    // ===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("<br><p align=center><b><font color=red>You are not able to comment on this torrent.</font></b></p>");
        }
What is wrong not working for me

use a TBDev 08
Reply With Quote
Reply

Tags
comments , disallow

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comments in request lafouine022 Mods & Themes 2 20th March 2012 08:59
Rating in Comments Fynnon Mods & Themes 6 5th May 2010 06:27
Anonymous Comments Rendevous Mods & Themes 0 4th May 2010 12:17
PM on Comments xxx2008 Free Torrent Source 5 17th January 2010 13:16
comments wMan BT.Manager (phpMyBitTorrent) 0 2nd September 2009 18:32



All times are GMT +2. The time now is 15:59. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.