-
AuthorPosts
-
southsouthworld Friend
southsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
July 13, 2017 at 2:49 pm #1048486This reply has been marked as private.Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
July 17, 2017 at 10:42 am #1049123southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
July 17, 2017 at 2:14 pm #1049216This reply has been marked as private.southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
July 18, 2017 at 4:34 am #1049384Thank you very much, Luna, for everything! It has been great support. 🙂
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
July 25, 2017 at 3:45 am #1051246Hi.
You could try this:
Edit the file:
components/com_jak2filter/models/itemlist.phpLook for:
if($start_created == $end_created) { $end_created .= ' 23:59:59'; }
Change to:
$end_created .= ' 23:59:59';
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
July 25, 2017 at 5:46 am #1051254Hi I just wanted to know if the developer was able to find the solution yet? Many thanks.
Kindest regards,
AlyssaAnonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
July 27, 2017 at 2:21 am #1051838Hi I just wanted to know if the developer was able to find the solution yet? Many thanks.
You can give Moonlight’s solution in the reply above a try.
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 2, 2017 at 9:15 pm #1053379I just saw this now Moonlight! I wasnt able to see Moonlight’s response before.
I can’t find:
if($start_created == $end_created) {
$end_created .= ‘ 23:59:59’;
}In the file…
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 2, 2017 at 9:27 pm #1053384Ok I found it and after applying the change, the site went down and stopped working…
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 2, 2017 at 9:34 pm #1053385Ok I forgot to get rid of the { so the website is working again.
I tried search from 03/08/2017 back to 03/03/2016 but 0 results came up.
Could you please check if my itemlist.php codes are correct below?
//search by date
$dateFormat = ‘Y-m-d’;
$dtrange = $jinput->getString(‘dtrange’, ”);$now = new JDate(); switch($dtrange) { case 'today': $start_created = $end_created = new JDate(); break; case '-1d': $start_created = new JDate('-1 day'); $end_created = new JDate(); break; case '-7d': $start_created = new JDate('-7 days'); $end_created = new JDate(); break; case '-1m': $start_created = new JDate('-1 month'); $end_created = new JDate(); break; case 'tw': $dayofweek = $now->dayofweek; $start_created = new JDate('-'.($dayofweek-1).' days'); $end_created = new JDate($dayofweek == 7 ? 'now' : '+'.(7-$dayofweek).'days'); break; case 'lw': $dayofweek = $now->dayofweek; $start_created = new JDate('-'.($dayofweek -1 + 7).' days'); $end_created = new JDate('-'.($dayofweek).' days'); break; case 'tm': $daysinmonth = $now->daysinmonth; $day = $now->format('d'); $start_created = new JDate('-'.($day-1).' days'); $end_created = new JDate($day == $daysinmonth ? 'now' : '+'.($daysinmonth-$day).'days'); break; case 'lm': $lm = new JDate('-1 month'); $daysinmonth = $lm->daysinmonth; $day = $now->format('d'); $start_created = new JDate('-'.($day-1 + $daysinmonth).' days'); $end_created = new JDate('+'.(-$day).'days'); break; case 'range': default: $start_created = $jinput->getString('sdate', ''); $end_created = $jinput->getString('edate', ''); break; } if($start_created instanceof JDate) { $start_created = $start_created->format($dateFormat); } if($end_created instanceof JDate) { $end_created = $end_created->format($dateFormat); } if ($start_created){ $sql .= " AND (i.created >= ".$db->quote($start_created).")"; } if ($end_created){ $end_created .= ' 23:59:59'; $sql .= " AND (i.created <= ".$db->quote($end_created).")"; }
- This reply was modified 7 years, 3 months ago by southsouthworld.
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 4, 2017 at 2:33 am #1053635Hi.
Did you get it sorted out already? I didn’t see anything wrong when I checked.
If you still have any problem, please post your ftp account and I will check for you.
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 4, 2017 at 5:38 pm #1053811This reply has been marked as private.Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 8, 2017 at 2:45 am #1054374Hi,
The code is still correct.
Kindly make sure that:
I tried search from 03/08/2017 back to 03/03/2016 but 0 results came up.
You have to search from (earlier date) to (later date) You couldn’t search from (later date) to (earlier date)
And i couldn’t log into backend of your site with provided admin account anymore.
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 9, 2017 at 7:08 am #1054649Oh thank you for clarifying I have been choosing the later date then the earlier date! Thank you for letting me know Moonlight! I can’t believe I overlooked that! Many thanks.
Last question, is that how do I make the search results display only K2 items under directory and not K2 items under blog?
Many thanks!
-
AuthorPosts
This topic contains 16 replies, has 4 voices, and was last updated by southsouthworld 7 years, 3 months ago.
The topic ‘Search by date range not showing items by creation date’ is closed to new replies.