Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2013-02-04 06:12:52

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,376
Website GitHub Mastodon Twitter

Re: [SOLVED] Plugin which counts days

etc wrote:

Why wouldn’t you put these dates in cf, and then call…

Hi Oleg, the plugin’s tag is <txp:glx_countdown month="2" year="2013" day="4" delimiter=" " titletxt="passed" usetitle="false">passed</txp:glx_countdown> so it makes difficult to separate the dates.

I guess it is one of those rear txp walls so the only way is to edit the glx plugin so as to output last day when $now - $when ≤ 1 but I just can’t figure out how to do it.

Last edited by colak (2013-02-04 06:27:21)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#32 2013-02-04 09:50:59

etc
Developer
Registered: 2010-11-11
Posts: 5,675
Website GitHub

Re: [SOLVED] Plugin which counts days

Yiannis, try to replace

        $output = ($count == 1) ? "1 ".$name : "$count {$nameMulti}";

by

        $output = $count ? ($count == 1 ? "1 ".$name : "$count {$nameMulti}") : "last ".$name;

Offline

#33 2013-02-04 10:29:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,376
Website GitHub Mastodon Twitter

Re: [SOLVED] Plugin which counts days

Thanks so much Oleg. That did it. I tested it and all is working just fine.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB