Poster info theme change

OldCoder
Administrator
 
Posts: 346
Joined: Mon Oct 01, 2012 14:59

Poster info theme change

by OldCoder » Sat Aug 04, 2018 22:19


In the old Minetest phpBB3 theme, poster info went into a column on the left and posts went into a column on the right. This wasted screen real estate and posed problems for potential transition to a responsive layout.

So, I modified the theme to put poster info in a box located above posts as opposed to the left of posts.

To do this, I edited the template file viewtopic_body,html (using the built-in template editor; this wasn't an external file) and made a change similar to the following:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Old version, at about line 115:
<div style="float:left; width: 20%; min-height:80px;"

New version:
<!-- OldCoder -->
<div style="border:1px solid #0000AA; width:90%;
min-height:80px; margin:20px auto;"

Old version, at about line 165:
<div class="inner" style="width: 80%;
min-height: 150px; background: #FAFAFA;
float: left;">

New version:
<!-- OldCoder --> 
<div style="width:90%; min-height:150px;
background: #FAFAFA; margin:20px auto;">

The results looked pretty good or at least they were more compatible with mobile devices and responsive layouts.

As a separate change, I replaced "class=" in the first code block shown above with "class1=". This disabled an "Online" banner which was redundant subsequent to the layout change. Until the "class1=" change was made, the theme displayed two "Online" banners next to each other.

Presently, the poster info box is taller than it needs to be and has wasted white space on the right. However, that could be fixed.
 

Return to phpBB3 Classic

Who is online

Users browsing this forum: No registered users and 1 guest

cron