wasted on 7/5/02, 3:09 PM
Because Nucleus codes its forms with a hidden field named "action" (which causes problems calling the waste.pl-script), coding the "waste"-button requires some extra steps:
Wasting entries
Open the file admin_add.template in the directory /nucleus/libs/include.
-
Move the tag <div> which is placed right after the opening form-tag to immediately before the form-tag.
-
Wherever you want the "waste"-button to appear on the form, add this code:
<input type="button" value="waste!" onclick="this.form.removeChild(document.getElementById('action')); this.form.target='_blank'; this.form.action='ubique.ch'; this.form.submit(); if(!document.layers)location.reload()" class="formbutton" />
Wasting comments
Open the file SKIN.php in the directory /nucleus/libs.
Search for the function "parse_commentform".
Two things need to be changed in the form code that is printed there:
-
Move the tag <div class="commentform">, which is placed right after the opening form-tag, to immediately before the form-tag:
<div class="commentform">
<form method="post" action=">?=$actionurl?>">
-
Wherever you want the "waste-this-comment!"-button to appear on the form, add this code:
<input type="button" value="waste this comment!" onclick="this.form.removeChild(document.getElementById('action')); this.form.target='_blank'; this.form.action='ubique.ch'; this.form.submit(); if(!document.layers)location.reload()" class="formbutton" />
Done! Happy dumping!