Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_countdown: time to an event
alivato wrote #285195:
How to delete <br>
Temporary workaround: look at the post above yours :-)
Longer term (i.e. hopefully today, maybe later than that) I’m going to remove reliance on the core’s pesky doLabel() and write my own version in this plugin without the forced break.
Longer, longer term I might finally get round to fixing or improving the core’s doLabel which has been on the ToDo list since 2009…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_countdown: time to an event
alivato wrote #285195:
How to delete <br>
<txp:smd_countdown to="31 Dec 2014 23:59:59">...
You could use rah_replace (untested):
<txp:rah_replace from="<br>" to="">
<txp:smd_countdown to="31 Dec 2014 23:59:59">
<txp:else />
<txp:smd_time_info display="day"
labelafter="1" labelspacer=" "
label="d." show_zeros="0" />
<txp:smd_time_info display="hour"
labelafter="1" labelspacer=" "
label="h." show_zeros="0" />
<txp:smd_time_info display="minute"
labelafter="1" labelspacer=" "
label="m." show_zeros="0" />
</txp:smd_countdown>
</txp:rah_replace>
Offline
Re: smd_countdown: time to an event
Posted some changes to my github development version which should fix the annoying rogue <br> tag.
Note it’s a backwards-incompatible change, as there is no tag added at all now, so if you want to retain the old behaviour you’ll need to add labeltag="br" to your <txp:smd_time_info> tags.
There might be a better way to do this, hence I’ve not release v0.20 yet. But please report on the success or otherwise of the next version. To test it, either use Plugin Composer to upload the entire .php file from Github, or copy and paste the code block between # --- BEGIN PLUGIN CODE --- and # --- END PLUGIN CODE --- markers over the existing plugin code from the Admin->Plugins panel.
Ideas welcome on improvements or ways to retain backwards compatibility.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#34 2014-11-05 09:25:32
- vcokl
- New Member
- Registered: 2014-11-05
- Posts: 1
Re: smd_countdown: time to an event
And if the opportunity to make an active timer? Without refresh
Offline
Re: smd_countdown: time to an event
vcokl wrote #285467:
And if the opportunity to make an active timer? Without refresh
Sure, just use any of the freely available jQuery countdown timers and seed its start value from this plugin on page load.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_countdown: time to an event
Maintenance release has been published that just registers the public tags to avoid the testing/debug warnings, and for forthcoming Txp 4.8.0 compatibility.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline