Author Topic: I want to set it to insert the word STICKY on subject of sticky posts  (Read 330 times)

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
hello, im just not as good at php as i thought (i never thought i was too good, but at least kind of good -lol)  because im on the message template and just can not figure this out.  how can i add the word "STICKY" before the stickied subject when viewing all post in a board?
www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Online Sverre

  • Full Member
  • ***
  • Posts: 682
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #1 on: November 11, 2009, 05:12:34 PM »
MessageIndex.template.php

Code: (find) [Select]
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';
Code: (replace) [Select]
', $topic['is_sticky'] ? '<span class="sticky">' . $txt['sticky'] . '</span><b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';

Modifications.english.php

Code: (add) [Select]
$txt['sticky'] = 'Sticky:';

style.css

Code: (add and style to your liking) [Select]
.sticky
{
}

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #2 on: November 11, 2009, 06:25:12 PM »
Thanks for the assistance.
I did all that you said, but there was no change.
I even made the CSS style font size 18 just as a test to see if the changes were even registering but nothing happenned.

Anything I could have missed?
www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Online Sverre

  • Full Member
  • ***
  • Posts: 682
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #3 on: November 11, 2009, 06:46:22 PM »
A hard refresh (Ctrl + F5) maybe? Because it seems to be working fine judging by the forum in your signature...

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #4 on: November 11, 2009, 06:56:39 PM »
I never knew about CTRL + F5  (thanks for that). Is that the same as pressing Refresh on the web browser?

I did it, but still no change for me?  Do you see the word "Sticky:" before my sticky topic?
www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Online Sverre

  • Full Member
  • ***
  • Posts: 682
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #5 on: November 11, 2009, 07:07:23 PM »


You could perhaps try to delete your browser's cache in case the hard refresh didn't take properly.

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #6 on: November 11, 2009, 10:55:44 PM »
hey thank you very much!! You obviously see it on your computer and thats exactly what I was looking for. 

I'll do what you said with the cache.

again, thanks for the code and for helping me out with this!
:)
www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #7 on: November 12, 2009, 01:13:55 AM »
I just found out something odd....
I signed into a different screen name (non admin), and I could see it, but not only that, it had different "new.gif" icons???
I right clicked properties and the new.gif icons linked to Themes/stylized/images/english/new.gif

whereas my admin login linked to:
Themes/stylized/images/english-utf8/new.gif

I checked server settings and they were set to English, I even checked my admin profile language seting and it too was set to english,  yet my admin is using english utf8? and therefore seeing different things....
that explains why i could not see the "Sticky" text... does anyone know why this is?

www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Online Sverre

  • Full Member
  • ***
  • Posts: 682
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #8 on: November 12, 2009, 02:00:55 PM »
I've never used UTF8 and/or multiple language packs on any of my SMF installations, so I'm probably not the right person to give advice on this, but adding the new language string to Modifications.english-utf8.php should make it work when using English-UTF8 as well though.

As for why your Admin account is using English-UTF8 even if the account's language setting is set to "English", I'm pretty sure I've seen reports stating that both regular English and English-UTF8 appear as "English" in the language drop down lists, and if that's true for your site as well, just switch to the other "English" option to see what happens.

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #9 on: November 12, 2009, 04:51:49 PM »
Thanks. 
I didnt have two english options in my language selection, but I went & selected a different language, and then i re-selected the english language, and now it is working.  :)  weird, but as long as it works!  lol
Sooooo  Im finally good with this! 

Thanks again for ALL the help. I sincerely appreciate it!
www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog

Offline shane is my name

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Shane Is My Name.com
Re: I want to set it to insert the word STICKY on subject of sticky posts
« Reply #10 on: November 13, 2009, 12:03:42 AM »
LOL I give up!.   it worked that day, but today, i sign on under admin and its back to using the utf8 again... all by itself. lol  thats just crazy...

oh well, i will modify that other template you suggested. 

its just bothering me though...   lol

www.HipHopForums.org       <- my first forum
www.ShaneIsMyName.com  <- my first blog