• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Content plugin Upcoming & Past Date filter

sunnyjey

Active Member
I am trying to display the List of upcoming and another List of Past Events using content plugin.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]>=now mytable___date[condition]=>}

The above content syntax correctly display all future Events.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<=now mytable___date[condition]=>}

But this doesn't work for Past events.

What is correct PHP operator to filter Date for Past, as '<=' AND '<' are not working ? Is there any alternate way to display Past events ?
 
I don't know if this example is still valid, but if it is it says
{fabrik view=list id=1 fab_events___start_date[value]=x fab_events___start_date[condition]=>}
which is not like the code in your example.

Following this thread it should be something like
mytable___date[value]=2019-08-20 mytable___date[condition]=<

Are you sure "now" is doing?
Use fabrikdebug to see which query is generated.
 
Are you sure "now" is doing?
Use fabrikdebug to see which query is generated.

Not sure, as fabrikdebug shows WHERE 2=-2 in query generated. Tried all other options, but no use.

Can you suggest any alternative way to display ONLY past records. The filter in content plugin should be like:

WHERE 'date_time' IS LESS THAN 'current time'
 
Yes. I tried all options for hours but no use.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<now mytable___date[condition]=>}

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<now}

Code:
$currentTime = new JDate('now');

{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]=" .$currentTime . "}
 
Not sure what you are doing at all: at least the code you are showing is nor php nor HTML...
Where are you using this?

Did you try with hardcoded values (id, date...) for testing?
 
I've tested: content plugin
{fabrik view=list id=17 termin_reservation___id[value]=101 termin_reservation___id[condition]=> termin_reservation___von[value]=2018-01-01 termin_reservation___von[condition]=<}

is working fine on my site (on save < and > are converted to &lt; etc. but this is still working)
Fabrik debug is showing
...WHERE ( `termin_reservation`.`id` > 101 AND `termin_reservation`.`von` < '2018-01-01' )

Are you running a recent GitHub version?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top