Advertisement:

Author Topic: How to: Bold text for stuck topics?  (Read 43930 times)

SilentNoise

  • Guest
How to: Bold text for stuck topics?
« on: September 29, 2004, 05:45:15 PM »
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?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #1 on: September 29, 2004, 06:08:28 PM »
Themes/yourtheme/MessageIndex.template.php:

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

SilentNoise

  • Guest
Re: How to: Bold text for stuck topics?
« Reply #2 on: September 30, 2004, 05:55:44 PM »
Awesome stuff.

Thanks again

Offline LostProphecy

  • Jr. Member
  • **
  • Posts: 381
  • Gender: Female
    • The Lost Prophecy
Re: How to: Bold text for stuck topics?
« Reply #3 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??
Angelus Ex Quo Nox

Offline Prone

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • SyndicateOne
    • SyndicateOne
Re: How to: Bold text for stuck topics?
« Reply #4 on: October 08, 2004, 05:57:02 AM »
Perfect!

Thx [Unknown]
Webmaster http://www.syndicate-1.com

SyndicateOne - For All your gaming needs

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #5 on: October 08, 2004, 04:15:35 PM »
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]

Offline LostProphecy

  • Jr. Member
  • **
  • Posts: 381
  • Gender: Female
    • The Lost Prophecy
Re: How to: Bold text for stuck topics?
« Reply #6 on: October 10, 2004, 04:23:34 AM »
sooo... if i put this would it be right?

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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #7 on: October 10, 2004, 04:47:27 PM »
Code: [Select]
<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-weight: italics;' : '', '">', $topic['first_post']['link'], '</span>';
Try that.

Offline CapriSkye

  • Full Member
  • ***
  • Posts: 574
    • Open
Re: How to: Bold text for stuck topics?
« Reply #8 on: October 15, 2004, 08:28:25 PM »
italic isn't working for my locked sticky topic for some reason.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #9 on: October 15, 2004, 09:32:14 PM »
Code: [Select]
<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:

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

-[Unknown]

Offline CapriSkye

  • Full Member
  • ***
  • Posts: 574
    • Open
Re: How to: Bold text for stuck topics?
« Reply #10 on: October 15, 2004, 09:37:37 PM »
works great! thank you

Offline Lum-chan

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
  • Lum-chan is cute!
    • The World of Urusei Yatsura's Lum
Re: How to: Bold text for stuck topics?
« Reply #11 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 ?

Thanks in advance
Lum-chan


Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #12 on: October 26, 2004, 06:51:34 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]

Offline Lum-chan

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
  • Lum-chan is cute!
    • The World of Urusei Yatsura's Lum
Re: How to: Bold text for stuck topics?
« Reply #13 on: October 27, 2004, 03:18:28 PM »
@[Unknown]: Thanks you very much. It works now 
Lum-chan


Offline Jerry

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,903
  • Gender: Male
  • What? I can't hear you over my awesomeness!!
    • PlanetSMF
Re: How to: Bold text for stuck topics?
« Reply #14 on: October 28, 2004, 08:22:46 PM »
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."

Offline Waste

  • Jr. Member
  • **
  • Posts: 179
  • Gender: Male
  • Eh?
    • http://www.theunderside.org/
Re: How to: Bold text for stuck topics?
« Reply #15 on: October 28, 2004, 11:45:30 PM »
Woudl this be right to add "Sticky:" in front of all Sticky topics?:

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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #16 on: October 28, 2004, 11:48:53 PM »
Would this be right to add "Sticky:" in front of all Sticky topics?:

Not quite...

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

-[Unknown]

Offline Waste

  • Jr. Member
  • **
  • Posts: 179
  • Gender: Male
  • Eh?
    • http://www.theunderside.org/
Re: How to: Bold text for stuck topics?
« Reply #17 on: October 29, 2004, 12:06:34 AM »
As always, thanks for the help [Unknown].

Offline CapriSkye

  • Full Member
  • ***
  • Posts: 574
    • Open
Re: How to: Bold text for stuck topics?
« Reply #18 on: October 29, 2004, 12:55:52 AM »
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:
Code: [Select]
<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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: How to: Bold text for stuck topics?
« Reply #19 on: October 29, 2004, 02:10:25 AM »
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]