How to: Bold text for stuck topics?

Started by SilentNoise, September 29, 2004, 05:45:15 PM

Previous topic - Next topic

SilentNoise

Right now the only way to tell the difference between the stuck topics and the regular ones is to look at the little icon beside topic, and IMO, that little graphic isn't THAT telling, so it doesn't really let you know that those items are sticky topics.

Anyway, what I'm asking is, is there a way to make the sticky topics appear in bold text, just to seperate them from the regular topics?

[Unknown]

Themes/yourtheme/MessageIndex.template.php:

Find:
', $topic['first_post']['link'];

Replace:
<span', $topic['is_sticky'] ? ' style="font-weight: bold;"' : '', '>', $topic['first_post']['link'], '</span>';

-[Unknown]

SilentNoise


LostProphecy

while we are on this??

what would be the modification to also make locked topics say.... in italics...

and also would that then mean that a locked sticky topic would be bold and in italics??
Angelus Ex Quo Nox

Prone

Webmaster http://www.syndicate-1.com

SyndicateOne - For All your gaming needs

[Unknown]

Quote from: LostProphecy on October 08, 2004, 05:47:55 AM
while we are on this??

what would be the modification to also make locked topics say.... in italics...

and also would that then mean that a locked sticky topic would be bold and in italics??

You could do that... just use 'is_locked'.

-[Unknown]

LostProphecy

sooo... if i put this would it be right?

<span', $topic['is_sticky'] ? ' style="font-weight: bold;"' : '', $topic['is_locked'] ? ' style="font-weight: italics;"' : '', '>', $topic['first_post']['link'], '</span>';
Angelus Ex Quo Nox

[Unknown]

<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-weight: italics;' : '', '">', $topic['first_post']['link'], '</span>';

Try that.

CapriSkye

italic isn't working for my locked sticky topic for some reason.

[Unknown]

Quote from: [Unknown] on October 10, 2004, 04:47:27 PM
<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-weight: italics;' : '', '">', $topic['first_post']['link'], '</span>';

Try that.

Wait a minute there.  Font weight... italics?  I just cleaned it up.  Let's try this:

<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-style: italic;' : '', '">', $topic['first_post']['link'], '</span>';

How about that?

-[Unknown]

CapriSkye


Lum-chan

Wich file would be edited then? The bold sticky did work quite well here, but locked topic isn't quite clear to me.

Any directions for a n00bie on SMF 1.0 RC1 ?

Thanks in advance
Lum-chan


[Unknown]

Quote from: Lum-chan on October 26, 2004, 02:43:15 PM
Wich file would be edited then? The bold sticky did work quite well here, but locked topic isn't quite clear to me.

Any directions for a n00bie on SMF 1.0 RC1?

Same file, the MessageIndex template.

-[Unknown]

Lum-chan

@[Unknown]: Thanks you very much. It works now 
Lum-chan


Jerry

This is gr8 :D thanks onknown. my members just pointed out having a problem telling the difference between lock/pinned topics. Thank you :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Waste

Woudl this be right to add "Sticky:" in front of all Sticky topics?:

<span', $topic['is_sticky'] ? ' style="font-weight: bold;"' : '', '>Sticky:', $topic['first_post']['link'], '</span>';

[Unknown]

Quote from: Waste on October 28, 2004, 11:45:30 PM
Would this be right to add "Sticky:" in front of all Sticky topics?:

Not quite...

<span', $topic['is_sticky'] ? ' style="font-weight: bold;">Sticky: ' : '>', $topic['first_post']['link'], '</span>';

Should do it.

-[Unknown]

Waste

As always, thanks for the help [Unknown].

CapriSkye

i've been trying to add text string $txt['modlog_ac_stickied'] but with no luck, it's just too confusing :(

this is what i have for the sticky topic:

<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-style: italic;' : '', '">', '<span title="', $topic['first_post']['preview'], '">', $topic['first_post']['link'], '</span>', '</span>';


please help, thanks

[Unknown]

Well, modlog_ac_stickied is only defined in the admin center and mod log, etc.  It's not defined when viewing a topic, because it's not needed.

-[Unknown]

Advertisement: