本文整理汇总了PHP中uploader::getTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP uploader::getTemplate方法的具体用法?PHP uploader::getTemplate怎么用?PHP uploader::getTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uploader
的用法示例。
在下文中一共展示了uploader::getTemplate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
if (hasPermissions('articles')) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/uploader/uploader.php";
$templates = array(uploader::getTemplate('uploader', 'wysiwyg/'), uploader::getTemplate('uploader.file', 'wysiwyg/'), uploader::getTemplate('uploader.popup'));
uploader::init(array(), $templates, 'wysiwyg');
}
?>
<script>
window.addEvent('domready', function() {
$$('.ai-form input[type=file]').each( function (el) {
articlesFileInput(el);
});
<?php
if (hasPermissions('articles')) {
?>
CKEDITOR.config.customConfig = '/scripts/ckedit/config_admin.js';<?php
}
?>
CKEDITOR.replace('msgtext', {
toolbar : 'Articles',
// enterMode : CKEDITOR.ENTER_BR,
// shiftEnterMode : CKEDITOR.ENTER_P,
format_tags : 'p;h1;h2;h3;h4;h5;h6',
width: '',
linkShowAdvancedTab: false,
linkShowTargetTab: false
});
// CKEDITOR.replace('short', {
// toolbar : 'Articles',
示例2: header
<?php
if (!defined('IN_STDF')) {
header("HTTP/1.0 404 Not Found");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/portfolio.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/kwords.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/uploader/uploader.php";
$templates = array(uploader::getTemplate('uploader', 'portfolio/'), uploader::getTemplate('uploader.file', 'portfolio/'), uploader::getTemplate('uploader.popup', 'portfolio/'));
$stop_words = new stop_words(hasPermissions('users'));
setlocale(LC_ALL, 'ru_RU.CP1251');
$portf = new portfolio();
$prjs = $portf->GetPortf($user->uid, 'NULL', true);
$prfs = new professions();
$profs = $prfs->GetAllProfessionsPortfWithoutMirrored($user->uid, "AND t.user_id IS NOT NULL");
$is_not_spec = sizeof($profs) <= 0;
$first_profs = current($profs);
if ($specs_add) {
$specs_add_array = array();
for ($si = 0; $si < sizeof($specs_add); $si++) {
$specs_add_array[$si] = professions::GetProfNameWP($specs_add[$si], ' / ');
}
$specs_add_string = join(", ", $specs_add_array);
} else {
$specs_add_string = "Нет";
}
$html_keyword_js = '<a href="/freelancers/?word=$1" class="inherit">$2</a>';
$html_keyword = preg_replace('/\\$\\d/', '%s', $html_keyword_js);
示例3: updatePreview
function updatePreview($file_id, $resource)
{
$objResponse =& new xajaxResponse();
$CFile = new CFile($file_id);
$path_file = $CFile->path . 'sm_' . $CFile->name;
if ($CFile->image_size['height'] > portfolio::PREVIEW_MAX_HEIGHT || $CFile->image_size['width'] > portfolio::PREVIEW_MAX_WIDTH) {
$CFile = $CFile->resizeImage($path_file, portfolio::PREVIEW_MAX_WIDTH, portfolio::PREVIEW_MAX_HEIGHT, 'auto', true);
} else {
$CFile = uploader::remoteCopy($CFile->id, $CFile->table, $CFile->path, false, 'sm_f_');
}
uploader::sclear($resource);
// Чистим заменяем
uploader::screateFile($CFile, $resource);
$callback = uploader::getCallback(uploader::sgetTypeUpload($resource));
$template = uploader::getTemplate('uploader.file', 'portfolio/');
$template = str_replace(array('{idFile}', '{fileName}'), array($CFile->id, $CFile->original_name), $template);
$objResponse->script("\n \$\$('#work_preview_file .qq-upload-list').set('html', '{$template}');\n \$\$('#work_preview_file .qq-upload-list .qq-upload-file').set('href', '" . WDCPREFIX . "/{$path_file}');\n \$\$('#work_preview_file .qq-upload-list .qq-uploader-fileID').show();\n ");
$objResponse->script("\n \$\$('#work_preview_file .qq-upload-delete').addEvent('click', function() {\n new Request.JSON({\n url: '/uploader.php',\n onSuccess: function(resp) {\n if(resp.success) {\n \$\$('#work_preview_file .qq-upload-list').set('html', '');\n if(resp.onComplete !== undefined) {\n eval(resp.onComplete);\n }\n } \n }\n }).post({\n 'action': 'remove',\n 'files' : [{$CFile->id}],\n 'resource': '{$resource}',\n 'u_token_key': '{$_SESSION['rand']}'\n });\n });\n ");
$objResponse->script($callback);
return $objResponse;
}
示例4: array
</div>
<?php
} else {
?>
<?php
$sTitle = $project['moderator_status'] === '0' && $project['kind'] != 4 && $project['is_pro'] != 't' ? $stop_words->replace($project['name'], 'plain', false) : $project['name'];
?>
<?php
if (!is_emp() && !($project['exec_id'] && $exec_info)) {
?>
<div class="b-buttons b-buttons_padbot_30">
<?php
if (get_uid(false) && $project['kind'] != 9) {
?>
<div class="b-layout__txt b-layout__txt_padtop_10 b-layout__txt_float_right i-shadow"><?php
$templates = array(uploader::getTemplate('uploader', 'project_abuse/'), uploader::getTemplate('uploader.file', 'project_abuse/'), uploader::getTemplate('uploader.popup', 'project_abuse/'));
uploader::init(array('abuse_uploader' => array('umask' => uploader::umask('prj_abuse'), 'validation' => array('allowedExtensions' => array('jpg', 'gif', 'png', 'jpeg'), 'restrictedExtensions' => array(), 'sizeLimit' => tmp_project::MAX_FILE_SIZE), 'text' => array('uploadButton' => iconv('cp1251', 'utf8', 'Прикрепить файлы')))), $templates);
$complain = true;
$obj_project->IsHaveComplain($project['id'], get_uid(), $complain);
$is_project_complain_sent = $obj_project->isComplainSent($project['id']);
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects_complains.php";
$complainTypes = projects_complains::getTypes();
include $_SERVER['DOCUMENT_ROOT'] . "/projects/tpl.abuse.php";
?>
<span class="b-layout__txt_color_c10600">Пожаловаться на проект:
<a class="b-layout__link b-layout__link_dot_c10600 abuse-employer-project-link" href="javascript:void(0)">Работодателю</a>
/ <a class="b-layout__link b-layout__link_dot_c10600 abuse-moderator-project-link" href="javascript:void(0)">Модератору</a>
</span>
  <img class="b-layout__pic b-layout__pic_absolute b-layout__txt_hide" id="project_abuse_success" style="top:-8px; left:400px" src="/images/thanks.png" width="80" height="36">