Bonjour à tous !
Voilà un hack complémentaire pour donnée la possibilité a vos membres d'Activé ou désactivé la visibilité de l'annonce sur la shoutbox à partir de leur compte.
===========ANGLAIS…
Hello everyone!
Here's an additional hack to give your members the ability to enable or disable announcement visibility in the shoutbox from their account.
Add / Ajouter SQL :
ALTER TABLE `users` ADD `coveroff` ENUM( 'yes', 'no' ) DEFAULT 'yes' NOT NULL;
Open / Ouvrir account.php search / Chercher :
if ($CURUSER["class"] > 1)
print("<tr><td align='right' class='alt2'><b>".T_("TEAM").":</b> </td><td align='left' class='alt2'><select name='teams'>\n$teams\n</select></td></tr>");
Add After / Ajouter Apres :
<?php
if ($CURUSER["coveroff"] == 'yes'){
print("" .T_("POCHETTE_ON_OR_OFF"). ": <font color='#00FF00'>" .T_("VISIBLE"). "</font><br />");
} else {
print("" .T_("POCHETTE_ON_OR_OFF"). ": <font color='#FF0000'>" .T_("INVISIBLE"). "</font><br />");
}
?>
Search / Chercher :
$teams = $_POST["teams"];
Add After / Ajouter Apres :
$pochetteoff = $_POST["coveroff"];
Search / Chercher :
$updateset[] = "tzoffset = $timezone";
Add After / Ajouter Apres :
$updateset[] = "coveroff = " . sqlesc($coveroff);
Search / Chercher :
<?php echo T_("CLIENT"); ?>: <?php echo htmlspecialchars($user["client"])?><br />
Add After / Ajouter Apres :
print ("<tr><td align='right' class='alt2'><b>" .T_("POCHETTE_ON_OR_OFF"). ":</b> </td><td class='alt2'><input type='radio' name='coveroff'" . ($CURUSER["coveroff"] == "yes" ? " checked" : "") . " value='yes'><b>" .T_("VISIBLE"). "</b> <input type='radio' name='coveroff'" . ($CURUSER["coveroff"] == "no" ? " checked" : "") . " value='no'><b>" .T_("INVISIBLE"). "</b></td></tr>");
Open / Ouvrir torrents-upload.php Search / Chercher :
If ($anonycheck=='yes') {
if ($_POST["anonycheck"] != "yes") { $uppedby = " [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."] ".$CURUSER["username"]." [/url]"; } else { $uppedby = ""; }
$debut ="[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\n [img1]".$site_config["SITEURL"]."/uploads/images/".$inames[0]."[/img1]\n
";
$post_text = sqlesc($debut);
Remplacer par / Replace with :
//===| Announcement for a New Torrent in Ajax Shoutbox |===//☠
if ($CURUSER["coveroff"] == 'yes'){
If ($anonycheck=='yes') {
if ($_POST["anonycheck"] != "yes") { $uppedby = " [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."] ".$CURUSER["username"]." [/url]"; } else { $uppedby = ""; }
$debut ="[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\n [img1]".$site_config["SITEURL"]."/uploads/images/".$inames[0]."[/img1]\n
";
$post_text = sqlesc($debut);
}else{
if ($_POST["anonycheck"] != "yes") { $uppedby = " [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."] ".$CURUSER["username"]." [/url]"; } else { $uppedby = " Anonyme"; }
$debut ="[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\n [img1]".$site_config["SITEURL"]."/uploads/images/".$inames[0]."[/img1]\n Partager par".$uppedby."
";
$post_text = sqlesc($debut);
SQL_Query_exec("INSERT INTO ajshoutbox(uid, date, name, text) VALUES('0', '".get_date_time()."', 'Robot Crazy',".$post_text.")");
}
}
//===| END |===//
Add lang / Ajouter fichier langage :
ANGLAIS :
// Cover Visible or Not Visible ?
$LANG["POCHETTE_ON_OR_OFF"] = "Announcement on Shoutbox after upload?";
$LANG["VISIBLE"] = " <font color=greene>Visible</font>";
$LANG["INVISIBLE"] = " <font color=red>Invisible</font>";
FRENCH :
// Pochette Visible Ou Pas Visible ?
$LANG["POCHETTE_ON_OR_OFF"] = "Annonce Sur La Shoutbox Apres Upload ?";
$LANG["VISIBLE"] = " <font color=greene>Visible</font>";
$LANG["INVISIBLE"] = " <font color=red>Invisible</font>";
Always open to any modifications by the community, don't forget to say thank you!
-------------------------------//
Toujours ouvert à toutes modifications par la communauté, oublié pas dire merci !