当前位置: 首页>>代码示例>>PHP>>正文


PHP gpOutput::TemplateSettings方法代码示例

本文整理汇总了PHP中gpOutput::TemplateSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP gpOutput::TemplateSettings方法的具体用法?PHP gpOutput::TemplateSettings怎么用?PHP gpOutput::TemplateSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gpOutput的用法示例。


在下文中一共展示了gpOutput::TemplateSettings方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Response

 /**
  * Handle HTTP responses made with $_REQUEST['req'] = json (when <a ... data-cmd="gpajax">)
  * Sends JSON object to client
  *
  */
 static function Response()
 {
     global $page;
     if (!is_array($page->ajaxReplace)) {
         die;
     }
     if (!isset($_REQUEST['jsoncallback'])) {
         die('Invalid Request: jsoncallback not set');
     }
     //gadgets may be using gpajax/json request/responses
     gpOutput::TemplateSettings();
     gpOutput::PrepGadgetContent();
     echo gpAjax::Callback($_REQUEST['jsoncallback']);
     echo '([';
     //output content
     if (!empty($_REQUEST['gpx_content'])) {
         switch ($_REQUEST['gpx_content']) {
             case 'gpabox':
                 gpAjax::JsonDo('admin_box_data', '', $page->contentBuffer);
                 break;
         }
     } elseif (in_array('#gpx_content', $page->ajaxReplace)) {
         $replace_id = '#gpx_content';
         if (isset($_GET['gpreqarea'])) {
             $replace_id = '#' . $_GET['gpreqarea'];
         }
         ob_start();
         $page->GetGpxContent(true);
         $content = ob_get_clean();
         gpAjax::JsonDo('replace', $replace_id, $content);
     }
     //other areas
     foreach ($page->ajaxReplace as $arguments) {
         if (is_array($arguments)) {
             $arguments += array(0 => '', 1 => '', 2 => '');
             gpAjax::JsonDo($arguments[0], $arguments[1], $arguments[2]);
         }
     }
     //always send messages
     ob_start();
     echo GetMessages(false);
     $content = ob_get_clean();
     if (!empty($content)) {
         gpAjax::JsonDo('messages', '', $content);
     }
     echo ']);';
     die;
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:53,代码来源:ajax.php

示例2: EditLayout

 /**
  * Edit layout properties
  * 		Layout Identification
  * 		Content Arrangement
  * 		Gadget Visibility
  *
  */
 function EditLayout($layout, $cmd)
 {
     global $page, $gpLayouts, $langmessage, $config;
     $GLOBALS['GP_ARRANGE_CONTENT'] = true;
     $page->head_js[] = '/include/js/inline_edit/inline_editing.js';
     $this->curr_layout = $layout;
     $this->SetLayoutArray();
     $page->SetTheme($layout);
     $this->LoremIpsum();
     gpOutput::TemplateSettings();
     gpPlugin::Action('edit_layout_cmd', array($layout));
     switch ($cmd) {
         /**
          * Inline image editing
          *
          */
         case 'inlineedit':
             $this->InlineEdit();
             return;
         case 'gallery_folder':
         case 'gallery_images':
             $this->GalleryImages();
             return;
         case 'image_editor':
             includeFile('tool/editing.php');
             gp_edit::ImageEditor($this->curr_layout);
             return;
         case 'save_inline':
             $this->SaveHeaderImage();
             return;
         case 'theme_images':
             $this->ShowThemeImages();
             return;
         case 'drag_area':
             $this->Drag();
             break;
             //insert
         //insert
         case 'insert':
             $this->SelectContent();
             return;
         case 'addcontent':
             $this->AddContent();
             break;
             //remove
         //remove
         case 'rm_area':
             $this->RemoveArea();
             break;
     }
     if ($this->LayoutCommands($cmd)) {
         return;
     }
     //control what is displayed
     switch ($cmd) {
         //show the layout (displayed within an iframe)
         case 'save_css':
         case 'preview_css':
         case 'addcontent':
         case 'rm_area':
         case 'drag_area':
         case 'in_iframe':
             $this->ShowInIframe($cmd);
             return;
     }
     $layout_info = common::LayoutInfo($layout, false);
     $handlers_count = 0;
     if (isset($layout_info['handlers']) && is_array($layout_info['handlers'])) {
         foreach ($layout_info['handlers'] as $val) {
             $int = count($val);
             if ($int === 0) {
                 $handlers_count++;
             }
             $handlers_count += $int;
         }
     }
     $page->label = $langmessage['layouts'] . ' » ' . $layout_info['label'];
     $_REQUEST += array('gpreq' => 'body');
     //force showing only the body as a complete html document
     $page->get_theme_css = false;
     ob_start();
     $this->LayoutEditor($layout, $layout_info);
     $page->admin_html = ob_get_clean();
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:91,代码来源:admin_theme_content.php

示例3: Template

 /**
  * Send all content according to the current layout
  * @static
  *
  */
 static function Template()
 {
     global $page, $GP_ARRANGE, $GP_STYLES, $get_all_gadgets_called, $addon_current_id, $GP_MENU_LINKS, $GP_MENU_CLASS, $GP_MENU_CLASSES, $GP_MENU_ELEMENTS;
     $get_all_gadgets_called = false;
     if (isset($page->theme_addon_id)) {
         $addon_current_id = $page->theme_addon_id;
     }
     gpOutput::TemplateSettings();
     self::StandardHeaders();
     $path = $page->theme_dir . '/template.php';
     $return = IncludeScript($path, 'require', array('page', 'GP_ARRANGE', 'GP_MENU_LINKS', 'GP_MENU_CLASS', 'GP_MENU_CLASSES', 'GP_MENU_ELEMENTS'));
     //return will be false if there's a fatal error with the template.php file
     if ($return === false) {
         gpOutput::BodyAsHtml();
     }
     gpPlugin::ClearDataFolder();
     gpOutput::HeadContent();
 }
开发者ID:Bomberus,项目名称:gpEasy-CMS,代码行数:23,代码来源:gpOutput.php

示例4: EditLayout

 /**
  * Edit layout properties
  * 		Layout Identification
  * 		Content Arrangement
  * 		Gadget Visibility
  *
  */
 function EditLayout($layout, $cmd)
 {
     global $page, $gpLayouts, $langmessage, $config;
     if (!isset($gpLayouts[$layout])) {
         message($langmessage['OOPS'] . ' (Invalid Layout)');
         return false;
     }
     $GLOBALS['GP_ARRANGE_CONTENT'] = true;
     $page->head .= "\n" . '<script type="text/javascript">var gpLayouts=true;</script>';
     $page->head_js[] = '/include/js/inline_edit/inline_editing.js';
     $page->show_admin_content = false;
     $this->curr_layout = $layout;
     $page->SetTheme($layout);
     $this->LoremIpsum();
     gpOutput::TemplateSettings();
     gpPlugin::Action('edit_layout_cmd', array($layout));
     switch ($cmd) {
         case 'save_css':
             $this->SaveCSS();
             break;
         case 'css':
             $this->EditCSS();
             break;
         case 'makedefault':
             $this->MakeDefault($layout);
             break;
         case 'change_layout_color':
             $this->ChangeLayoutColor($layout);
             break;
         case 'css_preferences':
             $this->CSSPreferences($layout);
             break;
         case 'rmgadget':
             $this->RmGadget($layout);
             break;
         case 'layout_details':
             $this->LayoutDetails();
             break;
         case 'restore_drag':
         case 'restore':
             $this->Restore($layout);
             break;
         case 'drag':
             $this->Drag();
             break;
             //insert
         //insert
         case 'insert':
             $this->SelectContent();
             return true;
         case 'addcontent':
             $this->AddContent();
             break;
             //remove
         //remove
         case 'rm':
             $this->RemoveArea();
             break;
     }
     $layout_info = common::LayoutInfo($layout);
     $handlers_count = 0;
     if (isset($layout_info['handlers']) && is_array($layout_info['handlers'])) {
         foreach ($layout_info['handlers'] as $val) {
             $int = count($val);
             if ($int === 0) {
                 $handlers_count++;
             }
             $handlers_count += $int;
         }
     }
     $page->label = $langmessage['layouts'] . ' » ' . $layout_info['label'];
     //display options
     switch ($cmd) {
         case 'makedefault':
         case 'details':
             $this->ShowDetails($layout, $layout_info, $handlers_count);
             return true;
     }
     $this->PrepareCSS();
     $this->Toolbar($layout, $layout_info);
     return true;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:89,代码来源:admin_theme_content.php

示例5: Template

 /**
  * Send all content according to the current layout
  * @static
  */
 function Template()
 {
     global $page, $GP_ARRANGE, $GP_STYLES, $get_all_gadgets_called, $addon_current_id;
     $get_all_gadgets_called = false;
     if (isset($page->theme_addon_id)) {
         $addon_current_id = $page->theme_addon_id;
     }
     gpOutput::TemplateSettings();
     header('Content-Type: text/html; charset=utf-8');
     require $page->theme_dir . '/template.php';
     gpPlugin::ClearDataFolder();
     gpOutput::AllGadgetSetting();
     gpOutput::HeadContent();
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:18,代码来源:gpOutput.php


注:本文中的gpOutput::TemplateSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。