本文整理汇总了PHP中registry::add_const方法的典型用法代码示例。如果您正苦于以下问题:PHP registry::add_const方法的具体用法?PHP registry::add_const怎么用?PHP registry::add_const使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类registry
的用法示例。
在下文中一共展示了registry::add_const方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_edit
return $this->roles[$id]['classes_r'];
}
public function get_edit($id)
{
return '<img src="' . $this->root_path . 'images/glyphs/edit.png" alt="' . $this->user->lang('edit_role') . '" title="' . $this->user->lang('edit_role') . '" onclick="editRole(\'' . $id . '\')"/>';
}
public function get_memberroles($classid, $addfirstrow = false)
{
$whatcanibe = $addfirstrow ? array(0 => '---') : array();
foreach ($this->roles as $rolearray) {
if (in_array($classid, $rolearray['classes'])) {
$whatcanibe[$rolearray['id']] = $this->roles[$rolearray['id']]['name'];
}
}
return $whatcanibe;
}
public function get_roleid2classid($list)
{
foreach (explode("|", $list) as $class_id) {
$output[$class_id] = $this->game->get_name('classes', $class_id);
}
$classnames = implode(", ", $output);
return $classnames ? $classnames : $list;
}
}
//end class
}
//end if class not exists
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_pdh_r_roles', pdh_r_roles::__shortcuts());
}
示例2: redirect
$me = $this->get_me();
$uid = $me['uid'];
$me = $me['me'];
redirect($this->fb->getLogoutUrl(), false, true);
}
return true;
}
/**
* Autologin
*
* @param $arrCookieData The Data ot the Session-Cookies
* @return bool
*/
public function autologin($arrCookieData)
{
if ($this->get_me()) {
$me = $this->get_me();
$uid = $me['uid'];
$me = $me['me'];
$userid = $this->pdh->get('user', 'userid_for_authaccount', array($uid));
if ($userid) {
$userdata = $this->pdh->get('user', 'data', array($userid));
return $userdata ? $userdata : false;
}
}
return false;
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_login_facebook', login_facebook::$shortcuts);
}
示例3: get_search
* Searches the shoutbox module for the search value
*
* @param string $search Value to search
*
* @returns array
*/
public function get_search($search)
{
// empty search results
$searchResults = array();
// loop through the data array and fill search results
if ($this->data && is_array($this->data)) {
$arrStatus = $this->user->lang('gr_status');
foreach ($this->data as $id => $data) {
$member = $data['username'];
$email = register('encrypt')->decrypt($data['email']);
$content = $data['content'];
if (strpos($member, $search) !== false || strpos($email, $search) !== false || strpos($content, $search) !== false) {
$searchResults[] = array('id' => $this->time->user_date($data['tstamp'], true), 'name' => $data['username'] . '; ' . $this->user->lang('status') . ': ' . $arrStatus[$data['status']], 'link' => $this->root_path . 'plugins/guildrequest/viewrequest.php' . $this->SID . '&id=' . $id);
}
}
}
return $searchResults;
}
}
//end class
}
//end if class not exists
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_pdh_r_guildrequest_requests', pdh_r_guildrequest_requests::__shortcuts());
}
示例4: sanitize
{
if ($this->config('pk_mybars_headtext')) {
$this->header = sanitize($this->config('pk_mybars_headtext'));
}
$maxbars = $this->config('pk_mybars_bars') ? $this->config('pk_mybars_bars') : 1;
if ($maxbars > 1) {
$out = '';
for ($i = 1; $i <= $maxbars; $i++) {
$out .= $this->bar_out($i);
}
return $out;
}
return $this->bar_out();
}
public function bar_out($num = 1)
{
$value = (int) $this->config('pk_mybars_current' . $num);
$max = (int) $this->config('pk_mybars_max' . $num);
$text = (string) $this->config('pk_mybars_title' . $num);
$tooltip = $this->config('pk_mybars_tooltip' . $num);
if (empty($tooltip)) {
return $this->jquery->ProgressBar('mybar_' . uniqid(), $value / $max * 100, $text . ' ' . $value . '/' . $max);
}
$name = 'mybar_tt_' . uniqid();
$positions = array('left1' => array('my' => 'left top', 'at' => 'right center', 'name' => $name), 'left2' => array('my' => 'left bottom', 'at' => 'right center', 'name' => $name), 'middle' => array('name' => $name), 'right' => array('my' => 'right center', 'at' => 'left center', 'name' => $name), 'bottom' => array('my' => 'bottom center', 'at' => 'top center', 'name' => $name));
return $this->html->ToolTip($tooltip, $this->jquery->ProgressBar('mybar_' . uniqid(), $value / $max * 100, $text . ' ' . $value . '/' . $max), '', $positions[$this->position]);
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_mybars_portal', mybars_portal::__shortcuts());
}
示例5: define
* Began: 2010
* Date: $Date: 2012-12-13 18:49:38 +0100 (Thu, 13 Dec 2012) $
* -----------------------------------------------------------------------
* @author $Author: hoofy_leon $
* @copyright 2006-2011 EQdkp-Plus Developer Team
* @link http://eqdkp-plus.com
* @package eqdkp-plus
* @version $Rev: 12583 $
*
* $Id: infotooltip_feed.php 12583 2012-12-13 17:49:38Z hoofy_leon $
*/
define('EQDKP_INC', true);
$eqdkp_root_path = './../';
$noinit = true;
include $eqdkp_root_path . '/common.php';
registry::add_const('root_path', $eqdkp_root_path);
//init our db-class
registry::load_config();
require $eqdkp_root_path . 'core/dbal/dbal.php';
require_once $eqdkp_root_path . 'core/dbal/' . registry::get_const('dbtype') . '.php';
registry::$aliases['db'] = array('dbal_' . registry::get_const('dbtype'), array(array('open' => true)));
error_reporting(E_ALL);
header('content-type: text/html; charset=UTF-8');
include $eqdkp_root_path . 'infotooltip/infotooltip.class.php';
$itt = registry::register('infotooltip');
$in = registry::register('input');
registry::$aliases['bridge'] = 'bridge_generic';
/* Itemfetching
* Parameters accepted:
* - name => item_name OR item_ID if game_id = true
* - lang => language of item (short version, e.g. 'en', 'de')
示例6: header
header('HTTP/1.0 404 Not Found');
exit;
}
class joomla_bridge extends bridge_generic
{
public $name = "Joomla";
public $data = array('groups' => array('table' => 'usergroups', 'id' => 'id', 'name' => 'title', 'QUERY' => ''), 'user_group' => array('table' => 'user_usergroup_map', 'group' => 'group_id', 'user' => 'user_id', 'QUERY' => ''), 'user' => array('table' => 'users', 'id' => 'id', 'name' => 'username', 'where' => 'username', 'password' => 'password', 'email' => 'email', 'salt' => '', 'QUERY' => ''));
public $functions = array('login' => array('callbefore' => '', 'function' => '', 'callafter' => 'joomla_callafter'), 'logout' => '', 'autologin' => '', 'sync' => '');
//Needed function
public function check_password($password, $hash, $strSalt = '', $boolUseHash)
{
list($strHash, $strSalt) = explode(':', $hash);
if (md5($password . $strSalt) == $strHash) {
return true;
}
return false;
}
public function joomla_callafter($strUsername, $strPassword, $boolAutoLogin, $arrUserdata, $boolLoginResult, $boolUseHash)
{
//Is user active?
if ($boolLoginResult) {
if ($arrUserdata['block'] != '0') {
return false;
}
}
return true;
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_joomla_bridge', joomla_bridge::$shortcuts);
}
示例7: class_name
return true;
}
case 'RED':
if ($gem == 'ORANGE' || $gem == 'PURPLE') {
return true;
}
case 'YELLOW':
if ($gem == 'ORANGE' || $gem == 'GREEN') {
return true;
}
}
return false;
}
private function class_name($class_id)
{
if (empty($this->class_names)) {
$class_names = $this->bnet->getdata('character', 'classes');
$this->class_names = $class_names['classes'];
}
foreach ($this->class_names as $class) {
if ($class['id'] === $class_id) {
return $class['name'];
}
}
return 'unknown';
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_armory', armory::$shortcuts);
}
示例8: header
* @link http://eqdkp-plus.com
* @package raidlogimport
* @version $Rev: 5040 $
*
* $Id: rli.class.php 5040 2009-06-09 15:20:27Z hoofy_leon $
*/
if (!defined('EQDKP_INC')) {
header('HTTP/1.0 Not Found');
exit;
}
include_once registry::get_const('root_path') . 'maintenance/includes/sql_update_task.class.php';
if (!class_exists('update_raidlogimport_0602')) {
class update_raidlogimport_0602 extends sql_update_task
{
public $author = 'Hoofy';
public $version = '0.6.0.2';
public $name = 'Raidlogimport 0.6.0.2 Update';
public $type = 'plugin_update';
public $plugin_path = 'raidlogimport';
private $data = array();
public function __construct()
{
parent::__construct();
// init language
$this->langs = array('english' => array('update_raidlogimport_0602' => 'Raidlogimport 0.6.0.2 Update Package', 1 => 'Expand zone-table with new inactive field', 2 => 'Expand boss-table with new inactive field'), 'german' => array('update_raidlogimport_0602' => 'Raidlogimport 0.6.0.2 Update Package', 1 => 'Expand zone-table with new inactive field', 2 => 'Expand boss-table with new inactive field'));
$this->sqls = array(1 => "ALTER TABLE __raidlogimport_zone ADD `zone_active` INT(1) NOT NULL DEFAULT 1;", 2 => "ALTER TABLE __raidlogimport_boss ADD `boss_active` INT(1) NOT NULL DEFAULT 1;");
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_update_raidlogimport_0602', update_raidlogimport_0602::__shortcuts());
示例9: detail_twink_css_js
private function detail_twink_css_js()
{
if (!$this->dt_cssjs and $this->config->get('pk_detail_twink') and $this->settings['show_detail_twink']) {
$this->tpl->add_css('.toggle_members { cursor: default; width: 10px; height: 10px; }');
$this->tpl->add_js("\$('.toggle_members').toggle(function(){\n\t\t\t\t\t\t\t\t\$('.'+\$(this).attr('id')).attr('style', 'display:block;');\n\t\t\t\t\t\t\t\t\$(this).attr('src', '" . $this->root_path . "images/arrows/down_arrow.png');\n\t\t\t\t\t\t\t},function(){\n\t\t\t\t\t\t\t\t\$('.'+\$(this).attr('id')).attr('style', 'display:none;');\n\t\t\t\t\t\t\t\t\$(this).attr('src', '" . $this->root_path . "images/arrows/right_arrow.png');\n\t\t\t\t\t\t\t});", 'docready');
$this->dt_cssjs = true;
}
}
private function dt_sort_by_name($a, $b)
{
return strcmp($this->pdh->get('member', 'name', $a), $this->pdh->get('member', 'name', $b));
}
public function get_html_footer_row($footer_text)
{
$footer = "<tr>\n\t<th colspan=\"" . (count($this->columns) + 2) . "\" class=\"footer\">";
if ($footer_text == null) {
$count = count($this->view_list);
$footer .= $this->total_count > $count ? sprintf($this->user->lang('hptt_default_part_footcount'), $count, $this->total_count) : sprintf($this->user->lang('hptt_default_footcount'), $count);
} else {
$footer .= $footer_text;
}
$footer .= "</th>\n</tr>\n";
return $footer;
}
}
//end class
}
//end if
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_html_pdh_tag_table', html_pdh_tag_table::$shortcuts);
}
示例10: array
$realms = array();
// set URL reader options
$this->puf->checkURL_first = true;
// loop through all supported realms and get status
foreach ($this->supported_realm_list as $realmname => $realm) {
// build realm url(s)
$status_url_realm = $this->base_status_url . 'dns=' . $realm['ip'] . '&port=' . $realm['port'] . '&style=t1';
$status_url_login = $this->base_status_url . 'dns=' . $this->login_list[$realm['region']]['ip'] . '&port=' . $this->login_list[$realm['region']]['port'] . '&style=t1';
// get url content for realm and login
$url_data_realm = $this->puf->fetch($status_url_realm);
$url_data_login = $this->puf->fetch($status_url_login);
if ($url_data_realm && $url_data_login) {
// both, login + realm servers have to be online for "online" status
if (strstr($url_data_realm, 'online') !== false && strstr($url_data_login, 'online') !== false) {
$status = 'up';
} else {
$status = 'down';
}
} else {
$status = 'unknown';
}
// add to list of realms
$realms[$realmname] = $status;
}
return $realms;
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_rom_realmstatus', rom_realmstatus::__shortcuts());
}
示例11: settype
settype($item_id, 'int');
$item = array('id' => $item_id);
if (!$item_id) {
return null;
}
$url = 'www.' . $this->config['game'] . 'database.com/xml/' . $this->av_langs[$lang];
$item['link'] = $url . "/" . $type . "/xmls/" . $item['id'] . ".xml";
//get the xml: http://www.aiondatabase.com/xml/$lang_code/items/xmls/$itemid.xml
$itemxml = $this->puf->fetch($item['link'], array('Cookie: cookieLangId="' . $lang . '";'));
$itemxml = simplexml_load_string($itemxml);
$item['name'] = (!is_numeric($itemname) and strlen($itemname) > 0) ? $itemname : trim($itemxml->name);
//filter baditems
if (!isset($itemxml->tooltip) or strlen($itemxml->tooltip) < 5) {
$item['baditem'] = true;
}
//build itemhtml
$html = "<table class='db-tooltip' cellspacing='0'><tr><td class='normal'>";
$html .= str_replace('"', "'", $itemxml->tooltip);
$html .= "</td><td class='right'></td></tr><tr><td class='bottomleft'></td><td class='bottomright'></td></table>";
$template_html = trim(file_get_contents($this->root_path . 'infotooltip/includes/parser/templates/aion_popup.tpl'));
$item['html'] = str_replace('{ITEM_HTML}', stripslashes($html), $template_html);
$item['lang'] = $lang;
$item['icon'] = $itemxml->iconpath;
$item['color'] = 'aion_q' . $itemxml->quality;
return $item;
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_xxxdatabase', xxxdatabase::$shortcuts);
}
示例12: array
{
$item = array('id' => $item_id);
if (!$item_id) {
return null;
}
$url = 'http://eq2.zam.com/db/tooltip.html?items=' . $item['id'];
$item['link'] = $url;
$itemdata = $this->puf->fetch($item['link'], array('Cookie: cookieLangId="' . $lang . '";'));
if (preg_match('#zamTooltip\\.store\\({\\"icon\\":\\"(.*?)\\",\\"linkColor\\":\\"(.*?)\\",\\"html\\":\\"(.*?)\\",\\"site\\":\\"(.*?)\\",\\"dataType\\":\\"(.*?)\\",\\"name\\":\\"(.*?)\\",\\"id\\":\\"(.*?)\\"#', $itemdata, $matches)) {
$quality = $matches[2];
$content = stripslashes(str_replace('\\n', '', $matches[3]));
if (preg_match('#Icons\\/(.*?).jpg#', stripslashes($matches[1]), $icon_matches)) {
$icon = $icon_matches[1];
}
$template_html = trim(file_get_contents($this->root_path . 'infotooltip/includes/parser/templates/eq2_popup.tpl'));
$template_html = str_replace('{ITEM_HTML}', $content, $template_html);
$item['html'] = $template_html;
$item['lang'] = $lang;
$item['icon'] = $icon;
$item['color'] = $quality;
$item['name'] = $matches[6];
} else {
$item['baditem'] = true;
}
return $item;
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_eq2_zam', eq2_zam::$shortcuts);
}
示例13: __shortcuts
* __dependencies
* Get module dependencies
*/
public static function __shortcuts()
{
$shortcuts = array('config');
return array_merge(parent::__shortcuts(), $shortcuts);
}
public $author = 'Aderyn';
public $version = '0.3.4';
// new version
public $name = 'Shoutbox 0.3.4 Update';
public $type = 'plugin_update';
public $plugin_path = 'shoutbox';
// important!
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
// init language
$this->langs = array('english' => array('update_shoutbox_034' => 'Shoutbox 0.3.4 Update Package', 1 => 'Add new permission'), 'german' => array('update_shoutbox_034' => 'Shoutbox 0.3.4 Update Paket', 1 => 'Füge neue Berechtigung hinzu'));
// init SQL querys
$this->sqls = array(1 => "INSERT INTO `__auth_options` (`auth_value`, `auth_default`) VALUES ('u_shoutbox_view', 'Y');");
}
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_update_shoutbox_034', update_shoutbox_034::__shortcuts());
}
示例14: add_css
}
if ($dd) {
return $dd_data;
}
return $php_file_tree;
}
public function add_css()
{
$output = "\n\n\t\t\t.php-file-tree .open {\n\t\t\t\tfont-style: italic;\n\t\t\t}\n\n\t\t\t.php-file-tree .closed {\n\t\t\t\tfont-style: normal;\n\t\t\t}\n\n\t\t\t.php-file-tree .pft-directory {\n\t\t\t\tlist-style-image: url(" . $this->root_path . "images/glyphs/extensions/directory.png);\n\t\t\t}\n\n\t\t\t/* Default file */\n\t\t\t.php-file-tree LI.pft-file { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/file.png); }\n\t\t\t/* Additional file types */\n\t\t\t.php-file-tree LI.ext-3gp { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-afp { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-afpa { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-asp { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-aspx { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-avi { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-bat { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/application.png); }\n\t\t\t.php-file-tree LI.ext-bmp { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-c { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-cfm { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-cgi { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-com { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/application.png); }\n\t\t\t.php-file-tree LI.ext-cpp { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-css { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/css.png); }\n\t\t\t.php-file-tree LI.ext-doc { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/doc.png); }\n\t\t\t.php-file-tree LI.ext-exe { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/application.png); }\n\t\t\t.php-file-tree LI.ext-gif { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-fla { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/flash.png); }\n\t\t\t.php-file-tree LI.ext-h { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-htm { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/html.png); }\n\t\t\t.php-file-tree LI.ext-html { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/html.png); }\n\t\t\t.php-file-tree LI.ext-jar { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/java.png); }\n\t\t\t.php-file-tree LI.ext-jpg { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-jpeg { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-js { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/script.png); }\n\t\t\t.php-file-tree LI.ext-lasso { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-log { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/txt.png); }\n\t\t\t.php-file-tree LI.ext-m4p { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/music.png); }\n\t\t\t.php-file-tree LI.ext-mov { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-mp3 { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/music.png); }\n\t\t\t.php-file-tree LI.ext-mp4 { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-mpg { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-mpeg { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-ogg { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/music.png); }\n\t\t\t.php-file-tree LI.ext-pcx { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-pdf { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/pdf.png); }\n\t\t\t.php-file-tree LI.ext-php { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/php.png); }\n\t\t\t.php-file-tree LI.ext-png { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-ppt { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/ppt.png); }\n\t\t\t.php-file-tree LI.ext-psd { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/psd.png); }\n\t\t\t.php-file-tree LI.ext-pl { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/script.png); }\n\t\t\t.php-file-tree LI.ext-py { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/script.png); }\n\t\t\t.php-file-tree LI.ext-rb { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/ruby.png); }\n\t\t\t.php-file-tree LI.ext-rbx { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/ruby.png); }\n\t\t\t.php-file-tree LI.ext-rhtml { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/ruby.png); }\n\t\t\t.php-file-tree LI.ext-rpm { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/linux.png); }\n\t\t\t.php-file-tree LI.ext-ruby { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/ruby.png); }\n\t\t\t.php-file-tree LI.ext-sql { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/db.png); }\n\t\t\t.php-file-tree LI.ext-swf { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/flash.png); }\n\t\t\t.php-file-tree LI.ext-tif { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-tiff { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/picture.png); }\n\t\t\t.php-file-tree LI.ext-txt { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/txt.png); }\n\t\t\t.php-file-tree LI.ext-vb { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-wav { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/music.png); }\n\t\t\t.php-file-tree LI.ext-wmv { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/film.png); }\n\t\t\t.php-file-tree LI.ext-xls { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/xls.png); }\n\t\t\t.php-file-tree LI.ext-xml { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/code.png); }\n\t\t\t.php-file-tree LI.ext-zip { list-style-image: url(" . $this->root_path . "images/glyphs/extensions/zip.png); }\n\t\t\t/* You can add millions of these... */\n\t\t";
return $output;
}
public function add_js()
{
$output = '$(document).ready( function() {
// Hide all subfolders at startup
$(".php-file-tree").find("UL").hide();
// Expand/collapse on click
$(".pft-directory a").click( function() {
$(this).parent().find("UL:first").slideToggle("medium");
if( $(this).parent().attr(\'className\') == "pft-directory" ) return false;
});
});';
return $output;
}
}
//close class
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_uploader', uploader::$shortcuts);
}
示例15: header
if (!defined('EQDKP_INC')) {
header('HTTP/1.0 404 Not Found');
exit;
}
class wordofthemoment_portal extends portal_generic
{
public static function __shortcuts()
{
$shortcuts = array('user', 'core', 'config', 'bbcode' => 'bbcode');
return array_merge(parent::$shortcuts, $shortcuts);
}
protected $path = 'wordofthemoment';
protected $data = array('name' => 'Word of the Moment', 'version' => '2.0.0', 'author' => 'WalleniuM', 'contact' => EQDKP_PROJECT_URL, 'description' => 'Output a randomword or sentence of the moment');
protected $positions = array('left1', 'left2', 'right', 'middle', 'bottom');
protected $settings = array('pk_wotd_words' => array('name' => 'pk_wotm_words', 'language' => 'pk_wotm_words', 'property' => 'bbcodeeditor', 'cols' => '30', 'rows' => '20', 'codeinput' => false));
protected $install = array('autoenable' => '0', 'defaultposition' => 'right', 'defaultnumber' => '7');
public function output()
{
$words = explode(";", $this->config->get('pk_wotm_words'));
if (count($words) > 0) {
shuffle($words);
$myout = $this->bbcode->toHTML($words[0]);
} else {
$myout = $this->user->lang('pk_wotm_nobd');
}
return $myout;
}
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
registry::add_const('short_wordofthemoment_portal', wordofthemoment_portal::__shortcuts());
}