TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 27, 2024, 01:43:30 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 90
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 36
  • Total: 36

How to get matching title styles on Front Page articles

Started by davo88, February 04, 2024, 08:01:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davo88

Link to my forum: Test forum only
SMF version: SMF ver 2.1.4
TP version: TP ver 3.0.0
Default Forum Language: English
Theme name and version: Default SMF Curve2
Browser Name and Version: Brave 1.62.156
Mods installed: None. All screens are fresh installs with no settings changed other than described below.
Related Error messages: None.

After a fresh install of TP with no settings changed, the front page looks like this.
You cannot view this attachment.
All Panel styles are set to this default setting
You cannot view this attachment.
Then I change all Panel styles to this setting with no other changes.
You cannot view this attachment.
Now the Front Page looks like this with a continuous blue background in the top row of title bars across the full width of the page.
You cannot view this attachment.
When in the forum, we see the same continuous blue in the top bar across the page.
You cannot view this attachment.
Next I want to remove the Center panel and mix in articles with forum topics on the Front Page. So I add an article and set it to display on Front Page. Now we have a different style of title bar displayed for the article.
You cannot view this attachment.
The article has been left at its default setting of "Use frame and title style from theme". All the category settings are at their defaults.
You cannot view this attachment.

I can't figure out how to get articles to display on the Front Page using the same "catbg+windowbg" style as all the blocks and in the forum. The goal is to have a uniform look and continuous blue title bars in the top row across the full width of the page. Anyone know how to do this?

@rjen

Check the settings under Settings & Frontpage > Frontpage

You cannot view this attachment.
Running Latest TP on SMF2.1 at: www.fjr-club.nl

davo88

Tried the settings as shown in your snip but it remains the same - the article has a different style bar. Tried changing to a few other settings in the drop downs but couldn't find a combination that changes the article title bar. The changes do affect the forum title bar displayed on the front page, but not the article title bar.

@rjen

Sorry, thought you were looking for the forum topics setting.
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

I don't think there is a setting that allows you to change it. It will require a code edit...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Yep, may be a nice feature for a new version. I will put it on the backlog...

For now, if you reaaly need it, you can change this part in TPsubs.template.php

Find
// decide the header style, different for forumposts
    $usetitlestyle = in_array($context['TPortal']['article']['frame'], array('theme', 'title'));
    $useframestyle = in_array($context['TPortal']['article']['frame'], array('theme', 'frame'));
$divheader = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_divheader'] : 'title_bar';
$headerstyle = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_headerstyle'] : 'titlebg';
$divbody = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_divbody'] : ($usetitlestyle ? 'windowbg noup' : 'windowbg');
$showtitle = in_array('title', $context['TPortal']['article']['visual_options']);


And change to
// decide the header style, different for forumposts
    $usetitlestyle = in_array($context['TPortal']['article']['frame'], array('theme', 'title'));
    $useframestyle = in_array($context['TPortal']['article']['frame'], array('theme', 'frame'));
$divheader = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_divheader'] : 'cat_bar';
$headerstyle = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_headerstyle'] : 'catbg';
$divbody = isset($context['TPortal']['article']['boardnews']) ? $context['TPortal']['boardnews_divbody'] : ($usetitlestyle ? 'windowbg tp_block21' : 'windowbg');
$showtitle = in_array('title', $context['TPortal']['article']['visual_options']);
Running Latest TP on SMF2.1 at: www.fjr-club.nl

davo88

Beautiful. Now the articles and forum topics on the front page have similar styling. Makes a big difference. Thank you @rjen.
Before code edit
You cannot view this attachment.
After code edit
You cannot view this attachment.