Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How could I ad a "class" to the li of the first comment?

2»

Comments

  • Lemme know what ya think of it so far... BTW I plan on having 50 + Categories and all will have a separate icon
  • edited November 2007
    Ok, so far everythings going well... Now i need to do something to the firstcomment a little more complicated, just not sure how to do it... I want to move the comment header to the bottom for just the first comment. how might i go about this one??? All i can figure is in the comments.php file we're gonna ad one or two "if thens"...
  • I guess you're right, everything is in the comments.php file, and you'll need a 'if', but no 'then' ;).
    What you need first is to break the strings to have separate instructions for the different <li></li> that you want to invert. Then have a try yourself!!! I think it can be as simple as:
    if ( it's the first ) {$CommentList.='<li>...1...</li>';$CommentList.='<li>...2...</li>';} else {$CommentList.='<li>...2...</li>';$CommentList.='<li>...1...</li>';}
  • I'll give it a try and let ya know how it turns out :)
  • Dude. That is awesome what you are doing. I'm going to have to try this myself.
  • Now looking at the rest of the Vanilla areas here, with this kind of concept, you could basically build an "Addon"esque vanilla install. Same for Swell. I think you could do a lot with this very concept.
  • Sorry, I don't understand the "concept". Could you detail please ?
  • Look at the individual Addon's discussion page. Such as: http://lussumo.com/addons/index.php?PostBackAction=AddOn&AddOnID=321

    That could basically be replicated with this idea: changing the first comment in the discussion to look different. Its the same thing for Swell's comment page: http://lussumo.com/swell/169/Vanilla-114-Package-Problem/#Comments

    I'm just saying with this concept: changing the look of the first comment, vanilla could very well be extended outside the realm of forums and into other types of CMS.

    Also, you'll have to excuse me. It was 2am when I wrote that and I was falling asleep mid-type.
  • That's exactly what i'm trying to achieve here, i'm turning vanilla into a cms kinda news theme site...
  • Ok, understood now. Maybe we can hope this to be built-in in next versions...
    I don't know how to say in in English, but "forgive to you I give".
  • :oP "Grahack" you're really helping me to learn even more about vanilla and php :) thank you so much... Hopefully i'll have alot of people wanting to use the theme i'm building here :) wayne
  • I would totally use it. Especially to learn off to put into different needs that I have that this could totally work for. Its a great idea. Keep rolling with it.
  • here's what i've got so far, take a look around... NC Golf Community
This discussion has been closed.