TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 02:51:17 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 190
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 172
  • Total: 172

[Simple Shoutbox] Shouts selection by page on admin panel

Started by raid, October 23, 2008, 04:43:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raid

On my forum, we use to keep shoutbox clean, and its hard select lots of shouts one by one to erease them.
I added this small code to add a checkbox on Shouts control panel to select  all shouts on page (something like "Select All"):

Code (TPShout.template.php, Find this code) Select
echo '<tr class="windowbg">
      <td colspan="2" align="left" class="normaltext">
<input name="tp_shoutsdelall" type="checkbox" value="ON" onclick="javascript:return confirm(\''.$txt['tp-confirm'].'\')"> <strong><em>'.$txt['tp-deleteallshouts'].'</em></strong></td><td colspan="2" align="right" class="smalltext"><b>'.$context['TPortal']['shoutbox_pageindex'].'</b>
      </td>
      </tr><tr><td colspan="4" class="windowbg2" align="center" valign="top">
      <input type="submit" value="'.$txt['tp-send'].'" name="send"></td>
      </tr>
</table>
     </form>';

Code (Replace with) Select
echo '<tr class="windowbg">
      <td colspan="2" align="left" class="normaltext">';
//Checkbox to check Deletebox for all message on Admin shouts manage
echo '
      <input type="checkbox" name="all" id="check_all" value="" onclick="invertAll(this, this.form, \'tp_shoutbox_remove\');" class="check" /> <em>'.$txt['tp-deleteallshoutsonpage'].'</em><br />';
echo '
<input name="tp_shoutsdelall" type="checkbox" value="ON" onclick="javascript:return confirm(\''.$txt['tp-confirm'].'\')"> <strong><em>'.$txt['tp-deleteallshouts'].'</em></strong></td><td colspan="2" align="right" class="smalltext"><b>'.$context['TPortal']['shoutbox_pageindex'].'</b>
      </td>
      </tr><tr><td colspan="4" class="windowbg2" align="center" valign="top">
      <input type="submit" value="'.$txt['tp-send'].'" name="send"></td>
      </tr>
</table>
     </form>';


and then add this language string:
Code (TPortaAdmin.english.php, Find this code) Select
$txt['tp-deleteallshouts'] = 'Delete all shouts?';
Code (Add before) Select
$txt['tp-deleteallshoutsonpage'] = 'Delete all shouts on this page?';

tested on SMF 1.1.6 and TP 1.0.6 Beta2
SMF 2.0 + TP RC2

G6Cad


raid

SMF 2.0 + TP RC2

G6Cad