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

You want to replace LIKE :username with :email assuming ternary operator isn’t used instead. I’m not at my files at the moment. This should be in the Ajax ZIP
It’s the opposite idea about public libraries or APIs, with the claim that their often highly maintained and of skilled individuals (it’s their job). The classes I use compared to the base code is like black and white. I hope to syntax my life like that soon. Reading is power!
The new function works perfectly. Solved all my logout issues completely, and adding to announce I’ve now made strictly private torrents connectable without DHT. They never connected before adding this. Big thanks!! :D
Did you get email working?
Remove it, it’s a executation endpoint of an isolated script action. Completely irrelevant for PDO, not sure about mysqli
"spiritblue, post: 68758, member: 401":

little question...
I tried adding the default avatar with an [color=rgb(226, 80, 65)]else[/color] and it didn't work, you have an idea, don't I?

CODE BETA:

$downloaders = SQL_Query_exec("SELECT users_downloaded.userid, users_downloaded.torrentid, users.avatar, users.id, users.class, users.username FROM users_downloaded LEFT JOIN users ON users.id = users_downloaded.userid WHERE users_downloaded.torrentid = $id LIMIT 12");
if (mysqli_num_rows($downloaders) > 0) {

print('<tr><td align="center" colspan="2"><div class="alsoDownloaded">
   <ul class="grid" style="list-style: none">');
   while ($dlrow = mysqli_fetch_assoc($downloaders)):
   $avatar = htmlspecialchars($user["avatar"]);
   if (!$avatar){
   print('<li class="grid"><a href="account-details.php?id="'.$dlrow["userid"].'"></a><img src="'.$dlrow["avatar"].'" /><br/><font size="2">&nbsp; '.class_user($dlrow["username"]).' &nbsp;</font>');
   }else{
   print('<img class="hitavatar" src="'.$avatar.'" alt="" />');
#print('<a href="account-details.php?id="'.$dlrow["userid"].'"><img src="'.$site_config["SITEURL"].'"/images/default_avatar.png"/>'.$avatar.'</a>');
   }
   #if ($CURUSER) {
   #print('<p><a href="mailbox.php?compose&amp;id="'.$dlrow["userid"].'"> Mp</a></p>');
   #}
   print('</li>');
   endwhile;  
   print('</ul></div></td></tr>');
   #} else {
       #print('<img src="'.$avatar.'" alt="" />');
   #echo '<span style="float:right;padding:30px">' .format_comment("Aucun téléchargeur pour l'instant.. "). '</span>';
}

[ATTACH type="full" alt="Capture.PNG"]5595[/ATTACH]

...thanks !


That’s easy, I’ll write it out tonight. I’m surprised I didn’t add it.
Adjust the change username to email or duplicate it so both fields check.
Check sqlerror, post access log, i have nothing to go off of if you ran the SQL. Works fine and it’s very vanilla to V3. I’m sure others have it working, but the majority of those are runners so no feedback for a few hours time. Always nice.
I don’t know what to tell you, I followed original V3 files, line by line. Open tag issue?
— 2020-06-20 22:58:21 in
I LOVE unit3D, a lot of my work is inspired by their demo site. Incredible platform.
See it live on my site for full demo. what is not working? Can you post the error feedback?
It will be blank until members start downloading.

Too stoned that night, I forgot to add a vital piece of the mod for download.php, so sorry! I updated original post.

Open download.php and find

SQL_Query_exec("UPDATE torrents SET hits = hits + 1 WHERE id = $id");


Add under

SQL_Query_exec("INSERT INTO users_downloaded (userid, torrentid, lastdownload) VALUES ($CURUSER[id], $id, NOW())");
Use BCrypt rehash check. Upgrading is pointless unless someone integrates it.
No need for a new section, thats simply my own time spent on site itself.dont let the template fool you, the PHP code is all the same, and if your using V3 then your already able to use this, find $speedQ, add under block. The codes in TT already, there Is nothing unique about this, conditionals are all through the script, so they are also used in torrenttable()
"MicroMonkey, post: 68730, member: 311":

Look really cool, but $freeleech is not in the MYSQLI 3.0 version at all. I can only find that in snatched.php, so maybe you are getting versions mixed up or are doing custom code that will not immediately be identifiable by people using the 3.0 as I posted it on github. Just something to be aware of, but thanks for all the help. I just think things are getting crossed over between projects. I have my own custom project that I dont share because I cant just help people "plug and play" using what I have altered, so I always have to refer and test against the code that is downloadable for all to use. If I share something, I test it against the code that I posted on git. I tried sharing custom code once, it was too difficult to help with since I was always fiddling with it lol. But as I said, very nice stuff you have and thank you very much for sharing :) If people know what they are looking at they can pick it apart and code it themselves, but I try to make it as easy as I can for the folks who may be just starting to have some fun with this


I’ll refine the post to fit the original functions file as best as possible. I tend to rely on mine because I’ve stripped out a lot of the old stuff. There lies the issue, the MVC version is not legacy-compatible so existing databases will never see it. I posted my code to fix this limitation, so I’m not sure where it ever went but it’s posted.

Too many mixed releases indeed. And mine is about to take off another 20 miles North due to completion of sessions and a template system tried and true.

Makes you just want to tinker on the old source and provide several parse warnings lol
I don't know what to call these, but I call them index tags ( per torrent, per ID). These just pick up the statistics on each torrent in the index, and lets users know right away how each result is doing, or how that result competes with the other results in favour of criteria/ID their after.

I took one look at UNIT3D and wrote it in because it looked nice.

So open backend/functions.php and find

$freeleech


add after

<div>$reseed $healthy $popular $fleech $comments</div>


Add this close by same file


           $state = SQL_Query_exec("SELECT id, seeders, hits, freeleech, comments FROM torrents WHERE id = " .$id);
           $check = mysql_fetch_assoc($state);
       
           if ($check["seeders"] <= 2) { // If torrent has 2 seeds or less (poor health)
               $reseed = '<span style="pointer-events:none;font-size:13px;background:orange;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Seeders Wanted
                          </span>';
           }else{
               $reseed = '';
           }
           if ($check["seeders"] >= 3) { // If torrent has 3 seeds or more (good health)
               $healthy = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:#ED2324;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">        
                               Healthy
                           </span>';
           }else{
               $healthy = '';
           }
           if ($check["hits"] >= 20) { // If torrent has 20 downloads or more (good hits)
               $popular = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:purple;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Popular
                           </span>';
           }else{
               $popular = '';
           }
           if ($check["freeleech"] == 1) { // If torrent has 20 downloads or more (good hits)
               $fleech = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:#0079FE;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Freeleech
                          </span>';
           }else{
               $fleech = '';
           }
           if ($check["comments"] >= 4) { // If torrent has 4 comments or more (user attention)
               $comments = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:green;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Social
                            </span>';
           }else{
               $comments = '';
           }


How it looks on my end

[ATTACH type="full" alt="NewTorrentIndexFeature.png"]5590[/ATTACH]

This is code is quick and posted as I completed. i’ll improve it. I'll expand on these, and update post. But you can see the general idea.
Something I made to help connect downloaders to other downloaders with a link to request file help / feedback. As time goes on, the table will populate with hits and users photos will start to appear on details page.

Open download.php and find

SQL_Query_exec("UPDATE torrents SET hits = hits + 1 WHERE id = $id");


Add after

SQL_Query_exec("INSERT INTO users_downloaded (userid, torrentid, lastdownload) VALUES ($CURUSER[id], $id, NOW())");


Open torrents-details.php and find


print("<center><br />" . format_comment($row['descr']) . "<br /><br />\n");

// end description

?>


Add after


<h1 itemprop="name" class="entry-title" style="font-size:30px;font-weight:400">
     Also downloaded
</h1>
<?
$downloaders = SQL_Query_exec("SELECT users_downloaded.userid, users_downloaded.torrentid, users.avatar, users.id, users.class, users.username FROM users_downloaded LEFT JOIN users ON users.id = users_downloaded.userid WHERE users_downloaded.torrentid = $id LIMIT 12");
if (mysql_num_rows($downloaders) > 0) {
?>
<!-- BEGIN Users Also Downloaded -->
<div class="alsoDownloaded">
  <ul class="grid columns-3" style="list-style: none">
     <?
           while ($dlrow = mysql_fetch_assoc($downloaders)):
     ?>
    <li>
        <a href="/user/?id=<? echo $dlrow["userid"]; ?>">
        <img src="/<? echo $dlrow["avatar"]; ?>" /></a>
    <?
        if ($CURUSER) {
    ?>
       <p><a href="/message/?compose&id=<?
           echo $dlrow["userid"]; ?>">Ask for Help</a></p>
    <?
        }
    ?>
    </li>
     <?
          endwhile;
     ?>
    <li style="padding-bottom:10px; list-style: none">
        <span>+ 11 more</span>
     </li>
  </ul>
</div>
<?
} else {
   echo '<span style="float:right;padding:30px">' . format_comment('No downloaders populated yet.. :( ') . '</span>';
}
?>


Add to your theme's CSS


.alsoDownloaded {
   margin: 0 auto;
   margin-top: 3%;
   margin-bottom: 4%
   }

ul.grid {
   list-style: none;
   font-size: 0px;
   margin-left: -6.5% /* should match li left margin */
   }

ul.grid li {
   float: right;
   display: inline-block;
   _padding: 10px;
   _margin: 0 0 2.5% 2.5%;
   _background: #fff;
   _border: 1px solid #dfdfdf;
   font-size: 16px;
   font-size: 1rem;
   vertical-align: top;
   _box-shadow: 0 0 5px #dfdfdf;
   box-sizing: border-box;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box
   }

ul.grid li img {
   height:55px;
   width:55px;
   border-radius:100%;
   margin-left:10px
   }

ul.grid li h3 {
   margin: 0 0 5px
   }

ul.grid li p {
   font-size: .9em;
   line-height: 1.5em;
   color: #999;
   text-align: center
   }

ul.grid.columns-3 li {
   _width: 30.83%; /* this value + 2.5 should = 33% */
   }


run query

CREATE TABLE `users_downloaded` (
 `userid` int(10) unsigned NOT NULL DEFAULT 0,
 `torrentid` int(10) unsigned NOT NULL DEFAULT 0,
 `lastdownload` datetime NOT NULL,
 UNIQUE KEY `userfriend` (`userid`,`torrentid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


What it looks like on my end

[ATTACH type="full" alt="AlsoDownloaded.png"]5589[/ATTACH]
— 2020-06-14 18:30:43 in
"shadows, post: 68722, member: 20311":

Shouldn't views be used for actual HTML parts of torrents/upload/details/profiles  if this is a MVC structure?

Controllers are only used to return views eg.
public function indexAction()
   {
       View::renderTemplate('Torrent/torrents-upload.html');
   }


In case of Smarty, this is the case too. HTML and custom tags.
Announce - BIGINT Errors — 2020-06-12 16:04:37 in v3 Support
Interesting, So I aim to break down this join and merge the columns in manually. First I will seek to replace join on code examples and keep “cleaning” until the sqlerr sees no entries. I think this bug went unnoticed, or was not tested on large databases.

i can tick each one ‘ that typically used to handle larger databases, but I don’t think that will do it. Will post my progress!
[ATTACH type="full" alt="Trophies43.png"]5587[/ATTACH]

Trophies. Earn trophies (badges) for using certain parts of the site. Will show off to all, some will be hard to find and some will be redeemable as Prestige trophies (so your connection is your only hope for remedying in seedbonus page.

Hovering over that book and start reveal the tooltip that explains the reason for their trophy. New table, setup so they can only earn it one time (no primary key in table), works a charm.

Moods mod updated to check, uses new table, added while loop thats all.

So far, its just for forums.php


// TROPHIE: FIRST FORUM TOPIC
       SQL_Query_exec("INSERT INTO users_trophies (userid, trophie, reason, trophiepic) VALUES
       ($CURUSER[id], 'First Forum Topic', 'Earned Bookworm Trophie for posting their first forum topic.', 'images/trophies/firstforumtopic.png')");


And torrents-details.php


// TROPHIE: FIRST TORRENT COMMENT
   SQL_Query_exec("INSERT INTO users_trophies (userid, trophie, reason, trophiepic) VALUES
   ($CURUSER[id], 'First Comment', 'Earned Star Trophie for posting their first torrent comment.', 'images/trophies/firstcomment.png')");


The rest is vector/PNG in /images/trophies/*

Somewhere in functions.php torrenttable()


$trophieq = SQL_Query_exec("SELECT userid, trophie, trophiepic, reason FROM users_trophies LEFT JOIN users ON users.id = users_trophies.userid WHERE users_trophies.userid = $result2[user]");
           if (mysql_num_rows($trophieq)){
               while($trophie = mysql_fetch_assoc($trophieq)) {
           
               // Retrieve users trophies - June 11, 2020
               $trophiename = $trophie["trophie"];
               $reasonalt   = $trophie["reason"];
               $trophiepic  = $trophie["trophiepic"];
           
               echo "<span style='float:left;padding-right:3px'><img src='$site_config[SITEURL]/$trophiepic' title='$reasonalt' style='height:25px' /></span>";
               }
           }else{
               echo "<div style='font-size:12px;color:#C0C0C0'>(none yet)</div>";
           }
           echo "</div>";


SQL:


CREATE TABLE `users_trophies` (
 `userid` int(10) unsigned NOT NULL DEFAULT 0,
 `trophie` text NOT NULL,
 `reason` text NOT NULL,
 `trophiepic` text NOT NULL,
 UNIQUE KEY `userfriend` (`userid`,`reason`) USING HASH
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
"m-jay, post: 68715, member: 20288":

add anything you wish  (y) been distracted with server but this can go a few places just the link to the controllermethod/page needs changing ive updated 1st post, the type in likes table need to be changed comment for comment, forum for forum etc

for comments its this line in commenttable function
print('<th align="right">' . $edit . $delete . '[<a href="$site_config[SITEURL]/report?comment=' . $row["id"] . '">Report</a>] Posted: ' . date("d-m-Y \\a\\t H:i:s", utc_to_tz_time($row["added"])) . '<a id="comment' . $row["id"] . '"></a></th>');


This is capable of comment likes already? I'll run my code and do a bit different for V3-stock, tables are easy to generate and paste in to code. "username liked this", "2 up votes", "2 down votes", "rep +5" etc etc
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