Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
New User & Torrent In Shoutbox [TTv3]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2019-03-16 07:30:57
Updated for V3 credit to Original Author

shoutbox post new members
in account-signup.php find

       $signupclass = '2';


after add

$msg_shout = sqlesc("New User: ".$wantusername." has joined.");
SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");


shoutbox post new torrent
in torrents-upload.php.php find
write_log( sprintf(T_("TORRENT_UPLOADED"), htmlspecialchars($name), $CURUSER["username"]) );


add after
$msg_shout = sqlesc("New Torrent: [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url] has been uploaded ".($anon == 'no' ? "by [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
   SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");
2019-03-20 10:01:56
can not find this line
$id = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["DBconnector"]))) ? false : $___mysqli_res);
2019-03-20 13:13:03
what version of torrenttrader are you using?
2019-03-20 19:49:01
find
$id = mysqli_insert_id($GLOBALS["DBconnector"]);

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-06-09 08:20:56
"m-jay, post: 66295, member: 20288":

Updated for V3 credit to Original Author

shoutbox post new members
in account-signup.php find

       $signupclass = '2';


after add

$msg_shout = sqlesc("New User: ".$wantusername." has joined.");
SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");


shoutbox post new torrent
in torrents-upload.php.php find
write_log( sprintf(T_("TORRENT_UPLOADED"), htmlspecialchars($name), $CURUSER["username"]) );


add after
$msg_shout = sqlesc("New Torrent: [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url] has been uploaded ".($anon == 'no' ? "by [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
   SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");



allo , thanks you for mod

I install shoutbox but your line does not advertise?

you can help me, thanks
2019-06-09 10:12:12
I do not use the ajax shout box but the issue will be the sql query try replace
INSERT INTO shoutbox (userid, date, user, message)
with
INSERT INTO ajshoutbox (uid, date, name, text)
2019-06-09 14:55:42
"m-jay, post: 66697, member: 20288":

I do not use the ajax shout box but the issue will be the sql query try replace
INSERT INTO shoutbox (userid, date, user, message)
with
INSERT INTO ajshoutbox (uid, date, name, text)

#1
a big thank you
2019-06-09 15:24:40
To thank you m-Jay

[color=rgb(251, 160, 38)]For ajshoutbox [/color]:

   // MESSAGE TO THE AJSHOUTBOX FOR A NEW TORRENT by @spiritblue
   $image = $inames[0];
   $msg_shout = sqlesc("
[img]".$site_config["SITEURL"]."/images/torrents/NewTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."
");
   SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System' ,".$msg_shout.")");



[color=rgb(251, 160, 38)]For shoutbox [/color]:

   // MESSAGE TO THE SHOUTBOX FOR A NEW TORRENT by @spiritblue
   $image = $inames[0];
   $msg_shout = sqlesc("
[img]".$site_config["SITEURL"]."/images/torrents/NewTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."
");
   SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message)  VALUES(0,NOW(), 'System' ,".$msg_shout.")");



[color=rgb(251, 160, 38)]CSS[/color] :

/* Announcing New Torrent On Sharing At The Chat Room (In Pictures) From The Beacon  > img1 */
.img1-shout{
  width:160px; height:230px;
  background-color: transparent; /* Fond de couleur */
  border: 2px double #F0F8FF;
  border-radius: 8px 8px 8px 8px;
  box-shadow: 0px 0px 15px 0px #60C1D0; /* intensiter de dégrader de la couleur des 4 faces + couleur */
  -moz-border-bottom-colors: #60C1D0 #777777 #2090FF #E9ED74 #E3E934 #2090FF #1771C0; /* dégrader de couleur des 4 faces */
  -moz-border-top-colors: #60C1D0 #777777 #2090FF #E9ED74 #E3E934 #2090FF #1771C0;
  -moz-border-left-colors: #60C1D0 #777777 #2090FF #E9ED74 #E3E934 #2090FF #1771C0;
  }


[color=rgb(184, 49, 47)]NOTE: [/color]
in the folder "images" create a folder named "torrents" and add the image of the name of "NewTorrent.png"

[color=rgb(247, 218, 100)]Example in image[/color]
:
NewTorrent.png
NewTorrent.png

Unknown User
2019-11-20 00:37:08
good evening, do you know how to put the avatar next to the system for the welcome message to the member?
thank you :)

bonsoir, savez vous comment mettre l'avatar a coté de systeme pour le message de bienvenue au membre ?
merci :)

[ATTACH type="full"]5246[/ATTACH]

I put this code :

$msg_shout = sqlesc("New User: ".$wantusername." has joined.");
SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System' ,".$msg_shout.")");
2019-11-20_013248.png
2019-11-20_013248.png
Unknown User
2019-11-20 04:08:12
Is it difficult to include information about new posts in a forum!? :unsure:
Unknown User
2019-11-20 04:23:27
good evening IFFI what do you want to say?
2019-11-20 09:28:49
Normalement il prend l'avatar par défaut, vérifi si tu as bien changer ton avatar par défaut dans[color=rgb(251, 160, 38)] image[/color][color=rgb(255, 255, 255)]/[/color][color=rgb(251, 160, 38)]default_avatar.png[/color] et vérifie dans fonctions que t'a le même nom de ton image et son lien
Dans [color=rgb(251, 160, 38)]backend[/color][color=rgb(255, 255, 255)]/[/color][color=rgb(251, 160, 38)]fonctions.php[/color]:

       if (!$avatar)
           $avatar = $site_config["SITEURL"]."/images/default_avatar.png";


[color=rgb(41, 105, 176)]ps:[/color] ici  je suis en png, mais  ton extension d'image pourrais bien être aussi jpg ;)

===================================

Normally it takes the avatar by default, check if you have changed your default avatar in image / default_avatar.png and check in functions that you have the same name of your image and its link

In backend / functions.php:



        if (! $ avatar)

            $ avatar = $ site_config ["SITEURL"]. "/images/default_avatar.png";




ps: here I am in png, but your image extension could be synonymous jpg
Unknown User
2019-11-20 11:42:07
bonjour spiritblue, merci pour ta réponse.
apres vérification j'ai bien cette ligne dans function.php, tout est ok mes l'avatar ne s'affiche toujours pas. sa me fais sa seulement sur la shout pour systeme. pour les autres utilisateur inscrit l'avatar par défault fonctionne bien. je comprend pas :(


hello spiritblue, thank you for your answer.
after checking I have this line in function.php, everything is ok my avatar still does not display. it's just my shout for system. for other user registered the default avatar works fine. I do not understand :(
2019-11-20 11:51:59
in shoutbox.php I have, but I dont know what you are using for a shoutbox, it looks like the ajax one. Im not using this mod, Im just posting up some code that displays an avatar for system or userid 0
/////Avatar shit
$ol3 = mysqli_fetch_array(SQL_Query_exec("SELECT avatar FROM users WHERE id=".$row["userid"]));
$av=$ol3['avatar'];
if(!empty($av)){
$av="<img src='".$ol3[avatar]."' alt='my_avatar' width='27' height='27'>";
}else{
$av="<img src='images/default_avatar.png' alt='my_avatar' width='27' height='27'>";
}
if($row['userid']==0){
$av="<img src='images/0_avatar.png' alt='0_avatar' width='27' height='27'>";
}
mysqli_free_result($ol3);
/////Close avatar shit

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-11-20 12:01:22
hello micromonkey, yes I use ajax shout
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728