Changeset 3 for branches/rsr.v5.1.dev/web/punbb/help.php
- Timestamp:
- Nov 14, 2011, 11:17:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rsr.v5.1.dev/web/punbb/help.php
r1 r3 1 1 <?php 2 /***********************************************************************3 2 4 Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) 5 6 This file is part of PunBB. 7 8 PunBB is free software; you can redistribute it and/or modify it 9 under the terms of the GNU General Public License as published 10 by the Free Software Foundation; either version 2 of the License, 11 or (at your option) any later version. 12 13 PunBB is distributed in the hope that it will be useful, but 14 WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 MA 02111-1307 USA 22 23 ************************************************************************/ 24 3 /** 4 * Copyright (C) 2008-2011 FluxBB 5 * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB 6 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher 7 */ 25 8 26 9 // Tell header.php to use the help template 27 10 define('PUN_HELP', 1); 28 11 29 define('PUN_ROOT', './');12 define('PUN_ROOT', dirname(__FILE__).'/'); 30 13 require PUN_ROOT.'include/common.php'; 31 14 … … 39 22 40 23 41 $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_help['Help']; 24 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_help['Help']); 25 define('PUN_ACTIVE_PAGE', 'help'); 42 26 require PUN_ROOT.'header.php'; 43 27 44 28 ?> 45 <h2>< ?php echo $lang_common['BBCode'] ?></h2>29 <h2><span><?php echo $lang_help['BBCode'] ?></span></h2> 46 30 <div class="box"> 47 31 <div class="inbox"> 48 <p><a name="bbcode"></a><?php echo $lang_help['BBCode info 1'] ?></p> <br />32 <p><a name="bbcode"></a><?php echo $lang_help['BBCode info 1'] ?></p> 49 33 <p><?php echo $lang_help['BBCode info 2'] ?></p> 50 34 </div> 51 35 </div> 52 <h2>< ?php echo $lang_help['Text style'] ?></h2>36 <h2><span><?php echo $lang_help['Text style'] ?></span></h2> 53 37 <div class="box"> 54 <p><?php echo $lang_help['Text style info'] ?></p><br /> 55 <div style="padding-left: 4px"> 56 [b]<?php echo $lang_help['Bold text'] ?>[/b] <?php echo $lang_help['produces'] ?> <b><?php echo $lang_help['Bold text'] ?></b><br /> 57 [u]<?php echo $lang_help['Underlined text'] ?>[/u] <?php echo $lang_help['produces'] ?> <span class="bbu"><?php echo $lang_help['Underlined text'] ?></span><br /> 58 [i]<?php echo $lang_help['Italic text'] ?>[/i] <?php echo $lang_help['produces'] ?> <i><?php echo $lang_help['Italic text'] ?></i><br /> 59 [color=#FF0000]<?php echo $lang_help['Red text'] ?>[/color] <?php echo $lang_help['produces'] ?> <span style="color: #ff0000"><?php echo $lang_help['Red text'] ?></span><br /> 60 [color=blue]<?php echo $lang_help['Blue text'] ?>[/color] <?php echo $lang_help['produces'] ?> <span style="color: blue"><?php echo $lang_help['Blue text'] ?></span> 38 <div class="inbox"> 39 <p><?php echo $lang_help['Text style info'] ?></p> 40 <p><code>[b]<?php echo $lang_help['Bold text'] ?>[/b]</code> <?php echo $lang_help['produces'] ?> <samp><strong><?php echo $lang_help['Bold text'] ?></strong></samp></p> 41 <p><code>[u]<?php echo $lang_help['Underlined text'] ?>[/u]</code> <?php echo $lang_help['produces'] ?> <samp><span class="bbu"><?php echo $lang_help['Underlined text'] ?></span></samp></p> 42 <p><code>[i]<?php echo $lang_help['Italic text'] ?>[/i]</code> <?php echo $lang_help['produces'] ?> <samp><em><?php echo $lang_help['Italic text'] ?></em></samp></p> 43 <p><code>[s]<?php echo $lang_help['Strike-through text'] ?>[/s]</code> <?php echo $lang_help['produces'] ?> <samp><span class="bbs"><?php echo $lang_help['Strike-through text'] ?></span></samp></p> 44 <p><code>[del]<?php echo $lang_help['Deleted text'] ?>[/del]</code> <?php echo $lang_help['produces'] ?> <samp><del><?php echo $lang_help['Deleted text'] ?></del></samp></p> 45 <p><code>[ins]<?php echo $lang_help['Inserted text'] ?>[/ins]</code> <?php echo $lang_help['produces'] ?> <samp><ins><?php echo $lang_help['Inserted text'] ?></ins></samp></p> 46 <p><code>[em]<?php echo $lang_help['Emphasised text'] ?>[/em]</code> <?php echo $lang_help['produces'] ?> <samp><em><?php echo $lang_help['Emphasised text'] ?></em></samp></p> 47 <p><code>[color=#FF0000]<?php echo $lang_help['Red text'] ?>[/color]</code> <?php echo $lang_help['produces'] ?> <samp><span style="color: #ff0000"><?php echo $lang_help['Red text'] ?></span></samp></p> 48 <p><code>[color=blue]<?php echo $lang_help['Blue text'] ?>[/color]</code> <?php echo $lang_help['produces'] ?> <samp><span style="color: blue"><?php echo $lang_help['Blue text'] ?></span></samp></p> 49 <p><code>[h]<?php echo $lang_help['Heading text'] ?>[/h]</code> <?php echo $lang_help['produces'] ?></p> <div class="postmsg"><h5><?php echo $lang_help['Heading text'] ?></h5></div> 61 50 </div> 62 51 </div> 63 <h2>< ?php echo $lang_help['Links and images'] ?></h2>52 <h2><span><?php echo $lang_help['Links and images'] ?></span></h2> 64 53 <div class="box"> 65 <p><?php echo $lang_help['Links info'] ?></p><br /> 66 <div style="padding-left: 4px"> 67 [url=<?php echo $pun_config['o_base_url'].'/' ?>]<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>[/url] <?php echo $lang_help['produces'] ?> <a href="<?php echo $pun_config['o_base_url'].'/' ?>"><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?></a><br /> 68 [url]<?php echo $pun_config['o_base_url'].'/' ?>[/url] <?php echo $lang_help['produces'] ?> <a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_base_url'].'/' ?></a><br /> 69 [email]myname@mydomain.com[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com">myname@mydomain.com</a><br /> 70 [email=myname@mydomain.com]<?php echo $lang_help['My e-mail address'] ?>[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com"><?php echo $lang_help['My e-mail address'] ?></a><br /><br /> 54 <div class="inbox"> 55 <p><?php echo $lang_help['Links info'] ?></p> 56 <p><code>[url=<?php echo pun_htmlspecialchars(get_base_url(true).'/') ?>]<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>[/url]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/') ?>"><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?></a></samp></p> 57 <p><code>[url]<?php echo pun_htmlspecialchars(get_base_url(true).'/') ?>[/url]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/') ?>"><?php echo pun_htmlspecialchars(get_base_url(true).'/') ?></a></samp></p> 58 <p><code>[url=/help.php]<?php echo $lang_help['This help page'] ?>[/url]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo get_base_url(true).'/help.php' ?>"><?php echo $lang_help['This help page'] ?></a></samp></p> 59 <p><code>[email]myname@mydomain.com[/email]</code> <?php echo $lang_help['produces'] ?> <samp><a href="mailto:myname@mydomain.com">myname@mydomain.com</a></samp></p> 60 <p><code>[email=myname@mydomain.com]<?php echo $lang_help['My email address'] ?>[/email]</code> <?php echo $lang_help['produces'] ?> <samp><a href="mailto:myname@mydomain.com"><?php echo $lang_help['My email address'] ?></a></samp></p> 61 <p><code>[topic=1]<?php echo $lang_help['Test topic'] ?>[/topic]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?id=1') ?>"><?php echo $lang_help['Test topic'] ?></a></samp></p> 62 <p><code>[topic]1[/topic]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?id=1') ?>"><?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?id=1') ?></a></samp></p> 63 <p><code>[post=1]<?php echo $lang_help['Test post'] ?>[/post]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?pid=1#p1') ?>"><?php echo $lang_help['Test post'] ?></a></samp></p> 64 <p><code>[post]1[/post]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?pid=1#p1') ?>"><?php echo pun_htmlspecialchars(get_base_url(true).'/viewtopic.php?pid=1#p1') ?></a></samp></p> 65 <p><code>[forum=1]<?php echo $lang_help['Test forum'] ?>[/forum]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewforum.php?id=1') ?>"><?php echo $lang_help['Test forum'] ?></a></samp></p> 66 <p><code>[forum]1[/forum]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/viewforum.php?id=1') ?>"><?php echo pun_htmlspecialchars(get_base_url(true).'/viewforum.php?id=1') ?></a></samp></p> 67 <p><code>[user=2]<?php echo $lang_help['Test user'] ?>[/user]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/profile.php?id=2') ?>"><?php echo $lang_help['Test user'] ?></a></samp></p> 68 <p><code>[user]2[/user]</code> <?php echo $lang_help['produces'] ?> <samp><a href="<?php echo pun_htmlspecialchars(get_base_url(true).'/profile.php?id=2') ?>"><?php echo pun_htmlspecialchars(get_base_url(true).'/profile.php?id=2') ?></a></samp></p> 71 69 </div> 72 <p><a name="img"></a><?php echo $lang_help['Images info'] ?></p> 73 <div>[img]http://www.punbb.org/img/small_logo.png[/img] <?php echo $lang_help['produces'] ?> <img src="http://www.punbb.org/img/small_logo.png" alt="http://www.punbb.org/img/small_logo.png" /></div> 70 <div class="inbox"> 71 <p><a name="img"></a><?php echo $lang_help['Images info'] ?></p> 72 <p><code>[img=<?php echo $lang_help['FluxBB bbcode test'] ?>]<?php echo pun_htmlspecialchars(get_base_url(true)) ?>/img/test.png[/img]</code> <?php echo $lang_help['produces'] ?> <samp><img style="height: 21px" src="<?php echo pun_htmlspecialchars(get_base_url(true)) ?>/img/test.png" alt="<?php echo $lang_help['FluxBB bbcode test'] ?>" /></samp></p> 73 </div> 74 74 </div> 75 <h2>< ?php echo $lang_help['Quotes'] ?></h2>75 <h2><span><?php echo $lang_help['Quotes'] ?></span></h2> 76 76 <div class="box"> 77 <div style="padding-left: 4px">78 < ?php echo $lang_help['Quotes info'] ?><br /><br />79     [quote=James]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br />80 < ?php echo $lang_help['produces quote box'] ?><br /><br />77 <div class="inbox"> 78 <p><?php echo $lang_help['Quotes info'] ?></p> 79 <p><code>[quote=James]<?php echo $lang_help['Quote text'] ?>[/quote]</code></p> 80 <p><?php echo $lang_help['produces quote box'] ?></p> 81 81 <div class="postmsg"> 82 < blockquote><div class="incqbox"><h4>James <?php echo $lang_common['wrote'] ?>:</h4><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote>82 <div class="quotebox"><cite>James <?php echo $lang_common['wrote'] ?></cite><blockquote><div><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote></div> 83 83 </div> 84 <br /> 85 <?php echo $lang_help['Quotes info 2'] ?><br /><br /> 86     [quote]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br /> 87 <?php echo $lang_help['produces quote box'] ?><br /><br /> 84 <p><?php echo $lang_help['Quotes info 2'] ?></p> 85 <p><code>[quote]<?php echo $lang_help['Quote text'] ?>[/quote]</code></p> 86 <p><?php echo $lang_help['produces quote box'] ?></p> 88 87 <div class="postmsg"> 89 <blockquote><div class="incqbox"><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote> 88 <div class="quotebox"><blockquote><div><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote></div> 89 </div> 90 <p><?php echo $lang_help['quote note'] ?></p> 91 </div> 92 </div> 93 <h2><span><?php echo $lang_help['Code'] ?></span></h2> 94 <div class="box"> 95 <div class="inbox"> 96 <p><?php echo $lang_help['Code info'] ?></p> 97 <p><code>[code]<?php echo $lang_help['Code text'] ?>[/code]</code></p> 98 <p><?php echo $lang_help['produces code box'] ?></p> 99 <div class="postmsg"> 100 <div class="codebox"><pre><code><?php echo $lang_help['Code text'] ?></code></pre></div> 90 101 </div> 91 102 </div> 92 103 </div> 93 <h2>< ?php echo $lang_help['Code'] ?></h2>104 <h2><span><?php echo $lang_help['Lists'] ?></span></h2> 94 105 <div class="box"> 95 <div style="padding-left: 4px">96 < ?php echo $lang_help['Code info'] ?><br /><br />97     [code]<?php echo $lang_help['Code text'] ?>[/code]<br /><br />98 < ?php echo $lang_help['produces code box'] ?><br /><br />106 <div class="inbox"> 107 <p><a name="lists"></a><?php echo $lang_help['List info'] ?></p> 108 <p><code>[list][*]<?php echo $lang_help['List text 1'] ?>[/*][*]<?php echo $lang_help['List text 2'] ?>[/*][*]<?php echo $lang_help['List text 3'] ?>[/*][/list]</code> 109 <br /><span><?php echo $lang_help['produces list'] ?></span></p> 99 110 <div class="postmsg"> 100 <div class="codebox"><div class="incqbox"><h4><?php echo $lang_common['Code'] ?>:</h4><div class="scrollbox" style="height: 4.5em"><pre><?php echo $lang_help['Code text'] ?></pre></div></div></div> 111 <ul><li><p><?php echo $lang_help['List text 1'] ?></p></li><li><p><?php echo $lang_help['List text 2'] ?></p></li><li><p><?php echo $lang_help['List text 3'] ?></p></li></ul> 112 </div> 113 <p><code>[list=1][*]<?php echo $lang_help['List text 1'] ?>[/*][*]<?php echo $lang_help['List text 2'] ?>[/*][*]<?php echo $lang_help['List text 3'] ?>[/*][/list]</code> 114 <br /><span><?php echo $lang_help['produces decimal list'] ?></span></p> 115 <div class="postmsg"> 116 <ol class="decimal"><li><p><?php echo $lang_help['List text 1'] ?></p></li><li><p><?php echo $lang_help['List text 2'] ?></p></li><li><p><?php echo $lang_help['List text 3'] ?></p></li></ol> 117 </div> 118 <p><code>[list=a][*]<?php echo $lang_help['List text 1'] ?>[/*][*]<?php echo $lang_help['List text 2'] ?>[/*][*]<?php echo $lang_help['List text 3'] ?>[/*][/list]</code> 119 <br /><span><?php echo $lang_help['produces alpha list'] ?></span></p> 120 <div class="postmsg"> 121 <ol class="alpha"><li><p><?php echo $lang_help['List text 1'] ?></p></li><li><p><?php echo $lang_help['List text 2'] ?></p></li><li><p><?php echo $lang_help['List text 3'] ?></p></li></ol> 101 122 </div> 102 123 </div> 103 124 </div> 104 <h2>< ?php echo $lang_help['Nested tags'] ?></h2>125 <h2><span><?php echo $lang_help['Nested tags'] ?></span></h2> 105 126 <div class="box"> 106 <div style="padding-left: 4px">107 < ?php echo $lang_help['Nested tags info'] ?><br /><br />108     [b][u]<?php echo $lang_help['Bold, underlined text'] ?>[/u][/b] <?php echo $lang_help['produces'] ?> <span class="bbu"><b><?php echo $lang_help['Bold, underlined text'] ?></b></span><br /><br />127 <div class="inbox"> 128 <p><?php echo $lang_help['Nested tags info'] ?></p> 129 <p><code>[b][u]<?php echo $lang_help['Bold, underlined text'] ?>[/u][/b]</code> <?php echo $lang_help['produces'] ?> <samp><strong><span class="bbu"><?php echo $lang_help['Bold, underlined text'] ?></span></strong></samp></p> 109 130 </div> 110 131 </div> 111 <h2>< ?php echo $lang_common['Smilies'] ?></h2>132 <h2><span><?php echo $lang_help['Smilies'] ?></span></h2> 112 133 <div class="box"> 113 <div style="padding-left: 4px">114 < a name="smilies"></a><?php echo $lang_help['Smilies info'] ?><br /><br />134 <div class="inbox"> 135 <p><a name="smilies"></a><?php echo $lang_help['Smilies info'] ?></p> 115 136 <?php 116 137 117 138 // Display the smiley set 118 @include_once PUN_ROOT.'cache/cache_smilies.php'; 119 if (!defined('PUN_CACHE_SMILEY')) 120 { 121 require_once PUN_ROOT.'include/cache_smilies.php'; 122 generate_smiley_cache(); 123 require PUN_ROOT.'cache/cache_smilies.php'; 124 } 139 require PUN_ROOT.'include/parser.php'; 125 140 126 $num_smilies = count($smiley_text); 127 for ($i = 0; $i < $num_smilies; ++$i) 128 { 129 // Is there a smiley at the current index? 130 if (!isset($smiley_text[$i])) 131 continue; 141 $smiley_groups = array(); 132 142 133 echo "\t\t".'    '.$smiley_text[$i]; 143 foreach ($smilies as $smiley_text => $smiley_img) 144 $smiley_groups[$smiley_img][] = $smiley_text; 134 145 135 // Save the current text and image 136 $cur_img = $smiley_img[$i]; 137 $cur_text = $smiley_text[$i]; 138 139 // Loop through the rest of the array and see if there are any duplicate images 140 // (more than one text representation for one image) 141 for ($next = $i + 1; $next < $num_smilies; ++$next) 142 { 143 // Did we find a dupe? 144 if (isset($smiley_img[$next]) && $smiley_img[$i] == $smiley_img[$next]) 145 { 146 echo ' '.$lang_common['and'].' '.$smiley_text[$next]; 147 148 // Remove the dupe so we won't display it twice 149 unset($smiley_text[$next]); 150 unset($smiley_img[$next]); 151 } 152 } 153 154 echo ' '.$lang_help['produces'].' <img src="img/smilies/'.$cur_img.'" alt="'.$cur_text.'" /><br />'."\n"; 155 } 146 foreach ($smiley_groups as $smiley_img => $smiley_texts) 147 echo "\t\t".'<p><code>'.implode('</code> '.$lang_common['and'].' <code>', $smiley_texts).'</code> <span>'.$lang_help['produces'].'</span> <samp><img src="'.pun_htmlspecialchars(get_base_url(true)).'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.$smiley_texts[0].'" /></samp></p>'."\n"; 156 148 157 149 ?> 158 <br />159 150 </div> 160 151 </div>
Note: See TracChangeset
for help on using the changeset viewer.