allow_comments

Started by SlaTkis, December 31, 2015, 03:54:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SlaTkis

Thanks I found mistake so now works...

denede


SlaTkis

#1
First I add a this

`torrents` ADD `allow_comments` enum('yes','no') NOT NULL default 'yes';

in edit.php add this


    // ===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

torrents.allow_comments

and

     
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