Note: There is a much cleaner solution found in 2.8. Be looking forward to it.
This change will add two links next to the Delete All and Move All Selected boxes at the top and the bottom of thread display. I borrowed the js function from rkquest's post at digitalpoint
--- thread.tmpl.dist 2009-02-05 01:39:24.000000000 -0700
+++ thread.tmpl 2009-02-05 02:51:40.000000000 -0700
@@ -93,7 +93,7 @@
{SECTION: END}
{SECTION: thread_list}
-{IF: $MOD || $mo == 8224}<form method="post" action="{TEMPLATE: thread_mod_mass_lnk}">{ENDIF}
+{IF: $MOD || $mo == 8224}<form method="post" action="{TEMPLATE: thread_mod_mass_lnk}" name="frmthreadsel">{ENDIF}
<table border="0" cellspacing="1" cellpadding="2" class="pad">
<tr>
<th> </th>
@@ -106,14 +106,14 @@
{TEMPLATE-DATA: announcements}
{IF: $MOD || $mo == 8224}
<tr>
- <td colspan="3" class="RowStyleC ar"><input type="submit" class="button" name="del_sel_all" value="{MSG: thread_del_all}"> <input type="submit" class="button" name="mov_sel_all" value="{MSG: thread_mov_all}"></td>
+ <td colspan="3" class="RowStyleC ar"><input type="submit" class="button" name="del_sel_all" value="{MSG: thread_del_all}"> <input type="submit" class="button" name="mov_sel_all" value="{MSG: thread_mov_all}"> <a href="javascript:thread_select(1)">{MSG: select_all}</a> <a href="javascript:thread_select(0)">{MSG: deselect_all}</a></td>
<td colspan="3" class="RowStyleC"> </td>
</tr>
{ENDIF}
{TEMPLATE-DATA: thread_list_table_data}
{IF: $MOD || $mo == 8224}
<tr>
- <td colspan="3" class="RowStyleC ar"><input type="submit" class="button" name="del_sel_all" value="{MSG: thread_del_all}"> <input type="submit" class="button" name="mov_sel_all" value="{MSG: thread_mov_all}"></td>
+ <td colspan="3" class="RowStyleC ar"><input type="submit" class="button" name="del_sel_all" value="{MSG: thread_del_all}"> <input type="submit" class="button" name="mov_sel_all" value="{MSG: thread_mov_all}"> <a href="javascript:thread_select(1)">{MSG: select_all}</a> <a href="javascript:thread_select(0)">{MSG: deselect_all}</a></td>
<td colspan="3" class="RowStyleC"> </td>
</tr>
{ENDIF}
--- msg 2009-02-05 02:55:07.000000000 -0700
+++ msg.dist 2009-02-05 02:54:58.000000000 -0700
@@ -1004,6 +1004,8 @@
search_results_hdr: {VAR: total} Search Results Found
thread_del_all: Delete All Selected
thread_mov_all: Move All Selected
+select_all: Select All
+deselect_all: Deselect All
dmsg_ip: IP:
err_blockedaccnt_title: ERROR: Your account has been filtered out.
err_blockedaccnt_msg: Your account has been blocked from accessing the forum due to one of the installed user filters.
--- lib.js.dist 2009-02-05 01:50:24.000000000 -0700
+++ lib.js 2009-02-05 02:58:27.000000000 -0700
@@ -16,6 +16,15 @@
var OPERA = navigator.userAgent.indexOf("Opera") > -1 ? 1 : 0;
var MAC = navigator.userAgent.indexOf("Mac") > -1 ? 1 : 0;
+/* select or deselect all, see thread.tmpl */
+function thread_select(a) {
+ var theForm = document.frmthreadsel;
+ for (i=0; i<theForm.elements.length; i++) {
+ if (theForm.elements[i].name=='_sel[]')
+ theForm.elements[i].checked = a;
+ }
+}
+
/* edit box stuff */
function insertTag(obj, stag, etag)
{
[Updated on: Thu, 05 February 2009 11:08]
Report message to a moderator