News:

Wondering if this will always be free?  See why free is better.

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
Testing SMF 2.1 with next version Tinyportal at test.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
Testing SMF 2.1 with next version Tinyportal at test.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
Testing SMF 2.1 with next version Tinyportal at test.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
Testing SMF 2.1 with next version Tinyportal at test.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
Testing SMF 2.1 with next version Tinyportal at test.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
Testing SMF 2.1 with next version Tinyportal at test.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.

Advertisement: