Post by Peter on Oct 29, 2004 12:21:26 GMT
Code created by Hechizero[/color]
Script Name: Extra Topic Icons
Description: Adds more options to the Message Icon dropdown list. The icon shows in the topic list and in the posts.
Hack Type: Topic-Enable & Thread-Enable & Post-Enable
Version: 1.0
Previews: Preview #1 || Preview #2 || Preview #3
This script was requested by justlooking. Here it comes:
Main Board Footer:
Boards Footer:
How to Customize it?:
1. SETUP
Before editing anything in the script you must do some things first. First find a server that can host your images and put all of them IN THE SAME FOLDER. Also if you have custom images for the default topic options be sure that they are also in that folder.
After creating the folder name (if you had not already done so) or rename the NEW topic images with a three or less characters name. The name can include letters, numbers and/or underscores. Also rename your default custom images so that their name match the proboards default images names.
For example, proboards use the name of "question" for the pic that represent the question message icon so your custom one must also have the name of "question". In addition you can have different new topic images with the following names as allowed names: mon, er4, 0_p, etc.
Note: All the images must be in ".gif" format.
2. Specifying the images folder
Search for this part in the first lines of the Boards Footer script:
var toppicf="FOLDER URL";
And edit the red capitalized words with the url to the folder that contains the images. Remember to add a final "/" character to the url.
3. All images are custom?
If all of your images for the message icon are custom made (that means that you are not using the proboards ones) search for this part at the beggining of the second script:
var allcus="no";
And edit the red part with the values "yes". If you use the proboards images leave it with the "no" value.
4. Specifying the extra topic images name and text
Now search for this part in the script:
var extoppic= new Array();
extoppic[0]="PIC NAME";
extoppic[1]="PIC TEXT";
And edit the red part with the name of the first of the extra topic images that you hosted, and the blue part with the text that you want to appear in the Dropdownlist. To add more extra topic images just keep adding this:
extoppic[N]="PIC NAME";
extoppic[M]="PIC TEXT";
And edit the orange part with the next number, the red part with the topic image name, the green part with the next number, and the blue part with the text that you want to be displayed on the Dropdownlist.
Notes:
1- See preview #2 to be aware of two exceptions that this script fails to hide.
2- This script works only 75% in Mozilla. Basically you can see if there were added a new message icon but the functions does not work in Mozilla so they can't use the option to add new message icons with the dropdown list.
Location: One goes in the Main Page Footer and the other in All the Boards Footers.
Script Name: Extra Topic Icons
Description: Adds more options to the Message Icon dropdown list. The icon shows in the topic list and in the posts.
Hack Type: Topic-Enable & Thread-Enable & Post-Enable
Version: 1.0
Previews: Preview #1 || Preview #2 || Preview #3
This script was requested by justlooking. Here it comes:
Main Board Footer:
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Extra Topic Icons v1.0
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
var tds=document.getElementsByTagName("td");
if (location.href.indexOf("action=recent")!=-1 || location.href.indexOf("action=usersrecent")!=-1 || location.href.indexOf("action=search2")!=-1) {
for (h=0;h<tds.length;h++) {if (tds[h].width=="75%" && tds[h].innerHTML.match("@*")) {tds[h].innerHTML=tds[h].innerHTML.replace(/\w{1,3}@\*/ig,"");}}}
else {for (h=0;h<tds.length;h++) {
if (tds[h].width=="60%" && tds[h].innerHTML.match("Total Topics:") && tds[h].innerHTML.match("@*")) {tds[h].innerHTML=tds[h].innerHTML.replace(/\w{1,3}@\*/ig,"");}}}
</script>
Boards Footer:
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Extra Topic Icons v1.0
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
var toppicf="FOLDER URL";
var allcus="no";
var tds=document.getElementsByTagName("td");
if (document.title.indexOf("@*")!=-1) {document.title=document.title.split("@*")[1];}
if (location.href.indexOf("action=display")!=-1) {
for (h=0;h<tds.length;h++) {if (tds[h].align=="right" && tds[h].height=="20" && tds[h-1].innerHTML.indexOf('@*')!=-1) {
var toppic=tds[h-1].getElementsByTagName("b")[0].innerHTML.split("@*")[0];
tds[h-1].innerHTML=tds[h-1].innerHTML.replace(toppic+"@*","");
tds[h-2].innerHTML='<img src="'+toppicf+toppic+'.gif" border="0">';}}} else {
if(location.href.indexOf("=post")!=-1 || location.href.indexOf("=createpoll")!=-1 || location.href.indexOf("=modify")!=-1) {
var extoppic= new Array();
extoppic[0]="PIC NAME";
extoppic[1]="PIC TEXT";
var extraai=""; var dp=document.postmodify;
for (e=0;e<extoppic.length;e+=2) {extraai+='<option value="'+extoppic[e]+'">'+extoppic[e+1]+'</option>';}
if (dp.subject.value.indexOf("@*")!=-1) {dp.subject.value=dp.subject.value.split("@*")[1];}
for (h=0;h<tds.length;h++) {if (tds[h].width=="23%" && tds[h].innerHTML.match("Message icon:")) {
tds[h+1].innerHTML=tds[h+1].innerHTML.split("Wink")[0]+'Wink'+extraai+tds[h+1].innerHTML.split("Wink")[1];
tds[h+1].innerHTML=tds[h+1].innerHTML.replace("showimage\(\)","ulshowimage\(\)");}}
function ulshowimage() {if (dp.icon.selectedIndex>11 || allcus=="yes") {
document.images.icons.src=toppicf+dp.icon.options[dp.icon.selectedIndex].value+".gif";}
else {document.images.icons.src="http://4d5.net/boardimages/"+dp.icon.options[dp.icon.selectedIndex].value+".gif";}}
function addextoppic() {if (dp.icon.selectedIndex>11) {
dp.subject.value=dp.icon.options[dp.icon.selectedIndex].value+"@*"+dp.subject.value; dp.icon.options[0].selected=true;}}
dp.post[0].onclick=addextoppic; dp.subject.maxLength="45";}
else {for (h=0;h<tds.length;h++) {if (tds[h].width=="48%" && tds[h].innerHTML.indexOf("@*")!=-1) {
var toppic=tds[h].getElementsByTagName("b")[0].innerHTML.split("@*")[0];
tds[h].innerHTML=tds[h].innerHTML.replace(toppic+"@*","");
tds[h-1].innerHTML='<img src="'+toppicf+toppic+'.gif" border="0">';}}}}
</script>
How to Customize it?:
1. SETUP
Before editing anything in the script you must do some things first. First find a server that can host your images and put all of them IN THE SAME FOLDER. Also if you have custom images for the default topic options be sure that they are also in that folder.
After creating the folder name (if you had not already done so) or rename the NEW topic images with a three or less characters name. The name can include letters, numbers and/or underscores. Also rename your default custom images so that their name match the proboards default images names.
For example, proboards use the name of "question" for the pic that represent the question message icon so your custom one must also have the name of "question". In addition you can have different new topic images with the following names as allowed names: mon, er4, 0_p, etc.
Note: All the images must be in ".gif" format.
2. Specifying the images folder
Search for this part in the first lines of the Boards Footer script:
var toppicf="FOLDER URL";
And edit the red capitalized words with the url to the folder that contains the images. Remember to add a final "/" character to the url.
3. All images are custom?
If all of your images for the message icon are custom made (that means that you are not using the proboards ones) search for this part at the beggining of the second script:
var allcus="no";
And edit the red part with the values "yes". If you use the proboards images leave it with the "no" value.
4. Specifying the extra topic images name and text
Now search for this part in the script:
var extoppic= new Array();
extoppic[0]="PIC NAME";
extoppic[1]="PIC TEXT";
And edit the red part with the name of the first of the extra topic images that you hosted, and the blue part with the text that you want to appear in the Dropdownlist. To add more extra topic images just keep adding this:
extoppic[N]="PIC NAME";
extoppic[M]="PIC TEXT";
And edit the orange part with the next number, the red part with the topic image name, the green part with the next number, and the blue part with the text that you want to be displayed on the Dropdownlist.
Notes:
1- See preview #2 to be aware of two exceptions that this script fails to hide.
2- This script works only 75% in Mozilla. Basically you can see if there were added a new message icon but the functions does not work in Mozilla so they can't use the option to add new message icons with the dropdown list.
Location: One goes in the Main Page Footer and the other in All the Boards Footers.