TinyPortal

Development => Support => Topic started by: kopijun on May 28, 2009, 06:31:37 AM

Title: Define class for Tp article Subject
Post by: kopijun on May 28, 2009, 06:31:37 AM
Hi, I want to define a certain class for the TParticle's Subject . Could anyone show which code I have to modified in tinyportal10beta4?

In tp beta3 I still found the code which could be modified to define a class, to make a different style on the article subject. The code is in TPortal.template.php, as you can see below, they are : catbg, titlebg etc.
echo '<div' , $story['is_featured'] ? ' id="featured_article"' : '' , ' class="' ,$story['is_boardnews'] ? 'catbg' : 'titlebg' , ' tp_subject">';

so again, where can I found such a code, to make different class for the article subject...?
Thanks...
Title: Re: Define class for Tp article Subject
Post by: bloc on May 28, 2009, 08:58:35 AM
Try to simply add an extra class next to tp_subject - or just change .tp_subject class in tp-style.css or style.css.Either way will allow you to change it as you like.

If you are searching for where it is, look at TPBlocks.template, the TPlayout functions there. It was moved for this beta to simplify TPortal.template.
Title: Re: Define class for Tp article Subject
Post by: kopijun on May 28, 2009, 09:10:54 AM
Wunderbar....I found that...Now I can make the header's tittle different between tp-article and the boards....

Thanks Bloc...You're the best  :up: :up:
Title: Re: Define class for Tp article Subject
Post by: bloc on May 28, 2009, 11:04:57 AM
yw :)

To be honest I still think the current system is bit too cumbersome, which is why for beta5 I plan to separate further how each block looks without all the PHP inbetween. While being handy, that part can be distracting for people only wanting to change the css or in your case, the markup. But its still in the "thinking" stage so it may be a while before it to happen.