From: Cliff <cl...@sl...> - 2003-10-20 20:11:28
|
On Monday 20 October 2003 07:17, shane wrote: > > The key point - and I apologize for not making this clear before > > - is that I need to mix colors on the main page. Each Story must > > be assigned to a grouping which has its own color. > > Are the colors random? Do they need to always be the same given > topic __n___? Are they shown by story # {1..n}? Need more info > here. > > > What would it take to mix colors on the main page, with > > different story colors right there, depending on each story's > > Section - or Topic - or something? > > That's the question - what do you want it to depend on? That > affects what/where you'd have to change in the src and/or > templates. Another question is how many topics you are planning on having. To be honest, I don't think using sections to do this would be the right way to go, since you'll have to pull the section colors for *each story* for any container sections you'll be displaying, not to mention that the section colors are loaded into the $user object auto-magically by Slash, so to use sections, you'd have to fight the existing code to make it work (means more chance for unexpected bugs). Sections are another thing that I'm not so sure people have a good grasp on yet. Sections recently changed around to formalize some of those features that had rapidly evolved in Slash. A section can be a 'container' type or it can be a "collection" (type == 'collected'). The index page is an example of a "collection" section, as it "collects" stories from other specified secitons. 'container' types are sections like Slashdot's YRO, and Ask Slashdot. They only "contain" stories of a specific genre. So your color changes really need only apply to the "collected" type of section. I honestly see a real easy way to do what is necessary, but I'm not sure how well it would affect performance. If I can code something up that looks like it will work, during my spare time, I'll send what I have out to the list. - Cliff |