本文整理汇总了PHP中gallery::getThumbnail方法的典型用法代码示例。如果您正苦于以下问题:PHP gallery::getThumbnail方法的具体用法?PHP gallery::getThumbnail怎么用?PHP gallery::getThumbnail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gallery
的用法示例。
在下文中一共展示了gallery::getThumbnail方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sizeof
$page = (int) $_GET['page'] - 1;
} else {
$page = 0;
}
$start = $page * $perpage;
$total = $perpage;
} else {
$pages = 1;
$page = 0;
$start = 0;
$total = sizeof($files);
}
$keys = @array_keys($files);
$pagination = rcms_pagination(sizeof($files), $perpage, $page + 1, '?' . $_SERVER['QUERY_STRING']);
//Output
if (!empty($pagination)) {
$frm->addrow($pagination);
}
$c = $start;
while ($total > 0 && $c < sizeof($keys)) {
$filename =& $files[$keys[$c]];
$data = $gallery->getData($filename);
$frm->addrow($filename . ' aka ' . $frm->text_box('title[' . $filename . ']', $data['title']) . '<br/>' . __('Keywords') . ': ' . $frm->text_box('keywords[' . $filename . ']', @$data['keywords']) . '<br/>' . $data['type'] . '(' . $data['size'] . ')<br/>' . $frm->checkbox('delete[' . $filename . ']', 'true', __('Delete')), $gallery->getThumbnail($filename), 'top');
$total--;
$c++;
}
$frm->addmessage(__('To divide keywords use ; symbol'));
} else {
$frm->addmessage(__('Nothing founded'));
}
$frm->show();
示例2: gallery
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
$gallery = new gallery();
$images = $gallery->getFullImagesList();
if (!empty($images)) {
$i = rand(0, sizeof($images) - 1);
$id = 0;
foreach ($images as $filename) {
if ($id == $i) {
show_window(__('Random image'), '<a href="?module=gallery&id=' . $filename . '">' . $gallery->getThumbnail($filename) . '</a>', 'center');
break;
}
$id++;
}
}
示例3: InputForm
} else {
$result .= __('Cannot update title') . ': ' . $filename . '<br/>';
}
if (@$current['keywords'] !== $_POST['keywords']) {
if ($gallery->changeKeywords($filename, $_POST['keywords'])) {
$result .= __('Keywords updated') . ': ' . $filename . '<br/>';
} else {
$result .= __('Cannot update keywords') . ': ' . $filename . '<br/>';
}
}
$gallery->saveIndexFiles();
}
$current = $gallery->getData(basename($_GET['edit']));
$frm = new InputForm('', 'post', __('Submit'));
$frm->hidden('save', 1);
$frm->addrow(__('Title') . ': ' . $frm->text_box('title', $current['title']) . '<br/>' . __('Keywords') . ': ' . $frm->text_box('keywords', @$current['keywords']) . '<br/>' . $current['type'] . '(' . $current['size'] . ')<br/>' . $frm->checkbox('delete', $filename, __('Delete')), $gallery->getThumbnail($filename), 'top');
$frm->addmessage(__('To divide keywords use ; symbol'));
if (!empty($result)) {
show_window($gallery_link . ' → ' . __('Result'), $result);
}
show_window($gallery_link . ' → ' . __('Edit') . ' ' . $filename, $frm->show(true) . back_button());
}
$result = '';
if (!empty($_GET['delete'])) {
$filename = $_GET['delete'];
if ($gallery->removeImage($filename)) {
$result .= __('Image removed') . ': ' . $filename . '<br/>';
} else {
$result .= __('Error occurred') . ': ' . $filename . '<br/>';
}
}
示例4: ceil
}
if (!empty($system->config['perpage'])) {
$pages = ceil(sizeof($images) / $system->config['perpage']);
if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
$page = (int) $_GET['page'] - 1;
} else {
$page = 0;
}
$start = $page * $system->config['perpage'];
$total = $system->config['perpage'];
} else {
$pages = 1;
$page = 0;
$start = 0;
$total = sizeof($images);
}
$keys = @array_keys($images);
$data['pagination'] = rcms_pagination(sizeof($images), $system->config['perpage'], $page + 1, '?' . $_SERVER['QUERY_STRING']);
$c = $start;
$data['images'] = array();
while ($total > 0 && $c < sizeof($keys)) {
$image =& $images[$keys[$c]];
if ($image_data = $gallery->getData($image)) {
$data['images'][$image] = $image_data + array('thumbnail' => $gallery->getThumbnail($image), 'comments' => $gallery->countComments($image));
}
$total--;
$c++;
}
$data['linkdata'] = $linkdata;
show_window('<a href="?module=gallery">' . __('Gallery') . '</a>' . (cfr('GALLERY') ? ' ' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : '') . (get('keyword') ? ' → ' . get('keyword') : ''), !empty($images) ? rcms_parse_module_template('gallery.tpl', $data) : __('Nothing founded'), 'center');
}