punbb/help.php
author Dan
Thu, 12 Jul 2007 01:04:01 -0400
changeset 2 a8a21e1c7afa
parent 0 f9ffdbd96607
child 3 c0c445d4a13e
permissions -rw-r--r--
Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     1
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     2
/***********************************************************************
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     3
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     4
  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     5
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     6
  This file is part of PunBB.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     7
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     8
  PunBB is free software; you can redistribute it and/or modify it
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     9
  under the terms of the GNU General Public License as published
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    10
  by the Free Software Foundation; either version 2 of the License,
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    11
  or (at your option) any later version.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    12
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    13
  PunBB is distributed in the hope that it will be useful, but
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    14
  WITHOUT ANY WARRANTY; without even the implied warranty of
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    15
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    16
  GNU General Public License for more details.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    17
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    18
  You should have received a copy of the GNU General Public License
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    19
  along with this program; if not, write to the Free Software
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    20
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    21
  MA  02111-1307  USA
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    22
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    23
************************************************************************/
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    24
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    25
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    26
// Tell header.php to use the help template
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    27
define('PUN_HELP', 1);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    28
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    29
//define('PUN_ROOT', './');
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    30
//require PUN_ROOT.'include/common.php';
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    31
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    32
global $pun_db, $pun_user, $pun_config, $lang_common;
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    33
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    34
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    35
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    36
if ($pun_user['g_read_board'] == '0')
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    37
	message($lang_common['No view']);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    38
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    39
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    40
// Load the help.php language file
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    41
require PUN_ROOT.'lang/'.$pun_user['language'].'/help.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    42
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    43
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    44
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_help['Help'];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    45
require PUN_ROOT.'header.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    46
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    47
?>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    48
<h2><?php echo $lang_common['BBCode'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    49
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    50
	<div class="inbox">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    51
		<p><a name="bbcode"></a><?php echo $lang_help['BBCode info 1'] ?></p><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    52
		<p><?php echo $lang_help['BBCode info 2'] ?></p>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    53
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    54
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    55
<h2><?php echo $lang_help['Text style'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    56
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    57
	<p><?php echo $lang_help['Text style info'] ?></p><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    58
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    59
		[b]<?php echo $lang_help['Bold text'] ?>[/b] <?php echo $lang_help['produces'] ?> <b><?php echo $lang_help['Bold text'] ?></b><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    60
		[u]<?php echo $lang_help['Underlined text'] ?>[/u] <?php echo $lang_help['produces'] ?> <span class="bbu"><?php echo $lang_help['Underlined text'] ?></span><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    61
		[i]<?php echo $lang_help['Italic text'] ?>[/i] <?php echo $lang_help['produces'] ?> <i><?php echo $lang_help['Italic text'] ?></i><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    62
		[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 />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    63
		[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>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    64
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    65
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    66
<h2><?php echo $lang_help['Links and images'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    67
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    68
	<p><?php echo $lang_help['Links info'] ?></p><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    69
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    70
		[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 />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    71
		[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 />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    72
		[email]myname@mydomain.com[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com">myname@mydomain.com</a><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    73
		[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 />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    74
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    75
	<p><a name="img"></a><?php echo $lang_help['Images info'] ?></p>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    76
	<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>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    77
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    78
<h2><?php echo $lang_help['Quotes'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    79
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    80
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    81
		<?php echo $lang_help['Quotes info'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    82
		&nbsp;&nbsp;&nbsp;&nbsp;[quote=James]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    83
		<?php echo $lang_help['produces quote box'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    84
		<div class="postmsg">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    85
			<blockquote><div class="incqbox"><h4>James <?php echo $lang_common['wrote'] ?>:</h4><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    86
		</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    87
		<br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    88
		<?php echo $lang_help['Quotes info 2'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    89
		&nbsp;&nbsp;&nbsp;&nbsp;[quote]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    90
		<?php echo $lang_help['produces quote box'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    91
		<div class="postmsg">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    92
			<blockquote><div class="incqbox"><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    93
		</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    94
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    95
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    96
<h2><?php echo $lang_help['Code'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    97
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    98
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    99
		<?php echo $lang_help['Code info'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   100
		&nbsp;&nbsp;&nbsp;&nbsp;[code]<?php echo $lang_help['Code text'] ?>[/code]<br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   101
		<?php echo $lang_help['produces code box'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   102
		<div class="postmsg">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   103
			<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>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   104
		</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   105
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   106
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   107
<h2><?php echo $lang_help['Nested tags'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   108
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   109
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   110
		<?php echo $lang_help['Nested tags info'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   111
		&nbsp;&nbsp;&nbsp;&nbsp;[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 />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   112
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   113
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   114
<h2><?php echo $lang_common['Smilies'] ?></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   115
<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   116
	<div style="padding-left: 4px">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   117
		<a name="smilies"></a><?php echo $lang_help['Smilies info'] ?><br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   118
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   119
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   120
// Display the smiley set
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   121
require PUN_ROOT.'include/parser.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   122
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   123
$num_smilies = count($smiley_text);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   124
for ($i = 0; $i < $num_smilies; ++$i)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   125
{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   126
	// Is there a smiley at the current index?
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   127
	if (!isset($smiley_text[$i]))
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   128
		continue;
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   129
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   130
	echo "\t\t".'&nbsp;&nbsp;&nbsp;&nbsp;'.$smiley_text[$i];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   131
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   132
	// Save the current text and image
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   133
	$cur_img = $smiley_img[$i];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   134
	$cur_text = $smiley_text[$i];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   135
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   136
	// Loop through the rest of the array and see if there are any duplicate images
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   137
	// (more than one text representation for one image)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   138
	for ($next = $i + 1; $next < $num_smilies; ++$next)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   139
	{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   140
		// Did we find a dupe?
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   141
		if (isset($smiley_img[$next]) && $smiley_img[$i] == $smiley_img[$next])
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   142
		{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   143
			echo ' '.$lang_common['and'].' '.$smiley_text[$next];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   144
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   145
			// Remove the dupe so we won't display it twice
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   146
			unset($smiley_text[$next]);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   147
			unset($smiley_img[$next]);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   148
		}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   149
	}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   150
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   151
	echo ' '.$lang_help['produces'].' <img src="img/smilies/'.$cur_img.'" width="15" height="15" alt="'.$cur_text.'" /><br />'."\n";
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   152
}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   153
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   154
?>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   155
		<br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   156
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   157
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   158
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   159
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   160
require PUN_ROOT.'footer.php';