The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
Eric,
edit your postbit_attachment template for any non-default skins and add this at end : Code:
<tr><td> </td><td> $attachment[tstats] <br> $attachment[torrentinfo] </td> </tr> |
#22
|
||||
|
||||
Whoa! That did it lol. I didn't see that in the instructions or maybe it didn't make it in from the plugin? I also had to rebuild (edit any template and his save) my bitfields after installation.. Just an FYI.
|
#23
|
|||
|
|||
yeah i'll actually put that in the next releases install readme. If you have any other skins besides default some of the features dont carry over thru templates and have to be manually entered in templates.
I will supply all the necessary docs in the next release this weekend. I've also got a new announce.php which fixes 2 bugs in it to be included in that release. |
#24
|
||||
|
||||
Quote:
|
#25
|
||||
|
||||
Lookin good toolmanwill!
|
#26
|
|||
|
|||
Quote:
|
#27
|
|||
|
|||
actually that will be included in next release of both PHP and XBT.
to fix it now before new release edit VBTT Showthread Stuff plugin This is ONLY for PHP version, XBT plugin/code for this is totally different replace entire plugin code with : Code:
$s=""; if ($attachment['info_hash'] != '') { $myid = $attachment['attachmentid']; // now we display the files inside the torrent $subres = $db->query("SELECT * FROM " . TABLE_PREFIX . "files WHERE info_hash ='".$attachment['info_hash']."' ORDER BY fileid ASC"); $s.="<table id='torrent$myid' class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" width=\"100%\" border=\"0\">\n"; $s.="<thead><tr><td class=\"tcat\" colspan=\"7\"><a href=\"#top\" style=\"float:right\" "; $s .= " onclick=\"return toggle_collapse('torrent".$myid."')\">"; $coll = "collapseimg_torrent".$myid ; $s.= "<img id=\"collapseimg_torrent$myid\" src='".$stylevar[imgdir_button]."/collapse_alt".str_replace('_collapsed','',$vbcollapse[$coll]).".gif' alt=\"\" border=\"0\">"; $s.="</a><strong><a href=\"#top\" onclick=\"return toggle_collapse('torrent".$myid."')\">Files</a></strong></td></tr></thead>\n"; $s.="<tbody id=\"collapseobj_torrent".$myid."\" style=\"\">" ; $s.=" <tr><td class=\"alt1\" width=\"15%\"><div align=\"center\"><strong>Size</strong></div></td> <td class=\"alt1\" width=\"70%\"><div align=\"center\"><strong>Filename</strong></div></td> <td class=\"alt1\" width=\"15%\"><div align=\"center\"><strong>MD5</strong></div></td></tr>\n" ; $i=0; while ($subrow = $db->fetch_array($subres)) { $i++; if ($i % 2 == 0 ) $s.= "<tr><td class=\"alt1\" width=\"15%\"><div align=\"center\">" . vb_number_format($subrow["size"], 1, true) . "</div></td> <td class=\"alt1\" width=\"85%\"><div align=\"center\">" . $subrow["filename"] ."</div></td> <td class=\"alt1\" width=\"15%\"><div align=\"center\">" . $subrow["md5sum"] . "</div></td></tr>\n"; else $s.= "<tr><td class=\"alt2\" width=\"15%\"><div align=\"center\">" . vb_number_format($subrow["size"], 1, true) . "</div></td> <td class=\"alt2\" width=\"85%\"><div align=\"center\">" . $subrow["filename"] ."</div></td> <td class=\"alt2\" width=\"15%\"><div align=\"center\">" .$subrow["md5sum"] . "</div></td></tr>\n"; } $s.= "</tbody>\n</table>\n"; $s.="<script type='text/javascript'> toggle_collapse('torrent$myid');</script>"; //now we display seeds/peers on this torrent $downloaders = array(); $seeders = array(); $subres = $db->query("SELECT agent, ulspeed, dlspeed, seeder, ip, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, connectable, UNIX_TIMESTAMP(last_action) AS la FROM peers WHERE info_hash = '".$attachment[info_hash]."' ") ; while ($subrow = $db->fetch_array($subres)) { if ($subrow["seeder"] == "yes") $seeders[] = $subrow; else $downloaders[] = $subrow; } usort($seeders, "seed_sort"); usort($downloaders, "leech_sort"); $s.="<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" width=\"100%\" border=\"0\">\n"; $s.="<thead>\n"; $s.="<tr><td class=\"tcat\" colspan=\"9\">\n"; $s.="<a href=\"#top\" style=\"float:right\" onclick=\"return toggle_collapse('tpeers$myid')\">"; $coll = "collapseimg_tpeers".$myid ; $s.="<img id=\"collapseimg_tpeers$myid\" src='".$stylevar[imgdir_button]."/collapse_alt".str_replace('_collapsed','',$vbcollapse[$coll]).".gif' alt=\"\" border=\"0\"></a> "; $s.="<strong><a href=\"#top\" onclick=\"return toggle_collapse('tpeers$myid')\">Statistics</a></strong>"; $s.="</td></tr>"; $s.="</thead>"; $s.="<tbody id=\"collapseobj_tpeers$myid\" style=\"\">" ; $s.="<tr><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>User</strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Connected</strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Downloaded</strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Uploaded</strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Ratio<strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Progress<strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>UL Speed<strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>DL Speed<strong></div></td><td class=\"alt1\" width=\"10%\"><div align=\"center\"><strong>Agent<strong></div></td></tr>"; $s.=dltable("Seeder(s)", $seeders,$attachment[size]) ; $s.=dltable("Leecher(s)", $downloaders,$attachment[size]) ; $s.="</tbody></table>"; $s.="<script type='text/javascript'> toggle_collapse('tpeers$myid'); </script>"; // advanced stats $s.="<table id='detail$myid' class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" width=\"100%\" border=\"0\">\n"; $s.="<thead><tr><td class=\"tcat\" colspan=\"5\"><a href=\"#top\" style=\"float:right\" "; $s .= " onclick=\"return toggle_collapse('detail".$myid."')\">"; $coll = "collapseimg_detail".$myid ; $s.= "<img id=\"collapseimg_detail$myid\" src='".$stylevar[imgdir_button]."/collapse_alt".str_replace('_collapsed','',$vbcollapse[$coll]).".gif' alt=\"\" border=\"0\">"; $s.="</a><strong><a href=\"#top\" onclick=\"return toggle_collapse('detail".$myid."')\">More details on torrent</a></strong></td></tr></thead>\n"; $s.="<tbody id=\"collapseobj_detail".$myid."\" style=\"\">" ; $s.=" <tr><td class=\"alt1\" width=\"75%\">"; $s .= "<strong><u>Created By:</u></strong><br>"; $s .= $attachment[created_by]; $s .= "<br><br><strong><u>Comment:</u></strong><br>"; if ($attachment[comment] != "") $s .= $attachment[comment]; else $s .= "No comment for this torrent"; $s .= "<br><br><strong><u>Announce List:</u></strong><br>"; $s .= $attachment[announce_list]; $s .= "<br><br><strong><u>Completed by:</u></strong><br>"; if ($attachment[completed_by] = '".$passkey."') { if ($attachment[completed_by]{0} == ";") $attachment[completed_by] = substr($attachment[completed_by],1); $query_user = $db->query("SELECT userid,username FROM " . TABLE_PREFIX . "user WHERE userid IN (" .str_replace(";",", ",$attachment[completed_by]). ")"); while ($result_user = $db->fetch_array($query_user) ) { $s .= '<a href="member.php?u='.$result_user['userid'].'">'.$result_user['username'].'</a>, '; } $s = substr($s,0,-2)."</td>"; } else { $s .= "Nobody has completed this torrent yet !</td>"; } $s.="<td width=\"25%\" align=\"right\">"; require_once("charts.php"); //insert the charts.swf flash file into the web page //tell charts.swf to get the chart's data from sample.php created in the first step $s.= InsertChart ( "charts.swf", "torrent.php?id=".$attachment['attachmentid'],200,200,"f5f5ff"); $s .= "</td></tr>\n" ; $i=0; $s.= "</tbody>\n</table>\n"; $s.="<script type='text/javascript'> toggle_collapse('detail$myid');</script>"; $attachment[tstats] = "<b>Full Size:</b> ".mksize($attachment[size], 1, true).", <b>Seeders:</b> ".$attachment[seeders].", <b>Leechers:</b> ".$attachment[leechers].", <b>Completed:</b> ".$attachment[completed].", <b>UL Speed:</b> ".mksize($attachment[ulspeed], 1, true)."/s" .", <b>DL Speed:</b> ".mksize($attachment[dlspeed], 1, true)."/s" ." "; $attachment[torrentinfo] = $s; } |
#28
|
|||
|
|||
I use Xbt myself thanks.
Also my stats wont update. Shows no seeds ect. I had a small problem with one of the file edits also. Code:
9) Open showthread.php -------------------------------- FIND: -------------------------------- // load attachments if ($thread['attach']) { $attachments = $db->query_read(" SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter, postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize, attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow FROM " . TABLE_PREFIX . "attachment LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype USING (extension) WHERE postid IN (-1" . $ids . ") ORDER BY attachmentid "); -------------------------------- AND REPLACE IT WITH: -------------------------------- // load attachments if ($thread['attach']) { $attachments = $db->query_read(" SELECT info_hash, size,comment,created_by,announce_list,completed_by, completed, seeders, leechers, ulspeed, dlspeed, dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter, postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize, attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow FROM " . TABLE_PREFIX . "attachment LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype USING (extension) WHERE postid IN (-1" . $ids . ") ORDER BY attachmentid "); |
#29
|
|||
|
|||
hum yeah that would work, never thought of that altho its not reporting the size I need, the actual size of the files in the torrent should be there, hence the size query. filesize is the size of the .torrent attachment.
Hopefully somebody can possibly figure out a workaround for the ambiguious size field error. I'm fresh outta ideas on that one. |
#30
|
|||
|
|||
I get the correct size of the files in the dropdown menu. But the size of the torrent is correct as they are usually only a a few kb. I hope that makes sense to you.
Example: The torrent file I am using is 22kb which is correct in my postbit. In the dropdown for torrent info it shows a list of files. The one metioned above has one file which is 1.88GB which is correct. So any idea why my stats wont update? It wont show me seeding when I am. Also the site Im doing this on has thousand of zip attachments. Every one of them shows a torrent stats section under the zips. Very annoying. Im using XBT not PHP. Tommorrow Id like to catch you on MSN or something. I have some thoughts for you. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|