-
AuthorPosts
-
luciffere Friend
luciffere
- Join date:
- January 2008
- Posts:
- 103
- Downloads:
- 3
- Uploads:
- 17
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
April 20, 2011 at 1:39 pm #163007How 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 25, 2011 at 3:39 am #387907I’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.
Thanksluciffere Friendluciffere
- Join date:
- January 2008
- Posts:
- 103
- Downloads:
- 3
- Uploads:
- 17
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
April 25, 2011 at 3:47 pm #388060The 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 26, 2011 at 8:00 am #388255ok 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()) =0OR
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 🙂
1 user says Thank You to Saguaros for this useful post
luciffere Friendluciffere
- Join date:
- January 2008
- Posts:
- 103
- Downloads:
- 3
- Uploads:
- 17
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
May 20, 2011 at 8:35 am #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()) =0OR
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.
-
AuthorPosts
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