View Single Post
  #4  
Old 31st December 2015, 19:38
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
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