I am setting up a new site using SMF 1.1.4 and TP 0.9.8 and am starting to customize it. I have a forum dedicated to front page news, and have news posted in it; but what I need to be able to do is sticky a topic on the front page news forum and it stay on top on the front page. Was wondering if this was possible at all without modifying the code by hand.
I searched everything I could think of, and couldnt find anything.
Not possible with board news. You can do it with an article, but not with board news.
Hope you dont mind ,but I found a way.
Open /Sources/TPortal.php
Goto line 1760.
It should read
QuoteORDER BY t.ID_FIRST_MSG DESC
Change it to read
QuoteORDER BY t.isSticky DESC, t.ID_FIRST_MSG DESC
And whala, you have your stickied posts stay at the top, and your non-sticky's underneath. All you have to do is unsticky it in the forum for it to drop back into it's natural place.
Hope this is helpful to someone else, as I couldn't find an answer.
It does seem to work...and I don't get any errors. Are there any "caveats" to this hack? :D
Wally
I haven't seen any myself yet, it just seems to work. All it's changing is the sort order in the query for the news.
Actually, I thought it worked...and maybe it does for NEWS, but for general sticky posts...it is not staying at the top of my most recent blocks. Thanks though.
Wally
I would imagine the most recent posts would be in a different spot for the query, as it's looking at the entire board not just the selected forums for news, so I would not expect it to work for most recent, however, I would imagine that would be in done in a similar fashion.
hmmm...I may have to look for that.
Thanks,
Wally
OK...that didn't take long. I just don't have the experience yet to find it. I downloaded and looked, but I don't know the coding.
Thanks and hope yours works out well.
Wally
Quote from: boyo on March 10, 2008, 06:17:27 PM
I would imagine the most recent posts would be in a different spot for the query, as it's looking at the entire board not just the selected forums for news, so I would not expect it to work for most recent, however, I would imagine that would be in done in a similar fashion.
Any chance you could see how difficult this could be...just curious. If it doesn't take much time...it might even prove useful for you. ;)
Wally