Post by Peter on Oct 31, 2004 15:09:59 GMT
Code by Hechizero
Script Name: Posting Area Preferences
Description: Modifies the member post with the settings that he specified on his profile.
Hack Type: Profile-Enable & Thread-Enable
Version: 1.0
Previews: Preview #1 || Preview #2 || Preview #3
Main Page Footer
Boards Footer:
How to Customize it?:
You only need to modify(or add/delete) some parts in the "Main Page Footer" script.
1. Question image
Look in the preview #2. Below some headers there is a question image. If you want to use a different one search for this part in the script:
var questpic="http://216.40.206.219/boardimages/question.gif";
And edit the red part with the url to the new image that you want to use.
2. Adding an image to the first column
Look at the preview #2. You have the option to add an image to the leftmost colum above the text that identifies that row. If you want to add a image search for this part in the script:
partspics[0]="NONE";
partspics[1]="NONE";
partspics[2]="NONE";
And edit the red part with the url to the image. (Note: In the script the word NONE does not appear, I just added it here to show where you must add the url.)
3. Adding default images
If you want to give the members the option to choose from one of your hosted images just search for this part on the script:
defimurls[0]="URL TO THE IMAGE";
defimnames[0]="NAME OF THE IMAGE";
And edit the red part with the url to that image and the blue part with a name that you want for it. That name will appear in the dropdown list. If you don't want to add a default image REMOVE the above part from the script. If you want to add more default options just keep adding this:
defimurls[N]="URL TO THE IMAGE";
defimnames[N]="NAME OF THE IMAGE";
And edit the red part with the next number, the blue part with the image url, the green part with the SAME number that you used on the red part, and the yellow part with the name that you want to give to the image.
Script Name: Posting Area Preferences
Description: Modifies the member post with the settings that he specified on his profile.
Hack Type: Profile-Enable & Thread-Enable
Version: 1.0
Previews: Preview #1 || Preview #2 || Preview #3
Main Page Footer
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Posting Area Preferences v1.0
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
if (location.href.indexOf("action=profile")!=-1 && location.href.indexOf("action=profile2")==-1) {
var partspics=new Array(); var defimurls= new Array(); var defimnames= new Array();
var questpic="http://216.40.206.219/boardimages/question.gif";
partspics[0]="";
partspics[1]="";
partspics[2]="";
defimurls[0]="URL TO THE IMAGE";
defimnames[0]="NAME OF THE IMAGE";
var cortado=document.creator.websiteurl.value.split('!#'); var tables=document.getElementsByTagName("table");
for (h=0;h<tables.length;h++) {if (tables[h].className=="bordercolor" && tables[h].width=="720") {var mucamba=h;}
if (tables[h].cellPadding=="3" && tables[h].innerHTML.match(/Hide Email from public?/i) && tables[h].innerHTML.indexOf("Edit Profile")==-1) {var newtr=tables[h].insertRow(4); var newtd1=newtr.insertCell(0); var newtd2=newtr.insertCell(1); newtd1.width="320px"; newtd2.style.paddingLeft="90px";
newtd1.innerHTML='<font size="2"><b>Posting Area Preferences:</b></font><br><font size="1">Click on the link to view or set your posting area preferences</font>';
newtd2.innerHTML='<a href="javascript: void(0);" onclick="tables[mucamba].style.display=\'none\'; document.getElementById(\'papreftab\').style.display=\'block\'; alert(\'Post Area Customizer v1.0\\n\\nIf you want the script to work correctly remember to verify\\nthe changes that you do before submiting your profile data.\');">View and Set Preferences</a>';
document.write('<script src="http://www.webpost.net/he/hechizero/scripts/setpaprefs.js"></sc'+'ript>');}}}
if (location.href.indexOf("action=imshow")!=-1 || location.href.indexOf("action=calendarview")!=-1) {var tables=document.getElementsByTagName("table");
for (h=0;h<tables.length;h++) {if (tables[h].cellPadding=="4" && tables[h].className.match(/windowbg/i) && tables[h].innerHTML.match(/!#/i)) {var tds=tables[h].getElementsByTagName("td"); var ito=0;
for (e=0;e<tds.length;e++) {if (tds[e].width=="20%" && tds[e].innerHTML.match(/!#/i)) {var paprefs=tds[e].innerHTML.split("!#"); tds[e].innerHTML=paprefs[0]+paprefs[paprefs.length-1];
if (paprefs[1]==5 || paprefs[1]==7) {tds[e].style.backgroundColor=paprefs[2]; tds[e].style.backgroundImage='url('+paprefs[3]+')'; tds[e].style.backgroundRepeat=paprefs[4]; tds[e].style.backgroundPosition=unescape(paprefs[5]); ito=4;}
else {tds[e].bgColor=""; tds[e].className="";}
if (paprefs[1]!=5) {tables[h].style.backgroundColor=paprefs[2+ito]; tables[h].style.backgroundImage='url('+paprefs[3+ito]+')'; tables[h].style.backgroundRepeat=paprefs[4+ito]; tables[h].style.backgroundPosition=unescape(paprefs[5+ito]);}}
if (tds[e].className.match(/windowbg/i) && tds[e].vAlign=="top" && tds[e].width!="20%") {if (paprefs[1]==5 || paprefs[1]==8) {tds[e].style.backgroundColor=paprefs[6]; tds[e].style.backgroundImage='url('+paprefs[7]+')'; tds[e].style.backgroundRepeat=paprefs[8]; tds[e].style.backgroundPosition=unescape(paprefs[9]);}
else {tds[e].bgColor=""; tds[e].className="";}}
if (tds[e].className.match(/windowbg/i) && tds[e].vAlign=="bottom") {if (paprefs[1]==5 || paprefs[1]==6) {tds[e].style.backgroundColor=paprefs[10]; tds[e].style.backgroundImage='url('+paprefs[11]+')'; tds[e].style.backgroundRepeat=paprefs[12]; tds[e].style.backgroundPosition=unescape(paprefs[13]);}
else {tds[e].bgColor=""; tds[e].className="";}}}}}}
var mwsv=document.links;
for (i=0;i<mwsv.length;i++) {if (mwsv[i].href.indexOf("!#")!=-1) {mwsv[i].href=mwsv[i].href.split("!#")[0];}}
</script>
Boards Footer:
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Posting Area Preferences v1.0
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
if (location.href.indexOf("action=display")!=-1) {
var tables=document.getElementsByTagName("table");
for (h=0;h<tables.length;h++) {if (tables[h].cellPadding=="4" && tables[h].className.match(/windowbg/i) && tables[h].innerHTML.match(/!#/i)) {var tds=tables[h].getElementsByTagName("td"); var ito=0;
for (e=0;e<tds.length;e++) {if (tds[e].width=="20%" && tds[e].innerHTML.match(/!#/i)) {var paprefs=tds[e].innerHTML.split("!#"); tds[e].innerHTML=paprefs[0]+paprefs[paprefs.length-1];
if (paprefs[1]==5 || paprefs[1]==7) {tds[e].style.backgroundColor=paprefs[2]; tds[e].style.backgroundImage='url('+paprefs[3]+')'; tds[e].style.backgroundRepeat=paprefs[4]; tds[e].style.backgroundPosition=unescape(paprefs[5]); ito=4;}
else {tds[e].bgColor=""; tds[e].className="";}
if (paprefs[1]!=5) {tables[h].style.backgroundColor=paprefs[2+ito]; tables[h].style.backgroundImage='url('+paprefs[3+ito]+')'; tables[h].style.backgroundRepeat=paprefs[4+ito]; tables[h].style.backgroundPosition=unescape(paprefs[5+ito]);}}
if (tds[e].className.match(/windowbg/i) && tds[e].vAlign=="top" && tds[e].width!="20%") {if (paprefs[1]==5 || paprefs[1]==8) {tds[e].style.backgroundColor=paprefs[6]; tds[e].style.backgroundImage='url('+paprefs[7]+')'; tds[e].style.backgroundRepeat=paprefs[8]; tds[e].style.backgroundPosition=unescape(paprefs[9]);}
else {tds[e].bgColor=""; tds[e].className="";}}
if (tds[e].className.match(/windowbg/i) && tds[e].vAlign=="bottom") {if (paprefs[1]==5 || paprefs[1]==6) {tds[e].style.backgroundColor=paprefs[10]; tds[e].style.backgroundImage='url('+paprefs[11]+')'; tds[e].style.backgroundRepeat=paprefs[12]; tds[e].style.backgroundPosition=unescape(paprefs[13]);}
else {tds[e].bgColor=""; tds[e].className="";}}}}}}
var mwsv=document.links;
for (i=0;i<mwsv.length;i++) {if (mwsv[i].href.indexOf("!#")!=-1) {mwsv[i].href=mwsv[i].href.split("!#")[0];}}
</script>
How to Customize it?:
You only need to modify(or add/delete) some parts in the "Main Page Footer" script.
1. Question image
Look in the preview #2. Below some headers there is a question image. If you want to use a different one search for this part in the script:
var questpic="http://216.40.206.219/boardimages/question.gif";
And edit the red part with the url to the new image that you want to use.
2. Adding an image to the first column
Look at the preview #2. You have the option to add an image to the leftmost colum above the text that identifies that row. If you want to add a image search for this part in the script:
partspics[0]="NONE";
partspics[1]="NONE";
partspics[2]="NONE";
And edit the red part with the url to the image. (Note: In the script the word NONE does not appear, I just added it here to show where you must add the url.)
3. Adding default images
If you want to give the members the option to choose from one of your hosted images just search for this part on the script:
defimurls[0]="URL TO THE IMAGE";
defimnames[0]="NAME OF THE IMAGE";
And edit the red part with the url to that image and the blue part with a name that you want for it. That name will appear in the dropdown list. If you don't want to add a default image REMOVE the above part from the script. If you want to add more default options just keep adding this:
defimurls[N]="URL TO THE IMAGE";
defimnames[N]="NAME OF THE IMAGE";
And edit the red part with the next number, the blue part with the image url, the green part with the SAME number that you used on the red part, and the yellow part with the name that you want to give to the image.