Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • issay Friend
    #167605

    in JA news pro there is a time range option. is it possible to implement this option in Ja bulletin module (most read/latest) . and could any one tell me how to show image thumbs in related articles. i want to put related articles in a tab. but there are no thumbs like most read/latest.

    Sherlock Friend
    #410715

    <em>@issay 260975 wrote:</em><blockquote>in JA news pro there is a time range option. is it possible to implement this option in Ja bulletin module (most read/latest) . and could any one tell me how to show image thumbs in related articles. i want to put related articles in a tab. but there are no thumbs like most read/latest.</blockquote>

    Hi issay,

    To implement the time range option into the Ja bulletin module you can try as below
    Open the file of modulesmod_jabulletinhelper.php look for all these block codes

    [PHP]

    $query .= ‘ ORDER BY ‘ . $ordering;
    $db->setQuery ( $query, 0, $count );[/PHP]

    change to

    [PHP]
    if ($params->get(‘timerange’)>0){
    $datenow = &JFactory::getDate();
    $date = $datenow->toMySQL();
    $query .= ” AND (
    (a.modified > DATE_SUB(‘{$date}’,INTERVAL “.$params->get(‘timerange’).” DAY))
    OR
    (a.created > DATE_SUB(‘{$date}’,INTERVAL “.$params->get(‘timerange’).” DAY))
    )”;
    }
    $query .= ‘ ORDER BY ‘ . $ordering;
    $db->setQuery ( $query, 0, $count );[/PHP]

    then open the file of modulesmod_jabulletinmod_jabulletin.xml look for this tag
    <param name=”type” type=”list” default=”latest” label=”Type” description=”PARAMJABULTYPE”>
    <option value=”latest”>Latest News</option>
    <option value=”mostread”>Most read</option>
    </param>

    change to
    <param name=”type” type=”list” default=”latest” label=”Type” description=”PARAMJABULTYPE”>
    <option value=”latest”>Latest News</option>
    <option value=”mostread”>Most read</option>
    </param>
    <param
    name=”timerange”
    type=”list”
    default=””
    label=”TIME RANGE”
    description=”TIME RANGE DESC”>
    <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>
    </param>

    Regarding the issue of image thumbs in related articles, could you please explain it in more details ?

    issay Friend
    #410773

    <em>@Dat Hoang 265303 wrote:</em><blockquote>

    Regarding the issue of image thumbs in related articles, could you please explain it in more details ?</blockquote>

    Iam saying that in ja teline iv we have a Ja bullting module. so we can show Latest, Most viewed items with small thumbs . but JA dont have a module for related items. so we have to use Joomla core related item module. but it does not have images. so Iam asking Ja to make a new feature in Ja bulleting to show related items with images

    issay Friend
    #410785

    <em>@Dat Hoang 265303 wrote:</em><blockquote>

    To implement the time range option into the Ja bulletin module you can try as below
    Open the file of modulesmod_jabulletinhelper.php look for all these block codes

    </blockquote>

    Hello
    It seems that you gave me a code in Ja bulletin in joomla1.5

    I cant find your the code you mentioning in modulesmod_jabulletinhelper.php but I found it in teline iv joomla 1.5 package.

    So please can you tell me how to put your code in j1.6 mod_jabulletin.v1.1.0 ( i have this version)

    Sherlock Friend
    #410913

    <em>@issay 265385 wrote:</em><blockquote>Hello
    It seems that you gave me a code in Ja bulletin in joomla1.5

    I cant find your the code you mentioning in modulesmod_jabulletinhelper.php but I found it in teline iv joomla 1.5 package.

    So please can you tell me how to put your code in j1.6 mod_jabulletin.v1.1.0 ( i have this version)</blockquote>

    Hi issay !

    I have thought it is joomla 1.5, if it is joomla 1.6 you can try as below

    1) open the file of modulesmod_jabulletinmod_jabulletin.xml ,look for this tag

    <field
    name=”count”
    type=”text”
    default=”5″
    label=”Count”
    description=”COUNT_DESC” />

    change to

    <field
    name=”count”
    type=”text”
    default=”5″
    label=”Count”
    description=”COUNT_DESC” />
    <field
    name=”timerange”
    type=”list”
    default=””
    label=”TIME_RANGE”
    description=”TIME_RANGE_DESC”>
    <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>
    </field>

    2) open the file of modulesmod_jabulletinhelper.php
    look for this code
    [PHP] $featured = $params->get(‘show_featured’, 1);
    if(!$featured){
    $model->setState(‘filter.featured’, ‘hide’);
    }
    elseif($featured==2){
    $model->setState(‘filter.featured’, ‘only’);
    }
    [/PHP]

    change it to
    [PHP] $featured = $params->get(‘show_featured’, 1);
    if(!$featured){
    $model->setState(‘filter.featured’, ‘hide’);
    }
    elseif($featured==2){
    $model->setState(‘filter.featured’, ‘only’);
    }

    if ($params->get(‘timerange’)>0){
    $model->setState(‘filter.date_filtering’, ‘relative’);
    $model->setState(‘filter.date_field’, ‘a.created’);
    $model->setState(‘filter.relative_date’, $params->get(‘timerange’));
    } [/PHP]

    hope this should help !

    dotik Friend
    #411146

    Hi, I tried to use this code, but it doesnt work…I dont know, where is problem…but I think my Ja Bulletin Module is corrupted, everythink what i change do not work 🙁

    minsunlee Friend
    #411501

    <em>@Dat Hoang 265303 wrote:</em><blockquote>Hi issay,

    To implement the time range option into the Ja bulletin module you can try as below
    Open the file of modulesmod_jabulletinhelper.php look for all these block codes

    [PHP]

    $query .= ‘ ORDER BY ‘ . $ordering;
    $db->setQuery ( $query, 0, $count );[/PHP]

    change to

    [PHP]
    if ($params->get(‘timerange’)>0){
    $datenow = &JFactory::getDate();
    $date = $datenow->toMySQL();
    $query .= ” AND (
    (a.modified > DATE_SUB(‘{$date}’,INTERVAL “.$params->get(‘timerange’).” DAY))
    OR
    (a.created > DATE_SUB(‘{$date}’,INTERVAL “.$params->get(‘timerange’).” DAY))
    )”;
    }
    $query .= ‘ ORDER BY ‘ . $ordering;
    $db->setQuery ( $query, 0, $count );[/PHP]

    then open the file of modulesmod_jabulletinmod_jabulletin.xml look for this tag
    <param name=”type” type=”list” default=”latest” label=”Type” description=”PARAMJABULTYPE”>
    <option value=”latest”>Latest News</option>
    <option value=”mostread”>Most read</option>
    </param>

    change to
    <param name=”type” type=”list” default=”latest” label=”Type” description=”PARAMJABULTYPE”>
    <option value=”latest”>Latest News</option>
    <option value=”mostread”>Most read</option>
    </param>
    <param
    name=”timerange”
    type=”list”
    default=””
    label=”TIME RANGE”
    description=”TIME RANGE DESC”>
    <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>
    </param>

    Regarding the issue of image thumbs in related articles, could you please explain it in more details ?</blockquote>

    That works even with K2 Thanks a lot I was Looking for that very long time. Thanks again 🙂

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

This topic contains 7 replies, has 4 voices, and was last updated by  minsunlee 12 years, 8 months ago.

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