本文整理汇总了PHP中filesystemToInternal函数的典型用法代码示例。如果您正苦于以下问题:PHP filesystemToInternal函数的具体用法?PHP filesystemToInternal怎么用?PHP filesystemToInternal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了filesystemToInternal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getOptionsSupported
function getOptionsSupported()
{
global $_zp_gallery;
$themename = $_zp_gallery->getCurrentTheme();
$curdir = getcwd();
$root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
chdir($root);
$filelist = safe_glob('*.php');
$list = array();
foreach ($filelist as $file) {
$file = filesystemToInternal($file);
$list[$file] = str_replace('.php', '', $file);
}
$list = array_diff($list, standardScripts());
$all = query_full_array('SELECT `aux` FROM ' . prefix('plugin_storage') . ' WHERE `type`="favorites"');
$disable = false;
$text = gettext('If enabled a user may have multiple (named) favorites.');
foreach ($all as $aux) {
$instance = getSerializedArray($aux['aux']);
if (isset($instance[1])) {
$disable = true;
$text .= '<br /><span class="warningbox">' . gettext('Named favorites are present.') . '</span>';
break;
}
}
$options = array(gettext('Link text') => array('key' => 'favorites_linktext', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 2, 'desc' => gettext('The text for the link to the favorites page.')), gettext('Multiple sets') => array('key' => 'favorites_multi', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'disabled' => $disable, 'desc' => $text), gettext('Add button') => array('key' => 'favorites_add_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 6, 'desc' => gettext('Default text for the <em>add to favorites</em> button.')), gettext('Remove button') => array('key' => 'favorites_remove_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 7, 'desc' => gettext('Default text for the <em>remove from favorites</em> button.')), gettext('Title') => array('key' => 'favorites_title', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 3, 'desc' => gettext('The favorites page title text.')), gettext('Description') => array('key' => 'favorites_desc', 'type' => OPTION_TYPE_TEXTAREA, 'multilingual' => true, 'order' => 5, 'desc' => gettext('The favorites page description text.')), gettext('Sort albums by') => array('key' => 'favorites_albumsort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 9, 'desc' => ''), gettext('Sort images by') => array('key' => 'favorites_imagesort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 10, 'desc' => ''));
if (!MOD_REWRITE) {
$options['note'] = array('key' => 'favorites_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => gettext('<p class="notebox">Favorites requires the <code>mod_rewrite</code> option be enabled.</p>'));
}
return $options;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:favoritesHandler.php
示例2: adddownloadListItem
/**
* Adds a new download item to the database. For internal use.
* @param string $path Path of the download item
*/
function adddownloadListItem($path)
{
$path = filesystemToInternal($path);
$checkitem = query_single_row("SELECT `data` FROM " . prefix('plugin_storage') . " WHERE `aux` = " . db_quote($path) . " AND `type` = 'downloadList'");
if (!$checkitem) {
query("INSERT INTO " . prefix('plugin_storage') . " (`type`,`aux`,`data`) VALUES ('downloadList'," . db_quote($path) . ",'0')");
}
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:12,代码来源:downloadList-functions.php
示例3: loadAlbumNames
function loadAlbumNames($albumdir)
{
if (!is_dir($albumdir) || !is_readable($albumdir)) {
return array();
}
$dir = opendir($albumdir);
$albums = array();
while ($dirname = readdir($dir)) {
$dirname = filesystemToInternal($dirname);
if (is_dir($albumdir . $dirname) && $dirname[0] != '.') {
$albums = array_merge(array($dirname), $this->loadAlbumNames($albumdir . $dirname . '/'));
}
}
closedir($dir);
return $albums;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:16,代码来源:filter-fileSearches.php
示例4: getResidentFiles
/**
*
* enumerates the files in folder(s)
* @param $folder
*/
function getResidentFiles($folder, $exclude)
{
global $_zp_resident_files;
$dirs = array_diff(scandir($folder), $exclude);
$localfiles = array();
$localfolders = array();
foreach ($dirs as $file) {
$file = str_replace('\\', '/', $file);
$key = str_replace(SERVERPATH . '/', '', filesystemToInternal($folder . '/' . $file));
if (is_dir($folder . '/' . $file)) {
$localfolders[] = $key;
$localfolders = array_merge($localfolders, getResidentFiles($folder . '/' . $file, $exclude));
} else {
$localfiles[] = $key;
}
}
return array_merge($localfiles, $localfolders);
}
开发者ID:benuri,项目名称:DevTools,代码行数:23,代码来源:zenphoto_package_generator.php
示例5: getOptionsSupported
function getOptionsSupported()
{
global $_zp_gallery;
$themename = $_zp_gallery->getCurrentTheme();
$curdir = getcwd();
$root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
chdir($root);
$filelist = safe_glob('*.php');
$list = array();
foreach ($filelist as $file) {
$file = filesystemToInternal($file);
$list[$file] = str_replace('.php', '', $file);
}
$list = array_diff($list, standardScripts());
$options = array(gettext('Link text') => array('key' => 'favorites_linktext', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 2, 'desc' => gettext('The text for the link to the favorites page.')), gettext('Multiple sets') => array('key' => 'favorites_multi', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('If enabled a user may have multiple (named) favorites.')), gettext('Add button') => array('key' => 'favorites_add_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 6, 'desc' => gettext('Default text for the <em>add to favorites</em> button.')), gettext('Remove button') => array('key' => 'favorites_remove_button', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 7, 'desc' => gettext('Default text for the <em>remove from favorites</em> button.')), gettext('Title') => array('key' => 'favorites_title', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => true, 'order' => 3, 'desc' => gettext('The favorites page title text.')), gettext('Description') => array('key' => 'favorites_desc', 'type' => OPTION_TYPE_TEXTAREA, 'multilingual' => true, 'order' => 5, 'desc' => gettext('The favorites page description text.')), gettext('Sort albums by') => array('key' => 'favorites_albumsort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 9, 'desc' => ''), gettext('Sort images by') => array('key' => 'favorites_imagesort', 'type' => OPTION_TYPE_CUSTOM, 'order' => 10, 'desc' => ''));
if (!MOD_REWRITE) {
$options['note'] = array('key' => 'favorites_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => gettext('<p class="notebox">Favorites requires the <code>mod_rewrite</code> option be enabled.</p>'));
}
return $options;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:20,代码来源:favoritesHandler.php
示例6: getOptionsSupported
function getOptionsSupported()
{
$gallery = new Gallery();
$opts = array();
$exclude = array('404.php', 'themeoptions.php', 'theme_description.php');
foreach (array_keys($gallery->getThemes()) as $theme) {
$curdir = getcwd();
$root = SERVERPATH . '/' . THEMEFOLDER . '/' . $theme . '/';
chdir($root);
$filelist = safe_glob('*.php');
$list = array();
foreach ($filelist as $file) {
if (!in_array($file, $exclude)) {
$list[$script = stripSuffix(filesystemToInternal($file))] = 'colorbox_' . $theme . '_' . $script;
}
}
chdir($curdir);
$opts[$theme] = array('key' => 'colorbox_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which Colorbox is enabled. {Should have been set by the themes!}'));
}
return $opts;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:21,代码来源:colorbox.php
示例7: getFolderList
function getFolderList($root)
{
$curdir = getcwd();
chdir($root);
$filelist = safe_glob('*');
$list = array();
foreach ($filelist as $file) {
if (is_dir($file) && $file != '.' && $file != '..') {
$internal = filesystemToInternal($file);
if (!file_exists("{$root}/{$file}/persona.properties")) {
continue;
}
$props = new Properties();
$props->load(file_get_contents("{$root}/{$file}/persona.properties"));
$name = $props->getProperty('name');
if (!isset($name)) {
continue;
}
$list[$name] = $internal;
}
}
chdir($curdir);
return $list;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:24,代码来源:themeoptions.php
示例8: zp_getFonts
/**
* Returns a list of available fonts
*
* @return array
*/
function zp_getFonts()
{
global $_imagick_fontlist;
if (!is_array($_imagick_fontlist)) {
@($_imagick_fontlist = Imagick::queryFonts());
$_imagick_fontlist = array('system' => '') + array_combine($_imagick_fontlist, $_imagick_fontlist);
$basefile = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/imagick_fonts/';
if (is_dir($basefile)) {
chdir($basefile);
$filelist = safe_glob('*.ttf');
foreach ($filelist as $file) {
$key = filesystemToInternal(str_replace('.ttf', '', $file));
$_imagick_fontlist[$key] = getcwd() . '/' . $file;
}
}
chdir(dirname(__FILE__));
}
return $_imagick_fontlist;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:24,代码来源:lib-Imagick.php
示例9: loadFileNames
/**
* Load all of the filenames that are found in this Albums directory on disk.
* Returns an array with all the names.
*
* @param $dirs Whether or not to return directories ONLY with the file array.
* @return array
*/
function loadFileNames($dirs = false)
{
if ($this->isDynamic()) {
// there are no 'real' files
return array();
}
$albumdir = $this->localpath;
if (!is_dir($albumdir) || !is_readable($albumdir)) {
if (!is_dir($albumdir)) {
$msg = sprintf(gettext("Error: The album named %s cannot be found."), $this->name);
} else {
$msg = sprintf(gettext("Error: The album %s is not readable."), $this->name);
}
zp_error($msg, false);
return array();
}
$dir = opendir($albumdir);
$files = array();
$others = array();
while (false !== ($file = readdir($dir))) {
$file8 = filesystemToInternal($file);
if ($dirs && (is_dir($albumdir . $file) && substr($file, 0, 1) != '.' || hasDynamicAlbumSuffix($file))) {
$files[] = $file8;
} else {
if (!$dirs && is_file($albumdir . $file)) {
if (is_valid_other_type($file)) {
$files[] = $file8;
$others[] = $file8;
} else {
if (is_valid_image($file)) {
$files[] = $file8;
}
}
}
}
}
closedir($dir);
if (count($others) > 0) {
$others_thumbs = array();
foreach ($others as $other) {
$others_root = substr($other, 0, strrpos($other, "."));
foreach ($files as $image) {
$image_root = substr($image, 0, strrpos($image, "."));
if ($image_root == $others_root && $image != $other && is_valid_image($image)) {
$others_thumbs[] = $image;
}
}
}
$files = array_diff($files, $others_thumbs);
}
if ($dirs) {
return zp_apply_filter('album_filter', $files);
} else {
return zp_apply_filter('image_filter', $files);
}
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:63,代码来源:class-album.php
示例10: generateListFromFiles
/**
* Generates a selection list from files found on disk
*
* @param strig $currentValue the current value of the selector
* @param string $root directory path to search
* @param string $suffix suffix to select for
* @param bool $descending set true to get a reverse order sort
*/
function generateListFromFiles($currentValue, $root, $suffix, $descending = false)
{
if (is_dir($root)) {
$curdir = getcwd();
chdir($root);
$filelist = safe_glob('*' . $suffix);
$list = array();
foreach ($filelist as $file) {
$file = str_replace($suffix, '', $file);
$list[] = filesystemToInternal($file);
}
generateListFromArray(array($currentValue), $list, $descending, false);
chdir($curdir);
}
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:23,代码来源:functions.php
示例11: unset
unset($installed_files[$key]);
break;
case 'plugins':
$plugin_subfolders[] = implode('/', $folders);
unset($installed_files[$key]);
// this will be taken care of later
break;
case STATIC_CACHE_FOLDER:
$Cache_html_subfolders[] = implode('/', $folders);
unset($installed_files[$key]);
break;
}
}
$filelist = '';
foreach ($installed_files as $extra) {
$filelist .= filesystemToInternal(str_replace($base, '', $extra) . '<br />');
}
if (class_exists('zpFunctions') && zpFunctions::hasPrimaryScripts() && count($installed_files) > 0) {
if (defined('TEST_RELEASE') && TEST_RELEASE) {
$msg1 = gettext("Zenphoto core files [This is a <em>debug</em> build. Some files are missing or seem wrong]");
} else {
$msg1 = gettext("Zenphoto core files [Some files are missing or seem wrong]");
}
$msg2 = gettext('Perhaps there was a problem with the upload. You should check the following files: ') . '<br /><code>' . substr($filelist, 0, -6) . '</code>';
$mark = -1;
} else {
if (defined('TEST_RELEASE') && TEST_RELEASE) {
$mark = -1;
$msg1 = gettext("Zenphoto core files [This is a <em>debug</em> build]");
} else {
$msg1 = '';
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:index.php
示例12: checkFolder
function checkFolder($folder)
{
global $albums, $gallery, $count, $albumcount;
$files = scandir(ALBUM_FOLDER_SERVERPATH . '/' . $folder);
$display = true;
if (!empty($folder)) {
$album = new Album($gallery, filesystemToInternal($folder));
}
foreach ($files as $file) {
$file = str_replace('\\', '/', $file);
$key = str_replace(SERVERPATH . '/', '', $folder . '/' . $file);
if (is_dir(ALBUM_FOLDER_SERVERPATH . $folder . '/' . $file) && $file != '..' && $file != '.') {
if (empty($folder)) {
$albumname = $file;
} else {
$albumname = $folder . '/' . $file;
}
checkFolder($albumname);
} else {
if (is_valid_image($file) || is_valid_other_type($file)) {
$filename = internalToFilesystem($file);
$seoname = seoFriendly($filename);
if ($seoname != $filename) {
$old = filesystemToInternal($file);
$image = newImage($album, $old);
if (!($e = $image->rename($seoname))) {
if ($display) {
echo '<p>' . filesystemToInternal($folder) . "</p>\n";
$display = false;
}
echo ' ';
printf(gettext('<em>%1$s</em> renamed to <em>%2$s</em>'), $old, $seoname);
echo "<br />\n";
$count++;
?>
<script type="text/javascript">
<!--
imagecount = <?php
echo $count;
?>
;
//-->
</script>
<?php
}
}
}
}
}
if (!empty($folder)) {
$albumname = internalToFilesystem($folder);
$file = basename($albumname);
$seoname = seoFriendly($file);
if ($seoname != $file) {
$newname = dirname($albumname);
if (empty($newname) || $newname == '.') {
$newname = $seoname;
} else {
$newname .= '/' . $seoname;
}
if (!$album->rename($newname)) {
printf(gettext('<em>%1$s</em> renamed to <em>%2$s</em>'), $albumname, $newname);
echo "<br />\n";
$albumcount++;
?>
<script type="text/javascript">
<!--
albumcount = <?php
echo $albumcount;
?>
;
//-->
</script>
<?php
}
}
}
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:78,代码来源:seo_cleanup.php
示例13: printCustomPageSelector
/**
* Prints the selector for custom pages
*
* @return string
*/
function printCustomPageSelector($current)
{
global $_zp_gallery;
?>
<select id="custompageselector" name="custompageselect">
<?php
$curdir = getcwd();
$themename = $_zp_gallery->getCurrentTheme();
$root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
chdir($root);
$filelist = safe_glob('*.php');
$list = array();
foreach ($filelist as $file) {
$file = filesystemToInternal($file);
$list[$file] = str_replace('.php', '', $file);
}
generateListFromArray(array($current), $list, false, true);
chdir($curdir);
?>
</select>
<?php
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:27,代码来源:menu_manager-admin-functions.php
示例14: createPrimealbum
/**
* Creates a "prime" album for the user. Album name is based on the userid
*/
function createPrimealbum($new = true, $name = NULL)
{
// create his album
$t = 0;
$ext = '';
if (is_null($name)) {
$filename = internalToFilesystem(str_replace(array('<', '>', ':', '"' . '/' . '\\', '|', '?', '*'), '_', seoFriendly($this->getUser())));
} else {
$filename = internalToFilesystem(str_replace(array('<', '>', ':', '"' . '/' . '\\', '|', '?', '*'), '_', $name));
}
while ($new && file_exists(ALBUM_FOLDER_SERVERPATH . $filename . $ext)) {
$t++;
$ext = '-' . $t;
}
$path = ALBUM_FOLDER_SERVERPATH . $filename . $ext;
$albumname = filesystemToInternal($filename . $ext);
if (@mkdir_recursive($path, FOLDER_MOD)) {
$album = newAlbum($albumname);
if ($title = $this->getName()) {
$album->setTitle($title);
}
$album->save();
$this->setAlbum($album);
$this->setRights($this->getRights() | ALBUM_RIGHTS);
if (getOption('user_album_edit_default')) {
$subrights = MANAGED_OBJECT_RIGHTS_EDIT;
} else {
$subrights = 0;
}
if ($this->getRights() & UPLOAD_RIGHTS) {
$subrights = $subrights | MANAGED_OBJECT_RIGHTS_UPLOAD;
}
$objects = $this->getObjects();
$objects[] = array('data' => $albumname, 'name' => $albumname, 'type' => 'album', 'edit' => $subrights);
$this->setObjects($objects);
}
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:40,代码来源:lib-auth.php
示例15: zp_register_filter
<?php
zp_register_filter('themeSwitcher_head', 'switcher_head');
zp_register_filter('themeSwitcher_Controllink', 'switcher_controllink');
zp_register_filter('theme_head', 'css_head', 500);
enableExtension('zenpage', 0, false);
// we do not support it
$curdir = getcwd();
chdir(SERVERPATH . "/themes/" . basename(dirname(__FILE__)) . "/styles");
$filelist = safe_glob('*.css');
$themecolors = array();
foreach ($filelist as $file) {
$themecolors[] = stripSuffix(filesystemToInternal($file));
}
chdir($curdir);
function css_head($ignore)
{
global $themecolors, $zenCSS, $themeColor, $_zp_themeroot;
if (!$themeColor) {
$themeColor = getThemeOption('Theme_colors');
}
if ($editorConfig = getOption('tinymce4_comments')) {
if (strpos($themeColor, 'dark') !== false) {
setOption('tinymce4_comments', 'dark_' . $editorConfig, false);
}
}
$zenCSS = $_zp_themeroot . '/styles/' . $themeColor . '.css';
$unzenCSS = str_replace(WEBPATH, '', $zenCSS);
if (!file_exists(SERVERPATH . internalToFilesystem($unzenCSS))) {
$zenCSS = $_zp_themeroot . "/styles/light.css";
}
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:functions.php
示例16: getImageRotation
function getImageRotation($imgfile)
{
$imgfile = substr(filesystemToInternal($imgfile), strlen(ALBUM_FOLDER_SERVERPATH));
$result = query_single_row('SELECT EXIFOrientation FROM ' . prefix('images') . ' AS i JOIN ' . prefix('albums') . ' as a ON i.albumid = a.id WHERE ' . db_quote($imgfile) . ' = CONCAT(a.folder,"/",i.filename)');
if (is_array($result) && array_key_exists('EXIFOrientation', $result)) {
$splits = preg_split('/!([(0-9)])/', $result['EXIFOrientation']);
$rotation = $splits[0];
switch ($rotation) {
case 1:
return false;
// none
// none
case 2:
return false;
// mirrored
// mirrored
case 3:
return 180;
// upside-down (not 180 but close)
// upside-down (not 180 but close)
case 4:
return 180;
// upside-down mirrored
// upside-down mirrored
case 5:
return 270;
// 90 CW mirrored (not 270 but close)
// 90 CW mirrored (not 270 but close)
case 6:
return 270;
// 90 CCW
// 90 CCW
case 7:
return 90;
// 90 CCW mirrored (not 90 but close)
// 90 CCW mirrored (not 90 but close)
case 8:
return 90;
// 90 CW
}
}
return false;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:43,代码来源:functions-image.php
示例17: processPlugins
function processPlugins()
{
global $_zp_current_admin_obj;
$curdir = getcwd();
$basepath = SERVERPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/';
chdir($basepath);
$filelist = safe_glob('*.php');
foreach ($filelist as $file) {
$titlelink = stripSuffix(filesystemToInternal($file));
$author = stripSuffix(basename(__FILE__));
$sql = 'SELECT `id` FROM ' . prefix('news') . ' WHERE `titlelink`=' . db_quote($titlelink);
$result = query_single_row($sql);
if (empty($result)) {
$plugin_news = new ZenpageNews($titlelink);
$fp = fopen($basepath . $file, 'r');
$empty = true;
$desc = '<p>';
$tags = array($titlelink);
$incomment = false;
while ($line = fgets($fp)) {
if (strpos($line, '/*') !== false) {
$incomment = true;
}
if ($incomment) {
if (strpos($line, '*/') !== false) {
break;
}
$i = strpos($line, '*');
$line = trim(trim(substr($line, $i + 1), '*'));
if (empty($line)) {
if (!$empty) {
$desc .= '<p>';
}
$empty = true;
} else {
if (strpos($line, '@') === 0) {
$line = trim($line, '@');
$i = strpos($line, ' ');
$mod = substr($line, 0, $i);
$line = trim(substr($line, $i + 1));
switch ($mod) {
case 'author':
$desc .= 'Author: ' . html_encode($line) . ' ';
$empty = false;
preg_match_all('|\\((.+?)\\)|', $line, $matches);
$tags = array_merge($tags, $matches[1]);
$author = array_shift($matches[1]);
break;
case 'package':
case 'subpackage':
$tags[] = $line;
break;
case 'tags':
$pluginTags = explode(',', $line);
foreach ($pluginTags as $tag) {
$tags[] = trim(unQuote($tag));
}
break;
}
} else {
$desc .= html_encode($line) . ' ';
$empty = false;
}
}
}
}
$desc .= '</p>';
fclose($fp);
$plugin_news->setShow(0);
$plugin_news->setDateTime(date('Y-m-d H:i:s'), filemtime($file));
$plugin_news->setAuthor($author);
$plugin_news->setTitle($titlelink);
$plugin_news->setContent($desc);
$plugin_news->setTags($tags);
$plugin_news->setCategories(array('officially-supported', 'extensions'));
$plugin_news->setCustomData("http://www.zenphoto.org/documentation/plugins/_" . PLUGIN_FOLDER . "---" . $titlelink . ".html");
$plugin_news->save();
}
}
chdir($curdir);
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:81,代码来源:PluginNews.php
示例18: getTileResources
static function getTileResources($type, $folder = NULL)
{
$curdir = getcwd();
$theme = basename(dirname(dirname(__FILE__)));
$root = SERVERPATH . "/themes/{$theme}/tiles";
chdir($root);
$filelist = safe_glob('*');
$list = array();
foreach ($filelist as $file) {
if (is_dir($file) && $file != '.' && $file != '..') {
$internal = filesystemToInternal($file);
$filename = "{$root}/{$internal}/{$internal}.{$type}";
if (!file_exists($filename)) {
continue;
}
$list[WEBPATH . "/themes/{$theme}/tiles/{$internal}/{$internal}.{$type}"] = $filename;
}
}
$root = SERVERPATH . "/themes/{$theme}/{$folder}";
if (is_dir($root)) {
chdir($root);
$filelist = safe_glob("*.{$type}");
foreach ($filelist as $file) {
$internal = filesystemToInternal($file);
$list[WEBPATH . "/themes/{$theme}/{$folder}/{$internal}"] = SERVERPATH . "/themes/{$theme}/{$folder}/{$internal}";
}
}
chdir($curdir);
return $list;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:30,代码来源:Utils.php
示例19: getPersonaIconList
static function getPersonaIconList($persona)
{
$list = array();
if (!isset($persona) || trim($persona) == '') {
return $list;
}
$theme = $theme = basename(dirname(dirname(__FILE__)));
$root = SERVERPATH . "/themes/{$theme}/personality/{$persona}/icons";
$curdir = getcwd();
chdir($root);
$filelist = safe_glob('*.png');
foreach ($filelist as $file) {
$internal = filesystemToInternal($file);
$list[] = $internal;
}
chdir($curdir);
return $list;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:18,代码来源:PersonalityUtil.php
示例20: array
$personalities = array();
foreach ($persona as $personality) {
if (file_exists(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus/' . $personality . '/functions.php')) {
$personalities[ucfirst(str_replace('_', ' ', $personality))] = $personality;
}
}
$personality = strtolower(getOption('effervescence_personality'));
if (!in_array($personality, $personalities)) {
$persona = $personalities;
$personality = array_shift($persona);
}
chdir(SERVERPATH . "/themes/" . basename(dirname(__FILE__)) . "/styles");
$filelist = safe_glob('*.txt');
$themecolors = array();
foreach ($filelist as $file) {
$themecolors[basename($file)] = stripSuffix(filesystemToInternal($file));
}
chdir($cwd);
if (!OFFSET_PATH) {
if (extensionEnabled('themeSwitcher')) {
$themeColor = getOption('themeSwitcher_effervescence_color');
if (isset($_GET['themeColor'])) {
$new = $_GET['themeColor'];
if (in_array($new, $themecolors)) {
setOption('themeSwitcher_effervescence_color', $new);
$themeColor = $new;
}
}
if (!$themeColor) {
$themeColor = getThemeOption('Theme_colors');
}
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:functions.php
注:本文中的filesystemToInternal函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论