Skip to content

Instantly share code, notes, and snippets.

View ysanmiguel's full-sized avatar

ysanmiguel.com ysanmiguel

View GitHub Profile
@nick2687
nick2687 / getPageFeed.php
Last active April 10, 2018 17:07
Simple modx snippet that will pull facebook page feed data and display it using a chunk
<?php
// Facebook App id & secret
$fb_app_id = isset($fb_app_id) ? $fb_app_id : NULL;
$fb_app_secret = isset($fb_app_secret) ? $fb_app_secret : NULL;
$access_token = $fb_app_id . '|' . $fb_app_secret;
// Other options
$page_id = isset($page_id) ? $page_id : NULL ;
$chunk = isset($chunk) ? $chunk : 'getPageFeedTpl' ;
@sottwell
sottwell / hex2rgba.php
Last active July 20, 2017 11:11
Hex2Rgbp Custom Output Modifier Snippet
<?php
# hex2rgba
# converts hex value from ColorPicker TV to rgba value
# NOTE that the ColorPicker TV must use the default output option
# based on function from http://mekshq.com/how-to-convert-hexadecimal-color-code-to-rgb-or-rgba-using-php/
if (!function_exists('hex2rgba')) {
function hex2rgba($color, $opacity = false) {
$default = 'rgb(0,0,0)';