コード例 #1
0
ファイル: start.php プロジェクト: socialweb/PiGo
function izap_bridge_init()
{
    global $CONFIG;
    //including venders directory in default include paths.
    set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/vendors/');
    // initializes the bridge plugin
    izap_plugin_init(GLOBAL_IZAP_ELGG_BRIDGE);
    //registering tab view javascript
    elgg_register_js('jquery.md5', 'mod/izap-elgg-bridge/vendors/tabs_view.js');
    //load library for the bridge(using bridge)
    IzapBase::loadLib(array('plugin' => GLOBAL_IZAP_ELGG_BRIDGE, 'lib' => 'init'));
    // over-ride "admin" pagehandler
    elgg_register_page_handler('admin', GLOBAL_IZAP_PAGEHANDLER);
    // register some basic hooks
    elgg_register_plugin_hook_handler('register', 'user', 'izap_registration_sniffer');
    elgg_register_event_handler('login', 'user', 'izap_login_sniffer');
    elgg_register_event_handler('create', 'all', 'izap_entity_creation_sniffer');
    elgg_register_event_handler('update', 'all', 'izap_entity_updation_sniffer');
    elgg_register_event_handler('delete', 'all', 'izap_entity_deletion_sniffer');
    elgg_register_event_handler('ready', 'system', 'system_ready_hook');
    elgg_register_plugin_hook_handler('config', 'htmlawed', 'izap_htmlawed_hook');
    // set pages for the admin
    elgg_register_admin_menu_item('administer', 'marked-spammers', 'users');
    // @todo: merge to izap menu
    elgg_register_admin_menu_item('administer', 'suspected-spammers', 'users');
    // @todo: merge to izap menu
    /**
     * common horizontal control menu hook registration for all plugins dependent
     * on izap-elgg-bridge
     */
    elgg_register_plugin_hook_handler('register', 'menu:entity', 'izap_entity_menu_setup');
    elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'izap_mark_spammer');
    elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'izap_unmark_spammer');
    elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'izap_suspected_spammer');
    elgg_extend_view('page/elements/footer', GLOBAL_IZAP_ELGG_BRIDGE . '/our_link');
    if (elgg_is_admin_logged_in()) {
        if (IzapBase::pluginSetting(array('name' => 'izap_api_key', 'plugin' => GLOBAL_IZAP_ELGG_BRIDGE)) == '') {
            elgg_add_admin_notice('api_key', elgg_echo('izap-bridge:add_api'));
        }
    }
    $global_currency = IzapBase::pluginSetting(array('name' => 'izap_site_currency', 'plugin' => GLOBAL_IZAP_ELGG_BRIDGE));
    if ($global_currency == '') {
        $CONFIG->site_currency_name = 'USD';
        $CONFIG->SITE_CURRENCY_SIGN = '$';
    } else {
        $site_currency = explode(':', $global_currency);
        $CONFIG->site_currency_name = $site_currency[0];
        $CONFIG->site_currency_sign = $site_currency[1];
    }
    // regiter antispam with elgg
    elgg_register_ajax_view('/js/antispam/userstats');
}
コード例 #2
0
 public function actionCshop()
 {
     IzapBase::loadLib(array('plugin' => GLOBAL_IZAP_ELGG_BRIDGE, 'lib' => 'cshop'));
     switch ($this->_page[1]) {
         case 'orders':
             break;
         case 'order':
             break;
         case 'cart':
             break;
         case 'products':
         default:
             $contents = cshop_list_products();
             break;
     }
     $this->page_elements['content'] = $contents;
     $this->drawPage();
     return;
 }
コード例 #3
0
ファイル: new_edit.php プロジェクト: socialweb/PiGo
<?php

/* * ***********************************************
 * PluginLotto.com                                 *
 * Copyrights (c) 2005-2011. iZAP                  *
 * All rights reserved                             *
 * *************************************************
 * @author iZAP Team "<*****@*****.**>"
 * @link http://www.izap.in/
 * Under this agreement, No one has rights to sell this script further.
 * For more information. Contact "Tarun Jangra<*****@*****.**>"
 * For discussion about corresponding plugins, visit http://www.pluginlotto.com/forum/
 * Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
 */
// this is the form for adding/editing a new challenge
IzapBase::loadLib(array('plugin' => GLOBAL_IZAP_CONTEST_PLUGIN, 'lib' => 'izap-contest'));
$challenge_entity = izap_array_to_object(isset($vars['challenge_entity']) ? $vars['challenge_entity'] : array('access_id' => defined('ACCESS_DEFAULT') ? ACCESS_DEFAULT : 1));
?>

<div>
  <form action="<?php 
echo IzapBase::getFormAction('challenge_save', GLOBAL_IZAP_CONTEST_PLUGIN);
?>
" method="post" enctype="multipart/form-data">
    <?php 
echo elgg_view('input/securitytoken');
?>
    <p>
      <label>
        <?php 
echo elgg_echo('izap-contest:title');