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
Torrent Trader PDO Update Beta Test
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / M-BiTsy / M-BiTsy Support

2020-02-06 16:19:13
Thank you spirtblue, I got the idea off a old updated torrents-details.php i got from botanicar.
I will do account-details this weekend and share for anyone who wishes to use (y)
2020-02-06 17:30:36
"m-jay, post: 67834, member: 20288":

Thank you spirtblue, I got the idea off a old updated torrents-details.php i got from botanicar.
I will do account-details this weekend and share for anyone who wishes to use (y)

cool, and add the activation function on config.php to this multi menu or normal  lolll
2020-02-07 14:03:45
unfortunately it can not be added to config due to jquery and the div ids, heres the basic account-details - some css and this will look nice, im bad at styling though lol  :unsure:  buttons or navbar ?

Unknown User
2020-02-07 14:33:34
Here's how I organized it:

Views are generally used for templates like (header, footer, navbar, etc)

<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3">
 <div class="container">
   <a class="navbar-brand" href="#"><?php echo SITENAME; ?></a>
   <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
     <span class="navbar-toggler-icon"></span>
   </button>
   <div class="collapse navbar-collapse" id="navbarNav">
     <ul class="navbar-nav">
       <li class="nav-item active">
         <a class="nav-link" href="<?php echo URLROOT; ?>">Home</a>
       </li>
       <li class="nav-item">
         <a class="nav-link" href="<?php echo URLROOT; ?>/pages/about">About</a>
       </li>
     </ul>
     <ul class="navbar-nav ml-auto">
     <?php if(isset($_SESSION['user_id'])) : ?>
       <li class="nav-item">
         <a class="nav-link" href="<?php echo URLROOT; ?>/users/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> Logout</a>
       </li>
     <?php else : ?>
       <li class="nav-item">
         <a class="nav-link" href="<?php echo URLROOT; ?>/users/register">Register</a>
       </li>
       <li class="nav-item">
         <a class="nav-link" href="<?php echo URLROOT; ?>/users/login">Login</a>
       </li>
     <?php endif; ?>
     </ul>
   </div>
 </div>
</nav>


Classes are generally for CRUD (Create, update, delete) and regulations with if else

class Torrent {
   private $db;
 
   public function __construct(){
     $this->db = new Database;
   }

   // Get all torrents
   public function getTorrents(){
     $this->db->query("SELECT *,
                       torrent.id as torrentId,
                       users.id as userId
                       FROM torrents
                       INNER JOIN users
                       ON torrents.user_id = users.id
                       ORDER BY torrents.created_at DESC;");

     $results = $this->db->resultset();

     return $results;
   }

   // Get torrent by ID
   public function getTorrentById($id){
     $this->db->query("SELECT * FROM torrents WHERE id = :id");

     $this->db->bind(':id', $id);
   
     $row = $this->db->single();

     return $row;
   }

   // Add torrent
   public function addTorrent($data){
     // Prepare Query
     $this->db->query('INSERT INTO torrents (title, user_id, body)
     VALUES (:title, :user_id, :body)');

     // Bind Values
     $this->db->bind(':title', $data['title']);
     $this->db->bind(':user_id', $data['user_id']);
     $this->db->bind(':body', $data['body']);
   
     //Execute
     if($this->db->execute()){
       return true;
     } else {
       return false;
     }
   }
}


Commenttable, torrenttable, $CURUSER and so forth should be added as class and called as one per page.

$userInfo = new CURUSER();
echo $userInfo ->username . $userInfo ->avatar;
2020-02-07 16:41:38
I have some project about index.php so it be better an that old, I sen all files to m-jay and  he check it first
torrent-details.php is finished and working on m-jay's V3 (need some estetic patricles to be finished) I share it here if you need it

[ATTACH type="full" alt="5366"]5366[/ATTACH]
1581093680418.png
1581093680418.png



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2020-02-07 16:45:52
I have a lousy server that can't be controlled so everything works properly, has lots of other customers who have their needs, and therefore can't test everything at once

[ATTACH type="full" alt="5367"]5367[/ATTACH]

this is index.php with possibility to use different categories on index page, an carousel poster slide
1581093874303.png
1581093874303.png



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2020-02-07 20:53:01
"Botanicar, post: 67840, member: 19833":

I have some project about index.php so it be better an that old, I sen all files to m-jay and  he check it first
torrent-details.php is finished and working on m-jay's V3 (need some estetic patricles to be finished) I share it here if you need it

[ATTACH type="full" alt="5366"]5366[/ATTACH]


I would reduce the spread px on text-shadow for better visibility *
2020-02-07 22:11:15
The theme is pretty big, some of the bootstrap could be done with css but I'll keep playing with it I really like the design but it needs some work, I've added it to test site botanicar
2020-02-07 22:33:04
If you ever need some help, let me know. I spend maybe 6 hours a day on CSS/HTML
2020-02-08 00:27:21
I see no problem ?
for those who want a nice button, use the button tag on your css to create something pretty  :geek:
2020-02-08 14:04:40
hello m-jay
where is your JS at the header of the theme?
2020-02-08 16:18:42
At the minute i have 2 js in accountdetails/torrentdetails i will move these to js file later for header and have many functions
showaccount(), showadmin() & showtorrents() so one js takes care of all sections I'm going to do admincp as well  i dont have v3 to compare at m8nute

i update github with just these files for guidance all sections are noted with // start id & // end id etc.  i removed some of the frames i still need to protect buttons like edit users / edit torrents
https://github.com/M-jay84/Torrent-Trader-2020-PDO/commit/64a0bfa5e30105bb8b66d9de45e9cfd4fff18a4f

in theme.css
/* -- jquery hide --*/
.hide{
   display:none;
}

.block{
   width: 100px;
   height:50px;
   background-color:#cccccc;
   text-align:center;
   line-height:50px;
}


under first beginframe in accountdetails/torrentdetails
?>
<script type="text/javascript">
function show(elementId) {
document.getElementById("id1").style.display="none";
document.getElementById("id2").style.display="none";
document.getElementById("id3").style.display="none";
document.getElementById("id4").style.display="none";
document.getElementById("id5").style.display="none";
document.getElementById("id6").style.display="none";
document.getElementById("id7").style.display="none";
document.getElementById(elementId).style.display="block";
}
</script>

<button type="button" onclick="show('id1');">DETAILS</button>
<button type="button" onclick="show('id2');">RATING</button>
<button type="button" onclick="show('id3');">IMAGES</button>
<button type="button" onclick="show('id4');">FILES</button>
<button type="button" onclick="show('id5');">PEERLIST</button>
<button type="button" onclick="show('id6');">NFO</button>
<button type="button" onclick="show('id7');">COMMENTS</button>
<?php


Wrap any section (remember to change id)
// start id7
echo "<div id=id7  style=display:none>";

// the code for first div id1 set to
//  style=display:block

echo "</div>";
//end id7
2020-02-09 13:07:33
Thanks but the JavaScript doesn't work?
2020-02-09 13:57:15
ive done basic on v3 to make it easier, you can just add to see if its working
torrents-details.zip
Download
2020-02-09 16:02:22
"m-jay, post: 67852, member: 20288":

ive done basic on v3 to make it easier, you can just add to see if its working

your file has worked, but it from my site does not work and as soon as I add id2, it made the rating disappear

..for the account-details page, it works # 1, thanks again
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