News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Flatline 2.1

Started by TwitchisMental, September 11, 2021, 02:40:16 PM

Previous topic - Next topic

RML

Many thanks TwitchisMental.

TwitchisMental

Version 1.2 has been uploaded and ready for download.
1.2
Update : Updated to work with SMF 2.1.0
Feature Added : Readded the time/date and news sections.

You cannot view this attachment.

RML

Hello. I have a problem again with this theme. I upgraded my 2.1 RC3 site to 2.1.1. Before the upgrade I deleted all themes and mods. After the upgrade installed the latest version of your theme and it doesn't look good. (On a clean 2.1.1 install no such problem with your theme but I don't really want to do that.) Is there any solution for this problem?

You cannot view this attachment.

TwitchisMental

Quote from: RML on February 21, 2022, 10:58:11 AMHello. I have a problem again with this theme. I upgraded my 2.1 RC3 site to 2.1.1. Before the upgrade I deleted all themes and mods. After the upgrade installed the latest version of your theme and it doesn't look good. (On a clean 2.1.1 install no such problem with your theme but I don't really want to do that.) Is there any solution for this problem?

You cannot view this attachment.
If it is working without issue on a clean install, that leads me to believe this is being caused by a mod or something else.

Do you have a link to the forum ?

RML

As I said I uninstalled all themes and mods before upgrading so there was no any mods installed when I upgreded the forum so it can't cause by any mod. In the meantime, I noticed that if I log out and see the forum as a guest, the situation is even worse.

You cannot view this attachment.

Link to my forum:
https://board.missyforum.info/index.php

You can log in with guest user name and password.

@rjen

Just wondering: you css is minified. Was this minified from 'before'  the upgrade?

You may want to check your css (just to be sure) and switch the option to Minify css off
Then hard refresh the page (clear the cache)

Admin > Configuration > Features and options > General

Minimize CSS and JavaScript files > switch off
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

RML

Quote from: @rjen on February 22, 2022, 03:09:14 AMJust wondering: you css is minified. Was this minified from 'before'  the upgrade?

Yes, it was. Now I unchecked it, cleard the casche, cleard all the cookies and cashe of my browser too but it didn't help.

@rjen

Found it.

There is an issue with the theme: if the news is not showing on the main page, the div class="newsandtime" is not closed properly.

Go to Admin > Configuration > Current theme

then choose option: "Enable random news line in the forum header" and you issue will go away..
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Index.template.php

find
    echo '
<div class="newsandtime">
<div class="row">
     <div class="column">
<div class="user">
<time datetime="', smf_gmstrftime('%FT%TZ'), '">', $context['current_time'], '</time>';
if ($context['user']['is_logged'])
echo '
<ul class="unread_links">
<li>
<a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a>
</li>
<li>
<a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
</li>
</ul>

    </div></div>
 
  <div class="column">';
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']) && !empty($context['random_news_line']))
echo '
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>
    </div>
      </div></div>';

// The main content should go here.

replace with
    echo '
<div class="newsandtime">
<div class="row">
<div class="column">
<div class="user">
<time datetime="', smf_gmstrftime('%FT%TZ'), '">', $context['current_time'], '</time>';
if ($context['user']['is_logged'])
echo '
<ul class="unread_links">
<li>
<a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a>
</li>
<li>
<a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
</li>
</ul>
</div>
</div>';
 
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) {
echo '
<div class="column">
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>
</div>';
}
echo '
</div>
</div>';

// The main content should go here.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

RML

Many thanks for your help @rjen. It worked.

RML

Sorry for bother you again but it solved the problem only for logged in users. This is what guests see.

You cannot view this attachment.

Diego Andrés

It's a bug in the theme, to fix:

index.template.php
Code (Search) Select
if (!empty($settings['enable_news']) && !empty($context['random_news_line']))
echo '
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>
    </div>
      </div></div>';
Code (Replace) Select
if (!empty($settings['enable_news']) && !empty($context['random_news_line']))
echo '
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>';

echo '
    </div>
      </div></div>';

SMF Tricks - Free & Premium Responsive Themes for SMF.

@rjen

I believe that is what I already wrote?

What fix did you apply?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

Your fix is more complete for sure, I missed your reply.
Btw the theme is not marked for 2.1.1, is that a mistake? Just noticed none are marked for it so just no changes in the themes, they should work just fine  :)

SMF Tricks - Free & Premium Responsive Themes for SMF.

@rjen

Actually, my fix was incomplete: there is indeed another issue due to user being guest...

Let me post the complete fix...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

find

    echo '
<div class="newsandtime">
<div class="row">
     <div class="column">
<div class="user">
<time datetime="', smf_gmstrftime('%FT%TZ'), '">', $context['current_time'], '</time>';
if ($context['user']['is_logged'])
echo '
<ul class="unread_links">
<li>
<a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a>
</li>
<li>
<a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
</li>
</ul>

    </div></div>
 
  <div class="column">';
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']) && !empty($context['random_news_line']))
echo '
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>
    </div>
      </div></div>';

// The main content should go here.

replace with

    echo '
<div class="newsandtime">
<div class="row">
<div class="column">
<div class="user">
<time datetime="', smf_gmstrftime('%FT%TZ'), '">', $context['current_time'], '</time>';
if ($context['user']['is_logged']) {
echo '
<ul class="unread_links">
<li>
<a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a>
</li>
<li>
<a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
</li>
</ul>';
}
echo '
</div>
</div>';
 
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) {
echo '
<div class="column">
<div class="news">
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>
</div>
</div>';
}
echo '
</div>
</div>';

// The main content should go here.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

TwitchisMental

Looks like @rjen has already resolved this issue.

I have uploaded the fixed version. Sorry about that.

RML

Thank you very much @rjen, now everything is perfect.

iqbalresources

Hi

i'm working to open up my community forum later on, and at the moment still build up smf on my localhost. flatline simply a beautiful theme. for my community, i'm intend my forum users on the same page, means everyone check in into the very same place.Thus, may i know how can i remove the color selector,located on top left?  thank you


TwitchisMental

Quote from: iqbalresources on August 16, 2022, 02:11:21 PMHi

i'm working to open up my community forum later on, and at the moment still build up smf on my localhost. flatline simply a beautiful theme. for my community, i'm intend my forum users on the same page, means everyone check in into the very same place.Thus, may i know how can i remove the color selector,located on top left?  thank you

Open index.template.php in your favorite editor.

Find line 369
    echo '
    <div id="wrapper">
        <div id="header">
            <h1 class="forumtitle">
                <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? '<img src="'. $settings['images_url']. '/custom/logo.png" alt="' . $context['forum_name'] . '" title="' . $context['forum_name'] . '" />' : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" title="' . $context['forum_name'] . '" />', '</a>
            </h1>   
            <div class="styleselect">
            <a class="red" href="', $scripturl, '?variant=red" title="'.$txt['colorred'].'"></a>
            <a class="blue" href="', $scripturl, '?variant=blue" title="'.$txt['colorblue'].'"></a>   
            <a class="green" href="', $scripturl, '?variant=green" title="'.$txt['colorgreen'].'"></a>
            <a class="purple" href="', $scripturl, '?variant=purple" title="'.$txt['colorpurple'].'"></a>
            <a class="turquoise" href="', $scripturl, '?variant=turquoise" title="'.$txt['colorturquoise'].'"></a>
            </div>
            </div>

Replace With

    echo '
    <div id="wrapper">
        <div id="header">
            <h1 class="forumtitle">
                <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? '<img src="'. $settings['images_url']. '/custom/logo.png" alt="' . $context['forum_name'] . '" title="' . $context['forum_name'] . '" />' : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" title="' . $context['forum_name'] . '" />', '</a>
            </h1>   
            </div>

Advertisement: