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
Signature in torrent-details and comment
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-09-28 15:16:48
Hello ,

I've got a question:

How can I display the user signature on its torrent details and its comments (in news or torrent too)

I really sure i've got to put the folowing code somewhere... but where ?

if (!$usersignature){

print("<br><br></td></tr>\n");

}else{

print("<br><br>---------------<br>$usersignature</td></tr>\n");

}
//code found in the forum mod  :)

I'ven't found any topic about this modification and i'm sure its simple te do for somebody who know php and torrenttrader but i'm a beginner  ;)

Thx for reading and sorry if you dont understand me, i'm french and i'm not really good in english ;)
Unknown User
2008-09-28 15:25:30
functions.php:

 print("<td valign=top width='75%' class=table_col2>$commenttext</td>");

print("</tr></table><BR>\n");
replace:


print("</tr></table><BR>\n");


with that
Unknown User
2008-09-28 15:49:20
that do notthing else dont display the comments but thx to you i replace (in functions.php)

:)



what do you think of that, is that good or not ? (iq there security risk or isn't it the more simple ?)



In the torrent-details.php after the detail "box" and before the rating one, i had that :

		print("<td valign=top width='75%' class=table_col2>$commenttext</td>");
by
	if (!$usersignature){

print("<td valign=top width='75%' class=table_col2>$commenttext </td>");

}else{

print("<td valign=top width='75%' class=table_col2>$commenttext <br><br>---------------<br>$usersignature</td></tr>\n</td>");

}





and that works

echo "<FIELDSET class=search><LEGEND></a><B>Signature</B></LEGEND>";

echo "<table cellpadding=3 border=0 width=95%>";

if (!$usersignature){

}else{

print("<td valign=top width='75%' class=table_col2>$usersignature</td>");

}

echo "</table></FIELDSET><BR><BR>";
but that don't display the signature, i suppose that "$usersignature" isn't correctly used, maybe i shoud tell which user's sign i wanna display... do someone know how could i do that ?
Unknown User
2008-10-10 08:24:27
I DO IT!  :)

In function.php find:

print("<td valign=top width='75%' class=table_col2>$commenttext</td>");

print("</tr></table><BR>\n");





replace:



print("<td valign=top width='75%' class=table_col2>$commenttext<br><br>---------------<br>$usersignature</td>");

print("</tr></table><BR>\n");
Unknown User
2008-10-11 16:29:37
"VodKaZ, post: 46767":
that do notthing else dont display the comments but thx to you i replace (in functions.php)

		print("<td valign=top width='75%' class=table_col2>$commenttext</td>");
by
	if (!$usersignature){

print("<td valign=top width='75%' class=table_col2>$commenttext </td>");

}else{

print("<td valign=top width='75%' class=table_col2>$commenttext <br><br>---------------<br>$usersignature</td></tr>\n</td>");

}



and that works  :)
Actually do like me seems better, it avoid a unused request if user don't have a signature  ;)

But i'm still unable to display user's Signature in his torrents description... i think i'm about to leave this idea...
Unknown User
2008-10-22 00:07:27
"TorrentialStorm, post: 46765":
functions.php:

 print("<td valign=top width='75%' class=table_col2>$commenttext</td>");

print("</tr></table><BR>\n");
replace:


print("</tr></table><BR>\n");


with that


That don't work...

It shows only avatar but no comment...
Unknown User
2008-10-22 00:13:50
"VodKaZ, post: 46767":
that do notthing else dont display the comments but thx to you i replace (in functions.php)
;)



what do you think of that, is that good or not ? (iq there security risk or isn't it the more simple ?)



In the torrent-details.php after the detail "box" and before the rating one, i had that :

		print("<td valign=top width='75%' class=table_col2>$commenttext</td>");
by
	if (!$usersignature){

print("<td valign=top width='75%' class=table_col2>$commenttext </td>");

}else{

print("<td valign=top width='75%' class=table_col2>$commenttext <br><br>---------------<br>$usersignature</td></tr>\n</td>");

}





and that works

echo "<FIELDSET class=search><LEGEND></a><B>Signature</B></LEGEND>";

echo "<table cellpadding=3 border=0 width=95%>";

if (!$usersignature){

}else{

print("<td valign=top width='75%' class=table_col2>$usersignature</td>");

}

echo "</table></FIELDSET><BR><BR>";
but that don't display the signature, i suppose that "$usersignature" isn't correctly used, maybe i shoud tell which user's sign i wanna display... do someone know how could i do that ?


Hi,

Your mod works very well for the comment !!!

For the signature when you post a link,you may introduce yours in the description of the link,as[img]%7Boption%7D[/img]

It's not an automatic system but you're sure your signature appaers in the description ;)
Unknown User
2008-10-25 16:11:30
"celtic, post: 47732":
Hi,Your mod works very well for the comment !!!

For the signature when you post a link,you may introduce yours in the description of the link,as[img]%7Boption%7D[/img]

It's not an automatic system but you're sure your signature appaers in the description  ;)
Thx  ;)

But for those witch have a sentence, and many images, they have to copy them at each presentation... not really usefull  ;)

I'm still looking for smthg but dont found... but it let me know more the code of torrent tradder ^^
Unknown User
2008-12-10 00:43:43
good job thanks works great :D
Unknown User
2011-01-28 20:17:52
Hi Guys,

I am not a PHP programmer.  So this means if the CODE is not clean enough, be my guest and post yours.  This is a RECAP for showing the SIGNATURE

in COMMENTS, ACCOUNT, TORRENT DETAILS and the ADMINCP.PHP.  In fact, the addition of this code will post the IMAGE instead of a LINK.

This as been tested on version 2.06.

Note:  I suggest that you take the UPLOAD YOUR AVATAR MOD located at this post [url="http://www.torrenttrader.org/index.php?showtopic=7034&hl=upavatar%5C.php"]http://www.torrenttrader.org/index.php?sho...vatar\.php[/url] and change all the AVATAR word for SIGNATURES.

Please if you do so, do not forget to create yourself a folder called SIGNATURES in your root directory.

*****************************************************

The code below will add the signature in the COMMENTS.

In the backend folder, edit the FUNCTIONS.PHP

Find:

print("<td valign=top width='75%' class=table_col2>



Replace with:

print("<td valign=top width='75%' class=table_col2>$commenttext<br><br><br><br>");
if ( $usersignature <> "" )

{

echo "<img border='0' src='". stripslashes($row["signature"])."'></td>";

}

print("</tr></table><BR>\n");

***************************************************

The code below will add a signature log in the Account.

In your root folder, edit the ACCOUNT.PHP.

Find:

? print("<B>".SIGNATURE.""); ?>:</b>


Add Below:

<? 	
if ( $usersignature <> "" )

{

echo "<img border='0' src='". stripslashes( $CURUSER["signature"] )."'>";

}

?><br>

***************************************************

The code below will add the signature in the Admin Control Panel.

In the backend folder, edit the ADMINCP.PHP.

Find:

<td align="center"><a href=admincp.php?action=users><img src="images/admin/users.gif" border=0 width=32 height=32><br>Users</a><BR></td>



Add Below:

<td align="center"><a href=admincp.php?action=signature><img src="images/admin/avatar.gif" border=0 width=32 height=32><br>Signature Log</a><BR></td>



Find:

if ($action=="avatars"){
stdhead("Avatar Log");

navmenu();

begin_frame("Avatar Log");

$query = mysql_query("SELECT count(*) FROM users WHERE enabled='yes' AND avatar !=''");

$count = mysql_fetch_row($query);

$count = $count[0];

list($pagertop, $pagerbottom, $limit) = pager(50, $count, 'admincp.php?action=avatars&');

echo ($pagertop);

?>

<CENTER><TABLE class=table_table>

<TR>

<TD class=table_head><b>User</b></TD>

<TD class=table_head><b><center>Avatar</center></b></TD>

</TR><?

$query = "SELECT username, id, avatar FROM users WHERE enabled='yes' AND avatar !='' $limit";

$res = mysql_query($query);

while($arr = mysql_fetch_array($res)){

echo("<TR><TD class=table_col1><b><A href=\"account-details.php?id=" . $arr['id'] . "\">" . $arr['username'] . "</b></A></TD><TD class=table_col2>");

if (!$arr['avatar'])

echo "<img width=\"80\" src=images/default_avatar.gif></td>";

else

echo "<img width=\"80\" src=\"".htmlspecialchars($arr["avatar"])."\"></td>";

}

?>

</TABLE></CENTER>

<?

echo ($pagerbottom);

end_frame();

stdfoot();

}

Add Below the avatar frame:

/////list signatures
if ($action=="signature"){

stdhead("Signature Log");

navmenu();

begin_frame("Signature Log");

$query = mysql_query("SELECT count(*) FROM users WHERE enabled='yes' AND signature !=''");

$count = mysql_fetch_row($query);

$count = $count[0];

list($pagertop, $pagerbottom, $limit) = pager(15, $count, 'admincp.php?action=signature&');

echo ($pagertop);

?>

<CENTER><TABLE class=table_table>

<TR>

<TD class=table_head><b>User</b></TD>

<TD class=table_head><b><center>Signature</center></b></TD>

</TR><?

$query = "SELECT username, id, signature FROM users WHERE enabled='yes' AND signature !='' $limit";

$res = mysql_query($query);

while($arr = mysql_fetch_array($res)){

$usersignature = stripslashes(format_comment($arr["signature"]));

echo("<TR><TD class=table_col1><b><A href=\"account-details.php?id=" . $arr['id'] . "\">" . $arr['username'] . "</b></A></TD><TD class=table_col2>");

echo "<img border='0' src='". $usersignature ."'></tr>";

}

?>

</TABLE></CENTER>

<?

echo ($pagerbottom);

end_frame();

stdfoot();

}

///////////////////
Unknown User
2011-05-18 19:24:53
ok  merci

Juste un souci dans la recherche function.php

Vous demander de chercher ce code

print("<td valign=top width='75%' class=table_col2>

Mais il faut trouver celui ci

print("<td valign=top width='75%' class=table_col2>$commenttext</td>");

et remplacer par

if (!$usersignature){

print("<td valign=top width='75%' class=table_col2>$commenttext </td>");

}else{

print("<td valign=top width='75%' class=table_col2>$commenttext <br><br>---------------<br>$usersignature</td></tr>\n</td>");

}

Fonctionne tres bien en 2.06

Good Djob

------------------

ok thank you

Just a concern in research function.php

Ask you to try this code

print("<td valign=top width='75%' class=table_col2>

But we must find this one

print("<td valign=top width='75%' class=table_col2>$commenttext</td>");

and replace by

if (!$usersignature){

print("<td valign=top width='75%' class=table_col2>$commenttext </td>");

}else{

print("<td valign=top width='75%' class=table_col2>$commenttext <br><br>---------------<br>$usersignature</td></tr>\n</td>");

}

Works very well in 2.6

Good djob
2011-05-18 23:18:57
flav cool, but I prefer ...

|*********************|

cool  flav,  mais je pr

Capture.PNG
Capture.PNG

Unknown User
2011-10-10 18:57:57
moved to mods completed
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728