本文整理汇总了PHP中Context::addJsFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::addJsFilter方法的具体用法?PHP Context::addJsFilter怎么用?PHP Context::addJsFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Context
的用法示例。
在下文中一共展示了Context::addJsFilter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
$oSecurity = new Security();
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
if ($this->module_info->list_count) {
$this->list_count = $this->module_info->list_count;
}
if ($this->module_info->search_list_count) {
$this->search_list_count = $this->module_info->search_list_count;
}
if ($this->module_info->page_count) {
$this->page_count = $this->module_info->page_count;
}
$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
// $this->_getStatusNameListecret option backward compatibility
$oDocumentModel = getModel('document');
$statusList = $this->_getStatusNameList($oDocumentModel);
if (isset($statusList['SECRET'])) {
$this->module_info->secret = 'Y';
}
// use_category <=1.5.x, hide_category >=1.7.x
$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
if ($count_category) {
if ($this->module_info->hide_category) {
$this->module_info->use_category = $this->module_info->hide_category == 'Y' ? 'N' : 'Y';
} else {
if ($this->module_info->use_category) {
$this->module_info->hide_category = $this->module_info->use_category == 'Y' ? 'N' : 'Y';
} else {
$this->module_info->hide_category = 'N';
$this->module_info->use_category = 'Y';
}
}
} else {
$this->module_info->hide_category = 'Y';
$this->module_info->use_category = 'N';
}
/**
* check the consultation function, if the user is admin then swich off consultation function
* if the user is not logged, then disppear write document/write comment./ view document
**/
if ($this->module_info->consultation == 'Y' && !$this->grant->manager) {
$this->consultation = true;
if (!Context::get('is_logged')) {
$this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
}
} else {
$this->consultation = false;
}
$oDocumentModel = getModel('document');
$extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
Context::set('extra_keys', $extra_keys);
$template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
if (!is_dir($template_path) || !$this->module_info->mskin) {
$this->module_info->mskin = 'default';
$template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
}
$this->setTemplatePath($template_path);
Context::addJsFilter($this->module_path . 'tpl/filter', 'input_password.xml');
}
示例2: dispContactContent
/**
* @brief display contact content
**/
function dispContactContent()
{
Context::addJsFilter($this->module_path . 'tpl/filter', 'search.xml');
Context::addJsFilter($this->module_path . 'tpl/filter', 'send_email.xml');
/**
* get extra variables from xe_document_extra_keys table, context set
**/
$oDocumentModel =& getModel('document');
$form_extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
Context::set('form_extra_keys', $form_extra_keys);
// set template_file to be list.html
$this->setTemplateFile('index');
}
示例3: dispMagiccontentInsertDocument
function dispMagiccontentInsertDocument()
{
$widget_sequence = Context::get('widget_sequence');
$document_srl = (int) Context::get('document_srl');
if (!$document_srl) {
$document_srl = 0;
}
$oDocumentModel =& getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl, true);
$oDocument->module_srl = $widget_sequence;
Context::set('oDocument', $oDocument);
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert.xml');
$this->setLayoutFile('default_layout');
$this->setTemplateFile('insert_document');
}
示例4: init
/**
* @brief 초기화
**/
function init()
{
/**
* 기본 모듈 정보들 설정 (list_count, page_count는 게시판 모듈 전용 정보이고 기본 값에 대한 처리를 함)
**/
if ($this->module_info->list_count) {
$this->list_count = $this->module_info->list_count;
}
if ($this->module_info->page_count) {
$this->page_count = $this->module_info->page_count;
}
if (!$this->module_info->popular_tag_period) {
$this->module_info->popular_tag_period = 30;
}
/**
* 스킨 경로를 미리 template_path 라는 변수로 설정함
**/
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
if (!is_dir($template_path) || !$this->module_info->skin) {
$this->module_info->skin = 'xe_default';
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
}
$this->setTemplatePath($template_path);
/**
* 전반적으로 사용되는 javascript, JS 필터 추가
**/
Context::addJsFile($this->module_path . 'tpl/js/livexe.js');
if ($this->grant->insert_rss) {
Context::addJsFilter($this->module_path . 'tpl/filter', 'get_rss.xml');
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_rss.xml');
}
$args->module_srl = $this->module_srl;
$output = executeQuery('livexe.getRSSCount', $args);
Context::set('total_feeds', $output->data->count);
$output = executeQuery('livexe.getDocumentCount', $args);
Context::set('total_articles', $output->data->count);
if (Context::get('is_logged')) {
$logged_info = Context::get('logged_info');
$args->module_srl = $this->module_srl;
$args->member_srl = $logged_info->member_srl;
$output = executeQuery('livexe.getMyRSSCount', $args);
Context::set('total_my_feeds', $output->data->count);
}
}
示例5: dispMaterialPopup
/**
* @brief 글감 수집기 팝업
**/
function dispMaterialPopup()
{
global $lang;
$mid = Context::get('mid');
$auth = Context::get('auth');
Context::set('site_module_info', null);
$oMaterialModel =& getModel('material');
$oModuleModel =& getModel('module');
$module_info = $oModuleModel->getModuleInfoByMid($mid, $site_srl = 0);
$module_srl = $module_info->module_srl;
$member_srl = $oMaterialModel->getMemberSrlByAuth($auth);
if (!$member_srl) {
Context::set('error', true);
}
// 템플릿 변수
$objects = explode("\t", Context::get('objects'));
$images = explode("\t", Context::get('images'));
$objects = array_unique($objects);
$images = array_unique($images);
$img = array();
foreach ($images as $key => $image) {
if (preg_match('/\\.(gif|jpg|jpeg|png)(\\?.*|)$/i', $image)) {
$img[] = $image;
}
}
Context::set('objects', $objects);
Context::set('images', $img);
if (!Context::get('title')) {
Context::set('title', Context::get('url'));
}
Context::setBrowserTitle($lang->material->popup_title);
// 템플릿 지정
$this->setLayoutFile("popup_layout");
$this->setTemplateFile('popup');
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_material.xml');
}
示例6: dispAutoinstallAdminUninstall
/**
* Display uninstall package
*
* @return Object
*/
function dispAutoinstallAdminUninstall()
{
$package_srl = Context::get('package_srl');
if (!$package_srl) {
return $this->dispAutoinstallAdminIndex();
}
$oModel =& getModel('autoinstall');
$installedPackage = $oModel->getInstalledPackage($package_srl);
if (!$installedPackage) {
return $this->dispAutoinstallAdminInstalledPackages();
}
if (!$_SESSION['ftp_password']) {
Context::set('need_password', true);
}
$installedPackage = $oModel->getPackage($package_srl);
$path = $installedPackage->path;
$type = $oModel->getTypeFromPath($path);
if (!$type || $type == "core") {
return $this->stop("msg_invalid_request");
}
$config_file = $oModel->getConfigFilePath($type);
if (!$config_file) {
return $this->stop("msg_invalid_request");
}
$params["act"] = "getResourceapiPackages";
$params["package_srls"] = $package_srl;
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
$xml_lUpdate = new XmlParser();
$xmlDoc = $xml_lUpdate->parse($buff);
if ($xmlDoc && $xmlDoc->response->packagelist->item) {
$item_list = $this->rearranges($xmlDoc->response->packagelist->item);
$installedPackage->title = $item_list[$package_srl]->title;
$installedPackage->type = $item_list[$package_srl]->category;
$installedPackage->avail_remove = $item_list[$package_srl]->avail_remove;
$installedPackage->deps = $item_list[$package_srl]->deps;
Context::set('package', $installedPackage);
$this->setTemplateFile('uninstall');
Context::addJsFilter($this->module_path . 'tpl/filter', 'uninstall_package.xml');
$security = new Security();
$security->encodeHTML('package.');
$this->setTemplateFile('uninstall');
} else {
return $this->stop('msg_connection_fail');
}
}
示例7: dispHomepageIndex
/**
* @brief 카페 메인 출력
**/
function dispHomepageIndex()
{
$oHomepageAdminModel =& getAdminModel('homepage');
$oHomepageModel =& getModel('homepage');
$oModuleModel =& getModel('module');
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
if (!is_dir($template_path) || !$this->module_info->skin) {
$this->module_info->skin = 'xe_default';
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
}
$this->setTemplatePath($template_path);
// 카페 목록을 구함
$page = Context::get('page');
$output = $oHomepageAdminModel->getHomepageList($page);
if ($output->data && count($output->data)) {
foreach ($output->data as $key => $val) {
$banner_src = 'files/attach/cafe_banner/' . $val->site_srl . '.jpg';
if (file_exists(_XE_PATH_ . $banner_src)) {
$output->data[$key]->cafe_banner = $banner_src . '?rnd=' . filemtime(_XE_PATH_ . $banner_src);
}
$url = getSiteUrl($val->domain, '');
if (substr($url, 0, 1) == '/') {
$url = substr(Context::getRequestUri(), 0, -1) . $url;
}
$output->data[$key]->url = $url;
}
}
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('homepage_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
// 카페 생성 권한 세팅
if ($oHomepageModel->isCreationGranted()) {
Context::set('isEnableCreateCafe', true);
Context::addJsFilter($this->module_path . 'tpl/filter', 'cafe_creation.xml');
}
// 카페의 최신 글 추출
$output = executeQueryArray('homepage.getNewestDocuments');
Context::set('newest_documents', $output->data);
// 카페의 최신 댓글 추출
$output = executeQueryArray('homepage.getNewestComments');
Context::set('newest_comments', $output->data);
$logged_info = Context::get('logged_info');
if ($logged_info->member_srl) {
$myargs->member_srl = $logged_info->member_srl;
$output = executeQueryArray('homepage.getMyCafes', $myargs);
Context::set('my_cafes', $output->data);
}
$homepage_info = $oModuleModel->getModuleConfig('homepage');
if ($homepage_info->use_rss == 'Y') {
Context::set('rss_url', getUrl('', 'mid', $this->module_info->mid, 'act', 'rss'));
}
$this->setTemplateFile('index');
}
示例8: dispWikiDeleteComment
/**
* @brief 댓글 삭제 화면 출력
**/
function dispWikiDeleteComment()
{
// 권한 체크
if (!$this->grant->write_comment) {
return $this->dispWikiMessage('msg_not_permitted');
}
// 삭제할 댓글번호를 가져온다
$comment_srl = Context::get('comment_srl');
// 삭제하려는 댓글이 있는지 확인
if ($comment_srl) {
$oCommentModel =& getModel('comment');
$oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
}
// 삭제하려는 글이 없으면 에러
if (!$oComment->isExists()) {
return $this->dispWikiContent();
}
// 권한이 없는 경우 비밀번호 입력화면으로
if (!$oComment->isGranted()) {
return $this->setTemplateFile('input_password_form');
}
Context::set('oComment', $oComment);
/**
* 필요한 필터 추가
**/
Context::addJsFilter($this->module_path . 'tpl/filter', 'delete_comment.xml');
$this->setTemplateFile('delete_comment_form');
}
示例9: _setArticleTypeContentModify
function _setArticleTypeContentModify()
{
$oDocumentModel =& getModel('document');
$oDocument = $oDocumentModel->getDocument(0, true);
if ($this->module_info->document_srl) {
$document_srl = $this->module_info->document_srl;
$oDocument->setDocument($document_srl);
Context::set('document_srl', $document_srl);
}
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_article.xml');
Context::set('oDocument', $oDocument);
Context::set('mid', $this->module_info->mid);
$this->setTemplateFile('article_content_modify');
}
示例10: proc
//.........这里部分代码省略.........
$provider_is_logged[$provider] = $oSocialxeModel->isLogged($provider);
}
if (!isset($provider_is_logged)) {
$provider_is_logged = array();
}
Context::set('provider_is_logged', $provider_is_logged);
Context::set('logged_provider', $logged_provider);
Context::set('logged_count', $logged_count);
// 로그인한 서비스의 닉네임들
foreach ($logged_provider as $provider) {
$nick_names[$provider] = $oSocialxeModel->getProviderNickName($provider);
}
Context::set('nick_names', $nick_names);
// 대표 계정
$master_provider = $oSocialxeModel->getMasterProvider();
Context::set('master_provider', $master_provider);
// 대표 계정의 프로필 이미지
$profile_image = $oSocialxeModel->getProfileImage();
Context::set('profile_image', $profile_image);
// 대표 계정의 닉네임
$nick_name = $oSocialxeModel->getNickName();
Context::set('nick_name', $nick_name);
// 부계정
$slave_provider = $oSocialxeModel->getSlaveProvider();
Context::set('slave_provider', $slave_provider);
// 부계정의 프로필 이미지
$slave_profile_image = $oSocialxeModel->getSlaveProfileImage();
Context::set('slave_profile_image', $slave_profile_image);
// 부계정의 닉네임
$slave_nick_name = $oSocialxeModel->getSlaveNickName();
Context::set('slave_nick_name', $slave_nick_name);
// 현재 페이지 주소의 쿼리 정보를 세팅
$url_info = parse_url(Context::getRequestUrl());
Context::set('query', urlencode($url_info['query']));
// 댓글이 등록될 문서번호
Context::set('document_srl', $args->document_srl);
// 소셜 서비스에 등록될 주소
Context::set('content_link', htmlspecialchars($args->content_link));
// 소셜 서비스에 등록될 제목
Context::set('content_title', htmlspecialchars($args->content_title));
// 자동 로그인 키
$auto_login_key = $oSocialxeModel->getAutoLoginKey();
Context::set('auto_login_key', $auto_login_key);
// 자동 로그인 키 요청 주소
$auto_login_key_url = $oSocialxeModel->getAutoLoginKeyUrl();
Context::set('auto_login_key_url', $auto_login_key_url);
// 엔터 전송 여부
$enter_send = $args->enter_send;
if (!$enter_send) {
$enter_send = 'Y';
}
Context::set('enter_send', $enter_send);
// 대댓글 자동 펼침 여부
$auto_view_sub = $args->auto_view_sub;
if (!$auto_view_sub) {
$auto_view_sub = 'N';
}
Context::set('auto_view_sub', $auto_view_sub);
// 한번에 볼 댓글 개수
$list_count = $args->list_count;
if (!$list_count) {
$list_count = 10;
}
Context::set('list_count', $list_count);
// comment_srl이 있으면 해당 댓글을 가져온다.
$comment_srl = Context::get('comment_srl');
if ($comment_srl) {
$comment_list = $oSocialxeModel->getComment($args->document_srl, $comment_srl);
Context::set('comment_srl', null, true);
Context::set('use_comment_srl', $comment_list->get('use_comment_srl'));
Context::set('socialxe_comment_srl', $comment_srl);
} else {
$comment_list = $oSocialxeModel->getCommentList($args->document_srl, 0, $list_count);
}
Context::set('comment_list', $comment_list->get('list'));
Context::set('total', $comment_list->get('total'));
// 해당 글의 댓글 잠김을 확인한다.
$oDocumentModel =& getModel('document');
$oDocument = $oDocumentModel->getDocument($args->document_srl);
Context::set('allow_comment', $oDocument->allowComment());
// mid와 document_srl이 속한 모듈을 체크해서 같을 때만 _document_srl을 세팅
$oModuleModel =& getModel('module');
$module_info_by_mid = $oModuleModel->getModuleInfoByMid(Context::get('mid'));
$module_info_by_document_srl = $oModuleModel->getModuleInfoByDocumentSrl($args->document_srl);
if ($module_info_by_mid->module_srl == $module_info_by_document_srl->module_srl) {
Context::set('_document_srl', $args->document_srl);
}
// 사용하는 필터 등록
Context::addJsFilter($this->widget_path . 'filter', 'insert_social_comment.xml');
Context::addJsFilter($this->widget_path . 'filter', 'delete_social_comment.xml');
Context::addJsFilter($this->widget_path . 'filter', 'insert_sub_comment.xml');
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('skin', $args->skin);
// 템플릿 파일을 지정
$tpl_file = 'comment';
// 템플릿 컴파일
$oTemplate =& TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
示例11: dispTextyleToolExtraMenuInsert
function dispTextyleToolExtraMenuInsert()
{
// set filter
$menu_mid = Context::get('menu_mid');
if ($menu_mid) {
$oModuleModel =& getModel('module');
$module_info = $oModuleModel->getModuleInfoByMid($menu_mid, $this->site_srl);
if (!$module_info) {
return new Object(-1, 'msg_invalid_request');
}
$oWidgetController =& getController('widget');
$buff = trim($module_info->content);
$oXmlParser = new XmlParser();
$xml_doc = $oXmlParser->parse(trim($buff));
$document_srl = $xml_doc->img->attrs->document_srl;
$args->module_srl = $module_info->module_srl;
$output = executeQuery('textyle.getExtraMenu', $args);
if ($output->data) {
$selected_extra_menu = $output->data;
}
}
if ($selected_extra_menu) {
Context::set('selected_extra_menu', $selected_extra_menu);
Context::addJsFilter($this->module_path . 'tpl/filter', 'modify_extra_menu.xml');
} else {
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_extra_menu.xml');
}
$oDocumentModel =& getModel('document');
$material_srl = Context::get('material_srl');
if ($document_srl) {
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
} else {
$document_srl = 0;
$oDocument = $oDocumentModel->getDocument(0);
if ($material_srl) {
$oMaterialModel =& getModel('material');
$output = $oMaterialModel->getMaterial($material_srl);
if ($output->data) {
$material_content = $output->data[0]->content;
Context::set('material_content', $material_content);
}
}
}
$oEditorModel =& getModel('editor');
$option->skin = $this->textyle->getPostEditorSkin();
$option->primary_key_name = 'document_srl';
$option->content_key_name = 'content';
$option->allow_fileupload = true;
$option->enable_autosave = true;
$option->enable_default_component = true;
$option->enable_component = $option->skin == 'dreditor' ? false : true;
$option->resizable = true;
$option->height = 500;
$option->content_font = $this->textyle->getFontFamily();
$option->content_font_size = $this->textyle->getFontSize();
$editor = $oEditorModel->getEditor($document_srl, $option);
Context::set('editor', $editor);
Context::set('editor_skin', $option->skin);
if ($oDocument->get('module_srl') != $this->module_srl && !$document_srl) {
Context::set('from_saved', true);
}
Context::set('oDocument', $oDocument);
}
示例12: _setArticleTypeContentModify
function _setArticleTypeContentModify($isMobile = false)
{
$oDocumentModel = getModel('document');
$oDocument = $oDocumentModel->getDocument(0, true);
if ($isMobile) {
Context::set('isMobile', 'Y');
$target = 'mdocument_srl';
} else {
Context::set('isMobile', 'N');
$target = 'document_srl';
}
if ($this->module_info->{$target}) {
$document_srl = $this->module_info->{$target};
$oDocument->setDocument($document_srl);
Context::set('document_srl', $document_srl);
} else {
if (Context::get('document_srl')) {
$document_srl = Context::get('document_srl');
$oDocument->setDocument($document_srl);
Context::set('document_srl', $document_srl);
} else {
$oDocument->add('module_srl', $this->module_info->module_srl);
}
}
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_article.xml');
Context::set('oDocument', $oDocument);
Context::set('mid', $this->module_info->mid);
$this->setTemplateFile('article_content_modify');
}
示例13: dispBoardUpdateLogView
function dispBoardUpdateLogView()
{
$oDocumentModel = getModel('document');
$update_id = Context::get('update_id');
if ($this->grant->update_view !== true) {
return new Object(-1, 'msg_not_permitted');
}
$update_log = $oDocumentModel->getUpdateLog($update_id);
$extra_vars = unserialize($update_log->extra_vars);
Context::addJsFilter($this->module_path . 'tpl/filter', 'update.xml');
Context::set('extra_vars', $extra_vars);
Context::set('update_log', $update_log);
$this->setTemplateFile('update_view');
}
示例14: dispIssuetrackerDeleteTrackback
function dispIssuetrackerDeleteTrackback()
{
$trackback_srl = Context::get('trackback_srl');
$oTrackbackModel =& getModel('trackback');
$output = $oTrackbackModel->getTrackback($trackback_srl);
$trackback = $output->data;
if (!$trackback) {
return $this->dispIssuetrackerMessage('msg_invalid_request');
}
Context::set('trackback', $trackback);
// javascript 필터 추가
Context::addJsFilter($this->module_path . 'tpl/filter', 'delete_trackback.xml');
$this->setTemplateFile('delete_trackback');
}
示例15: dispContactAdminContactAgreement
/**
* @brief display contact Agreement Term admin page
**/
function dispContactAdminContactAgreement()
{
// only admin user can write contact term
if (!Context::get('is_logged')) {
return $this->setTemplateFile('input_password_form');
}
$logged_info = Context::get('logged_info');
if ($logged_info->is_admin != 'Y') {
return $this->setTemplateFile('input_password_form');
}
$oContactModel =& getModel('contact');
$editor_content = $oContactModel->getEditor($this->module_info->module_srl);
Context::set('editor_content', $editor_content);
/**
* add javascript filter file insert_question
**/
$termText = $this->module_info->content;
Context::set('termText', $termText);
Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_term.xml');
$this->setTemplateFile('agreement_term');
}