Skip to content

Instantly share code, notes, and snippets.

View ano's full-sized avatar
🏠
Working from home

Anonga Tisam ano

🏠
Working from home
View GitHub Profile
@ano
ano / functions.php
Created June 28, 2016 00:54
Google Single Sign On into Machform with Wordpress
/**
* CUSTOM_CODE Machform Integration code.
*
* @since Twenty Fifteen 1.0
*/
add_action('init', 'machformGetUser', 1);
add_action('wp_logout', 'machformEndSession');
add_action('wp_login', 'machformStartSession', 10, 2);
function machformGetUser() {
@ano
ano / formidable-pro-uuid.php
Last active July 4, 2017 05:54
Formidable Forms: Set Entry Key as UUID
<?php
/*
Plugin Name: Formidable Forms UUID
Plugin URI: https://gist.github.com/ano/95f19663a9cf8126eca2009c970d7c24
Description: Creates entry keys as UUIDv4 unique identifiers on form save.
Version: 1.0.0
Author: Ano Tisam
Author URI: https://www.linkedin.com/in/ano-tisam-19b50614/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ano
ano / meta_data.sql
Created September 7, 2017 22:31
PHPMaker - MySQL: Metadata fields
/*
* Common meta data fields for Machform
*/
ALTER TABLE `table_name`
ADD `user_id` int(11) DEFAULT NULL,
ADD `user_level_id` int(11) DEFAULT NULL,
ADD `user_group_id` int(11) DEFAULT NULL,
ADD `ipaddress` varchar(255) COLLATE utf8_bin DEFAULT NULL,
ADD `date_published` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
ADD `date_updated` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP;
@ano
ano / dashboard.php
Created September 26, 2017 16:52
Empty Machform template for adding custom pages
<?php
/********************************************************************************
MachForm
Copyright 2007-2016 Appnitro Software. This code cannot be redistributed without
permission from http://www.appnitro.com/
More info at: http://www.appnitro.com/
********************************************************************************/
require('includes/init.php');
@ano
ano / index.php
Created November 28, 2017 05:28
Viviki: QR Code + Logo Generator that accepts a form_id and entry_id parameter and creates a QRCode Link from that.
<?php
/**
* QR Code + Logo Generator
*
* Description: Accepts a form_id and entry_id parameter and creates a QRCode Link from that.
* Author: Ano Tisam
* Email: an0tis@gmail.com
* Orginal: https://gist.github.com/NTICompass/1283249
*/
@ano
ano / gist:e27f382369d2655fdc9e8d75fcab1665
Last active March 10, 2018 09:16
TurnkeyHub Update HTTPS LetsEncrypt manually
# install certbot, ONLY if not installed
apt-get update
apt-get install python-certbot-apache -t jessie-backports
# Run Update Manually on the Command Line
certbot renew
@ano
ano / userfn14.php
Last active May 5, 2018 05:53
Check if the Machform user is logged in AND that they have administrator permissions. If so, allow access to the PHPMaker application.
<?php
// Page Loading event
function Page_Loading() {
//echo "Page Loading";
}
/*
CUSTOM_CODE
-----------
Author: Ano Tisam
@ano
ano / ewcfg14.php
Last active August 3, 2018 05:28
Set PHPMaker config file to Machforms config file
<?php
/**
* MACHFORM INTEGRATION
*/
define("MACHFORM_BASE", "../../");
require_once(MACHFORM_BASE . "config.php");
//Find and Replace the $EW_CONN["DB"] variable with this
$EW_CONN["DB"] = array("conn" => NULL, "id" => "DB", "type" => "MYSQL", "host" => MF_DB_HOST, "port" => 3306, "user" => MF_DB_USER, "pass" => MF_DB_PASSWORD, "db" => MF_DB_NAME, "qs" => "`", "qe" => "`");
@ano
ano / ap_custom_link.sql
Last active May 5, 2018 05:50
A custom database table that can be added to the Machform database to enable 1 to many relationships between lookup fields (dropdown, checkboxes, radio)
@ano
ano / sync.lib.php
Created May 5, 2018 05:39
A PHP Library of functions to enable one to many relationships between forms in Machform
<?php
/*
CUSTOM_CODE
-----------
Author: Ano Tisam
Date: 09/03/2015
Description: PHP Library of functions to enable 1:M database relational database features in Machform Form Builder.
*/