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.
Options

How to display replies by date

Hi, I would like to display the replies of a discution , by date. I want to see the last comment first.

Can somebody tell me what do I have to change in order to get this result?

I am using Vanilla version 2.0.18.8

I am also using this plugin: Display Discussion Content 1.2

Thanks

Tagged:
«13

Answers

  • Options

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    You need to update vanilla first. 2.0 will only be supported till December, and there are critical security updates on both.

    grep is your friend.

  • Options

    So, this no change can be made until updating?

  • Options
    peregrineperegrine MVP
    edited October 2014

    1 - upgrade - because it is the smart thing to do.

    2 - did you try the plugin? http://vanillaforums.org/addon/reversecommentsort-plugin it appears to be written for older versions of vanilla.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I installed the plugin but it doesn't seem to work for me. Anyway, this sorting problem is not a big issue at this momente. Maybe updating Vanilla will solve the problems. Thanks.

  • Options

    I came back to this problem. I tried to add some code lines in config.php and it's not working. I have to mention that the first post is like a sticky post. I don't remember if I used a plugin or not, but could this be the problem that doesn't allow me to order the comments? Can I get some help? Thanks

  • Options
    peregrineperegrine MVP
    edited November 2014

    @cheilenereinfo said:
    I came back to this problem. I tried to add some code lines in config.php and it's not working. I have to mention that the first post is like a sticky post. I don't remember if I used a plugin or not, but could this be the problem that doesn't allow me to order the comments? Can I get some help? Thanks

    If you didn't upgrade to vanilla 2.1.6 - I would do that first. then try to solve other issues.

    can you re-state AGAIN what you want to do again. the version of vanilla you are using? and what you added.

    for the most part, we have no idea what you are adding or what you did.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    My Vanilla version is 2.0.18.8

    My problem: the last comment is the last in the list. I would like the last comment to be the first in the comments list, so that the visitor doesn;t have to browse a long list of comments to get to the last one.

    I made a research and I found that adding these 2 lines in config.php can solve the problem of sorting the discussions

    $Configuration['Vanilla']['Discussions']['SortField'] = 'd.DateInserted';
    $Configuration['Vanilla']['Discussions']['SortDirection'] = 'desc';
    

    So, I tried to change "Discussion" to "Comment", but nothing happend (maybe my idea was wrong as I don't have any knowledge of coding, I was just guessing).

    Then I saw that the main post remains like a sticky post. I imagined that this could cause the problem.

    This is one of the pages that has enough comments to see what I mean: http://cheilenereinfo.ro/discussion/123/bancuri-poante-faine-si-imagini-comice

  • Options
    peregrineperegrine MVP
    edited November 2014

    Although I still don't understand, and i know you are trying to explain, but very confusing to me.

    nice looking site by the way.

    since you are using the voting plugin.

    you probably need to change that.

    https://github.com/vanilla/addons/blob/master/plugins/Voting/class.voting.plugin.php#L145

    to

    $CommentModel->OrderBy('c.DateInserted', 'Desc');


    not sure why you don't care about the security issues and problems with using an old version of vanilla.
    2.0.18.14 is the latest for 2.0.18.x - and that will be the last update on that line.

    you should create a test site with vanilla 2.1.6 then upgrade to 2.1.6 when you have everything figured out with theme and plugin compatibility.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I made the change and no result. I also disabled the plugin. Any idea?

  • Options
    peregrineperegrine MVP
    edited November 2014

    @cheilenereinfo said:
    I made the change and no result. I also disabled the plugin. Any idea?

    I don't use vanilla 2.0.18.x and fewer and fewer developers are using 2.0.18.x so you might not get a whole lot of feedback. More and more people are moving on to vanilla 2.1.6

    Personally, i I would let first and last do it's job and not reverse comments.

    users got to the last comment in discussion that they read. personally, i see no point in reversing comments, and I don't have any more ideas. Maybe someone else will.

    guests will go to first comment no matter what, so it would be an advantage for them to log in ans see what the read and what they didn't and let vanilla navigation take care of itself for logged in users.

    you can re-read my comment above regarding versions.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Thank you for your time and effort.

    The reason why I don't want to update is the fact that I am affraid of loosing all the settings and codes I added. There are a lot of codes i found and added.

  • Options
    peregrineperegrine MVP
    edited November 2014

    make a test site!!! with a new version.

    if your host allows you to have two databases.

    in the following link use vanilla 2.1.6 as your target.
    http://vanillaforums.org/discussion/24793/yet-another-vanilla-upgrade-and-duplication-tutorial

    my fear would be someone hacking my site (I can't control that with an old version).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I just made the test..it seems that the theme has some problems with the update

    main forum: http://cheilenereinfo.ro/

    test forum: http://cheilenereinfo.ro/newvanilla/

    I still have to check if I can post and comment

  • Options
    peregrineperegrine MVP
    edited November 2014

    @cheilenereinfo said:
    I just made the test..it seems that the theme has some problems with the update

    main forum: http://cheilenereinfo.ro/

    test forum: http://cheilenereinfo.ro/newvanilla/

    I still have to check if I can post and comment

    awesome your on your way.

    should be relatively easy :wink: to adjust.

    try:

    #Menu {
        display: flex;
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2014
    #Menu li {
    font-weight: normal;
    display: inline;
    }
    
    #Content {
    float: left;
    width: 680px;
    margin: 0 0 40px;
    }
    
    #Panel {
    width: 250px;
    padding-right: 0px;
    padding-top: 30px;
    position: relative;
    float: right!important;
    }
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2014

    Ok I think the major problem is with the default.master.php of your theme. this happened to me with my themes.
    Also the default style.css has too many !important on it and some things don't respond. I went ahead and removed them ....

    to fix your theme

    You need to move the Panel div after the Body div so it is before the Content in the default.master.php

    Then apply the style I gave you above. More may need to be done to adjust it, but to fix the panel problem that is how I did it.

  • Options

    I' try and I'll come back and tell you if it worked. Thanks

  • Options

    I made the changes you suggested and this what I get at this moment.

    New forum

    Old forum

    The differences are pretty obvious. The side panel is now on the left side and the upper menu went in the left side, too. I guess these are not major changes, right?

  • Options
    peregrineperegrine MVP
    edited November 2014

    did you do as vrijvlinder suggested:

    You need to move the Panel div after the Body div so it is before the Content in the default.master.php

    and none of the vrijvlinder's css changes are made in custom.css, your changes in css are not reflected.

    your theme is insecure

    I'd like to point out your theme uses old vanilla views and helper functions, and lacks the security fixes that were implemented in 2.1

    I suggest you modify bittersweet theme and modify default.master.tpl and custom.css

    instead of using your theme.

    you will always be at a disadvantage using a theme that modifies helper functions, and views will lack events to fire upon so some plugin will not work as well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.