test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • jooservices Friend
    #173016

    I have patch 2 files to adding new feature: Display most voted in 30 days”.
    Just copy / overwrite it into your current module.

    Enjoy 🙂


    jooservices Friend
    #434640

    Just adding a bit guide about this query. It’s very simply, you can google it 🙂
    #. We need query items between current day and 30 days ago

    SELECT DATE_FORMAT(create_date, '%m/%d/%Y')
    FROM mytable
    WHERE create_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()

    So there is a sample code

    #. After that we sort by on voted with DESC 🙂

    ORDER BY `voted` DESC

    So finally we have

    /* adding by JOOservices */
    if ( $params->get('sort_type') == 3 ) {
    $where .= ' AND cm.date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE() ';
    $order = ' cm.voted ';
    }

    Very simply 🙂 Even it’s consider as custom work but we can do it in just 5min 😀

    msmedia Friend
    #435352

    IS it for 1.5 or just for 1.7 because mod_jaclatest_comments.xml looks v different.
    OK i edited my 1.5 file and added <option value=”3″>Most voted 30 days</option>
    Thank You very much

    msmedia Friend
    #435357

    Could You tell me also how to modify mod_jabulletin to show most commented articles from last 30 days?

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  msmedia 12 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum