本文整理汇总了PHP中RMUtilities::image_manager方法的典型用法代码示例。如果您正苦于以下问题:PHP RMUtilities::image_manager方法的具体用法?PHP RMUtilities::image_manager怎么用?PHP RMUtilities::image_manager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RMUtilities
的用法示例。
在下文中一共展示了RMUtilities::image_manager方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mw_widget_image
/**
* Provides a widget to specify the default image for posts
*/
function mw_widget_image()
{
global $xoopsSecurity, $xoopsModuleConfig, $xoopsUser, $rm_config;
$id = rmc_server_var($_REQUEST, 'id', 0);
$type = rmc_server_var($_REQUEST, 'type', '');
$op = rmc_server_var($_REQUEST, 'op', '');
$edit = $op == 'edit' ? 1 : 0;
$widget = array();
$widget['title'] = __('Default Image', 'mywords');
$util = new RMUtilities();
if ($edit) {
//Verificamos que el software sea válido
if ($id <= 0) {
$params = '';
}
$post = new MWPost($id);
if ($post->isNew()) {
$params = '';
} else {
$params = $post->getVar('image');
}
} else {
$params = '';
}
$widget['content'] = '<form name="frmDefimage" id="frm-defimage" method="post">';
$widget['content'] .= $util->image_manager('image', $params);
$widget['content'] .= '</form>';
return $widget;
}
示例2: mywords_widget_image
/**
* Provides a widget to specify the default image for posts
*/
function mywords_widget_image($post = null)
{
global $xoopsSecurity, $xoopsModuleConfig, $xoopsUser, $rm_config;
$type = RMHttpRequest::request('type', 'string', '');
$widget = array();
$widget['title'] = __('Default Image', 'mywords');
$util = new RMUtilities();
if (isset($post) && is_a($post, 'MWPost')) {
if ($post->isNew()) {
$params = '';
} else {
$params = $post->getVar('image', 'e');
}
} else {
$params = '';
}
$widget['content'] = '<form name="frmDefimage" id="frm-defimage" method="post">';
$widget['content'] .= $util->image_manager('image', 'image', $params, array('accept' => 'thumbnail', 'multiple' => 'no'));
$widget['content'] .= '</form>';
return $widget;
}
示例3: dt_widget_defimg
/**
* Show fields for default image
*/
function dt_widget_defimg($edit = 0)
{
$id = intval(rmc_server_var($_REQUEST, 'id', 0));
$type = rmc_server_var($_REQUEST, 'type', '');
$action = rmc_server_var($_REQUEST, 'action', '');
$widget = array();
$widget['title'] = __('Default Image', 'dtransport');
$widget['icon'] = '../images/shots.png';
$util = new RMUtilities();
if ($edit) {
//Verificamos que el software sea válido
if ($id <= 0) {
$params = '';
}
//Verificamos que el software exista
if ($type == 'edit') {
$sw = new DTSoftwareEdited($id);
} else {
$sw = new DTSoftware($id);
}
if ($sw->isNew()) {
$params = '';
} else {
$params = $sw->getVar('image');
}
} else {
$params = '';
}
$widget['content'] = '<form name="frmDefimage" id="frm-defimage" method="post">';
$widget['content'] .= $util->image_manager('image', $params);
$widget['content'] .= '</form>';
return $widget;
}