-
AuthorPosts
-
issay Friend
issay
- Join date:
- November 2009
- Posts:
- 114
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
August 20, 2011 at 3:42 am #167605in 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
September 5, 2011 at 9:55 am #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 Friendissay
- Join date:
- November 2009
- Posts:
- 114
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
September 5, 2011 at 2:48 pm #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 Friendissay
- Join date:
- November 2009
- Posts:
- 114
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
September 5, 2011 at 3:22 pm #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.5I 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
September 6, 2011 at 8:45 am #410913<em>@issay 265385 wrote:</em><blockquote>Hello
It seems that you gave me a code in Ja bulletin in joomla1.5I 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 !
September 7, 2011 at 6:57 am #411146Hi, 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 Friendminsunlee
- Join date:
- March 2011
- Posts:
- 24
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 3
- Thanked:
- 3 times in 1 posts
September 8, 2011 at 4:07 pm #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 🙂
-
AuthorPosts
This topic contains 7 replies, has 4 voices, and was last updated by minsunlee 13 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum