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
Suggestion: Responsive menu, with or wit
Controls ·  Search New posts · Mark unread

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

2020-05-06 18:03:13
Hello M-Jay,

I have been working on the menu a bit to make it fit better to the screen when browsing on mobile devices. Would like to provide some suggestions to make this development more bootstrap compliant.
You will notice it does not show the menu correct on your phone in the default theme. The pages will run out on the right because the menu does not conform to the smaller screen size.

With the provided changes, it does. The menu is fully bootstrap compliant. It is compliant with bootstrap 4.3.1. The overrides are inside the bootstrap.css file.

Here are the changes >>

Create a folder called responsive inside the views folder:

\views\themes\responsive
\views\themes\responsive-drop   << [color=rgb(26, 188, 156)]This one for the dropdown menu version[/color]

File changes are in >>

bootstrap.css (I will provide full changed in theme file)
header.php (I will provide full changed in theme file)
theme.css (I will provide full changed in theme file)
topnavbar.php (I will provide full changed in theme file)

I will explain some of the changes in the php files only, you can compare with the default theme.

[color=rgb(97, 189, 109)]header.php[/color] changes >>

Find:      [color=rgb(250, 197, 28)]<!-- Theme css -->[/color]  Just below this change:
    <link rel="shortcut icon" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/default/images/favicon.ico" />
   <link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/default/bootstrap.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/default/theme.css" />

To:
    <link rel="shortcut icon" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/responsive/images/favicon.ico" />
   <link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/responsive/bootstrap.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/views/themes/responsive/theme.css" />


[color=rgb(97, 189, 109)]topnavbar.php[/color] changes >>

Find:          [color=rgb(250, 197, 28)]<!-- Start Infobar -->[/color]   Above it, which should be the first 4 lines in the file, change:

    <nav class="navbar navbar-expand-lg navbar-dark primary-color">
       <a class="navbar-brand" href='<?php echo $site_config["SITEURL"]; ?>/index.php' title='Home' target='_self'><img
               src='<?php echo $site_config["SITEURL"]; ?>/views/themes/default/images/logo.gif' alt='logo' width='212'
               height='46' /></a>

To:
    <nav class="navbar navbar-expand-lg navbar-dark primary-color">


The following change is made to make the text shorter, and thus fitting better on small screens. It also requires an update to the language file.

Find:
print (T_("LOGGED_IN_AS").": ".class_user($CURUSER["username"])."");

Change to:
print (T_("HI")." ".class_user($CURUSER["username"])."");


The following will actually change the menu layout >>

Find:        [color=rgb(250, 197, 28)]<?php if ($CURUSER){ ?>[/color]

Below it, replace:
    <div class='navigation'>
       <div class='menu'>
           <ul id='nav-one' class='dropmenu'>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/index.php"><?php echo T_("HOME");?></a></li>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/forums"><?php echo T_("FORUMS");?></a></li>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/torrentsupload"><?php echo T_("UPLOAD_TORRENT");?></a></li>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/torrents/browse"><?php echo T_("BROWSE_TORRENTS");?></a></li>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/torrents/today"><?php echo T_("TODAYS_TORRENTS");?></a></li>
               <li><a href="<?php echo $site_config["SITEURL"]; ?>/torrentssearch"><?php echo T_("SEARCH_TORRENTS");?></a></li>
           </ul>
       </div>
   </div>

with:
                <div class="navigation">
         <nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href='<?php echo $site_config["SITEURL"]; ?>/index.php' title='Home' target='_self'><img src='<?php echo $site_config["SITEURL"]; ?>/views/themes/u2torrents/images/logo.gif' alt='logo' width='212' height='46' /></a>
           <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent1" aria-controls="navbarSupportedContent1" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
           <div class="collapse navbar-collapse" id="navbarSupportedContent1">
             <ul class="navbar-nav mr-auto">
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/index.php"><?php echo T_("HOME");?><span class="sr-only">(current)</span></a> </li>
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/forums"><?php echo T_("FORUMS");?></a> </li>
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/torrentsupload"><?php echo T_("UPLOAD_TORRENT");?></a> </li>
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/torrents/browse"><?php echo T_("BROWSE_TORRENTS");?></a> </li>
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/torrentssearch"><?php echo T_("SEARCH_TORRENTS");?></a> </li>
               <li class="nav-item active"> <a class="nav-link" href="<?php echo $site_config["SITEURL"]; ?>/torrents/today"><?php echo T_("TODAYS_TORRENTS");?></a> </li>
             </ul>
           </div>
         </nav>
       </div>


languages/english.php changes >>

Look for:
$LANG["LOGGED_IN_AS"] = "You are logged in as";

Add below:
$LANG["HI"] = "Hi";


That's it, which is just to show the changes that are required to have a responsive menu.
You can tweak to your liking. I am still tweaking myself :-)

I will attach a complete theme for a normal responsive menu, as well as a menu with a dropdown included.

[ATTACH type="full"]5500[/ATTACH]
[ATTACH type="full"]5501[/ATTACH]
04-responsive-menu-desktop-compressed.jpg
04-responsive-menu-desktop-compressed.jpg
06-responsive-menu-dropdown-showing-desktop.jpg
06-responsive-menu-dropdown-showing-desktop.jpg
responsive.rar
Download
responsive-drop.rar
Download

If It Ain't Dutch, It Ain't Much!!
2020-05-06 18:06:30
Note:

- The "Hi Propaganda ...." text does not overlap the Logo anymore!
- The "Hi Propaganda ...." appears now below the logo-menu line, and this looks pretty okie!!
- Note the menu is now in the familiar "Hamburger icon"

[ATTACH type="full"]5507[/ATTACH]
- Here is shows below the menu expanded!

[ATTACH type="full"]5508[/ATTACH]
03-responsive-menu.jpg
03-responsive-menu.jpg
04-responsive-menu-showing.jpg
04-responsive-menu-showing.jpg

If It Ain't Dutch, It Ain't Much!!
2020-05-06 18:27:27
Far from finished this bootstrap thing. I did realize that TT is far from bootstrap compliant.
Will do step by step, and welcome any any suggestion.
Note that I am not as skilled as the previous bootstrap skin developer, but slowly will make my way.
If It Ain't Dutch, It Ain't Much!!
2020-05-06 22:31:28
This can be achieved to be responsive in pure CSS, further complying across all modern browsers with some hand work. The only selector to focus on would be the viewport css max-width 100% and respective meta tag. There are table classes that can be assigned by adding a responsive class to a table tag, and it will take care of the responsiveness automatically, lesaving very little work for existing TT table markup (anywhere </table>, etc)

Where exactly is the menu causing you issues? Or is stock not mobile?
2020-05-07 04:45:13
Cheers I'll try it today, css and bootstrap are not my strengths so help is very appreciated header looks alot better on mobiles
2020-05-07 22:36:19
Throw me any JS or CS work and ill turn the cogs.
2020-05-08 03:35:04
"STorrents2020, post: 68523, member: 20382":

This can be achieved to be responsive in pure CSS, further complying across all modern browsers with some hand work. The only selector to focus on would be the viewport css max-width 100% and respective meta tag. There are table classes that can be assigned by adding a responsive class to a table tag, and it will take care of the responsiveness automatically, lesaving very little work for existing TT table markup (anywhere </table>, etc)

Where exactly is the menu causing you issues? Or is stock not mobile?


Hey ST, yes the stock no mobile friendly. The PDO version from M-Hay will also overflow the right side of the screen when viewed on mobile.
My coding skills very limited, took me 2 weeks of trial and error and learning to get where I am now!

Your skills much more advanced then mine, for sure!
The idea that I have of the mobile version is that the menu should show the "hamburger" icon below certain px.
Also now, on your mobile, it will show all the blocks, for example when you select the forum - you would expect the forum to just show - and not all the other blocks from the left column on top first...with the forum somewhere in the middle. Of course for the desktop the view should stay same, but on the mobile the left column should not show - other them when you select home screen.
If It Ain't Dutch, It Ain't Much!!
2020-05-08 09:27:12
My own theme has struggled with this too, but its well responsive.. its more the side content I want positioned on say, an iPad - but over time its become fixed up and fluid. I use .mobile-only to hide content I don't want on mobile, but the other way around isn't so easy.

I should test the default theme on a local run, and see what comes up. The majority of the default theme is relying on tables, so that alone makes it a lot easier and reliable to make responsive than a cluster mess of <div> all over. Thats when you need to rule out child, parent and notate a lot of your classes in CSS (joining classes or IDs), but it generally comes down to the viewport and the CSS.
2020-05-08 22:37:06
had a quick look at both themes and ill add your changes to project  (y) found a old v2x bootstrap theme like TTCE but smaller and nicer https://github.com/issarapong/TorrentTrader-Bootstrap

Took a bit of editing but managed to get it working and i will combine everything and try finish the theme off. I imagine there will be two outstanding issues
the left block must be enabled ( or 1 of  line code to fix style in theme.css)
the left block displays top on mobiles (this cant be changed because of header but it should be able to be hidden)

The theme was bootstrap 3 so needs some more work all together we should have some thing
Untitled.png
Untitled.png
2020-05-09 23:43:01
think ive got a fix for  left block display on mobile [USER=60]@Propaganda[/USER] if you want to test

add in header d-none d-md-block

<?php if ($site_config["LEFTNAV"]) {?>
 <div class="col-sm-2 d-none d-md-block sidenav">
2020-05-10 08:15:25
"m-jay, post: 68537, member: 20288":

think ive got a fix for  left block display on mobile [USER=60]@Propaganda[/USER] if you want to test

add in header d-none d-md-block

<?php if ($site_config["LEFTNAV"]) {?>
 <div class="col-sm-2 d-none d-md-block sidenav">



Yes this seems to do the trick, nice solution!
On screens with a width less then 768px it will hide the left column all together.

I went through the different pages, and the upload page (torrent name field) seems to push the page out of the screen.

Another thing worth find-tuning is the text in for example the navigation block slide in over the other text when compressing the with of the page.
This would happen for example on your iPad. One solution would be to use the following statement instead:  <div class="col-sm-2 d-none d-lg-block sidenav">
This would hide the left column on screens with lower then 992px. But then the left column does not fill out to the full with. (see attached screenshot)

[ATTACH type="full"]5512[/ATTACH]
06-responsive-rightcolumn.JPG
06-responsive-rightcolumn.JPG

If It Ain't Dutch, It Ain't Much!!
2020-05-10 09:08:18
d-sm-block
should change it to hide on smaller devices on the line in header
2020-05-10 12:06:56
I don't want to be negative, but for trying to do what you want to do, is that there is far too much modification to the block and frame code for various reasons.
2020-05-10 12:21:47
ive made a new theme with no css spirtblue its just bootstrap & jquery.
because all css has been removed all old css can be removed like div class t-title etc

now everything is standard bootstrap and it has a custom css to edit bootstrap directly so in future you update jquery and bootstrap only then add custom.css
ive edited frame & block functions & shoutbox and i should be finished in a few hours

the only thing is it is blank but adding css is easy if anyone wants to paint it
for example all frames and blocks are cards see blank image

for custom.css we just modify custom.css  keeping bootstrap/theme seperate
.card-header {
   padding: .75rem 1.25rem;
   margin-bottom: 0;
   background-color: #007bff;
   border-bottom: 1px solid rgba(0,0,0,.125);
}


now see colour image - this seems little but im hoping to build full site with little css and style

[color=rgb(251, 160, 38)]PS THIS THEME HAS NO CSS AND HAS ONLY HAD THE EXAMPLE ABOVE ADDED[/color]
blank.png
blank.png
colour.png
colour.png
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