Post by Peter on Oct 31, 2004 13:19:08 GMT
Code by Hechizero
Script Name: "Remove Last Edit" Checkbox
Description: Adds a checkbox when modifying a post that gives you the option to hide the "Last Edit" phrase from a post.
Hack Type: Thread-Disable & Post-Enable
Version: 1.3
Preview: Here
This was requested M Hendricks and it was added to the 'Current Code Ideas' thread. Ok, here comes the code:
How to Customize it?:
1. Edit the word added to the post
When you use the checkbox to disable the "Last Edit" it adds a word to the post, like when you select the checkbox to disable smileys. Well, the default for this script is "#noedit" but you can change it. Search for this part of the scrip:
var nedit="#noedit";
And edit the red text with the word that you want to be added. Please note that if you put a normal word like "no edit" the script may not work correctly because a sentence wrote by the member with those words can interfer with it.
2. Edit the IP image name
If you are using a custom made image for the ip (the image that appears at the side of the 'Logged' word) that has a diferent name from "ip.gif" search for this part in the script:
var ipic="ip.gif";
And edit the red part with the name of the image.
3. Edit the Checkbox Order
In the preview the checkbox is in the first position but you can edit it to appear in the second position or third position. The default is the first position but if you want to change it search for this part in the script:
var cbor=1;
And edit the red number with the number of the position that you want the checkbox to appear. (Note: It looks a little weird when the order chosed is 3)
4. Edit the 'Disable Last Edit' text
Search for this part of the script:
newC.innerHTML="<font size=2><b>Disable Last Edit:</b></font>";
And edit the red part with the text of your choice.
5. Edit the Explanation text
Search in the script this part:
newC2.innerHTML='<input type="checkbox" name="noedit" value="1"> <font size="1">Check this if you wish to disable the "Last Edit" message.</font>';}}
And edit the red part with the text of your choice.
Notes:
1- The checkbox only appears when you are editing a post, not when creating a thread or replying.
2- If you already checked the box once it will appear re-checked when you modify the post again.
Location: All Footers (except the Main Page Footer because it is useless, you can't modify PMs).
Script Name: "Remove Last Edit" Checkbox
Description: Adds a checkbox when modifying a post that gives you the option to hide the "Last Edit" phrase from a post.
Hack Type: Thread-Disable & Post-Enable
Version: 1.3
Preview: Here
This was requested M Hendricks and it was added to the 'Current Code Ideas' thread. Ok, here comes the code:
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
"Remove Last Edit" Checkbox v1.3
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
var nedit="#noedit";
var ipic="ip.gif";
var cbor=1;
var noedity=0; var tds = document.getElementsByTagName('td'); var tnoedit=document.postmodify;
for (h=0;h<tds.length;h++){
if (tds[h].width=="80%" && tds[h].innerHTML.indexOf(nedit)!=-1) {
noedity=1;
tds[h].innerHTML=tds[h].innerHTML.replace(nedit,"");}
if (tds[h].align=="right" && tds[h].innerHTML.match(ipic) && noedity==1) {
tds[h-1].innerHTML="";
noedity=0;}}
if(location.href.indexOf("=modify")!=-1) {
var tables = document.getElementsByTagName("table");
for(e=0; e<tables.length; e++){
if (tables[e].innerHTML.match("Notify of replies:") && tables[e].className.match("windowbg")){
var newR=tables[e].insertRow(cbor-1);
var newC=newR.insertCell();
var newC2=newR.insertCell();
newC.className="windowbg";
newC2.className="windowbg";
newC.innerHTML="<font size=2><b>Disable Last Edit:</b></font>";
newC2.innerHTML='<input type="checkbox" name="noedit" value="1"> <font size="1">Check this if you wish to disable the "Last Edit" message.</font>';}}
if (tnoedit.message.value.indexOf(nedit)!=-1) {
tnoedit.message.value=tnoedit.message.value.replace(nedit,"");
tnoedit.noedit.checked=true;}
function addnoedit() {
if (tnoedit.noedit.checked==true) {
tnoedit.message.value+=nedit;}}
tnoedit.post[0].onclick=addnoedit;}
if(location.href.indexOf("quote=")!=-1 && tnoedit.message.value.indexOf(nedit)!=-1) {
tnoedit.message.value=tnoedit.message.value.replace(nedit,"");}
</script>
How to Customize it?:
1. Edit the word added to the post
When you use the checkbox to disable the "Last Edit" it adds a word to the post, like when you select the checkbox to disable smileys. Well, the default for this script is "#noedit" but you can change it. Search for this part of the scrip:
var nedit="#noedit";
And edit the red text with the word that you want to be added. Please note that if you put a normal word like "no edit" the script may not work correctly because a sentence wrote by the member with those words can interfer with it.
2. Edit the IP image name
If you are using a custom made image for the ip (the image that appears at the side of the 'Logged' word) that has a diferent name from "ip.gif" search for this part in the script:
var ipic="ip.gif";
And edit the red part with the name of the image.
3. Edit the Checkbox Order
In the preview the checkbox is in the first position but you can edit it to appear in the second position or third position. The default is the first position but if you want to change it search for this part in the script:
var cbor=1;
And edit the red number with the number of the position that you want the checkbox to appear. (Note: It looks a little weird when the order chosed is 3)
4. Edit the 'Disable Last Edit' text
Search for this part of the script:
newC.innerHTML="<font size=2><b>Disable Last Edit:</b></font>";
And edit the red part with the text of your choice.
5. Edit the Explanation text
Search in the script this part:
newC2.innerHTML='<input type="checkbox" name="noedit" value="1"> <font size="1">Check this if you wish to disable the "Last Edit" message.</font>';}}
And edit the red part with the text of your choice.
Notes:
1- The checkbox only appears when you are editing a post, not when creating a thread or replying.
2- If you already checked the box once it will appear re-checked when you modify the post again.
Location: All Footers (except the Main Page Footer because it is useless, you can't modify PMs).