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.
Alter first comment?
Is there a method to change the look of the first comment in a discussion? I mean the post of the one who started the discussion.
0
This discussion has been closed.
Comments
$Context->SetDefinition('AfterFirstPostCode', '<hr style="border: 0 1 #ccc" />Insert code here'); $Context->SetDefinition('AfterLastPostCode', '<hr style="border: 0 1 #ccc" />Insert code here'); function TweenPost(&$CommentGrid) { // Insert the ad code after the last </li> $CommentList = &$CommentGrid->DelegateParameters['CommentList']; $RowNumber = &$CommentGrid->DelegateParameters['RowNumber']; $Comment = &$CommentGrid->DelegateParameters['Comment']; if ( 1 == $RowNumber ) { $Comment->Body .= $CommentGrid->Context->GetDefinition('AfterFirstPostCode'); } else { if ( ($CommentGrid->CommentDataCount == $RowNumber) || ($CommentGrid->Context->Configuration['COMMENTS_PER_PAGE'] == $RowNumber) ) { $Comment->Body .= $CommentGrid->Context->GetDefinition('AfterLastPostCode'); } } } $Context->AddToDelegate('CommentGrid', 'PreCommentOptionsRender', 'TweenPost');
I couldn't find any. Neither in the css file nor at the source code of the page.
I swear I have used it before.
$Comment->Body = '<div class="FirstComment">'. $Comment->Body .'</div>';
But that would only single out the body of the first comment... Maybe look at the beautiful lie theme if you are trying to get a blog-like appearance.There was a FirstComment class in .9.2.6 Not sure why it didin't make it into later versions. (Maybe because you can get the same effect with a :first-child CSS selector?)
#Comments li:First-Child { border: 2px solid #f00; }
But this seems to do things to the comment author and icon fields... and I am not familiar with how well browsers use it.The first method is very well for the beginning, thanks!
The 'First-Child' is not supported by IE.
The Beautiful Lie theme doesn't alter the look of the first comment, as far as I can see.
$Comment->Body = '<div class="FirstComment">'. $Comment->Body .'</div>';
Than you can define the class in you CSS stylesheet.