Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • luciffere Friend
    #163007

    How set the JA News Pro module to shown on it only the article from “today”?

    LE: The tilte is wrong. The good title: Article in JA News Pro module

    Saguaros Moderator
    #387907

    I’m confused with your question, do you you want to customize the JA News front page or JA News Pro to only show the images from ‘today”?
    and with this <blockquote>LE: The title is wrong. The good title: Article in JA News Pro module </blockquote> I’m still not clearly understandable :|, please provide more details.
    Thanks

    luciffere Friend
    #388060

    The title for post is wrong… Sorry for this. The question is for: “JA News Pro module” not “JA News Front Page module”…
    Now. The JA News Pro, at this moment, can be show articles from:

    <option value="">All time</option>
    <option value="1">1 day</option>
    <option value="3">3 days</option>
    <option value="7">1 week</option>
    <option value="15">2 weeks</option>
    <option value="30">1 month</option>
    <option value="180">6 months</option>

    and i want to show only the “today” articles…
    The “1 day” show all article from today and from yesterday, but i want to show only from “today” (0 day) 🙂

    Saguaros Moderator
    #388255

    ok you replace above xml code by this:

    <option value=””>All time</option>
    <option value=”0″>Today</option>
    <option value=”1″>1 day</option>
    <option value=”3″>3 days</option>
    <option value=”7″>1 week</option>
    <option value=”15″>2 weeks</option>
    <option value=”30″>1 month</option>
    <option value=”180″>6 months</option>

    Then open the file: modulesmod_janewsprohelpersadaptercontent.php and find the following code:

    [PHP]
    if ($helper->get(‘timerange’)>0){
    [/PHP]

    replace by :

    [PHP]
    if( $helper->get(‘timerange’) == 0){
    $query .= ” AND ( DATEDIFF(a.modified, CURDATE()) =0

    OR
    DATEDIFF(a.created, CURDATE())=0
    )”;
    }else if ($helper->get(‘timerange’)>0){
    [/PHP]

    when done , your module will get a new option for showing the ‘today’ articles 🙂

    luciffere Friend
    #392076

    <em>@tienhc 236558 wrote:</em><blockquote>ok you replace above xml code by this:

    <option value=””>All time</option>
    <option value=”0″>Today</option>
    <option value=”1″>1 day</option>
    <option value=”3″>3 days</option>
    <option value=”7″>1 week</option>
    <option value=”15″>2 weeks</option>
    <option value=”30″>1 month</option>
    <option value=”180″>6 months</option>

    Then open the file: modulesmod_janewsprohelpersadaptercontent.php and find the following code:

    [PHP]
    if ($helper->get(‘timerange’)>0){
    [/PHP]

    replace by :

    [PHP]
    if( $helper->get(‘timerange’) == 0){
    $query .= ” AND ( DATEDIFF(a.modified, CURDATE()) =0

    OR
    DATEDIFF(a.created, CURDATE())=0
    )”;
    }else if ($helper->get(‘timerange’)>0){
    [/PHP]

    when done , your module will get a new option for showing the ‘today’ articles :)</blockquote>

    But this is for com_content. I want the modification for k2 articles.

    luciffere Friend
    #392399

    @tienhc please help me with this…

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

This topic contains 6 replies, has 2 voices, and was last updated by  luciffere 13 years, 6 months ago.

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