Close

Technical Guides

A collection of technical guides, walkthroughs and tutorials targeted at Pacific Problems

Formidable Forms: Set Entry Key as UUID

The following code snippet sets the entry key as a UUID in Formidable Forms /* Change Entry Key to UUIDv4 */ add_filter(‘frm_validate_entry’, ‘change_entry_key’, 20, 2); function change_entry_key($errors, $values){ if(($_POST[‘frm_action’] == ‘create’)){ $_POST[‘item_key’] = guidv4(); } return $errors; } /* Generate a version 4 UUID clarification: a v4 UUID is in the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where any […]

Read More

Machform: Create a Plugin

In this tutorial we will show you how to create a Machform plugin using some JS/JQuery code to modify the applications behaviour. To do this you will need to have completed our first tutorial. Complete that before proceeding. In this tutorial we are going to create a simple plugin that adds additional menus items to […]

Read More

Digital Ocean: Allow Remote Access to MySQL database

We were initially having trouble connecting remotely to digital oceans WordPress MySQL database so we’ve decided to put this together to document the process for anyone else who might have trouble. Notes: -> Anything looking like [THIS] replace with your own variables -> To get the password for the database Use cat /root/.digitalocean_password Create a […]

Read More

TurnkeyLinux LAMP enable HTTPS with Lets Encrypt

Here’s a quick guide to getting Lets Encrypt Install and Enabled on TurnkeyLinux LAMP 14.1 so you can connect securely update pip apt-get remove python-pip wget https://bootstrap.pypa.io/get-pip.py python get-pip.py pip install python2-pythondialog add backports to Jessie echo ‘deb http://http.debian.net/debian jessie-backports main’ > /etc/apt/sources.list.d/jessie-backports.list apt-get update install lets encrypt apt-get install python-certbot-apache -t jessie-backports certbot –apache […]

Read More

Install Viviki on Turnkeylinux

To use all the features of Viviki you’ll need to install the following on a TurnkeyLinux LAMP server: GD Graphics Library – for dynamically manipulating images. Turnkeylinux/Debian comes with a package called php5-gd. Just type the following command to install this module: CURL – for sending RESTful communication and for composer Data Folder Permissions – Change […]

Read More

Validate International Radio Call Sign (IRCS) using PHP

A PHP function to validate IRCS numbers from Original Source Code answers. See below.

  function validate_callsign($callsign){ $pattern = ‘/^(\d?[a-z]{1,3}|[a-z]\d[a-z]?)\d[a-z]{1,3}$/’; if(preg_match(“/”.$regex.”/i”,$callsign) ){ return true; } }

Original Source Code: 

Authors: micah1701, obsidian Date: 04 February 2008 – 09:31 PM URL: http://forums.phpfreaks.com/topic/89437-solved-is-this-the-best-way-to-do-it/&safe=active&ssui=on  

Read More