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


PHP ilObjStyleSheet::getContentPrintStyle方法代码示例

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


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

示例1: printView

    /**
     * Print View
     *
     * @param
     * @return
     */
    function printView()
    {
        global $ilAccess, $tpl;
        if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
            return;
        }
        $terms = array();
        switch ($_POST["sel_type"]) {
            case "glossary":
                $ts = $this->glossary->getTermList();
                foreach ($ts as $t) {
                    $terms[] = $t["id"];
                }
                break;
            case "sel_topic":
                include_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
                $t_id = $this->glossary->getTaxonomyId();
                $items = ilObjTaxonomy::getSubTreeItems("glo", $this->glossary->getId(), "term", $t_id, (int) $_POST["topic"]);
                foreach ($items as $i) {
                    if ($i["item_type"] == "term") {
                        $terms[] = $i["item_id"];
                    }
                }
                break;
            case "selection":
                if (is_array($_POST["obj_id"])) {
                    $terms = $_POST["obj_id"];
                } else {
                    $terms = array();
                }
                break;
            case "term":
                $terms = array($this->term_id);
                break;
        }
        $tpl = new ilTemplate("tpl.main.html", true, true);
        $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
        /*
        		// syntax style
        		$this->tpl->setCurrentBlock("SyntaxStyle");
        		$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
        			ilObjStyleSheet::getSyntaxStylePath());
        		$this->tpl->parseCurrentBlock();
        
        		// content style
        		$this->tpl->setCurrentBlock("ContentStyle");
        		$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
        			ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
        		$this->tpl->parseCurrentBlock();*/
        include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
        iljQueryUtil::initjQuery($tpl);
        // determine target frames for internal links
        foreach ($terms as $t_id) {
            $page_content .= $this->listDefinitions($_GET["ref_id"], $t_id, true);
        }
        $tpl->setVariable("CONTENT", $page_content . '<script type="text/javascript" language="javascript1.2">
		<!--
			il.Util.addOnLoad(function () {
				il.Util.print();
			});
		//-->
		</script>');
        $tpl->show(false);
        exit;
    }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:71,代码来源:class.ilGlossaryPresentationGUI.php

示例2: printViewObject

    public function printViewObject($a_pdf_export = false)
    {
        global $tpl;
        $page_ids = $this->getPrintPageIds();
        if (!$page_ids) {
            $this->ctrl->redirect($this, "");
        }
        $tpl = new ilTemplate("tpl.main.html", true, true);
        $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
        $this->setContentStyleSheet($tpl);
        // syntax style
        $tpl->setCurrentBlock("SyntaxStyle");
        $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
        $tpl->parseCurrentBlock();
        // determine target frames for internal links
        include_once "./Modules/Wiki/classes/class.ilWikiPageGUI.php";
        $page_content = "";
        foreach ($page_ids as $p_id) {
            $page_gui = new ilWikiPageGUI($p_id);
            $page_gui->setOutputMode("print");
            $page_content .= $page_gui->showPage();
            if ($a_pdf_export) {
                $page_content .= '<p style="page-break-after:always;"></p>';
            }
        }
        $page_content = '<div class="ilInvisibleBorder">' . $page_content . '</div>';
        if (!$a_pdf_export) {
            $page_content .= '<script type="text/javascript" language="javascript1.2">
				<!--
					il.Util.addOnLoad(function () {
						il.Util.print();
					});
				//-->
				</script>';
        }
        $tpl->setVariable("CONTENT", $page_content);
        if (!$a_pdf_export) {
            $tpl->show(false);
            exit;
        } else {
            return $tpl->get("DEFAULT", false, false, false, true, false, false);
        }
    }
开发者ID:arlendotcn,项目名称:ilias,代码行数:43,代码来源:class.ilObjWikiGUI.php

示例3: showPrintView

 /**
  * show print view
  */
 function showPrintView()
 {
     global $ilUser, $lng, $ilCtrl;
     include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
     if (!$this->lm->isActivePrintView()) {
         return;
     }
     $this->renderPageTitle();
     $c_obj_id = $this->getCurrentPageId();
     // set values according to selection
     if ($_POST["sel_type"] == "page") {
         if (!is_array($_POST["obj_id"]) || !in_array($c_obj_id, $_POST["obj_id"])) {
             $_POST["obj_id"][] = $c_obj_id;
         }
     }
     if ($_POST["sel_type"] == "chapter" && $c_obj_id > 0) {
         $path = $this->lm_tree->getPathFull($c_obj_id);
         $chap_id = $path[1]["child"];
         if ($chap_id > 0) {
             $_POST["obj_id"][] = $chap_id;
         }
     }
     //var_dump($_GET);
     //var_dump($_POST);
     // set style sheets
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
     } else {
         $style_name = $ilUser->getPref("style") . ".css";
         $this->tpl->setVariable("LOCATION_STYLESHEET", "./style/" . $style_name);
     }
     // content style
     $this->tpl->setCurrentBlock("ContentStyle");
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->lm->getStyleSheetId()));
     } else {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", "content_style/content.css");
     }
     $this->tpl->parseCurrentBlock();
     // syntax style
     $this->tpl->setCurrentBlock("SyntaxStyle");
     $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $this->tpl->parseCurrentBlock();
     //$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.lm_print_view.html", true);
     // set title header
     $this->tpl->setVariable("HEADER", $this->lm->getTitle());
     $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
     include_once "./Modules/LearningModule/classes/class.ilLMPageGUI.php";
     include_once "./Modules/LearningModule/classes/class.ilLMPageObject.php";
     include_once "./Modules/LearningModule/classes/class.ilStructureObject.php";
     $act_level = 99999;
     $activated = false;
     $glossary_links = array();
     $output_header = false;
     $media_links = array();
     // get header and footer
     if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
         if (ilLMObject::_exists($this->lm->getFooterPage())) {
             $page_object_gui = $this->getLMPageGUI($this->lm->getFooterPage());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_object_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->lm->getStyleSheetId(), "lm"));
             // determine target frames for internal links
             $page_object_gui->setLinkFrame($_GET["frame"]);
             $page_object_gui->setOutputMode("print");
             $page_object_gui->setPresentationTitle("");
             $page_object_gui->setFileDownloadLink("#");
             $page_object_gui->setFullscreenLink("#");
             $page_object_gui->setSourceCodeDownloadScript("#");
             $footer_page_content = $page_object_gui->showPage();
         }
     }
     if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
         if (ilLMObject::_exists($this->lm->getHeaderPage())) {
             $page_object_gui = $this->getLMPageGUI($this->lm->getHeaderPage());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_object_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->lm->getStyleSheetId(), "lm"));
             // determine target frames for internal links
             $page_object_gui->setLinkFrame($_GET["frame"]);
             $page_object_gui->setOutputMode("print");
             $page_object_gui->setPresentationTitle("");
             $page_object_gui->setFileDownloadLink("#");
             $page_object_gui->setFullscreenLink("#");
             $page_object_gui->setSourceCodeDownloadScript("#");
             $header_page_content = $page_object_gui->showPage();
         }
     }
     // add free selected pages
     if (is_array($_POST["obj_id"])) {
         foreach ($_POST["obj_id"] as $k) {
             if ($k > 0 && !$this->lm_tree->isInTree($k)) {
                 if (ilLMObject::_lookupType($k) == "pg") {
                     $nodes[] = array("obj_id" => $k, "type" => "pg", "free" => true);
                 }
             }
         }
     } else {
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilLMPresentationGUI.php

示例4: printViewObject

    /**
     * Show printable view of a wiki page
     */
    function printViewObject()
    {
        $this->checkPermission("read");
        switch ($_POST["sel_type"]) {
            case "wiki":
                include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
                $pages = ilWikiPage::getAllPages($this->object->getId());
                foreach ($pages as $p) {
                    $pg_ids[] = $p["id"];
                }
                break;
            case "selection":
                if (is_array($_POST["obj_id"])) {
                    $pg_ids = $_POST["obj_id"];
                } else {
                    $pg_ids[] = $_GET["wpg_id"];
                }
                break;
            default:
                $pg_ids[] = $_GET["wpg_id"];
                break;
        }
        include_once "./Modules/Wiki/classes/class.ilWikiPageGUI.php";
        global $tpl;
        $tpl = new ilTemplate("tpl.main.html", true, true);
        $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
        $this->setContentStyleSheet($tpl);
        // syntax style
        $tpl->setCurrentBlock("SyntaxStyle");
        $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
        $tpl->parseCurrentBlock();
        // determine target frames for internal links
        foreach ($pg_ids as $p_id) {
            $page_gui = new ilWikiPageGUI($p_id);
            $page_gui->setOutputMode("print");
            $page_content .= $page_gui->showPage();
        }
        $tpl->setVariable("CONTENT", '<div class="ilInvisibleBorder">' . $page_content . '</div>' . '<script type="text/javascript" language="javascript1.2">
		<!--
			il.Util.addOnLoad(function () {
				il.Util.print();
			});
		//-->
		</script>');
        $tpl->show(false);
        exit;
    }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:50,代码来源:class.ilObjWikiGUI.php


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