Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Comment form appearing above thread

edited May 2011 in Vanilla 2.0 - 2.8
With anonymouse 2, the comment form is appearing above the thread for anonymous users. If I'm logged in, the comment form is below the thread, in the correct place.

I looked in the class.anonymouse.plugin.php file, and it looks like it's happening because on line 309 it says:

$Sender->AddAsset('Content', $CommentFormHtml);

I think that the Comment form is being added as an asset before the thread, and so it goes first in the sort order.

Do you know how to fix this?
Tagged:

Comments

  • edited May 2011
    I tried to solve this problem this way:
    replace $Sender->AddAsset('Content', $CommentFormHtml); with $Sender->AddAsset('Comment', $CommentFormHtml);

    Go to your design views, default_master.tpl(I did it on the Embed-friendly design..

    replace
    <div id="Content"> {asset name="Content"} </div>
    with
    <div id="Content"> {asset name="Content"} <div id="Comment"> {asset name="Comment"} </div> </div>
    That works fine on me, if you want, then you can edit the css on custom.css(in your theme folder)

    Any questions?
  • SS ✭✭
    edited May 2011
    I have more kosher solution:

    1. Find $Sender->AddAsset('Content', $CommentFormHtml);
    2. Replace by $Sender->AddAsset('Content', $CommentFormHtml, 'AnonymousCommentForm');
    3. Edit or add to /conf/config.php following line code:
    $Configuration['Modules']['Vanilla']['Content'] = array('MessageModule', 'Notices', 'NewConversationModule', 'NewDiscussionModule', 'Content', 'AnonymousCommentForm', 'Ads');
    If you editing, just put 'AnonymousCommentForm' after 'Content' in array code.

    Hope this helps.
  • Thanks guys,

    I wound up just putting this on line 26 in the anonymouse.js file:

    $('.CommentForm').insertAfter($('.MessageList'));

    I've only tested it with the default theme.
Sign In or Register to comment.