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
User Posts

Go to Profile

VPS host for trackers — 2013-08-16 12:49:55 in General Chat
Not the lowest priced one out there but you know they allow trackers  :) [url="http://www.admin-hosting.com/"]http://www.admin-hosting.com/[/url]
change
$updateset[] = "pcoff = " . sqlesc($pcoff);

to

$pcoff = $_POST["pcoff"];
$updateset[] = "pcoff = " . sqlesc($pcoff);
Ok this is basically an re-do of this [url="https://www.torrenttrader.org/topic/10965-addon-announcements/?hl=announcement"]https://www.torrenttrader.org/topic/10965-addon-announcements/?hl=announcement[/url]

I thing I did not like about that was it was an popup and really hard if possible to link the annnouncement page to other pages if wanted to  :(

you will need the sql from the old topic

or this.

CREATE TABLE IF NOT EXISTS `announcements` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `subject` varchar(64) NOT NULL,
 `message` text NOT NULL,
 `by` varchar(16) NOT NULL default 'Admin',
 `added` datetime NOT NULL default '0000-00-00 00:00:00',
 `minclassread` tinyint(3) unsigned NOT NULL,
 `active` enum('yes','no') NOT NULL default 'yes',
 PRIMARY KEY  (`id`),
 KEY `subject` (`subject`),
 KEY `minclass_idx` (`minclassread`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Ok 1st off the new sql if did not use the new above version,cause this new version can set announcements active or inactive instead of just plain deleting them


ALTER TABLE `announcements` ADD `active` enum('yes','no') NOT NULL default 'yes';
ALTER TABLE `announcements` ADD INDEX `minclass_idx` ( `minclassread` );

you will still need these in functions.php if you dont already have it.

New:

function announcement () {
GLOBAL $CURUSER;
if ($CURUSER && $CURUSER['announce_read'] == "no") {
$res = mysql_query("SELECT * FROM announcements WHERE minclassread <= $CURUSER[class] ORDER by added DESC LIMIT 1");
$ret = mysql_fetch_array($res);
}
return $ret;
}
if (!function_exists("pingto")) {
   function pingto($url)
   {
       if (headers_sent()) {
?>
<script language="javascript"> window.location.href='<?php echo $url;?>';</script>
<meta http-equiv="refresh" content="2;<?php echo $url;?>">
<?php echo sprintf("Redirecting", $url);
       } else
           header('Location: ' . $url);
       die();
   }
}
now upload the new attached announcements.php to your site.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6899"]announcements.php[/url]

i use an classifieds_block.php to display the link myself on the top of the pages but you dont then in index.php (or header.php after middleblocks):

replace

if ($CURUSER && $CURUSER["announce_read"] == "no" && $arr = announcement()) {
?>
<script type="text/javascript" src="scripts/announcement.js"></script>
<script type="text/javascript" src="scripts/preview.js"></script>
<!-- annoucement start #<?=$arr[id];?> -->
<div id="dropin" style="position:absolute;visibility:hidden;left:300px;top:100px;width:500px;height:100px">
<table border="0" cellpadding="0" cellspacing="0" width="650" class="error">
<tbody><tr><td class="none" style="padding: 2px 0 0 10px; background: red">
<font color=black><b>Title:</b> <?=$arr["subject"]?> -- <b>Created on"</b> <?=$arr["added"]?> -- <b>By:</b> <?=$arr["by"]?></b></font></td>
<td width="50" align="right" class="none" style="padding: 2px; background: red"><a href="#" onClick="dismissbox();return false"><img src="images/close.jpg" border="0"></a></td></tr>
<tr><td colspan="2" class=none width="650" style="padding: 0 0 0 10px;" bgcolor="#ffffff">
<p>
<?=format_comment($arr["message"])?>
</p>

<img id="loading" style=" visibility: hidden" src="images/load.gif">
<span style="color:red" name="preview" id="previewr" align="left">
<a href="#" onclick="java script:clearannouncement(this.parentNode,'clear_ann.php')">Click here to mark announcement read.</a>
</span><br><br></form>
</td></tr></tbody></table>
</div>
<!-- annoucement end #<?=$arr[id];?>-->
<span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=red width=100% align=center><tr><td style='padding: 10px; background: red' align='center'>
<b><a href="java script:show_announcement()"><font color=white>New announcement! Please click here to read!</font></a></b></td></tr></table></span><br />
<?php
}
with

        if ($CURUSER["announce_read"] == "no" && $arr_annouce = announcement()) {
?>
       <span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=#AB0000 width=100% align=center><tr><td style='padding: 10px; background: #AB0000' align='center'>
       <div style='font: bold 14px Times New Roman; color:#FFBF00'>There is a New Announcement! Please click <a href="<?php echo $SITEURL;?>/announcements.php"><font size=3 color=#CBCBCB>HERE</font></a> to read!</div></td></tr></table></span><br />
       <?php
       }

Note: Make sure you change this in announcements.php if your classes dont match stock 2.08 classes..

// Config
$min_class = 6;  // <-- Set this to the class you want to be able to edit the announcements.
$allow_class = array(1,2,3,4,5,6,7); // <-- Set this to your classes....
$announcement_autoclear = true; // <-- Set this to true if have the announcements to auto clear once viewed them.
// Config End
You can also change the auto clearing of announcements for people by changing true to false in the same above.Basically now if auto clears aka marks them as read once people view the announcements page the 1st time after a new announcement.

1st screenshot is staff that can edit the announcements.



2nd on is everyone else.



That should be it, I hope people like it.

Ps: I have included an new classifieds_block.php for those people that use that.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6898"]classifieds_block.php[/url]
you basically put that any place you think looks good... I put it after

echo "<center><h1>" . $shortname . "</h1></center>";on 2.08Dont know what is is under 2.08 or CARE!!!

"Demon, post: 90146":
TBV MOD LOL
^^ Banned user LOL!!!
You prob have an messed up seedtime...
You have to have the full snatched list by mvp installed....
I wish people would use sqlesc in writing to the db...
anyway to fix the db errors replace in [color=rgb(40,40,40)]required.php[/color] [size=18px]all[/size] of

modcomment = '$modcomment'

with
modcomment = " . sqlesc($modcomment) . "
You might have tried to use it just as cleanup ran or something.
files for translation — 2013-07-31 17:54:48 in General Chat
for the most part the files you want to translate is languages/english.php if using 2.08.. If under that version dont remember or care!

this topic is for french.php but should give you ideas. [url="https://www.torrenttrader.org/topic/17663-frenchphp/"]https://www.torrenttrader.org/topic/17663-frenchphp/[/url]

once you are done translating it you could attach it in this topic so others could use it:) [url="https://www.torrenttrader.org/topic/12073-v2-important-translations/page-8?hl=translate"]https://www.torrenttrader.org/topic/12073-v2-important-translations/page-8?hl=translate[/url]
help — 2013-07-31 03:47:01 in General Chat
your site looks ok right now maybe you had the wrong host in sql config? it should be localhost if running on the same place as the site.
ya it seems if another addon also trys to put images like for donated or others in username display after or before class_user is called in the same line it causes breaks.. oh well tech those are not needed if using class_user anyway cause it already had the icons:)
changing forums to use class_user is alot of changed. Here should be most of them.

changing all

>$arr[username]<to
>".class_user($arr[username])."<

and
>$a[username]<

to
>".class_user($a[username])."<

and
$postername = $arr2["username"];

needs to be
$postername = $arr2["username"];

and replace
$by = "<a href='account-details.php?id=$posterid'>$postername</a>" . ($donated > 0 ? "<img src='".$site_config['SITEURL']."/images/star.png' alt='Donated' />" : "") . "";

with
$by = "<a href='account-details.php?id=$posterid'>".class_user($postername)."</a>";

seems trying to get 2 images for like donated was breaking the format, its really not needed anyway lol class_user does it.
then replace all

>$arr2[username]<

with
>".class_user($arr2[username])."<

and replace
>$user[username]<

with
>".class_user($user[username])."<

and replace
>$lastposter<

with
>".class_user($lastposter)."<
You are prob trying to view torrent details not logged in aka no $CURUSER..
in functions
replacing

   $bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $id AND userid = $CURUSER[id]");
   if (mysql_num_rows($bookt) > 0) {
       $bookmark = "<a href='bookmark.php'><img src='images/bookmarked.png' border='0' title='Bookmarked'></a>";
   } else {
       $bookmark = "<a href='bookmarks.php?torrent=$id'><img src='images/bookmark.png' border='0' title='Bookmark this Torrent'></a>";
   }

   print("<td class='ttable_col$x' nowrap='nowrap'>".(count($expandrows)?"<a href="javascript: klappe_torrent('t".$row['id']."')"><img border="0" src="".$site_config["SITEURL"]."/images/plus.gif" id="pict".$row['id']."" alt="Show/Hide" class="showthecross" /></a>":"")."&nbsp;$bookmark <a title="".$row["name"]."" href="torrents-details.php?id=$id&amp;hit=1">$dispname</a> $freeleech $new</td>");

with

   if($CURUSER) {
   $bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $id AND userid = $CURUSER[id]");
   if (mysql_num_rows($bookt) > 0) {
       $bookmark = "<a href='bookmark.php'><img src='images/bookmarked.png' border='0' title='Bookmarked'></a>";
   } else {
       $bookmark = "<a href='bookmarks.php?torrent=$id'><img src='images/bookmark.png' border='0' title='Bookmark this Torrent'></a>";
   }
                       print("<td class='ttable_col$x' nowrap='nowrap'>".(count($expandrows)?"<a href="javascript: klappe_torrent('t".$row['id']."')"><img border="0" src="".$site_config["SITEURL"]."/images/plus.gif" id="pict".$row['id']."" alt="Show/Hide" class="showthecross" /></a>":"")."&nbsp;$bookmark <a title="".$row["name"]."" href="torrents-details.php?id=$id&amp;hit=1">$dispname</a> $freeleech $new</td>");
   } else {
                       print("<td class='ttable_col$x' nowrap='nowrap'>" . (count($expandrows) ? "<a href="javascript: klappe_torrent('t" . $row['id'] . "')"><img border="0" src="" . $site_config["SITEURL"] . "/images/plus.gif" id="pict" . $row['id'] . "" alt="Show/Hide" class="showthecross" /></a>" : "") . "&nbsp;<a title="" . $row["name"] . "" href="torrents-details.php?id=$id&amp;hit=1">$dispname</a><br>$descrs</td>");
   }

And torrents-details
replace

   //===| Start Bookmarks
   $bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
   if (mysql_num_rows($bookt) > 0)
       print("<div style='margin-top:3px'><font color='#0080FF'><b>Bookmark</b></font>: <font color='#FF2200'><b>This torrent is already into</b></font> <a href='bookmark.php'><b>Your Bookmarks</b></a>. &nbsp; [<a href='takedelbookmark.php?bookmarkid=".$row[id]."'><b>Delete it from the list</b></a>]</div>");
   else
       print("<div style='margin-top:3px'><font color='#0080FF'><b>Bookmark</b></font>: <a href='bookmarks.php?torrent=$row[id]'><b>Add this torrent</b></a> to <a href='bookmark.php'><b>Your Bookmarks</b></a></div>");
   //===| End Bookmarks

with

   //===| Start Bookmarks
   if($CURUSER) {
   $bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
   if (mysql_num_rows($bookt) > 0)
       print("<div style='margin-top:3px'><font color='#0080FF'><b>Bookmark</b></font>: <font color='#FF2200'><b>This torrent is already into</b></font> <a href='bookmark.php'><b>Your Bookmarks</b></a>. &nbsp; [<a href='takedelbookmark.php?bookmarkid=".$row[id]."'><b>Delete it from the list</b></a>]</div>");
   else
       print("<div style='margin-top:3px'><font color='#0080FF'><b>Bookmark</b></font>: <a href='bookmarks.php?torrent=$row[id]'><b>Add this torrent</b></a> to <a href='bookmark.php'><b>Your Bookmarks</b></a></div>");
   }
   //===| End Bookmarks    
Ya big thing I would check is if you have enough uploaded to get an medal... You could temp change the

$minup0 = .5 * $tb;
   $minup1 = 1 * $tb;
   $minup2 = 2 * $tb;
   $minup3 = 3.5 * $tb;
   $minup4 = 5.5 * $tb;
   $minup5 = 8 * $tb;
   $minup6 = 15 * $tb;
to see if it triggers..
like

$minup0 = .05 * $tb;
   $minup1 = .1 * $tb;
   $minup2 = .2 * $tb;
   $minup3 = .35 * $tb;
   $minup4 = .55 * $tb;
   $minup5 = .8 * $tb;
   $minup6 = 1.5 * $tb;

lol
Nope JEsaie cant help people that dont want to help themselves..
.. i dont see the issue anyway Tiloup above one does work fine on dev site..

This is something I am working on for 2.08.  Its an highly work in progress right now.

Database Error. Please report this to an administrator.
does no good if you don't also add the last info from your_siteurl/admincp.php?action=sqlerr
looks like these files will not work well in 2.08 due to them using shorttags:(

I have attached some new files that should work fine in 2.08

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6829"]staffbox.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6826"]contactstaff.php[/url] [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6828"]takecontact.php[/url]
"Tiloup, post: 91274":
si j'utilise votre code je voie aucune image?

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

if I use your code I see no picture?

V2.08
my guess is your class_user is not passing along the uploaded and downloaded...those 2 are prob not called in the query..

function auto_rank_icon dont make any extra db querys its lame and stupid to make another query when the function you got calling auto_rank_icon can do it..
.. that is exactly the same!!!!!!!! anyway mine works fine I took it from an live site!
Those are just uploader ranks.. Nothing to do with site classes.................................

And its both ratio and uploaded...

nothing at all to do with site classes
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