2013-05-14, 16:15:55
It depends on the purpose of the checkbox's use. Are you using it to have an option for displaying page content (like the Add this page to the menu checkbox)? If so...
Create the special field from the FIELDS tab of Plugins -> Configure I18N Special Pages with your default value in mind (i.e 'on' or simply leave it blank).
To make the checkbox affect how (or what) content is displayed, use its value in a conditional on the VIEW tab. For example, to display a different message depending on whether it is checked, the below would suffice:
You could for instance use it to display custom messages about the page's configurations, or simply enable/disable features. Using it with the external comments plugin, you can make the checkbox enable/disable the comments box like so:
Create the special field from the FIELDS tab of Plugins -> Configure I18N Special Pages with your default value in mind (i.e 'on' or simply leave it blank).
To make the checkbox affect how (or what) content is displayed, use its value in a conditional on the VIEW tab. For example, to display a different message depending on whether it is checked, the below would suffice:
Code:
<?php if(return_special_field('fieldname')=='on') { ?>
Checked
<?php } else { ?>
Not checked
<?php } ?>
You could for instance use it to display custom messages about the page's configurations, or simply enable/disable features. Using it with the external comments plugin, you can make the checkbox enable/disable the comments box like so:
Code:
<?php if(return_special_field('fieldname')=='on') { ?>
<div class="comments"><?php get_external_comments($id, $url, $title); ?></div>
<?php } else { ?>
<div class="comments">Comments box disabled</div>
<?php } ?>