Empty commit

This commit is contained in:
Git 2012-12-03 08:00:16 +00:00
parent a6d76fecbb
commit 816f9b3de5
4 changed files with 34 additions and 7 deletions

View File

@ -1,7 +1,7 @@
<? <?
class TEXT { class TEXT {
// tag=>max number of attributes // tag=>max number of attributes
private $ValidTags = array('b'=>0, 'u'=>0, 'i'=>0, 's'=>0, '*'=>0, '#'=>0, 'artist'=>0, 'user'=>0, 'n'=>0, 'inlineurl'=>0, 'inlinesize'=>1, 'headline'=>1, 'align'=>1, 'color'=>1, 'colour'=>1, 'size'=>1, 'url'=>1, 'img'=>1, 'quote'=>1, 'pre'=>1, 'code'=>1, 'tex'=>0, 'hide'=>1, 'plain'=>0, 'important'=>0, 'torrent'=>0, 'rule'=>0, private $ValidTags = array('b'=>0, 'u'=>0, 'i'=>0, 's'=>0, '*'=>0, '#'=>0, 'artist'=>0, 'user'=>0, 'n'=>0, 'inlineurl'=>0, 'inlinesize'=>1, 'headline'=>1, 'align'=>1, 'color'=>1, 'colour'=>1, 'size'=>1, 'url'=>1, 'img'=>1, 'quote'=>1, 'pre'=>1, 'code'=>1, 'tex'=>0, 'hide'=>1, 'plain'=>0, 'important'=>0, 'torrent'=>0, 'rule'=>0, 'mature'=>1,
); );
private $Smileys = array( private $Smileys = array(
@ -463,6 +463,9 @@ private function parse ($Str) {
case 'hide': case 'hide':
$Array[$ArrayPos] = array('Type'=>'hide', 'Attr'=>$Attrib, 'Val'=>$this->parse($Block)); $Array[$ArrayPos] = array('Type'=>'hide', 'Attr'=>$Attrib, 'Val'=>$this->parse($Block));
break; break;
case 'mature':
$Array[$ArrayPos] = array('Type'=>'mature', 'Attr'=>$Attrib, 'Val'=>$this->parse($Block));
break;
case '#': case '#':
case '*': case '*':
$Array[$ArrayPos] = array('Type'=>'list'); $Array[$ArrayPos] = array('Type'=>'list');
@ -699,6 +702,21 @@ private function to_html ($Array) {
$Str.='<strong>'.(($Block['Attr']) ? $Block['Attr'] : 'Hidden text').'</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>'; $Str.='<strong>'.(($Block['Attr']) ? $Block['Attr'] : 'Hidden text').'</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>'; $Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
break; break;
case 'mature':
global $LoggedUser;
if($LoggedUser['EnableMatureContent']) {
if(!empty($Block['Attr'])) {
$Str.='<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br \> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
}
else {
$Str .= '<strong>Use of the [mature] tag requires a description.</strong> The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this <a href="wiki.php?action=article&id=1063">wiki</a>.';
}
}
else {
$Str .= '<span class="mature_blocked" style="font-style:italic;"><a href="wiki.php?action=article&id=1063">Mature content </a>has been blocked. You can choose to view mature content by editing your <a href="user.php?action=edit&userid=' . $LoggedUser['ID'] . '">settings</a>.</span>';
}
break;
case 'img': case 'img':
if($this->NoImg>0 && $this->valid_url($Block['Val'])) { if($this->NoImg>0 && $this->valid_url($Block['Val'])) {
$Str.='<a rel="noreferrer" target="_blank" href="'.$Block['Val'].'">'.$Block['Val'].'</a> (image)'; $Str.='<a rel="noreferrer" target="_blank" href="'.$Block['Val'].'">'.$Block['Val'].'</a> (image)';

View File

@ -144,11 +144,10 @@
$DB->query("UPDATE users_notify_quoted SET Unread = '0' WHERE UserID = '$LoggedUser[ID]' AND TopicID = '$ThreadID'"); $DB->query("UPDATE users_notify_quoted SET Unread = '0' WHERE UserID = '$LoggedUser[ID]' AND TopicID = '$ThreadID'");
$QuoteNotifiactionsCount = $Cache->get_value('forums_quotes_'.$LoggedUser['ID']); $QuoteNotificationsCount = $Cache->get_value('forums_quotes_' . $LoggedUser['ID']);
if ($QuoteNotificationsCount > 0) { if ($QuoteNotificationsCount > 0) {
$Cache->cache_value('forums_quotes_' . $LoggedUser['ID'], $QuoteNotificationsCount - 1, 0); $Cache->cache_value('forums_quotes_' . $LoggedUser['ID'], $QuoteNotificationsCount - 1, 0);
} } else {
else {
$Cache->delete_value('forums_quotes_' . $LoggedUser['ID']); $Cache->delete_value('forums_quotes_' . $LoggedUser['ID']);
} }

View File

@ -220,6 +220,15 @@ function checked($Checked) {
<label for="disablesmileys">Disable smileys</label> <label for="disablesmileys">Disable smileys</label>
</td> </td>
</tr> </tr>
<? if(check_perms('users_warn')) { ?>
<tr>
<td class="label"><strong>Mature Content</strong></td>
<td>
<input type="checkbox" name="enablematurecontent" id="enablematurecontent" <? if (!empty($SiteOptions['EnableMatureContent'])) { ?>checked="checked"<? } ?> />
<label for="enablematurecontent">Show mature content</label>
</td>
</tr>
<? } ?>
<tr> <tr>
<td class="label"><strong>Avatars</strong></td> <td class="label"><strong>Avatars</strong></td>
<td> <td>

View File

@ -190,6 +190,7 @@
$Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0); $Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0);
$Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0); $Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0);
$Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0); $Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0);
$Options['EnableMatureContent'] = (!empty($_POST['enablematurecontent']) ? 1 : 0);
$Options['DisableAvatars'] = db_string($_POST['disableavatars']); $Options['DisableAvatars'] = db_string($_POST['disableavatars']);
$Options['Identicons'] = (!empty($_POST['identicons']) ? (int) $_POST['identicons'] : 0); $Options['Identicons'] = (!empty($_POST['identicons']) ? (int) $_POST['identicons'] : 0);
$Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0); $Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0);