Normally a countdown groups the units of time (weeks, days, hours, minutes and seconds) into a single countdown unit. But what if you wanted to break out these units and have them displayed on different parts of the page?
Step One. We will need to add a new attribute that tells the countdown NOT to display any of the digits. This way all the countdown scripts and details are still loaded, but the countdown is not displayed. Something like:
Step Two. A new shortcode will need to be created for displaying the time unit. We will need to know the countdown id (cid) the time unit to be displayed, and the style to be used, if other than the default style set up on the plugin settings. If a custom style is used it must be defined in both the countdown and the units like so:
As of version 1.2.6 we have introduced a new shortcode to print-pro-matic, just for printing PDFs.Note: the ability to print pdf files from javascript is currently not supported in FireFox. Therefore the PDF will open in a new tab and the user can print from there.
This will produce a simple button that will print the pdf:
The optional attirbutes for the print-pdf shortcode are as follows: id
The ID attribute will assign a custom ID to the button. If no ID is assigned a random id will be assigned.
title
The title attribute will assign the text of the print button. If no title is assigned, the button will have the tex of: ‘Print PDF’
class
The class attribute will assign the button a custom class.
tag
The tag attribute will change the trigger element from the default button to, say a div. For example:
[print-pdf pdf_url="url_to_pdf" tag="div"/]
img_url
The img_url attribute is used to define the image URL to use as a trigger. Using a trigger image will override standard print trigger, replacing it with the chosen image.
[print-pdf img_url="url_to_trigger_image"/]
width
Use the width attribute along with the img_url to define the image width.
height
Use the height attribute along with the img_url to define the image height.
alt
Use the alt attribute along with the img_url to define the image alt value.
redirect_url
Full url to redirect the user to after either a) the print dialogue closes or b) the pdf is loaded into a new tab (depending on which browser is being used)
Using the new %this year% and %this_easter% placeholders introduced with T(-) Countdown Control version 1.8.0, it’s easy to calculate holidays such as labor day like so:
Launch Strtotime: september %this_year% first monday
As of version 1.8.2, using these shortcodes will automatically recalculate for next year’s date after the holiday has past. Holidays should be set as recurring ‘Yearly’ and they will automatically be rescheduled for next year.
Other Holidays can be calculated in the same manner:
New Years: first day of january %this_year%
Martin Luther King, Jr. Day: january %this_year% third monday
President’s Day: february %this_year% third monday
Easter: %this_easter%
Ascension Day: %this_easter% + 40 days
Pentecost: %this_easter% + 50 days
Memorial Day: last monday of may
Independence Day: july 4 %this_year%
Labor Day: september %this_year% first monday
Columbus Day: october %this_year% second monday
Veteran’s Day: november 11 %this_year%
Thanksgiving Day: november %this_year% fourth thursday
Christmas Day: december 25 %this_year%
Tests
Ascension Day
Years
0
0
Months
0
3
Weeks
0
3
Days
0
0
Hours
0
1
Minutes
3
1
Seconds
5
6
Eight Days before Thanksgiving
november %this_year% fourth thursday + 14 hours 30 minutes – 8 days
There are times when it would be nice to turn ANY element into an external print trigger. This is a feature often asked for when trying to hook up a Visual Editor button to be a print trigger. As of Print-Pro-Matic v 1.1.4e we have added:
new printme_trigger class that turns anything into a print trigger
new external_trigger shortcode element to enter the id or ids of the element(s) that should be used as an external trigger
And this is how it works:
First we need an element that has a unique id. There must also be the ability to add the printme_trigger class to it.
And that’s it! Note: The external_trigger attribute can accept a comma separated list of multiple id’s. Also: When an external_trigger attribute is assigned, no standard print-pro-matic icon or text will be displayed, as the external trigger will be used instead.
There are times when it would be nice to turn ANY element into an external trigger for a collapse element. So as of Collapse-Pro-Matic v 1.2.9f we have added:
new colomat_trigger class that turns anything into a trigger
new external_trigger shortcode element to enter the ids of the elements that should be used as an external trigger
new data-external-element attribute that can be used for roll-your-own collapse elements
new colomat_expand_only class that prevents the external trigger from collapsing the target, only expand
new colomat_collapse_only class that prevents the external trigger from expanding the target, only collapse
And this is how it works:
take any element, make sure it has a unique id and the colomat_trigger class assigned.
Next, assign the ID of the external id (or multiple ids) using the external_trigger attribute:
[expand title="Who has the funk?" external_trigger="funkmaster flash"]You got the funk![/expand]
Who has the funk?
Glory be, baby, you got the funk!
Collapse-Pro-Matic Class Triggers
As of version 1.3.2 of Collapse-Pro-Matic an external trigger can also be assigned to any element using only class names. For example, using a WordPress menu element, where only the classes can be assigned. The following classes must be added to the trigger:
collapseomatic
noarrow
colomatclasstrigger
colomatid-[the_target_id]
[expand title="This is the Master Trigger" id="multi-trigger"]
This is the Master Trigger
This is some text that when you click on the trigger you are able to read with your eyes. Well, your eyes are able to see the text, but I guess it’s actually your brain that reads the words and makes sense of them. But jokes on you! There is no sense to be made from these words because they are just pure jibber-jabber.
Links
The following is a link that has an href attribute of “#multi-trigger” and a class of “expandanchor”. Clicking this will scroll-to and expand-only the element.
<a class="expandanchor" href="#multi-trigger">Anchor Link to Multi-Trigger%lt;/a>
Each button needs to correspond to a target. Normally to create the target it would be part of the trigger but we add the narrow and hidden classes using the trigclass attribute and remove the target padding using the targclass attribute like so:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OKPrivacy Policy