Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [SOLVED] Plugin which counts days
Yiannis, why not to move glx
tag to variable
?
<txp:variable name="lastday" value='<txp:glx_ ... />' />
<txp:if_variable name="lastday" value='<span title="deadline">0 days</span>'>
<span title="deadline">last day</span>
<txp:else />
<txp:variable name="lastday" />
</txp:if_variable>
Offline
Re: [SOLVED] Plugin which counts days
Hi Oleg, the glx tag is in the cf as each entry has a different deadline/closing date/etc.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Plugin which counts days
Why wouldn’t you put these dates in cf, an then call
<txp:variable name="lastday" value='<txp:glx_countdown ... to_or_whatever=''<txp:custom_field name="custom3" />'' />' />
Offline
#28 2013-02-03 18:18:12
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [SOLVED] Plugin which counts days
Thanks, Oleg, the listing made it clear … umm, the post from 18:11:25.
(Unfortunately we don’t have posting numeration any longer).
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [SOLVED] Plugin which counts days
Uli, my loose English certainly accounts for 50% of your ears temperature. :) But what can I do – English has evolved since my last lessons.
Offline
#30 2013-02-03 22:06:46
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [SOLVED] Plugin which counts days
Please don’t worry one iota about your English, Oleg! And my brain temperature (especially that of its left hemisphere) quickly went down again due to your excellent explanations :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
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
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
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