<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Toggle Button]]></title>
		<link>https://punbb.informer.com/forums/topic/4612/toggle-button/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/4612/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Toggle Button.]]></description>
		<lastBuildDate>Fri, 10 Sep 2004 23:20:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Toggle Button]]></title>
			<link>https://punbb.informer.com/forums/post/20788/#p20788</link>
			<description><![CDATA[<div class="codebox"><pre><code>##
##        Mod title:  Toggle Button
##
##      Mod version:  1.0
##   Works on PunBB:  Should work on any version, but only tested with 1.1.5 
##     Release date:  2004-09-10
##           Author:  Smartys (keyrex1@verizon.net)
##
##      Description:  Adds a toggle button to moderate.php so you can check
##                    multiple boxes faster! And Rickard called us lazy! :P
##
##   Affected files:  moderate.php
##                    header.php
##
##       Affects DB:  No
##
##       DISCLAIMER:  Please note that &quot;mods&quot; are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##


#
#---------[ 1. OPEN ]---------------------------------------------------------
#

header.php


#
#---------[ 2. FIND ]------------------------------------------------
#

// START SUBST - &lt;pun_head&gt;
ob_start();

if (isset($destination))
    echo &#039;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;&#039;.$delay.&#039;;URL=&#039;.$destination.&#039;&quot;&gt;&#039;.&quot;\n&quot;;


#
#---------[ 3. REPLACE WITH ]---------------------------------------------------
#

// START SUBST - &lt;pun_head&gt;
ob_start();

if (isset($moderate))
{
?&gt;

&lt;SCRIPT LANGUAGE=JAVASCRIPT&gt;    
function selectAll(f) {
for(i=0;i&lt;f.length;i++)
if(f.elements[i].type == &quot;checkbox&quot;)
f.elements[i].click();
}
&lt;/SCRIPT&gt;

&lt;?php

}

if (isset($destination))
    echo &#039;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;&#039;.$delay.&#039;;URL=&#039;.$destination.&#039;&quot;&gt;&#039;.&quot;\n&quot;;
#
#---------[ 4. SAVE/UPLOAD ]-------------------------------------------------
#



#
#---------[ 5. OPEN ]--------------------------------------------------------
#

moderate.php


#
#---------[ 6. FIND ]------------------------------------------------
#

&lt;td&gt;&lt;b&gt;&lt;a href=&quot;index.php&quot;&gt;&lt;?php echo pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) ?&gt;&lt;/a&gt; / &lt;a href=&quot;viewforum.php?id=&lt;?php echo $fid ?&gt;&quot;&gt;&lt;?php echo pun_htmlspecialchars($forum_name) ?&gt;&lt;/a&gt; / &lt;?php echo pun_htmlspecialchars($subject) ?&gt;&lt;/b&gt;&lt;/td&gt;


#
#---------[ 7. REPLACE WITH ]------------------------------------------------
#

&lt;td&gt;&lt;b&gt;&lt;a href=&quot;index.php&quot;&gt;&lt;?php echo pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) ?&gt;&lt;/a&gt; / &lt;a href=&quot;viewforum.php?id=&lt;?php echo $fid ?&gt;&quot;&gt;&lt;?php echo pun_htmlspecialchars($forum_name) ?&gt;&lt;/a&gt; / &lt;?php echo pun_htmlspecialchars($subject) ?&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;a href=&quot;javascript:selectAll(document.forms[0])&quot;&gt;&lt;font size=1&gt;Toggle&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;


#
#---------[ 8. FIND ]------------------------------------------------
#

&lt;td&gt;&lt;b&gt;&lt;a href=&quot;index.php&quot;&gt;&lt;?php echo pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) ?&gt;&lt;/a&gt; / &lt;?php echo pun_htmlspecialchars($forum_name) ?&gt;&lt;/b&gt;&lt;/td&gt;


#
#---------[ 9. REPLACE WITH ]------------------------------------------------
#

&lt;td&gt;&lt;b&gt;&lt;a href=&quot;index.php&quot;&gt;&lt;?php echo pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) ?&gt;&lt;/a&gt; / &lt;?php echo pun_htmlspecialchars($forum_name) ?&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;a href=&quot;javascript:selectAll(document.forms[0])&quot;&gt;&lt;font size=1&gt;Toggle&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;


#
#---------[ 10. FIND ]------------------------------------------------
#

$pun_root = &#039;./&#039;;
require $pun_root.&#039;include/common.php&#039;;


#
#---------[ 11. REPLACE WITH ]------------------------------------------------
#

$pun_root = &#039;./&#039;;
require $pun_root.&#039;include/common.php&#039;;
$moderate = true;


#
#---------[ 12. SAVE/UPLOAD ]-------------------------------------------------
#</code></pre></div><p>Enjoy the laziness! <img src="https://punbb.informer.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Fri, 10 Sep 2004 23:20:15 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/20788/#p20788</guid>
		</item>
	</channel>
</rss>
