Loading...
 

Tikiwiki-devel (mailman list mirror)


customSearch and date range selector using numbers of days

posts: 7767 Israel

Hi Jonny,

May ne you missed this ?

=====

Nicely done as usual Jonny,


Tested on Trunk and work perfectly.

Doc updated : https://doc.tiki.org/tiki-index.php?page_ref_id=4386&no_bl=y#Date_Range_Picker
Waiting for the backport.

Happy to have you back from the walking dead area… we missed you here ;)

B



> On 14 Jun 2018, at 17:23 , Jonny Bradley <jonny@tiki.org> wrote:
>
> Hi Roberto,
>
> Can you test it before backporting please? (or have you? probably.. ;)
>
> If it seems to work ok then yes please, r66651 and r66653 are the ones you need, and probably also backport r66652 if it seems ok too as it could be helpful for normal list plugin filter debugging.
>
> Thanks!
>
> jonny
>
>
>
>> On 14 Jun 2018, at 12:50, Roberto Kirschbaum <robertokir.pro@gmail.com> wrote:
>>
>> Hi Jonny,
>>
>> Have you backported it to 18? (I think not). Would you mind if I do it, so we can start using it in a site that has 18?
>>
>> thanks!
>> Roberto
>>
>> On Wed, Jun 13, 2018 at 12:02 PM, Jonny Bradley <jonny@tiki.org> wrote:
>>> Hi B and all
>>>
>>> Ok, i've added that to trunk in r66653 and a couple of corrections afterwards, can someone please test properly and report back and then i'll backport to 18.x and add to the doc page (or you can ;)
>>>
>>> So now this works:
>>>
>>> \{daterange _field="tracker_field_date" _gap="2 weeks" _to="next week" \}
>>>
>>> Doc page for the syntax accepted is here https://secure.php.net/manual/en/function.strtotime.php
>>>
>>> jb
>>>
>>>
>>>
>>>
>>>> On 13 Jun 2018, at 11:31, Jonny Bradley <jonny@tiki.org> wrote:
>>>>
>>>> Hi Bernard
>>>>
>>>> According to https://doc.tiki.org/PluginCustomSearch#Date_Range_Picker you need to use the "gap" function.
>>>>
>>>> So you can do:
>>>>
>>>> \{daterange _field="tracker_field_date" _gap="1210000" _to="now" _showtime="n"\}
>>>>
>>>> We (i) need to update that function too so that you can user strtotime values for the dates as you can in the date range filter... then we can do:
>>>>
>>>> \{daterange _field="tracker_field_date" _gap="two weeks" _to="now" _showtime="n"\}
>>>>
>>>> :-)
>>>>
>>>> jb
>>>>
>>>>
>>>>> On 13 Jun 2018, at 08:35, Bsfez Tiki <bsfez@tiki.org> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> (following my previous question)
>>>>>
>>>>> I set a customsearch with date range selector on the template.
>>>>>
>>>>> \{daterange _field="tracker_field_date" _trackerId="26" _from="1514764800" _to="now" _showtime="n"\}
>>>>>
>>>>> This set the selector by default like this :
>>>>> First date selector show: 1/1/2018
>>>>> Second date selector show: todays date
>>>>>
>>>>> But is it possible to show a date based on a numbers of days, like:
>>>>> First date selector show: todays date
>>>>> Second date selector show: (todays date) - 15days
>>>>>
>>>>> ?
>>>>>
>>>>> In fact (and back to my previous post) if I could set by default that the customsearch plugin show by default (onload) the items that have a "tracker_field_date" value from "now-15days" to "now" it will solve it all.
>>>>>
>>>>>
>>>>> Bernard
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> ___
>>>>> TikiWiki-devel mailing list
>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> ___
>>>> TikiWiki-devel mailing list
>>>> TikiWiki-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> TikiWiki-devel mailing list
>>> TikiWiki-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
>> TikiWiki-devel mailing list
>> TikiWiki-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> TikiWiki-devel mailing list
> TikiWiki-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
TikiWiki-devel mailing list
TikiWiki-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

posts: 126208 United Kingdom

Hi B

Thanks, but yes, no sign of that one here, must have fallen down a gap somewhere along the way ;)

jb


> On 14 Jun 2018, at 16:21, Bsfez Tiki <bsfez@tiki.org> wrote:
>
> Hi Jonny,
>
> May ne you missed this ?
>
> =====
>
> Nicely done as usual Jonny,
>
>
> Tested on Trunk and work perfectly.
>
> Doc updated : https://doc.tiki.org/tiki-index.php?page_ref_id=4386&no_bl=y#Date_Range_Picker
> Waiting for the backport.
>
> Happy to have you back from the walking dead area… we missed you here ;)
>
> B
>
>
>
>> On 14 Jun 2018, at 17:23 , Jonny Bradley <jonny@tiki.org> wrote:
>>
>> Hi Roberto,
>>
>> Can you test it before backporting please? (or have you? probably.. ;)
>>
>> If it seems to work ok then yes please, r66651 and r66653 are the ones you need, and probably also backport r66652 if it seems ok too as it could be helpful for normal list plugin filter debugging.
>>
>> Thanks!
>>
>> jonny
>>
>>
>>
>>> On 14 Jun 2018, at 12:50, Roberto Kirschbaum <robertokir.pro@gmail.com> wrote:
>>>
>>> Hi Jonny,
>>>
>>> Have you backported it to 18? (I think not). Would you mind if I do it, so we can start using it in a site that has 18?
>>>
>>> thanks!
>>> Roberto
>>>
>>> On Wed, Jun 13, 2018 at 12:02 PM, Jonny Bradley <jonny@tiki.org> wrote:
>>>> Hi B and all
>>>>
>>>> Ok, i've added that to trunk in r66653 and a couple of corrections afterwards, can someone please test properly and report back and then i'll backport to 18.x and add to the doc page (or you can ;)
>>>>
>>>> So now this works:
>>>>
>>>> \{daterange _field="tracker_field_date" _gap="2 weeks" _to="next week" \}
>>>>
>>>> Doc page for the syntax accepted is here https://secure.php.net/manual/en/function.strtotime.php
>>>>
>>>> jb
>>>>
>>>>
>>>>
>>>>
>>>>> On 13 Jun 2018, at 11:31, Jonny Bradley <jonny@tiki.org> wrote:
>>>>>
>>>>> Hi Bernard
>>>>>
>>>>> According to https://doc.tiki.org/PluginCustomSearch#Date_Range_Picker you need to use the "gap" function.
>>>>>
>>>>> So you can do:
>>>>>
>>>>> \{daterange _field="tracker_field_date" _gap="1210000" _to="now" _showtime="n"\}
>>>>>
>>>>> We (i) need to update that function too so that you can user strtotime values for the dates as you can in the date range filter... then we can do:
>>>>>
>>>>> \{daterange _field="tracker_field_date" _gap="two weeks" _to="now" _showtime="n"\}
>>>>>
>>>>> :-)
>>>>>
>>>>> jb
>>>>>
>>>>>
>>>>>> On 13 Jun 2018, at 08:35, Bsfez Tiki <bsfez@tiki.org> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> (following my previous question)
>>>>>>
>>>>>> I set a customsearch with date range selector on the template.
>>>>>>
>>>>>> \{daterange _field="tracker_field_date" _trackerId="26" _from="1514764800" _to="now" _showtime="n"\}
>>>>>>
>>>>>> This set the selector by default like this :
>>>>>> First date selector show: 1/1/2018
>>>>>> Second date selector show: todays date
>>>>>>
>>>>>> But is it possible to show a date based on a numbers of days, like:
>>>>>> First date selector show: todays date
>>>>>> Second date selector show: (todays date) - 15days
>>>>>>
>>>>>> ?
>>>>>>
>>>>>> In fact (and back to my previous post) if I could set by default that the customsearch plugin show by default (onload) the items that have a "tracker_field_date" value from "now-15days" to "now" it will solve it all.
>>>>>>
>>>>>>
>>>>>> Bernard
>>>>>> ------------------------------------------------------------------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>> ___
>>>>>> TikiWiki-devel mailing list
>>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> ___
>>>>> TikiWiki-devel mailing list
>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> ___
>>>> TikiWiki-devel mailing list
>>>> TikiWiki-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
>>> TikiWiki-devel mailing list
>>> TikiWiki-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> TikiWiki-devel mailing list
>> TikiWiki-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> TikiWiki-devel mailing list
> TikiWiki-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
TikiWiki-devel mailing list
TikiWiki-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

posts: 7767 Israel

Ha ha ha, nice one !

> On 14 Jun 2018, at 18:41 , Jonny Bradley <jonny@tiki.org> wrote:
>
> Hi B
>
> Thanks, but yes, no sign of that one here, must have fallen down a gap somewhere along the way ;)
>
> jb
>
>
>> On 14 Jun 2018, at 16:21, Bsfez Tiki <bsfez@tiki.org> wrote:
>>
>> Hi Jonny,
>>
>> May ne you missed this ?
>>
>> =====
>>
>> Nicely done as usual Jonny,
>>
>>
>> Tested on Trunk and work perfectly.
>>
>> Doc updated : https://doc.tiki.org/tiki-index.php?page_ref_id=4386&no_bl=y#Date_Range_Picker
>> Waiting for the backport.
>>
>> Happy to have you back from the walking dead area… we missed you here ;)
>>
>> B
>>
>>
>>
>>> On 14 Jun 2018, at 17:23 , Jonny Bradley <jonny@tiki.org> wrote:
>>>
>>> Hi Roberto,
>>>
>>> Can you test it before backporting please? (or have you? probably.. ;)
>>>
>>> If it seems to work ok then yes please, r66651 and r66653 are the ones you need, and probably also backport r66652 if it seems ok too as it could be helpful for normal list plugin filter debugging.
>>>
>>> Thanks!
>>>
>>> jonny
>>>
>>>
>>>
>>>> On 14 Jun 2018, at 12:50, Roberto Kirschbaum <robertokir.pro@gmail.com> wrote:
>>>>
>>>> Hi Jonny,
>>>>
>>>> Have you backported it to 18? (I think not). Would you mind if I do it, so we can start using it in a site that has 18?
>>>>
>>>> thanks!
>>>> Roberto
>>>>
>>>> On Wed, Jun 13, 2018 at 12:02 PM, Jonny Bradley <jonny@tiki.org> wrote:
>>>>> Hi B and all
>>>>>
>>>>> Ok, i've added that to trunk in r66653 and a couple of corrections afterwards, can someone please test properly and report back and then i'll backport to 18.x and add to the doc page (or you can ;)
>>>>>
>>>>> So now this works:
>>>>>
>>>>> \{daterange _field="tracker_field_date" _gap="2 weeks" _to="next week" \}
>>>>>
>>>>> Doc page for the syntax accepted is here https://secure.php.net/manual/en/function.strtotime.php
>>>>>
>>>>> jb
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On 13 Jun 2018, at 11:31, Jonny Bradley <jonny@tiki.org> wrote:
>>>>>>
>>>>>> Hi Bernard
>>>>>>
>>>>>> According to https://doc.tiki.org/PluginCustomSearch#Date_Range_Picker you need to use the "gap" function.
>>>>>>
>>>>>> So you can do:
>>>>>>
>>>>>> \{daterange _field="tracker_field_date" _gap="1210000" _to="now" _showtime="n"\}
>>>>>>
>>>>>> We (i) need to update that function too so that you can user strtotime values for the dates as you can in the date range filter... then we can do:
>>>>>>
>>>>>> \{daterange _field="tracker_field_date" _gap="two weeks" _to="now" _showtime="n"\}
>>>>>>
>>>>>> :-)
>>>>>>
>>>>>> jb
>>>>>>
>>>>>>
>>>>>>> On 13 Jun 2018, at 08:35, Bsfez Tiki <bsfez@tiki.org> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> (following my previous question)
>>>>>>>
>>>>>>> I set a customsearch with date range selector on the template.
>>>>>>>
>>>>>>> \{daterange _field="tracker_field_date" _trackerId="26" _from="1514764800" _to="now" _showtime="n"\}
>>>>>>>
>>>>>>> This set the selector by default like this :
>>>>>>> First date selector show: 1/1/2018
>>>>>>> Second date selector show: todays date
>>>>>>>
>>>>>>> But is it possible to show a date based on a numbers of days, like:
>>>>>>> First date selector show: todays date
>>>>>>> Second date selector show: (todays date) - 15days
>>>>>>>
>>>>>>> ?
>>>>>>>
>>>>>>> In fact (and back to my previous post) if I could set by default that the customsearch plugin show by default (onload) the items that have a "tracker_field_date" value from "now-15days" to "now" it will solve it all.
>>>>>>>
>>>>>>>
>>>>>>> Bernard
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>> ___
>>>>>>> TikiWiki-devel mailing list
>>>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>> ___
>>>>>> TikiWiki-devel mailing list
>>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> ___
>>>>> TikiWiki-devel mailing list
>>>>> TikiWiki-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
>>>> TikiWiki-devel mailing list
>>>> TikiWiki-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> TikiWiki-devel mailing list
>>> TikiWiki-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> TikiWiki-devel mailing list
>> TikiWiki-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> TikiWiki-devel mailing list
> TikiWiki-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
TikiWiki-devel mailing list
TikiWiki-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.