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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 179
  • Total: 179

Help with Aricle Display

Started by kaptkhaos, June 08, 2007, 04:51:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kaptkhaos

When installing TP, it places a Welcome Article on the front page. The, I'm assuming title bar, says Welcome, and this is a <div> with class="titlebg". I would like to change that to class="catbg". I am designing a theme from the default them. I have created an image that I am using for the catbg class and would also like it to be used for any articles posted on the front page since when I display posts on the front page, it uses the catbg class for the title. I want it to look uniform.

So my questions is, which template file controls how the Articles are displayed on the front page, or is this controlled by css? I have gone through the index.template.php in the new theme folder and changed every instance of titlebg to catbg, one at a time to view it's results. Doing this I was able to change the title bar of the blocks, but never was able to change the title bar of the article. Is there somewhere I else I can find this?

TIA
Bob

G6Cad

I think it's the Style.css that handle the coloring for most things, including Articles and Blocks

kaptkhaos

I understand it's coming from css. I want to change what is generated before it calls the css. Meaning, if I change the titlebg background property in the css, then it will change everything that has a class titlebg. I don't want to do that, I just want to change how the Title of the article is displayed. I want it to be output as catbg instead of titlebg.

IchBin

You'll have to manually go through the TPortal.template.php file in the default theme and change all the instances of the article code to use catbg instead then.

kaptkhaos

#4
Quote from: IchBinâ„¢ on June 09, 2007, 01:20:52 AM
You'll have to manually go through the TPortal.template.php file in the default theme and change all the instances of the article code to use catbg instead then.

If this is the case, if I copy the TPortal.template.php file to my Theme folder, will it pull from that file as opposed to the file in the default theme? I'm only asking because I don't necessarily want all the themes to have this change.

Figured it out!

echo '
<div style="padding: 3px 6px 3px 6px;" class="' , $story['is_boardnews'] ? 'catbg' : 'titlebg' , '">' , $story['icon'], ' <a href="' , $story['href'] , '">' , $story['subject'] , '</a></div>';


Just have to change the titlebg to catbg, works like a charm :) Also, copying this to my theme folder worked also, so it doesn't mess with the rest of the Themes.

Thanks for pointing me in the right direction! Much appreciated.

Bob

bloc

Yes, this is exactly how it works. Just copy TPortal.template into your preferred theme, adjust and then only that theme will have the changes.

This website is proudly hosted on Crocweb Cloud Website Hosting.