Esempio n. 1
0
<?php

/*
 * e107 website system
 *
 * Copyright (C) 2008-2013 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 * Online shortcodes
 *
*/
if (!defined('e107_INIT')) {
    exit;
}
register_shortcode('online_shortcodes', true);
initShortcodeClass('online_shortcodes');
class online_shortcodes
{
    protected $e107;
    public $memberInfo = array();
    // Site stats
    public $currentMember = array('oid' => '0', 'oname' => '??', 'page' => 'lost');
    public $currentUser = array();
    // Information about current user (for last seen)
    public $onlineMembersList = '';
    protected $gen;
    public function __construct()
    {
        $this->e107 = e107::getInstance();
        $this->memberInfo = e107::getConfig('history');
    if ($screen === 'post.php' || $screen === 'post-new.php') {
        wp_enqueue_script('google-maps-api', 'https://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=places');
        wp_enqueue_script('map-view-registration', plugins_url('back.js', __FILE__), array('mce-view'), false, true);
    }
}
function google_map_block_print_media_templates()
{
    ?>
	<script type="text/html" id="tmpl-google-maps-edit">
		<form>
			<input type="hidden" name="latitude" value="">
			<input type="hidden" name="longitude" value="">
			<input type="hidden" name="zoom" value="">
			<input type="hidden" name="height" value="">
			<input type="hidden" name="type" value="">
			<input type="text" name="address" value="" placeholder="Search..." style="line-height: 1.5;margin-right: 5px;">
			<label for="map-shortcode-marker"><input type="checkbox" id="map-shortcode-marker" name="marker" value="true"> Show marker</label>
		</form>
	</script>
	<?php 
}
function google_maps_block_callback($attributes, $content, $tag)
{
    $out = '<div class="map"';
    foreach ($attributes as $attribute => $value) {
        $out .= ' data-' . esc_html($attribute) . '="' . esc_attr($value) . '"';
    }
    return $out . '></div><style type="text/css">.map img { max-width: none; }</style>';
}
register_shortcode('map', array('callback' => 'google_maps_block_callback', 'content' => false, 'block' => true, 'attributes' => array('latitude' => array('title' => __('Latitude'), 'defaults' => '0'), 'longitude' => array('title' => __('Longitude'), 'defaults' => '0'), 'zoom' => array('title' => __('Zoom'), 'defaults' => '1'), 'marker' => array('title' => __('Marker'), 'defaults' => false), 'height' => array('title' => __('Height'), 'defaults' => '400px'), 'type' => array('title' => __('Type'), 'defaults' => 'roadmap')), 'scripts' => true));
Esempio n. 3
0
 * Copyright (C) 2008-2009 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 *
 *
 * $Source: /cvs_backup/e107_0.8/e107_plugins/download/download_shortcodes.php,v $
 * $Revision$
 * $Date$
 * $Author$
 */
if (!defined('e107_INIT')) {
    exit;
}
require_once e_HANDLER . 'shortcode_handler.php';
register_shortcode('download_shortcodes', true);
initShortcodeClass('download_shortcodes');
/**
 * download_shortcodes
 */
class download_shortcodes
{
    var $e107;
    var $postInfo;
    /**
     * download_shortcodes constructor
     */
    function download_shortcodes()
    {
        $this->e107 = e107::getInstance();
        $this->postInfo = array();
Esempio n. 4
0
 * $Id$
 */
/**
 *	e107 Private messenger plugin
 *
 *	@package	e107_plugins
 *	@subpackage	pm
 *	@version 	$Id$;
 */
// Note: all shortcodes now begin with 'PM', so some changes from previous versions
if (!defined('e107_INIT')) {
    exit;
}
include_lan(e_PLUGIN . 'pm/languages/' . e_LANGUAGE . '.php');
include_once e_PLUGIN . 'pm/pm_func.php';
register_shortcode('pm_handler_shortcodes', true);
initShortcodeClass('pm_handler_shortcodes');
/*
PM_FORM_TOUSER	- displays user entry box and selector
PM_FORM_TOCLASS - displays user class selector (when allowed)
PM_FORM_SUBJECT	- displays subject of current PM
PM_FORM_MESSAGE - displays message of current PM
PM_EMOTES
PM_POST_BUTTON
PM_PREVIEW_BUTTON
PM_ATTACHMENT
PM_ATTACHMENT_ICON
PM_ATTACHMENTS
PM_RECEIPT
PM_INBOX_TOTAL
PM_INBOX_UNREAD