* raised version to 1.15
+ added disable/re-enable automatic refresh + added filtering of [img]-BBCode (may get a switch in settings soon) ! if you don't like it, remove line #308 in sboxDB.php
This commit is contained in:
parent
9763831f11
commit
ab20b9f533
@ -4,7 +4,7 @@
|
||||
<name>SMF Shoutbox</name>
|
||||
<id>Deep:SMF_Shoutbox</id>
|
||||
<type>modification</type>
|
||||
<version>1.14</version>
|
||||
<version>1.15</version>
|
||||
|
||||
<install for="1.1 RC2, 1.1 RC3">
|
||||
<require-file name="sbox.php" destination="$sourcedir" />
|
||||
@ -85,6 +85,13 @@ PLEASE UNINSTALL ANY LANGUAGE PACK FOR SHOUTBOX BEFORE UPGRADING!]]></readme>
|
||||
<code type="file">sbox_upgrade.php</code>
|
||||
<modification type="file">sbox_latest.xml</modification>
|
||||
</upgrade>
|
||||
<upgrade from="1.14" for="1.1 RC2, 1.1 RC3">
|
||||
<readme type="inline"><![CDATA[Thanks for trying the shiny new update feature. Although the Package manager might show you an error, the upgrade should work.]]></readme>
|
||||
<require-file name="sboxDB.php" destination="$sourcedir" />
|
||||
<require-file name="sbox.english.php" destination="$languagedir" />
|
||||
<require-file name="sbox.german.php" destination="$languagedir" />
|
||||
<require-file name="sbox.template.php" destination="$themedir" />
|
||||
</upgrade>
|
||||
|
||||
<uninstall for="1.1 RC2, 1.1 RC3">
|
||||
<readme type="inline">Uninstall will remove all the changes made by the shoutbox.</readme>
|
||||
|
@ -4,6 +4,8 @@
|
||||
$txt['sbox_ModTitle'] = 'SMF Shoutbox';
|
||||
$txt['sbox_KillShout'] = 'Do you want to kill this shout?';
|
||||
$txt['sbox_Refresh'] = 'Refresh';
|
||||
$txt['sbox_RefreshEnable'] = '<b>ENABLE refresh</b>';
|
||||
$txt['sbox_RefreshDisable'] = 'Disable refresh';
|
||||
$txt['sbox_RefreshBlocked'] = '[<span class="Kill">Automatic refresh disabled due to inactivity</span>]';
|
||||
$txt['sbox_History'] = 'History';
|
||||
$txt['sbox_HistoryClear'] = 'Clear history';
|
||||
|
@ -4,6 +4,8 @@
|
||||
$txt['sbox_ModTitle'] = 'SMF Shoutbox';
|
||||
$txt['sbox_KillShout'] = 'Diesen Shout löschen?';
|
||||
$txt['sbox_Refresh'] = 'Neu laden';
|
||||
$txt['sbox_RefreshEnable'] = '<b>Automatische Aktualisierung EINSCHALTEN</b>';
|
||||
$txt['sbox_RefreshDisable'] = 'Automatische Aktualisierung ausschalten';
|
||||
$txt['sbox_RefreshBlocked'] = '[<span class="Kill">Automatische Aktualisierung wegen Inaktivität ausgeschaltet</span>]';
|
||||
$txt['sbox_History'] = 'Verlauf';
|
||||
$txt['sbox_HistoryClear'] = 'Verlauf löschen';
|
||||
|
11
sboxDB.php
11
sboxDB.php
@ -111,7 +111,7 @@ $delta = time() - $row['time'];
|
||||
if ((!empty($_REQUEST['action'])) && ($_REQUEST['action'] == 'write')) $dontblock = true; else $dontblock = false;
|
||||
if (($delta > $modSettings['lastActive']*60) && ($modSettings['sbox_BlockRefresh'] == '1') && (!$dontblock)) {
|
||||
$refreshBlocked = true;
|
||||
} else {
|
||||
} elseif (empty($_REQUEST['action']) || ($_REQUEST['action'] != 'stoprefresh')) {
|
||||
echo '
|
||||
<meta http-equiv="refresh" content="' . $modSettings['sbox_RefreshTime'] . ';URL=sboxDB.php?ts=' . time() . '">';
|
||||
}
|
||||
@ -266,6 +266,14 @@ if ($context['user']['is_admin']) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$refreshBlocked) {
|
||||
if (!empty($_REQUEST['action']) && ($_REQUEST['action'] == 'stoprefresh')) {
|
||||
echo ' [<a href="' . $_SERVER['PHP_SELF'] . '">' . $txt['sbox_RefreshEnable'] . '</a>]';
|
||||
} else {
|
||||
echo ' [<a href="' . $_SERVER['PHP_SELF'] . '?action=stoprefresh">' . $txt['sbox_RefreshDisable'] . '</a>]';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (!empty($settings['display_who_viewing'])) {
|
||||
echo '<small>';
|
||||
@ -297,6 +305,7 @@ if(mysql_num_rows($result)) {
|
||||
censorText($content);
|
||||
$content = missinghtmlentities($content);
|
||||
if ($modSettings['sbox_AllowBBC'] == '1' && ($name > 0 || $modSettings['sbox_GuestBBC'] == '1')) {
|
||||
$content = preg_replace('/(\[img)(.*?)(\[\/img\])/i', '', $content); // filter out [img]-BBC
|
||||
$content = parse_bbc($content);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
|
||||
<!-- This information needs to be the same as that in the package-info.xml. -->
|
||||
<id>Deep:SMF_Shoutbox</id>
|
||||
<version>1.14</version>
|
||||
<version>1.15</version>
|
||||
|
||||
<!-- Edit BoardIndex.template.php in the SMF Default Theme. -->
|
||||
<file name="$themedir/BoardIndex.template.php">
|
||||
|
Reference in New Issue
Block a user