Skip to content

Instantly share code, notes, and snippets.

@Pop-Code
Pop-Code / init.rb
Created March 27, 2012 13:52 — forked from lintaonz/init.rb
Redmine Wiki Extension that allows placement of raw HTML, CSS or JS into your wiki. Useful for Web UI Demos.
#
# vendor/plugins/redmine_wiki_html_util/init.rb
#
require 'redmine'
require 'open-uri'
Redmine::Plugin.register :redmine_gist do
name 'Redmine Wiki HTML Util'
author 'Arlo Carreon'
author_url 'http://www.arlocarreon.com/'
@Pop-Code
Pop-Code / gist:3724003
Created September 14, 2012 19:04
Fields login button
<?php
/**
*
* @author alexhermann
*
*/
$fields['login_button'] = array(
'title_config' => array(
'type'=>'html',
@Pop-Code
Pop-Code / comments.php
Created September 27, 2012 22:14
Facebook AWD Comments shortcodes
<?php
echo do_shortcode('[ AWD_comments option="value" otheroption="othervalue" ]');
?>
@Pop-Code
Pop-Code / likebox.php
Created September 27, 2012 22:24
Facebook AWD like Box shortcodes
<?php
echo do_shortcode('[AWD_likebox option="value" otheroption="othervalue" ]');
?>
@Pop-Code
Pop-Code / likebutton.php
Created September 27, 2012 22:28
Facebook AWD like Button shortcodes
<?php
echo do_shortcode('[AWD_likebutton option="value" otheroption="othervalue"]');
?>
@Pop-Code
Pop-Code / functions.php
Last active October 11, 2015 03:37
Get Facebook API in Facebook AWD
<?php
/**
* Helper to access Facebook AWD api object
* Return a AWD_facebook_api object that extends the Facebook API.
*/
function getFacebookApi(){
global $AWD_facebook;
if(is_object($AWD_facebook->fcbk)){
return $AWD_facebook->fcbk;
}
@Pop-Code
Pop-Code / gist:3797044
Created September 27, 2012 23:20
Get Current Facebook User data
global $AWD_facebook;
//check if a user is connected with facebook
if($AWD_facebook->is_user_logged_in_facebook()){
//get the data of the current user.
$fb_me = $AWD_facebook->me;
//Debug the user Data.
var_dump($fb_me);
}
@Pop-Code
Pop-Code / gist:3797062
Last active October 11, 2015 03:38
Get Facebook user data from WP_User ID
<?php
$user_id = 1; //the ID of your choice
$user_data_me = get_user_meta($user_id, 'fb_user_infos', true);
$user_data_mail = get_user_meta($user_id, 'fb_email', true);
$user_data_fb_uid = get_user_meta($user_id, 'fb_uid', true);
?>
@Pop-Code
Pop-Code / action.php
Created September 27, 2012 23:49
Facebook AWD opengraph Actions shortcodes
<?php
echo do_shortcode('[AWD_facebook_opengraph_actions option="value" otheroption="othervalue"]Content Here[/AWD_facebook_opengraph_actions]');
?>
@Pop-Code
Pop-Code / comments.php
Created September 29, 2012 17:33
Facebook AWD comments template
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die (esc_html__('Please do not load this page directly. Thanks!','Polished'));
if ( post_password_required() ) { ?>
<p class="nocomments"><?php esc_html_e('This post is password protected. Enter the password to view comments.','Polished') ?></p>
<?php
return;