Exemplo n.º 1
0
 function xpwiki_plugin_amazon(&$func)
 {
     parent::xpwiki_plugin($func);
     // Amazon associate ID
     if (!$this->root->amazon_AssociateTag) {
         include_once XOOPS_TRUST_PATH . '/class/hyp_common/hsamazon/hyp_simple_amazon.php';
         $ama = new HypSimpleAmazon();
         $this->root->amazon_AssociateTag = $ama->AssociateTag;
         $ama = NULL;
     }
     $this->config['PLUGIN_AMAZON_AID'] = $this->root->amazon_AssociateTag;
     // Expire caches per ? days
     $this->config['PLUGIN_AMAZON_EXPIRE_IMAGECACHE'] = 1;
     $this->config['PLUGIN_AMAZON_EXPIRE_TITLECACHE'] = 10;
     // Alternative image for 'Image not found'
     $this->config['PLUGIN_AMAZON_NO_IMAGE'] = $this->cont['IMAGE_DIR'] . 'noimage.png';
     // For confirm (admin only)
     $this->config['conflink'] = $this->root->userinfo['admin'] ? ' ( <a href="' . $this->cont['HOME_URL'] . '?cmd=conf#amazon_AssociateTag" target="_blank">confirm with this link</a> )' : '';
     // URI prefixes
     switch ($this->cont['LANG']) {
         case 'ja':
             // Amazon shop
             $this->config['PLUGIN_AMAZON_SHOP_URI'] = 'http://www.amazon.co.jp/exec/obidos/ASIN/';
             break;
         default:
             // Amazon shop
             $this->config['PLUGIN_AMAZON_SHOP_URI'] = 'http://www.amazon.com/exec/obidos/ASIN/';
             break;
     }
 }
Exemplo n.º 2
0
 function xpwiki_plugin_aws(&$func)
 {
     parent::xpwiki_plugin($func);
     // Amazon associate ID
     if (!$this->root->amazon_AssociateTag) {
         include_once XOOPS_TRUST_PATH . '/class/hyp_common/hsamazon/hyp_simple_amazon.php';
         $ama = new HypSimpleAmazon();
         $this->root->amazon_AssociateTag = $ama->AssociateTag;
         $ama = NULL;
     }
 }
Exemplo n.º 3
0
 function xpwiki_plugin_isbn(&$func)
 {
     parent::xpwiki_plugin($func);
     // Amazon associate ID
     if (!$this->root->amazon_AssociateTag) {
         include_once XOOPS_TRUST_PATH . '/class/hyp_common/hsamazon/hyp_simple_amazon.php';
         $ama = new HypSimpleAmazon();
         $this->root->amazon_AssociateTag = $ama->AssociateTag;
         $ama = NULL;
     }
     $this->config['AMAZON_ASE_ID'] = $this->root->amazon_AssociateTag;
     // For confirm (admin only)
     $this->config['conflink'] = $this->root->userinfo['admin'] ? ' ( <a href="' . $this->cont['HOME_URL'] . '?cmd=conf#amazon_AssociateTag" target="_blank">confirm with this link</a> )' : '';
 }
Exemplo n.º 4
0
 function xpwiki_plugin_skype($func)
 {
     parent::xpwiki_plugin($func);
     $func->add_js_head('http://download.skype.com/share/skypebuttons/js/skypeCheck.js');
 }
Exemplo n.º 5
0
 function fetch_options(&$params, $args, &$lvar)
 {
     // 残りの引数の処理
     parent::fetch_options($params, $args);
     // 拡張パラメーターの処理
     $this->check_arg_ex($params, $lvar);
     //アラインメント判定
     if ($params['right']) {
         $params['_align'] = 'right';
     } else {
         if ($params['left']) {
             $params['_align'] = 'left';
         } else {
             if ($params['center']) {
                 $params['_align'] = 'center';
             }
         }
     }
 }
Exemplo n.º 6
0
 function xpwiki_plugin_pcomment(&$xpwiki)
 {
     parent::xpwiki_plugin($xpwiki);
     $this->conf['options_default'] = array('noname' => FALSE, 'nodate' => FALSE, 'below' => FALSE, 'above' => FALSE, 'reply' => FALSE, 'template' => '', 'cols' => '', 'multi' => FALSE, 'emoji' => TRUE, 'noemoji' => FALSE, 'twitter' => FALSE, '_args' => array());
 }
Exemplo n.º 7
0
 function fetch_options(&$params, $args, $keys = array(), $other_key = '_args', $sep = '(?:=|:)')
 {
     // 残りの引数の処理
     parent::fetch_options($params, $args);
     // 拡張パラメーターの処理
     $this->check_arg_ex($params);
     //アラインメント判定
     if ($params['right']) {
         $params['_align'] = 'right';
     } else {
         if ($params['left']) {
             $params['_align'] = 'left';
         } else {
             if ($params['center']) {
                 $params['_align'] = 'center';
             }
         }
     }
 }
Exemplo n.º 8
0
 function plugin_calendar2(&$func)
 {
     parent::xpwiki_plugin($func);
     $this->conf['options'] = array('class' => 'button');
 }