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


PHP functions::OutputWikiPage方法代码示例

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


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

示例1: NsubscribeDialogue

 public static function NsubscribeDialogue($type = "subscribe")
 {
     $stdout = "";
     switch ($type) {
         case "subscribe":
             $stdout .= "<div class='col c1of2'>\r\n" . news::subscribe() . "</div> <div class='col c2of2 divider'>\r\n" . functions::OutputWikiPage('0', '2462') . "</div><div style='clear:both'><br></div>\r\n";
             break;
         case "unsubscribe":
             $stdout .= "<div class='col c1of2'>\r\n" . news::unsubscribe() . "</div> <div class='col c2of2 divider'>\r\n" . functions::OutputWikiPage('0', '2464') . "</div><div style='clear:both'><br></div>\r\n";
             break;
     }
     // --------------------------------
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例2: outputSignatureForm

 private static function outputSignatureForm($userdata)
 {
     if (empty($userdata)) {
         return "";
     }
     $stdout = "";
     $baseurl = str_replace("/index.php", "", $_SERVER["PHP_SELF"]);
     // ------------------------------
     $stdout .= functions::OutputWikiPage('0', '2456');
     /*
         $stdout =
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "            <ul class='tightlist'>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#create'><strong>Create Your Own Nordita E-Mail Signature</strong></a></li>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#non-nordita'><strong>Non-Nordita E-Mail Signatures</strong></a></li>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#about'><strong>What is an E-Mail Signature?</strong></a></li>\r\n" .
           //"              <li class='bottommargin'><a href='http://intra.kth.se/en/it/support/guider/e-post/mall-med-signaturer-in-i-outlook-1.281533'><strong>KTH-Branded Signatures for Outlook 2010 in Windows 7".EXTERNAL_LINK."</strong></a></li>\r\n" .
           "            </ul>\r\n" .
           "\r\n" .
           "          </div> <div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <ul class='tightlist'>\r\n" .
           "              <li>\r\n" .
           "                <p><a href='".$baseurl."/settings/index.php'><strong>Instructions on How to Add a Signature <span class='nowrap'>to Different E-Mail Programs and Webmail Services:</span></strong></a></p>\r\n" .
           "              </li>\r\n" .
           "            </ul>\r\n" .
           "            <p>" .
           "<a href='".$baseurl."/settings/alpine/index.php' title='Apline'><img src='img/_wiki/icon_alpine_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           "<a href='".$baseurl."/settings/applemail/index.php' title='Apple Mail'><img src='img/_wiki/icon_applemail_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/webmail_gmail/index.php' title='Gmail'><img src='img/_wiki/icon_gmail_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/webmail_kth/index.php' title='KTH Webmail'><img src='img/_wiki/icon_webmail_kth_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/outlook/index.php' title='Outlook'><img src='img/_wiki/icon_outlook2010_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/thunderbird/index.php' title='Thunderbird'><img src='img/_wiki/icon_thunderbird_75x75.png' alt='' style='width:45px;height:45px'></a>" .
           "</p>\r\n" .
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     
         // ------------------------------
     
         $stdout .=
           "          <hr id='create' style='margin:0 0 2em 0'>\r\n\r\n";
     
         $stdout .=
           "          <h3 class='bottommargin'>Create your own Nordita e-mail signature</h3>\r\n" .
           "\r\n" .
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "            <ol class='tightlist'>\r\n" .
           "              <li class='bottommargin'>Click on <a href='".$GLOBALS["documentClass"]->getPagePath()."/index.php#maildb_doorlabel' rel='nofollow'><strong>your linked name in the list below</strong></a></li>\r\n" .
           "              <li class='bottommargin'>You will be taken to a web page which lists <strong>several suggestions for a signature with your name and other data prefilled</strong>. They all contain the required elements but vary with extra information you may or may not want to use. There are sections for <a href='".$_SERVER["PHP_SELF"]."#about'><strong>plain text signatures (recommended) and HTML formatted signatures</strong></a>.</li>\r\n" .
           "              <li class='bottommargin'><strong>Follow the instructions</strong> to incorporate the signature in the settings of your e-mail program or webmail. <a href='".$baseurl."/settings/index.php'><strong>The details depend of course on what program you are using</strong></a>. Ask Hans Mühlen if you have problems.</p>\r\n" .
     
           "            </ol>\r\n" .
           "\r\n" .
           "          </div><div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <p style='margin-bottom:-0.5em'>Two signatures, one <strong>plain text</strong>, the other <strong>HTML formatted</strong>:</p>\r\n" .
           "            <p style='margin-bottom:-1em'><img src='".PATH_IMG."/_wiki/signature_two_samples.png' alt=''></p>\r\n".
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     */
     // ------------------------------
     $stdout .= "\r\n" . "          <div id='maildb_doorlabel'>\r\n" . "\r\n";
     $nr = ceil(count($userdata) / 4);
     $i = 0;
     $stdout .= "              <table style='width:100%;border-top:1px dotted #999;padding-top:1em;'>\r\n" . "                <tr>\r\n" . "                  <td>\r\n";
     foreach ($userdata as $user => $m) {
         if (isset($m["nw_fullname"])) {
             $i++;
             $stdout .= "                    <p><a href='" . $_SERVER["PHP_SELF"] . "?usr=" . $user . "'" . ">" . $m["nw_fullname"] . "</a></p>\r\n";
             if ($i % $nr == 0) {
                 $stdout .= "                  </td>\r\n                  <td>\r\n";
             }
         }
     }
     $stdout .= "                  </td>\r\n" . "                </tr>\r\n" . "              </table>\r\n" . "          </div>\r\n" . "\r\n";
     // ------------------------------
     $stdout .= PAGE_BREAK . functions::OutputWikiPage('0', '2457');
     /*
         $stdout .=
           "          <hr id='non-nordita' style='margin:2em 0 2em 0'>\r\n\r\n";
     
         $stdout .=
           "          <h3 class='bottommargin'>Non-Nordita e-mail signatures</h3>\r\n" .
           "\r\n" .
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "              <p><strong>In exceptional cases</strong>, mainly of an administrative nature, you might consider it to be advantageous to hide your affiliation with Nordita and instead use the fact that Nordita is owned by two well-known Swedish universities, KTH Royal Institute of Technology and Stockholm University. For these situations <strong>you might want to define alternative signatures</strong> in you e-mail program designed according to the rules of either of these universities.</p>\r\n" .
           "            <p>Both universities have their own <strong>strict rules on how their university e-mail singatures should look</strong>, and they also offer <strong>signature templates</strong> that can be incorporated into e-mail programs.</p>\r\n" .
           "\r\n" .
           "          </div><div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <p style='margin-bottom:-1em'><strong>KTH Royal Institute of Technology</strong></p>\r\n" .
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例3: AwikiExtractPages

 public static function AwikiExtractPages()
 {
     $stdout = "";
     $wpages = $classes = $images = array();
     //$stdout .= "<p class='red'>NOT PROPERLY DEBUGGED YET</p>";
     // -------------------
     // -- OBTAIN DATA
     $raw = $GLOBALS["documentClass"]->wikiid2paths;
     if (empty($raw)) {
         return BLURB_SORRY_WEB_SEARCH;
     }
     foreach ($raw as $wid => $record) {
         if (isset($record["name"]) && isset($record["path"]) && count($record["path"])) {
             $wpages[$record["name"]] = $record;
             $wpages[$record["name"]]["wid"] = $wid;
             $wpages[$record["name"]]["content"] = htmlspecialchars(functions::OutputWikiPage('0', $wid), ENT_NOQUOTES, 'UTF-8');
             if (preg_match_all("/class='([^']*)'/iU", $wpages[$record["name"]]["content"], $res)) {
                 foreach ($res[1] as $class) {
                     $class = trim($class);
                     foreach (explode(" ", $class) as $c) {
                         if ($c != "class=") {
                             $classes[$c] = 1;
                         }
                     }
                 }
             }
             if (!in_array($wid, array("2178", "2179", "2244")) && preg_match_all("/img src='([^']*)'/iU", $wpages[$record["name"]]["content"], $res)) {
                 foreach ($res[1] as $img) {
                     $img = trim($img);
                     foreach (explode(" ", $img) as $i) {
                         if (!preg_match("#^data#", $i)) {
                             $images[$i][$record["name"]] = 1;
                         }
                     }
                 }
             }
         } else {
             unset($wpages[$wid]);
         }
     }
     unset($wpages[""]);
     ksort($classes);
     ksort($wpages);
     ksort($images);
     $stdout .= "          <div id='jtabs' class='htabs'>\r\n" . "\r\n" . "            <ul>\r\n" . "              <li class=''><a href='" . PATH_FROM_DOCROOT . "#img'>IMAGES used in wiki pages</a></li>\r\n" . "              <li class=''><a href='" . PATH_FROM_DOCROOT . "#css'>CSS CLASSES used in wiki pages</a></li>\r\n" . "              <li class=''><a href='" . PATH_FROM_DOCROOT . "#content'>GENERATED CONTENT of all wiki pages</a></li>\r\n" . "            </ul>\r\n";
     // -------------------
     // -- OUTPUT: images
     $stdout .= "<div id='img'>\r\n" . "<h2>IMAGES used in wiki pages</h2>\r\n";
     foreach ($images as $i => $value) {
         $style = "";
         if (preg_match("#^img/[^/]*\$#", $i)) {
             $style = "color:red";
         } elseif (preg_match("#^http://www.nordita.org#", $i)) {
             $style = "color:teal";
         } elseif (preg_match("#^http://wiki.nordita.org#", $i)) {
             $style = "color:orange";
         } elseif (preg_match("#^people#", $i)) {
             $style = "color:fuchsia";
         }
         $stdout .= "<p style='margin-bottom:0'><a href='" . $i . "'><strong" . (!empty($style) ? " style='" . $style . "'" : "") . ">" . $i . "</strong></a></p>\r\n" . "<ul>\r\n";
         foreach ($value as $wid => $a) {
             $stdout .= "<li><a href='http://wiki.nordita.org/index.php?title=" . $wid . "&amp;action=edit'>" . $wid . "</a></li>\r\n";
         }
         $stdout .= "</ul>\r\n";
     }
     $stdout .= "</div>\r\n";
     // -------------------
     // -- OUTPUT: css classes
     $stdout .= "<div id='css'>\r\n" . "<h2>CSS CLASSES used in wiki pages</h2>\r\n" . "<ul class='tightlist'>\r\n";
     foreach ($classes as $c => $value) {
         $stdout .= "<li><strong>" . $c . "</strong></li>\r\n";
     }
     $stdout .= "</ul>\r\n" . "</div>\r\n";
     // -------------------
     // -- OUTPUT: generated code in each page
     $stdout .= "<div id='content'>\r\n" . "<h2>GENERATED CONTENT of all wiki pages</h2>\r\n";
     foreach ($wpages as $name => $record) {
         $stdout .= "<h3><a href='http://wiki.nordita.org/index.php?title=" . $name . "&amp;action=edit' " . "target='" . $name . "'>" . $name . "</a> [" . $record["wid"] . "]</h3>\r\n" . "<ul class='tightlist'>\r\n";
         foreach ($record["path"] as $path) {
             $stdout .= "<li><a href='" . $path . "/index.php' target='" . $path . "'>" . $path . "</a></li>\r\n";
         }
         $stdout .= "</ul>\r\n" . "<div class='box grayborder padding' style='width:780px!important;font-family:monospace;font-size:larger'>" . preg_replace("/[\r\n]+/", "<br>", $record["content"]) . "</div>\r\n" . "\r\n";
     }
     $stdout .= "</div>\r\n";
     // -------------------
     $stdout .= "\r\n" . "          </div> <!-- my-tabs -->\r\n";
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:88,代码来源:

示例4: OutputProgramsStart

 public static function OutputProgramsStart()
 {
     return "<div class='col c1of2'>\r\n" . functions::OutputWikiPage('0', '1623') . "</div> <div class='col c2of2'>\r\n" . functions::OutputWikiPage('0', '2313') . "</div><div style='clear:both'><br></div>\r\n";
 }
开发者ID:,项目名称:,代码行数:4,代码来源:

示例5: WstudentsArchive

 static function WstudentsArchive()
 {
     return "        <div class='col-content-1of3'>\r\n" . "          <h3 style='padding-bottom:1em;border-bottom:1px solid #666'>Nordita PhD Students</h3>\r\n" . functions::OutputWikiPage('0', '2368') . "        </div>\r\n" . "        <div class='col-content-2of3'>\r\n" . "          <h3 style='padding-bottom:1em;border-bottom:1px solid #666'>Visiting PhD Students</h3>\r\n" . functions::OutputWikiPage('0', '2367') . "        </div>\r\n" . "        <div class='col-content-3of3'>\r\n" . "          <h3 style='padding-bottom:1em;border-bottom:1px solid #666'>Nordita Interns</h3>\r\n" . functions::OutputWikiPage('0', '2372') . "        </div>\r\n" . "\r\n";
 }
开发者ID:,项目名称:,代码行数:4,代码来源:

示例6: OutputPhotoStart

 public static function OutputPhotoStart()
 {
     return functions::OutputWikiPage('0', '1730') . self::outputStartThumbnails();
 }
开发者ID:,项目名称:,代码行数:4,代码来源:

示例7: OutputWikiCategories

 static function OutputWikiCategories()
 {
     $stdout = "";
     $dbWiki = new fromdb_nwwiki();
     $data = $dbWiki->get_categories();
     ksort($data);
     $flera = $ansvarig = array();
     foreach ($data as $namn => $sidor) {
         if (!in_array($namn, array("Obsolete", "Newsletter"))) {
             foreach ($sidor as $key => $sida) {
                 if (isset($sida["wikititle"])) {
                     $ansvarig[$namn][$sida["wikititle"]] = $sida;
                     $flera[$sida["wikititle"]][] = $namn;
                 }
             }
         }
     }
     // ----------------------
     $selectform = "        <div class='col-content-left2thirds only_online'>\r\n" . functions::OutputWikiPage('0', '2467') . "          <ul class='tightlist'><li><a href='http://wiki.nordita.org/index.php/Special:Uncategorizedpages'" . " target='a" . rand(10000, 99999) . "'" . ">List of active wiki pages which <strong>have no responsible assigned</strong></a> <br>[the list should be empty!]</li></ul>\r\n" . "        </div>\r\n" . "        <div class='col-content-right1third divider only_online'>\r\n" . "          <h4>Show pages belonging to these <span class='nowrap'>areas of responsibility:</span></h4>\r\n";
     foreach ($ansvarig as $namn => $sidor) {
         $selectform .= "        <form action='" . $_SERVER["PHP_SELF"] . "' method='post' class='only_online'>" . "          <p style='font-size:medium;display:list-item;list-style-type:disc;margin:0.5em 0 0 2em'>" . "<input class='fakelink bold' style='font-size:medium' " . "type='submit' name='ansvarslista_select' value='" . $namn . "'></p>" . "          <input type='hidden' name='ansvarslista' value='1'>" . "        </form>";
     }
     /*
         $selectform .=
           "        <form id='selectmenu' action='".$_SERVER["PHP_SELF"]."' method='post' class='only_online'>" .
           "          <div class='input shadow-whiteinset'><span>Visa:</span>";
         foreach ($ansvarig as $namn => $sidor) {
           $selectform .=
             "            <input type='radio' name='ansvarslista_select' value='".$namn."'>&nbsp;" . $namn;
         }
         $selectform .=
           "          </div>" .
           "          <div class=''>" .
           "            <input type='submit' value='Välj ansvarig'>" .
           "            <input type='hidden' name='ansvarslista' value='1'>" .
           "          </div>" .
           "        </form>";
     */
     $selectform .= "        </div>\r\n" . "        <div style='clear:both'><br></div>\r\n" . functions::gpc_declare_input("ansvarslista", false, true);
     functions::gpc_declare_input("ansvarslista_select", "", false, array_keys($ansvarig));
     if (isset($GLOBALS["ansvarslista"]) && isset($GLOBALS["ansvarslista_select"]) && isset($ansvarig[$GLOBALS["ansvarslista_select"]])) {
         ksort($ansvarig[$GLOBALS["ansvarslista_select"]]);
         foreach ($ansvarig[$GLOBALS["ansvarslista_select"]] as $key => $sida) {
             $content = $dbWiki->getWikiPage($sida["wikiid"]);
             $content = trim(preg_replace("/(\\[?\\[[^\\]]*\\]\\]?)/", "", strip_tags($content)));
             $ansvarig[$GLOBALS["ansvarslista_select"]][$key]["antal"] = strlen($content);
         }
         $stdout .= self::outputWikiCategoriesAux($GLOBALS["ansvarslista_select"], $ansvarig[$GLOBALS["ansvarslista_select"]], $flera);
     }
     // ----------------------
     return $selectform . $stdout . "\r\n";
 }
开发者ID:,项目名称:,代码行数:52,代码来源:


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