本文整理汇总了PHP中plugInstalled函数的典型用法代码示例。如果您正苦于以下问题:PHP plugInstalled函数的具体用法?PHP plugInstalled怎么用?PHP plugInstalled使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugInstalled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/*
* e107 website system
*
* 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)
*
* Plugin - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/newsfeed/e_frontpage.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
if (!defined('e107_INIT')) {
exit;
}
if (!plugInstalled('newsfeed')) {
return;
}
include_lan(e_PLUGIN . 'newsfeed/languages/' . e_LANGUAGE . '_frontpage.php');
$front_page['newsfeed']['title'] = NWSF_FP_1 . ': ' . $row['content_heading'];
$front_page['newsfeed']['page'][] = array('page' => $PLUGINS_DIRECTORY . 'newsfeed/newsfeed.php', 'title' => NWSF_FP_2);
if ($sql->db_Select("newsfeed", "newsfeed_id, newsfeed_name")) {
while ($row = $sql->db_Fetch()) {
$front_page['newsfeed']['page'][] = array('page' => $PLUGINS_DIRECTORY . 'newsfeed/newsfeed.php?show.' . $row['newsfeed_id'], 'title' => $row['newsfeed_name']);
}
}
示例2: header
* Links plugin
*
* $URL$
* $Revision$
* $Date$
* $Author$
*/
/**
* e107 Links plugin
*
* @package e107_plugins
* @subpackage links
* @version $Id$;
*/
require_once '../../class2.php';
if (!getperms('P') || !plugInstalled('links_page')) {
header('location:' . e_BASE . 'index.php');
exit;
}
require_once e_PLUGIN . 'links_page/link_shortcodes.php';
require_once e_PLUGIN . 'links_page/link_defines.php';
require_once e_ADMIN . 'auth.php';
require_once e_HANDLER . 'userclass_class.php';
require_once e_HANDLER . 'form_handler.php';
$rs = new form();
require_once e_HANDLER . 'file_class.php';
$fl = new e_file();
e107_require_once(e_HANDLER . 'arraystorage_class.php');
$eArrayStorage = new ArrayData();
require_once e_PLUGIN . 'links_page/link_class.php';
$lc = new linkclass();
示例3: header
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Poll plugin main page display
*
* $URL$
* $Id$
*/
require_once '../../class2.php';
if (!plugInstalled('poll')) {
header('Location: ' . e_BASE . 'index.php');
exit;
}
require_once HEADERF;
require e_PLUGIN . 'poll/poll_menu.php';
require_once FOOTERF;
exit;
示例4: header
* e107 website system
*
* 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)
*
* Plugin administration - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/admin_config.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
require_once "../../class2.php";
if (!getperms("P") || !plugInstalled('trackback')) {
header("location:" . e_BASE . "index.php");
exit;
}
include_lan(e_PLUGIN . "trackback/languages/" . e_LANGUAGE . "_admin_trackback.php");
require_once e_ADMIN . "auth.php";
if (isset($_POST['updatesettings'])) {
$temp = array();
if ($pref['trackbackEnabled'] != $_POST['trackbackEnabled']) {
$temp['trackbackEnabled'] = $_POST['trackbackEnabled'];
$e107cache->clear('news.php');
}
$temp['trackbackString'] = $tp->toDB($_POST['trackbackString']);
if ($admin_log->logArrayDiffs($temp, $pref, 'TRACK_01')) {
save_prefs();
// Only save if changes
示例5:
<?php
/*
* e107 website system
*
* 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)
*
* Plugin administration - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackback.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
require_once "../../class2.php";
if (!plugInstalled('trackback')) {
exit;
}
header('Content-Type: text/xml');
include e_PLUGIN . "trackback/trackbackClass.php";
$trackback = trackbackClass::respondTrackback();
示例6: header
* e107 website system
*
* 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/chatbox_menu/admin_chatbox.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once "../../class2.php";
$frm = e107::getForm();
if (!plugInstalled('chatbox_menu') || !getperms("P")) {
header("Location: " . e_BASE . "index.php");
exit;
}
include_lan(e_PLUGIN . "chatbox_menu/languages/" . e_LANGUAGE . "/admin_chatbox_menu.php");
require_once e_ADMIN . "auth.php";
require_once e_HANDLER . "userclass_class.php";
if (isset($_POST['updatesettings'])) {
$temp = array();
$temp['chatbox_posts'] = min(intval($_POST['chatbox_posts']), 5);
$temp['cb_layer'] = intval($_POST['cb_layer']);
$temp['cb_layer_height'] = max(varset($_POST['cb_layer_height'], 200), 150);
$temp['cb_emote'] = intval($_POST['cb_emote']);
$temp['cb_mod'] = intval($_POST['cb_mod']);
if ($admin_log->logArrayDiffs($temp, $pref, 'CHBLAN_01')) {
save_prefs();
示例7: listclass
* $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_new_menu.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
/**
* Menu for list_new plugin
*
* @package e107_plugins
* @subpackage list_new
*/
if (!defined('e107_INIT')) {
exit;
}
if (!plugInstalled('list_new')) {
return;
}
unset($text);
global $rc;
if (!is_object($rc)) {
require_once e_PLUGIN . "list_new/list_class.php";
$rc = new listclass();
}
//set mode
$rc->mode = "new_menu";
//parse menu
$text = $rc->displayMenu();
$caption = varsettrue($rc->list_pref[$rc->mode . "_caption"], LIST_MENU_1);
$caption = $rc->e107->tp->toHtml($caption, FALSE, 'USER_TITLE');
$text = $rc->e107->tp->toHtml($text, TRUE, 'USER_BODY');
示例8: cookie
}*/
}
$core_pref->save(false);
// special case, do session cleanup, logout, redirect to login screen
if ($sessionRegenerate) {
// reset cookie
cookie($core_pref->get('cookie_name'), $_COOKIE[e_COOKIE], time() + 3600 * 24 * 30, e_HTTP, e107::getLanguage()->getCookieDomain());
cookie(e_COOKIE, null, null);
// regenerate session
$s = $_SESSION;
e107::getSession()->destroy();
$session = new e_core_session(array('name' => $core_pref->get('cookie_name')));
$_SESSION = $s;
}
}
if (plugInstalled('alt_auth')) {
$authlist[] = "e107";
$handle = opendir(e_PLUGIN . "alt_auth");
while ($file = readdir($handle)) {
if (preg_match("/^(.*)_auth\\.php/", $file, $match)) {
$authlist[] = $match[1];
}
}
}
/*
if(isset($message))
{
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
}
if(e_QUERY == "u")
示例9: renderPlugins
function renderPlugins($pluginOpts)
{
global $frm, $sql;
// if there is 1 entry, then it's not the same array.
$tmp = varset($pluginOpts['plugin'][1]) ? $pluginOpts['plugin'] : $pluginOpts;
$text = "";
foreach ($tmp as $p) {
$plug = trim($p['@attributes']['name']);
if (plugInstalled($plug)) {
$text .= $plug . " " . ADMIN_TRUE_ICON;
} else {
// echo $plug;
if ($sql->db_Select("plugin", "plugin_id", " plugin_path = '" . $plug . "' LIMIT 1 ")) {
$row = $sql->db_Fetch(MYSQL_ASSOC);
$name = "installplugin[" . $row['plugin_id'] . "]";
$text .= $this->frm->admin_button($name, ADLAN_121 . " " . $plug . "", 'delete');
} else {
$text .= varset($p['@attributes']['url']) && $p['@attributes']['url'] != 'core' ? "<a rel='external' href='" . $p['@attributes']['url'] . "'>" . $plug . "</a> " : "<i>" . $plug . "</i>";
$text .= ADMIN_FALSE_ICON;
}
}
$text .= " ";
}
return $text;
}
示例10: while
*
* 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/featurebox/featurebox.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) {
exit;
}
if (!plugInstalled('featurebox')) {
return '';
}
if ($sql->db_Select("featurebox", "*", "fb_mode=1 AND fb_class IN (" . USERCLASS_LIST . ") ORDER BY fb_class ASC")) {
while ($row = $sql->db_Fetch()) {
if ($row['fb_class'] > 0 && $row['fb_class'] < 251) {
extract($row);
continue;
} else {
$xentry = $row;
}
}
if (!isset($fb_title)) {
extract($xentry);
}
} else {
示例11:
<?php
/*
* e107 website system
*
* 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)
*
* Plugin administration - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/e_meta.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
if (!defined('e107_INIT')) {
exit;
}
if (plugInstalled('trackback') && isset($pref['trackbackEnabled'])) {
echo "<link rel='pingback' href='" . SITEURLBASE . e_PLUGIN_ABS . "trackback/trackback.php' />";
}
示例12: importSme
function importSme()
{
global $PLUGINS_DIRECTORY;
$ns = e107::getRender();
$sql = e107::getDb();
$sql2 = e107::getDb('sql2');
$frm = e107::getForm();
$mes = e107::getMessage();
$importArray = array();
/* sitelinks ... */
$sql->db_Select("links", "*", "ORDER BY link_order ASC", "no-where");
$nfArray = $sql->db_getList();
foreach ($nfArray as $row) {
if (!$sql->db_Select("gsitemap", "*", "gsitemap_name='" . $row['link_name'] . "' ")) {
$importArray[] = array('name' => $row['link_name'], 'url' => $row['link_url'], 'type' => GSLAN_1);
}
}
/* custom pages ... */
$sql->db_Select("page", "*", "ORDER BY page_datestamp ASC", "no-where");
$nfArray = $sql->db_getList();
foreach ($nfArray as $row) {
if (!$sql->db_Select("gsitemap", "*", "gsitemap_name='" . $row['page_title'] . "' ")) {
$importArray[] = array('name' => $row['page_title'], 'url' => "page.php?" . $row['page_id'], 'type' => "Custom Page");
}
}
/* forums ... */
if (plugInstalled('forum')) {
$sql->db_Select("forum", "*", "forum_parent!='0' ORDER BY forum_order ASC");
$nfArray = $sql->db_getList();
foreach ($nfArray as $row) {
if (!$sql->db_Select("gsitemap", "*", "gsitemap_name='" . $row['forum_name'] . "' ")) {
$importArray[] = array('name' => $row['forum_name'], 'url' => $PLUGINS_DIRECTORY . "forum/forum_viewforum.php?" . $row['forum_id'], 'type' => "Forum");
}
}
}
/* content pages ... */
if (plugInstalled('content')) {
$sql->db_Select("pcontent", "content_id, content_heading", "LEFT(content_parent,1) = '0' ORDER BY content_heading");
$nfArray = $sql->db_getList();
foreach ($nfArray as $row) {
$sql2->db_Select("pcontent", "content_id, content_heading", "content_parent = '" . $row['content_id'] . "' AND content_refer != 'sa' ORDER BY content_heading");
$nfArray2 = $sql2->db_getList();
foreach ($nfArray2 as $row2) {
if (!$sql->db_Select("gsitemap", "*", "gsitemap_name='" . $row2['content_heading'] . "' ")) {
$importArray[] = array('name' => $row2['content_heading'], 'url' => $PLUGINS_DIRECTORY . "content/content.php?content." . $row2['content_id'], 'type' => $row['content_heading']);
}
}
}
}
$text = "\n\t\t<form action='" . e_SELF . "' id='form' method='post'>\n\t\t<table class='table adminlist'>\n\t\t<colgroup>\n\t\t\t<col class='center' style='width:5%;' />\n\t\t\t<col style='width:15%' />\n\t\t\t<col style='width:40%' />\n\t\t\t<col style='width:40%' />\n\t\t</colgroup>\n\t\t<thead>\n\t\t<tr>\n\t\t<td>" . GSLAN_2 . "</td>\n\t\t<td>" . GSLAN_3 . "</td>\n\t\t<td>" . GSLAN_4 . "</td>\n\t\t<td>" . GSLAN_5 . "</td>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t";
foreach ($importArray as $ia) {
$text .= "\n\t\t\t<tr>\n\t\t\t<td><input type='checkbox' name='importid[]' value='" . $ia['name'] . "^" . $ia['url'] . "^" . $ia['type'] . "' /></td>\n\t\t\t<td>" . $ia['type'] . "</td>\n\t\t\t<td>" . $ia['name'] . "</td>\n\t\t\t<td><span class='smalltext'>" . str_replace(SITEURL, "", $ia['url']) . "</span></td>\n\t\t\t</tr>\n\t\t\t";
}
$text .= "\n\t\t<tr>\n\t\t<td colspan='4' class='center'>\n\t\t<div> " . GSLAN_8 . " " . GSLAN_9 . " : <select class='tbox' name='import_priority' >\n";
for ($i = 0.1; $i < 1.0; $i = $i + 0.1) {
$sel = $editArray['gsitemap_priority'] == number_format($i, 1) ? "selected='selected'" : "";
$text .= "<option value='" . number_format($i, 1) . "' {$sel}>" . number_format($i, 1) . "</option>\n";
}
$text .= "</select> " . GSLAN_10 . "\n\n\n\t\t<select class='tbox' name='import_freq' >\n";
foreach ($this->freq_list as $k => $fq) {
$sel = $editArray['gsitemap_freq'] == $k ? "selected='selected'" : "";
$text .= "<option value='{$k}' {$sel}>{$fq}</option>\n";
}
$text .= "</select> <br /><br />\n\n\t\t</div>\n\t\t\n\t\t</td>\n\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t<div class='buttons-bar center'>\n\t\t" . $frm->admin_button('import_links', GSLAN_18, 'submit') . "\n\t\t</div>\n\t\t</form>\n\t\t";
$ns->tablerender(GSLAN_7, $mes->render() . $text);
}
示例13: header
* e107 website system
*
* 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/admin_download.php,v $
* $Revision: 12639 $
* $Date: 2012-04-20 00:28:53 -0700 (Fri, 20 Apr 2012) $
* $Author: e107coders $
*/
$eplug_admin = true;
require_once "../../class2.php";
if (!getperms("P") || !plugInstalled('gallery')) {
header("location:" . e_BASE . "index.php");
exit;
}
$e_sub_cat = 'gallery';
class plugin_gallery_admin extends e_admin_dispatcher
{
/**
* Format: 'MODE' => array('controller' =>'CONTROLLER_CLASS'[, 'index' => 'list', 'path' => 'CONTROLLER SCRIPT PATH', 'ui' => 'UI CLASS NAME child of e_admin_ui', 'uipath' => 'UI SCRIPT PATH']);
* Note - default mode/action is autodetected in this order:
* - $defaultMode/$defaultAction (owned by dispatcher - see below)
* - $adminMenu (first key if admin menu array is not empty)
* - $modes (first key == mode, corresponding 'index' key == action)
* @var array
*/
protected $modes = array('main' => array('controller' => 'gallery_cat_admin_ui', 'path' => null, 'ui' => 'gallery_cat_admin_form_ui', 'uipath' => null), 'cat' => array('controller' => 'gallery_cat_ui', 'path' => null, 'ui' => 'gallery_cat_form_ui', 'uipath' => null));
示例14: load_elist
/**
* load_elist loads and checks all e_list.php files
*
* @return array
*
*/
function load_elist()
{
$listArray = '';
//require is needed here instead of require_once, since both the menu and the page could be visible at the same time
if (is_array($this->content_types) && in_array($this->settings['section'], $this->content_types)) {
$file = $this->content_name;
if (is_readable(e_PLUGIN . $file . "/e_list.php")) {
$this->mode_content = $this->settings['section'];
//echo "require: ".e_PLUGIN.$file."/e_list.php<br />";
require_once e_PLUGIN . $file . "/e_list.php";
$listArray = $this->load_data($file);
}
} else {
$file = $this->settings['section'];
if (in_array($file, $this->defaultArray)) {
//echo "require: ".$this->plugin_dir."section/list_".$file.".php<br />";
require_once $this->plugin_dir . "section/list_" . $file . ".php";
$listArray = $this->load_data($file);
} else {
if (plugInstalled($file)) {
if (is_readable(e_PLUGIN . $file . "/e_list.php")) {
//echo "require: ".e_PLUGIN.$file."/e_list.php<br />";
require_once e_PLUGIN . $file . "/e_list.php";
$listArray = $this->load_data($file);
}
}
}
}
return $listArray;
}
示例15: header
*
* 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)
*
* Plugin administration - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/modtrackback.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
$eplug_admin = true;
require_once "../../class2.php";
if (!getperms("P") || !plugInstalled('trackback') || !$pref['trackbackEnabled']) {
header("location:" . e_BASE . "index.php");
exit;
}
require_once e_ADMIN . "auth.php";
if (isset($_POST['moderate'])) {
$temp = array();
if (is_array($_POST['trackback_delete'])) {
while (list($key, $cid) = each($_POST['trackback_delete'])) {
$cid = intval($cid);
if ($cid > 0) {
$sql->db_Delete("trackback", "trackback_id=" . $cid);
$temp[] = $cid;
}
}
if (count($temp)) {