Skip to content

Instantly share code, notes, and snippets.

Avatar

Roland Barker xnau

View GitHub Profile
@xnau
xnau / pdb-record-edit-log.php
Last active Mar 13, 2022
Shows how to add an email template tag that shows all the changes made on a Participants Database record update.
View pdb-record-edit-log.php
<?php
/**
* Plugin Name: PDB Record Edit Log Tag
* Description: provides a custom email tag that shows which fields were updated
* Version: 1.0
*
*/
class PDb_Record_Edit_Log_Tag {
@xnau
xnau / pdb-custom-summary-tag.php
Created Feb 26, 2022
Sows how to add a custom summary tag to a Participants Database log
View pdb-custom-summary-tag.php
<?php
/**
* Plugin Name: PDB Custom Summary Tag
* Description: provides a custom tag to the "cars" log
*/
add_filter( 'pdblog-summary_tags', 'xnau_add_custom_summary_tag', 10, 2 );
/**
* adds a custom summary tag to the "cars" log
@xnau
xnau / pdb-admin-show-heading.php
Created Feb 14, 2022
Shows how to enable showing heading fields in the Participants Database admin edit participant page
View pdb-admin-show-heading.php
<?php
/**
* Plugin Name: PDB Show Heading Fields in Admin
* Description: enabled showing the heading type field on the admin edit participant page
*/
add_filter( 'pdb-omit_backend_edit_form_element_type', 'xnau_enable_heading_field_display' );
/**
* remove the heading field from the backend omit types array
@xnau
xnau / pdb-custom-calc-field.php
Last active Feb 28, 2022
Shows how to set up a custom calculation for a Participants Database calculated field
View pdb-custom-calc-field.php
<?php
/**
* Plugin Name: PDB Custom Calculated Field
* Description: demonstrates how to implement a custom calculation for a calculated field
*/
add_filter( 'pdb-calculated_field_calc_value', 'pdb_calculate_value', 10, 3 );
/**
@xnau
xnau / pdb-list-multisearch-edit-link.php
Created Jan 13, 2022
Shows how to combine the edit link template with a multisearch template for the Participants Database Combo Multisearch Plugin
View pdb-list-multisearch-edit-link.php
@xnau
xnau / pdb-custom-dynamic-field.php
Created Sep 22, 2021
Demonstrates how to implement a Participants Database custom dynamic hidden field that gets its value from the shortcode
View pdb-custom-dynamic-field.php
<?php
/**
* Plugin Name: PDB Custom Dynamic Field
* Description: demonstrates how to place a value from the shortcode into a dynamic hidden field
*/
class PDb_Custom_Dynamic_Field {
/**
@xnau
xnau / pdb-single-edit-button.php
Created Sep 16, 2021
Shows how to add a PArticipants Database record edit button to the single record template
View pdb-single-edit-button.php
<?php
/**
* @name pdb single template
* @version 1.0
*
* default template for displaying a single record with a record edit button
*
*/
if ( $this->participant_id > 0 ) :
@xnau
xnau / pdb-export-image-paths.php
Created Jul 12, 2021
Shows how to include the absolute URI for image files in a Participants Database CSV export
View pdb-export-image-paths.php
<?php
/**
* Plugin Name: PDB Export Absolute Image Paths
* Description: Shows how to include the absolute path to image files in a CSV export
*
*/
class PDb_Image_Paths_Export {
/**
@xnau
xnau / pdb_alternate_id_field.php
Created Jun 22, 2021
Shows how to set up an alternate record ID scheme in Participants Database
View pdb_alternate_id_field.php
<?php
/*
* Plugin Name: Participants Database Alternate ID Field
* Version: 0.1
* Description: allows the use of a custom field for the general ID that is used to show a record
* Author: xnau webdesign
*/
class PDb_alternate_id_field {
/**
@xnau
xnau / pdb-custom_summary.php
Last active May 20, 2021
Demonstrates how to show a custom summary value for a Participants Database Participant Log
View pdb-custom_summary.php
<?php
/**
* Plugin Name: PDB Custom Summary
* Description: provides a customized sum value for the "Work Log" log
* Version: 1.0
*
*/
class pdb_work_log_summary {