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
Ravers Theme [v3] (Respsonsive)
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Themes

2019-04-05 08:58:10
This is a copy of the default theme by nikkbu ive just made a few alterations.

Ive made the layout mobile friendly with the side blocks showing on the bottom on smaller screens. The pages (forum etc) needs more work for mobiles

ravers.zip
Download
2019-04-06 18:32:52
nice. How do you do that? Can you do other themes also?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-04-07 05:30:06
Ive updated the links in header.php so now you can keep the default. I was looking at bootstrap which is a frame work for @media css. Instead of using bootstrap i wanted to have a go at the css. It should be possible for any theme i only edited 3 files (so far) header.php, footer.php & theme css

heres the css i might not use them all but going forward it might become useful, if you look at the first two you see its show or hide with display none. You also notice the different screen size. Now we have media querys we can play with the php files (html in php)
@media only screen and (min-width: 430px) {
 .myBlock-show {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 .myBlock-hide {
     display: none;
     vertical-align: top;
     width: 170px;
 }
}

@media only screen and (min-width: 430px) {
 td.myBlock-show {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 td.myBlock-hide {
     display: none;
     vertical-align: top;
     width: 170px;
 }
}

@media only screen and (min-width: 430px) {
 .myBlock-show.td {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 .myBlock-hide.td {
     display: none;
     vertical-align: top;
     width: 170px;
 }
}


@media only screen and (min-width: 430px) {
 .myBlock-show {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 .myBlock-hide {
     display: none;
     vertical-align: top;
     width: 170px;
 }
}

@media only screen and (min-width: 430px) {
 td myBlock-show {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 td myBlock-hide {
     display: none;
     vertical-align: top;
     width: 170px;
 }
}

@media only screen and (min-width: 430px) {
 .myBlock-show td {
      display: none;
      width: 50%;
      vertical-align: top;
 }
}

@media only screen and (max-width: 430px) {
 .myBlock-hide td {
     display: none;
     vertical-align: top;
     width: 170px;
 }


Now for the header i only add a new class to the table    <td class="myBlock-hide" valign="top" > this tells the side blocks to hide if screen is below a certain size
   <table cellspacing="0" cellpadding="7" width="100%" border="0">
    <tr>
         <?php if ($site_config["LEFTNAV"]){?>
         <!-- START LEFT COLUM -->
         <td class="myBlock-hide" valign="top" >
         <?php leftblocks();?>
         </td>
         <!-- END LEFT COLUM -->
         <?php } //LEFTNAV ON/OFF END?>
         <!-- START MAIN COLUM -->
         <td width="100%" valign="top">


You also need to add a metatag at the top
<meta name="viewport" content="width=device-width">


Lastly the footer we need to tell the right side blocks to hide as well

<?php function_exists('T_') or die;

           if ($site_config["MIDDLENAV"]){
               middleblocks();
           } //MIDDLENAV ON/OFF END
           ?>
         </td>
         <!-- END MAIN COLUM -->
         <?php if ($site_config["RIGHTNAV"]){ ?>
         <!-- START RIGHT COLUMN -->
          <td class="myBlock-hide" valign="top" >
   
         <?php rightblocks(); ?>
         </td>
         <!-- END RIGHT COLUMN -->
         <?php } ?>
       </tr>
   </table>
 </div>


I then put in footer the response code which is basically the header and footer code combined without the middle blocks but this is myBlock-show so on mobiles this code will show if you look at the css you will see its set to 50%
  <!-- Start response -->
 <div id='main'>
   <table cellspacing="0" cellpadding="7" width="100%" border="0">
    <tr>
         <?php if ($site_config["LEFTNAV"]){?>
          <td class="myBlock-show" valign="top" >
         <?php leftblocks();?>
         </td>
         <?php } ?>
         <?php if ($site_config["RIGHTNAV"]){ ?>
         <td class="myBlock-show" valign="top">    
         <?php rightblocks(); ?>
         </td>
         <?php } ?>
       </tr>
   </table>
 </div>
<!-- End response -->


The only issue i had was most of the style is in pixels (wrapper, header etc) it should be in % so it adjusts also you may need css to 2 off the blocks 1 on either side just so the size of both are the same.

Now the layout is responsive we can get creative and edit other stuff by adding the class like
<div class="myBlock-hide">
<td class="myBlock-hide">
Anything wrapped will either show or hide

You can also just add a new line on your css file like
body {
 background-color: lightblue;
}

@media screen and (min-width: 400px) {
 body {
   background-color: lightgreen;
 }
}
Unknown User
2019-04-07 16:01:37
Thanks Brother :love:
2019-05-19 06:32:23
heres some more responsive code if anyone wants to try on there theme

in shoutbox.php find and replace 12 with 18
    echo    '</td><td style="font-size: 12px;


next in theme.css find these and remove font-size
body {
.menu ul li a {
.myBlock-caption {
.myFrame-caption {
.shoutbox_msgbox {

then add this to bottom of theme.css
@media screen and (min-width: 601px) {
body {
   font-size: 20px;
 }
}

@media screen and (max-width: 600px) {
body {
   font-size:30px;
 }
}

@media screen and (min-width: 601px) {
.menu ul li a {
   font-size: 20px;
 }
}

@media screen and (max-width: 600px) {
.menu ul li a {
   font-size:27px;
 }
}

@media screen and (min-width: 601px) {
.myBlock-caption {
   font-size: 20px;
 }
}

@media screen and (max-width: 600px) {
.myBlock-caption {
   font-size:30px;
 }
}

@media screen and (min-width: 601px) {
.myFrame-caption {
   font-size: 20px;
 }
}

@media screen and (max-width: 600px) {
.myFrame-caption {
   font-size:30px;
 }
}

@media screen and (min-width: 601px) {
.shoutbox_msgbox {
   font-size: 15px;
 }
}

@media screen and (max-width: 600px) {
.shoutbox_msgbox {
   font-size:20px;
 }
}
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728