View Full Version : Seperating important & stick threads from the rest
Ninth Dimension
06-28-2003, 12:20 AM
Hi all, i think the subject pritty much explains what i'm after, but i'll go into some detail.
How would I go about setting up the thread display to seperate the Important and Sticky from the rest of the thread listing?
I'm talking about some physical divide on the page so that people can tell the diffrence between announcements and things that need to be noted (like rules for a specific forum).
if no one can help then i'll look into doing it myself.
thanx
assassingod
06-29-2003, 03:26 PM
Well for seperating announcments, without hacking, would easy enough;
Open up the forumdisplay_threadslist template, find:
$announcement
Underneath add;
<tr valign="top">
<td colspan="10"><img src="{ imagesfolder}/clear.gif" alt="" width="1" height="1" /></td>
</tr>
For stickies, i'll look into it.
Ninth Dimension
06-29-2003, 03:36 PM
You star, that's just what I needed :)
Today at 05:26 PM assassingod said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=413894#post413894)
For stickies, i'll look into it.
I'm fairly sure that it does 2 queries, one listing the stickies, then a 2nd listing the rest of the threads, if this is the case then all we need to do add an extra line of code getting it to add a line.
But i fear it's a bit more complex than that (everything is OK in theory, but never in pratice :)
assassingod
06-29-2003, 03:42 PM
Actually it's rather easy, since i've just done it:D
Open up forumdisplay.php and find:
if ($thread[sticky] == 1) {
$thread[typeprefix]=$stickythreadprefix.$thread[typeprefix];
}
Underneath add;
if(!$addedRow and $stickyids and $thread[sticky] == 0 and $addedRow = true){
eval("\$sepsai = \"".gettemplate('forumdisplay_sepsai')."\";");
} else {
$sepsai = '';
}
Then open up forumdisplaybit template, and at the top add
$sepsai
Add a new template forumdisplay_sepsai ;
<tr valign="top">
<td colspan="10"><img src="{imagesfolder}/clear.gif" alt="" width="1" height="1" /></td>
</tr>
This makes all announcments & stickies above the line. If you used my other way without hacking, you'll have to uninstall it.
Ninth Dimension
06-29-2003, 03:47 PM
You are a star, you saved me a lot of faffing about (i'm sure i would have found the answer, but i'm too lazy :))
you should release this officially as a tweak :)
thanking ye kindly good sir.
assassingod
06-29-2003, 03:48 PM
Hehe, it's no problem at all.
I may release it:);)
squawell
06-29-2003, 05:05 PM
other question...if i want it look like below:
stick thread<==this is title
all stick threads here
thread starter replies views
thread list here
how to do that?thankz
assassingod
06-29-2003, 05:08 PM
I think I understand you, let me try it in a few minutes.
Oblivion Knight
06-29-2003, 08:47 PM
Wouldn't the announcement seperator be better at the very bottom of the forumdisplay_announcement template? Otherwise as it is, if there are no announcements, the seperator is still shown, this way it's only shown if there is an announcement present.. :)
Ninth Dimension
06-29-2003, 08:53 PM
this hack works well if you have some stickies on your forum (as shown in the attachment on my forum) but if you don't have any, it don't work (i.e. you have an announcement that you want seperated off.)
I did see another template edit on this forum to give the announcements there own feel, i might do this, but would prefer to keep it as it where, but with the line showing up
(i hope you understood all that?)
assassingod
06-29-2003, 08:53 PM
Today at 10:47 PM Oblivion Knight said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=413985#post413985)
Wouldn't the announcement seperator be better at the very bottom of the forumdisplay_announcement template? Otherwise as it is, if there are no announcements, the seperator is still shown, this way it's only shown if there is an announcement present.. :)
True, but that would be for the template-version only.:cheeky:
The hacking one removes the line if there is no announcment/sticky.
Edit: After reading Ninth Dimensions posts, there is a problem if there is a just an announcment the line doesn't show up.
Ninth Dimension
06-29-2003, 08:55 PM
attached is an image of a forum with an announcement but no stickies
(PS, what do you think of the colours? i know it looks very vB.org, but i've not finished yet)
assassingod
06-29-2003, 09:01 PM
Daniel;
Yeah, just noticed this. There is a simple way around it but I wont be able to do it 'til tomorrow, since I have to go to bed in a minute:o
Btw, colour look cool:D
Ninth Dimension
06-29-2003, 09:12 PM
looking foward to it, no hurry, the sites not being released for another week or so :)
assassingod
06-30-2003, 04:13 PM
Alright, i've done it. Only problem is, the announcment sticks to the bottom if you have both an announcment and sticky. I can either give you the instructions for that or give me some time later to sort it out. Can't do it now since im goin' out with a girl in a minute
Ninth Dimension
06-30-2003, 04:33 PM
It's OK, i think i'll edit the announcements templates to make them look diffrent from the rest of the page (like here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=46835) is a good one) and then use this to seperate the stickies from the rest of the page.
if i'm correct this will look for stickes -> display them -> show the line -> then display the rest of the page - right? it's not like dependant on the announcements or anything?
it might be good to see your code anyway, but i think i'll stick to what I've got above.
Today at 06:13 PM assassingod said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=414243#post414243)
Can't do it now since im goin' out with a girl in a minute woah? a girl, ive not had one of them for near 3 years now :)
assassingod
06-30-2003, 04:36 PM
Cool. Yes that is how the code works:)
I gotta go now;)
Oblivion Knight
07-01-2003, 07:48 AM
Any updates assassingod?
I've JUST installed a mod by Xenon showing each announcement in it's own thread, but this rendered the template mod useless since it added a line after EVERY accouncement (doing it my way editing forumdisplay_announcement).
So I've now switched to your forumdisplay.php mod and any help having the line in a forum with no stickies but does have announcements would be useful.. :)
Ninth Dimension
07-01-2003, 08:02 AM
Oblivion Knight
Obviouly i can't answer for assassin, but i think the latest code hack looked for stickies, displayed them, displayed the line, then displayed the rest of the page.
While announcements was meant to be part of the formula, it didn't quite work :knockedout: So i bypassed this bit and decided to use the seperator for stickies/normal posts and change the view of announcements insted (see pic attached).
Personally i'm not a huge fan of the way announcements works which i think is why i'm not too fussed about the code not working quite as it should, but if you use them a lot then you might want to see his alternative code hack (if he comes back and posts it).
assassingod
I highly recomend that you release this as a hack, it's not much, but it's enough to make a big diffrence to someones forum.
good on ya fella :)
assassingod
07-01-2003, 02:09 PM
Oblivion Knight;
Ninth Dimension is correct for what he said:)
Ninth Dimension;
The new code is simply editing the forumdisplay_sepsai template, and adding
$announcment
to the top of it, then removing
$announcment
from forumdisplay_threadslist
As for releasing it, I might as well:)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.