(2021-02-09, 01:52 PM)vk_knight Wrote: [ -> ]It fixed the problem alright. But the forum is not looking too good. Any general mybb theme has four sections(columns). The main forum section, threads, posts and last post.
What if the thread and post column is shifted a pixels to the left? Then also it may accommodate the entire last post section within borders.
not sure exactly what you are saying by it doesn't look good? It has the 4 columns as you stated it doesn't? it merely allows the last post area to be be wrapped rather that not? You do realize right that this the nowrap is present in default theme?!!
Also yes as you mention you could say edit forumbit_depth1_cat and find:
<td class="tcat" width="200"
To adjust that width without focusing on say threads and posts columns but again that is not solving your text not wrapping thus jumping outside the line as because even the default theme has nowrap hardcoded in:
forumbit_depth2_forum
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
ie:
<td class="{$bgcolor}" align="right" style="white-space: normal">{$lastpost}</td>
usercp_latest_threads_threads
<td class="{$bgcolor}" style="white-space: nowrap">
ie:
<td class="{$bgcolor}" style="white-space: normal">
forumdisplay_thread
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
ie:
<td class="{$bgcolor}{$thread_type_class}" style="white-space: normal; text-align: right;">
avatarep.css line #27
find:
.avatarep_img, .avatarep_bg{padding: 3px;border: 1px solid #D8DFEA;width: 40px;height: 40px;border-radius: 50%;opacity: 0.9;margin: auto;float: left}
add:
margin-right: 6px;
ie:
.avatarep_img, .avatarep_bg{padding: 3px;border: 1px solid #D8DFEA;width: 40px;height: 40px;border-radius: 50%;opacity: 0.9;margin: auto;float: left; margin-right: 6px;}
etc, etc....
hence why removing nowrap and changing to normal to allow wrap is one option..... (also note that in the next version of cerulean/cerise if I can find the free time to finish them up an up them to github, none of these edits are required because the cerulean layout is changed a bit to compensate for mobile usages)
Anyhoo, perhaps this is more of what you were meaning:
forumbit_depth2_forum
find:
<td class="{$bgcolor}" align="right" style="white-space: nowrap">{$lastpost}</td>
change to:
<td class="{$bgcolor}" align="right" style="white-space: nowrap; display: flex; padding: 10px;">{$lastpost}</td>
usercp_latest_threads_threads
find:
<td class="{$bgcolor}" style="white-space: nowrap">
change to:
<td class="{$bgcolor}" style="white-space: normal">
forumdisplay_thread
find:
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
change to:
<td class="{$bgcolor}{$thread_type_class}" style="white-space: normal; text-align: right;">
avatarep.css
line # 28
Find:
.avatarep_fd{width: 40px;height: 40px;display: inline;position: relative}
Change to:
/*.avatarep_fd{width: 40px;height: 40px;display: inline;position: relative}*/
.avatarep_fd{width: 50px;height: 50px;display: inline;position: relative}
you could then say note: expand* on this for a media query to say on certain size device the tcat heading for threads and posts as well as the trow displays for such get hidden thus only showing forums & last post for example:
@media screen and (max-width: 868px){
tbody[id^=cat_] .trow1:nth-child(3), tbody[id^=cat_] .trow1:nth-child(4), tbody[id^=cat_] .trow2:nth-child(3), tbody[id^=cat_] .trow2:nth-child(4) {
display: none !important;
}
tbody[id^=cat_] .tcat:nth-child(3), tbody[id^=cat_] .tcat:nth-child(5), tbody[id^=cat_] .tcat:nth-child(2) {
display: none !important;
}
}
ie:
* ok, now expanding slightly further upon that last suggested expand upon previously noted: "note: expand*"
in avatarep.css
find:
@media screen and (max-width: 868px){
previously above we used this but for this we can comment out:
@media screen and (max-width: 868px){
/*
tbody[id^=cat_] .trow1:nth-child(3), tbody[id^=cat_] .trow1:nth-child(4), tbody[id^=cat_] .trow2:nth-child(3), tbody[id^=cat_] .trow2:nth-child(4) {
display: none !important;
}
tbody[id^=cat_] .tcat:nth-child(3), tbody[id^=cat_] .tcat:nth-child(5), tbody[id^=cat_] .tcat:nth-child(2) {
display: none !important;
}
*/
}
and find its closing:
}
ok, inside of that media query add
.hide {
display: none !important;
}
so that it is inside the media query like for example:
@media screen and (max-width: 868px){
/*
tbody[id^=cat_] .trow1:nth-child(3), tbody[id^=cat_] .trow1:nth-child(4), tbody[id^=cat_] .trow2:nth-child(3), tbody[id^=cat_] .trow2:nth-child(4) {
display: none !important;
}
tbody[id^=cat_] .tcat:nth-child(3), tbody[id^=cat_] .tcat:nth-child(5), tbody[id^=cat_] .tcat:nth-child(2) {
display: none !important;
}
*/
.hide {
display: none !important;
}
}
ok we can now delete the commented out part:
/*
tbody[id^=cat_] .trow1:nth-child(3), tbody[id^=cat_] .trow1:nth-child(4), tbody[id^=cat_] .trow2:nth-child(3), tbody[id^=cat_] .trow2:nth-child(4) {
display: none !important;
}
tbody[id^=cat_] .tcat:nth-child(3), tbody[id^=cat_] .tcat:nth-child(5), tbody[id^=cat_] .tcat:nth-child(2) {
display: none !important;
}
*/
ok, now let us add this hide to a few places
forumbit_depth1_cat
find:
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
change to:
<td class="tcat hide" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat hide" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
forumbit_depth2_cat
find:
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
change to:
<td class="{$bgcolor} hide" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor} hide" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
forumbit_depth2_forum
find:
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
change to:
<td class="{$bgcolor} hide" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor} hide" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
forumdisplay_subforums
find:
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
change to:
<td class="tcat hide" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat hide" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
forumdisplay_thread
find:
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
change to:
<td align="center" class="{$bgcolor}{$thread_type_class} hide"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class} hide">{$thread['views']}</td>
forumdisplay_threadlist
find:
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=replies&order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=views&order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
change to:
<td class="tcat hide" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=replies&order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
<td class="tcat hide" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&sortby=views&order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
** optional you can continue this
forumdisplay_threadlist_rating
find:
<td class="tcat" align="center" width="80">
change to:
<td class="tcat hide" align="center" width="80">
forumdisplay_thread_rating
find:
<td align="center" class="{$bgcolor}{$thread_type_class}" id="rating_table_{$thread['tid']}">
change to:
<td align="center" class="{$bgcolor}{$thread_type_class} hide" id="rating_table_{$thread['tid']}">
etc, etc...