本文整理汇总了PHP中internalToFilesystem函数的典型用法代码示例。如果您正苦于以下问题:PHP internalToFilesystem函数的具体用法?PHP internalToFilesystem怎么用?PHP internalToFilesystem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了internalToFilesystem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: archive
function archive($name)
{
$this->options = array('basedir' => ".", 'name' => internalToFilesystem($name), 'prepend' => "", 'inmemory' => 0, 'overwrite' => 0, 'recurse' => 1, 'storepaths' => 1, 'followlinks' => 0, 'level' => 3, 'method' => 1, 'sfx' => "", 'type' => "", 'comment' => "");
$this->files = array();
$this->exclude = array();
$this->storeonly = array();
$this->error = array();
}
示例2: removeAlbum
function removeAlbum($alb)
{
$folder = $alb->name;
$sql = 'DELETE FROM ' . prefix('plugin_storage') . ' WHERE `type`="favorites" AND `aux`=' . db_quote($this->getInstance()) . ' AND `data`=' . db_quote(serialize(array('type' => 'albums', 'id' => $folder)));
query($sql);
$this->_removeCache(internalToFilesystem($folder));
zp_apply_filter('favoritesHandler_action', 'remove', $alb, $this->name);
}
示例3: __construct
function __construct($folder8, $cache = true, $quiet = false)
{
$folder8 = trim($folder8, '/');
$folderFS = internalToFilesystem($folder8);
$localpath = ALBUM_FOLDER_SERVERPATH . $folderFS;
$this->linkname = $this->name = $folder8;
$this->localpath = rtrim($localpath, '/');
if (!($this->exists = AlbumBase::albumCheck($folder8, $folderFS, $quiet, !file_exists($this->localpath) || is_dir($this->localpath)))) {
return;
}
$data = explode("\n", file_get_contents($localpath));
foreach ($data as $param) {
$parts = explode('=', $param);
switch (trim($parts[0])) {
case 'USER':
$owner = trim($parts[1]);
break;
case 'TITLE':
$this->instance = trim($parts[1]);
break;
case 'THUMB':
$this->set('thumb', trim($parts[1]));
break;
}
}
$new = $this->instantiate('albums', array('folder' => $this->name), 'folder', $cache);
$title = $this->getTitle('all');
$desc = $this->getDesc('all');
parent::__construct($owner);
$this->exists = true;
if (!is_dir(stripSuffix($this->localpath))) {
$this->linkname = stripSuffix($folder8);
}
$this->name = $folder8;
$this->setTitle($title);
$this->setDesc($desc);
if ($new) {
$title = $this->get('title');
$this->set('title', stripSuffix($title));
// Strip the suffix
$this->setDateTime(strftime('%Y-%m-%d %H:%M:%S', $this->get('mtime')));
$this->save();
zp_apply_filter('new_album', $this);
}
zp_apply_filter('album_instantiate', $this);
}
示例4: css_head
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";
}
return $ignore;
}
示例5: parseCSSDef
function parseCSSDef($file)
{
$file = str_replace(WEBPATH, '', $file);
$file = SERVERPATH . internalToFilesystem($file);
if (is_readable($file) && ($fp = @fopen($file, "r"))) {
while ($line = fgets($fp)) {
if (!(false === strpos($line, "#main2 {"))) {
$line = fgets($fp);
$line = trim($line);
$item = explode(":", $line);
$rslt = trim(substr($item[1], 0, -1));
return $rslt;
}
}
}
return "#0b9577";
/* the default value */
}
示例6: flowplayer_playlistJS
function flowplayer_playlistJS()
{
$theme = getCurrentTheme();
$css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/flowplayer3_playlist.css';
if (file_exists($css)) {
$css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/flowplayer3_playlist.css';
} else {
$css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/flowplayer3/flowplayer3_playlist.css';
}
?>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/flowplayer3/jquery.tools.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php
echo pathurlencode($css);
?>
" />
<?php
}
示例7: themeJS
static function themeJS()
{
$theme = getCurrentTheme();
$css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/jquery.bxslider.css';
if (file_exists($css)) {
$css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/jquery.bxslider.css';
} else {
$css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/bxslider_thumb_nav/jquery.bxslider.css';
}
?>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/bxslider_thumb_nav/jquery.bxslider.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php
echo html_encode($css);
?>
" />
<?php
}
示例8: themeJS
static function themeJS()
{
$theme = getCurrentTheme();
$css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/jcarousel.css';
if (file_exists($css)) {
$css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/jcarousel.css';
} else {
$css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jcarousel_thumb_nav/jcarousel.css';
}
?>
<script>
(function($) {
var userAgent = navigator.userAgent.toLowerCase();
$.browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, '0'])[1],
safari: /webkit/.test(userAgent),
opera: /opera/.test(userAgent),
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
};
})(jQuery);
</script>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/jcarousel_thumb_nav/jquery.jcarousel.pack.js"></script>
<link rel="stylesheet" type="text/css" href="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/jcarousel_thumb_nav/jquery.jcarousel.css" />
<link rel="stylesheet" type="text/css" href="<?php
echo html_encode($css);
?>
" />
<?php
}
示例9: getItemGallery
/**
* Gets the feed item data in a gallery feed
*
* @param object $item Object of an image or album
* @return array
*/
protected function getItemGallery($item)
{
if ($this->mode == "albums") {
$albumobj = newAlbum($item['folder']);
$totalimages = $albumobj->getNumImages();
$itemlink = $this->host . pathurlencode($albumobj->getLink());
$thumb = $albumobj->getAlbumThumbImage();
$title = $albumobj->getTitle($this->locale);
$filechangedate = filectime(ALBUM_FOLDER_SERVERPATH . internalToFilesystem($albumobj->name));
$latestimage = query_single_row("SELECT mtime FROM " . prefix('images') . " WHERE albumid = " . $albumobj->getID() . " AND `show` = 1 ORDER BY id DESC");
if ($latestimage && $this->sortorder == 'latestupdated') {
$count = db_count('images', "WHERE albumid = " . $albumobj->getID() . " AND mtime = " . $latestimage['mtime']);
} else {
$count = $totalimages;
}
if ($count != 0) {
$imagenumber = sprintf(ngettext('%s (%u image)', '%s (%u images)', $count), $title, $count);
} else {
$imagenumber = $title;
}
$feeditem['desc'] = $albumobj->getDesc($this->locale);
$feeditem['title'] = $imagenumber;
$feeditem['pubdate'] = date("r", strtotime($albumobj->getDateTime()));
} else {
if (isAlbumClass($item)) {
$albumobj = $item;
$thumb = $albumobj->getAlbumThumbImage();
} else {
$albumobj = $item->getAlbum();
$thumb = $item;
}
$itemlink = $this->host . $item->getLink();
$title = $item->getTitle($this->locale);
$feeditem['desc'] = $item->getDesc($this->locale);
$feeditem['title'] = sprintf('%1$s (%2$s)', $item->getTitle($this->locale), $albumobj->getTitle($this->locale));
$feeditem['pubdate'] = date("r", strtotime($item->getDateTime()));
}
//link
$feeditem['link'] = $itemlink;
//category
$feeditem['category'] = html_encode($albumobj->getTitle($this->locale));
//media content
$feeditem['media_content'] = '<image url="' . PROTOCOL . '://' . html_encode($thumb->getCustomImage($this->imagesize, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . '" />';
$feeditem['media_thumbnail'] = '<thumbnail url="' . PROTOCOL . '://' . html_encode($thumb->getThumb()) . '" />';
return $feeditem;
}
示例10: getFullImageURL
/**
* returns URL to the original image or to a high quality alternate
* e.g. ogg, avi, wmv files that can be handled by the client browser
*
* @param unknown_type $path
*/
function getFullImageURL()
{
// Search for a high quality version of the video
if ($vid = parent::getFullImageURL()) {
$folder = ALBUM_FOLDER_SERVERPATH . internalToFilesystem($this->album->getFileName());
$video = stripSuffix($this->filename);
$curdir = getcwd();
chdir($folder);
$candidates = safe_glob($video . '.*');
chdir($curdir);
foreach ($candidates as $target) {
$ext = getSuffix($target);
if (in_array($ext, $this->videoalt)) {
$vid = stripSuffix($vid) . '.' . substr(strrchr($target, "."), 1);
}
}
}
return $vid;
}
示例11: zp_apply_filter
$album->save();
}
@chmod($targetPath, CHMOD_VALUE);
$error = zp_apply_filter('check_upload_quota', UPLOAD_ERR_OK, $tempFile);
if (!$error) {
if (is_valid_image($name) || is_valid_other_type($name)) {
$seoname = seoFriendly($name);
if (strrpos($seoname, '.') === 0) {
$seoname = sha1($name) . $seoname;
}
// soe stripped out all the name.
$targetFile = $targetPath . '/' . internalToFilesystem($seoname);
if (file_exists($targetFile)) {
$append = '_' . time();
$seoname = stripSuffix($seoname) . $append . '.' . getSuffix($seoname);
$targetFile = $targetPath . '/' . internalToFilesystem($seoname);
}
if (move_uploaded_file($tempFile, $targetFile)) {
@chmod($targetFile, 0666 & CHMOD_VALUE);
$album = new Album($gallery, $folder);
$image = newImage($album, $seoname);
$image->setOwner($_zp_current_admin_obj->getUser());
if ($name != $seoname && $image->getTitle() == substr($seoname, 0, strrpos($seoname, '.'))) {
$image->setTitle(substr($name, 0, strrpos($name, '.')));
}
$image->save();
} else {
$error = UPLOAD_ERR_NO_FILE;
}
} else {
if (is_zip($name)) {
示例12: header
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);
header("HTTP/1.0 200 OK");
header("Status: 200 OK");
header('Last-Modified: ' . $_zp_last_modified);
zp_apply_filter('theme_headers');
include internalToFilesystem($_zp_obj);
} else {
// If the requested object does not exist, issue a 404 and redirect to the theme's
// 404.php page, or a 404.php in the zp-core folder.
if (is_object($_zp_HTML_cache)) {
$_zp_HTML_cache->abortHTMLCache();
}
list($album, $image) = rewrite_get_album_image('album', 'image');
debug404($album, $image, $theme);
$_zp_gallery_page = '404.php';
$errpage = THEMEFOLDER . '/' . internalToFilesystem($theme) . '/404.php';
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
zp_apply_filter('theme_headers');
if (file_exists(SERVERPATH . "/" . $errpage)) {
if ($custom) {
require_once $custom;
}
include $errpage;
} else {
include ZENFOLDER . '/404.php';
}
}
//$_zp_script_timer['theme script load'] = microtime();
exposeZenPhotoInformations($_zp_obj, $_zp_loaded_plugins, $theme);
示例13: create
/**
* Creates a zip file of the album
*
* @param string $albumname album folder
* @param bool fromcache if true, images will be the "sized" image in the cache file
*/
static function create($albumname, $fromcache)
{
global $_zp_zip_list, $_zp_gallery, $defaultSize;
$album = newAlbum($albumname);
if (!$album->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumname)) {
self::pageError(403, gettext("Forbidden"));
}
if (!$album->exists) {
self::pageError(404, gettext('Album not found'));
}
$_zp_zip_list = array();
if ($fromcache) {
$opt = array('large_file_size' => 5 * 1024 * 1024, 'comment' => sprintf(gettext('Created from cached images of %1$s on %2$s.'), $album->name, zpFormattedDate(DATE_FORMAT, time())));
loadLocalOptions(false, $_zp_gallery->getCurrentTheme());
$defaultSize = getOption('image_size');
self::AddAlbumCache($album, strlen($albumname), SERVERPATH . '/' . CACHEFOLDER . '/' . $albumname);
} else {
$opt = array('large_file_size' => 5 * 1024 * 1024, 'comment' => sprintf(gettext('Created from images in %1$s on %2$s.'), $album->name, zpFormattedDate(DATE_FORMAT, time())));
self::AddAlbum($album, strlen($albumname), SERVERPATH . '/' . ALBUMFOLDER . '/' . $albumname);
}
$zip = new ZipStream($albumname . '.zip', $opt);
foreach ($_zp_zip_list as $path => $file) {
@set_time_limit(6000);
$zip->add_file_from_path(internalToFilesystem($file), internalToFilesystem($path));
}
$zip->finish();
}
示例14: setupTheme
}
$theme = setupTheme($albumobj);
$custom = $_zp_themeroot . '/functions.php';
if (file_exists($custom)) {
require_once $custom;
}
$_zp_gallery_page = 'password.php';
$_zp_script = $_zp_themeroot . '/password.php';
if (!file_exists(internalToFilesystem($_zp_script))) {
$_zp_script = SERVERPATH . '/' . ZENFOLDER . '/password.php';
}
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);
header("HTTP/1.0 302 Found");
header("Status: 302 Found");
header('Last-Modified: ' . ZP_LAST_MODIFIED);
include internalToFilesystem($_zp_script);
exposeZenPhotoInformations($_zp_script, array(), $theme);
exitZP();
}
}
$image_path = $imageobj->localpath;
$suffix = getSuffix($image_path);
switch ($suffix) {
case 'wbm':
case 'wbmp':
$suffix = 'wbmp';
break;
case 'jpg':
$suffix = 'jpeg';
break;
case 'png':
示例15: getThumbImageFile
/**
* Returns the image file name for the thumbnail image.
*
* @param string $path override path
*
* @return s
*/
function getThumbImageFile($path = NULL)
{
global $_zp_gallery;
if (is_null($path)) {
$path = SERVERPATH;
}
if (is_null($this->objectsThumb)) {
switch (getSuffix($this->filename)) {
case "pdf":
$img = '/pdfDefault.png';
break;
case 'ppt':
case 'pps':
$img = '/ppsDefault.png';
break;
case 'tif':
case 'tiff':
$img = '/tifDefault.png';
break;
}
$imgfile = $path . '/' . THEMEFOLDER . '/' . internalToFilesystem($_zp_gallery->getCurrentTheme()) . '/images/' . $img;
if (!file_exists($imgfile)) {
$imgfile = $path . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . substr(basename(__FILE__), 0, -4) . '/' . $img;
}
} else {
$imgfile = ALBUM_FOLDER_SERVERPATH . internalToFilesystem($this->imagefolder) . '/' . $this->objectsThumb;
}
return $imgfile;
}