Пример #1
0
<?php

/**
 * @package Gsocial module for Joomla! 2.5
 * @version $Id: mod_gsocial.php 2012-21-05 11:00:00Z  $
 * @author Glimlag.gr
 * @copyright (C) 2012- Glimlag.gr
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
**/
// no direct access
defined("_JEXEC") or die;
require_once dirname(__FILE__) . '/helpers/helper.php';
modgsocialHelper::ajaxsocialize();
$cur_url = modgsocialHelper::getUrl();
require JModuleHelper::getLayoutPath('mod_gsocial', $params->get('layout', 'default'));
Пример #2
0
 function ajaxsocialize()
 {
     $social_network = JRequest::getVar('social_network');
     $social_networks = array('facebook', 'twitter', 'google_plus');
     if (!in_array($social_network, $social_networks)) {
         return;
     }
     $ret = modgsocialHelper::gsocial($social_network);
     $ret['message_type'] = isset($ret['message_type']) ? $ret['message_type'] : 'message';
     $json['message'] = $message;
     $json['message_type'] = $ret['message_type'];
     $json = modgsocialHelper::json_encode($json);
     jexit();
 }