Post by SubDevo on Feb 17, 2009 3:55:55 GMT -5
Member and Admin Jumps by SubDevo
Tested in IE, FF, Opera and Safari
This code creates two Jumps. One for members and another for administrators. For members, it gives instant access to common links. Such as anything PM related, bookmarks and most recent posts of the forum.
The Admin Jump, has all the links from the admin page and sub-level links. For most of these, you will save 2 or 3 mouse clicks!
One click to access your global or main headers/footers. One click to access Customize Images, Modify skin and more!
Personally, I just use this code for the Admin jump and hide the member jump. It is a REAL timesaver! You will wonder how you got along without this before! ;D
Preview:
Preview 1 (Screenshot from FireFox)
Preview 2 (Screenshot from IE)
Support for Multiple Skins! The code automatically customizes the items in the Admin Jump for your forum! (Editing instructions at bottom of post)
Admin Jump Single and Multiple Skin Comparison
The code has two parts. The CSS style and the code for the jumps themselves to check weather you are a guest, member and/or administrator.
The jumps are not visible to guests.
Code Placement:
Place the CSS portion in your Global Header along with your other forum CSS. Place the rest of the code (intact) somewhere in your Global Header or Footer depending on where you want it to appear on your page. You may have to experiment on code placement till you get it to appear where you want it.
Each jump is in its own DIV. Both of these DIVs are placed into this div: #pmcontainer. In this code, it is centered for a fixed width forum. You may use a percentage instead of px if your forum is NOT fixed width.
The member jump is placed at the far left, the admin jump at the far right. Changing the width of #pmcontainer, will move both of the jumps closer together or move them apart. Change the "top" value to move your Jumps up or down from its current position. Negative values move up, positive down. Change "left" value in #pmdiv to move the Member Jump to the right. Change "right" value in #admindiv to move the Admin Jump to the Left.
Look at the preview pics (above the Code box), for placement of the divs.
Edit the Yellow sections.
These are the DIVs...
#pmcontainer {position: relative; width: 750px; height: 16px; top: -55px;}
#pmdiv {position: absolute; left: 0px; bottom: 0px;}
#admindiv {position: absolute; right: 0px; bottom: 0px;}
These "style" the look of your "jumps"...
.optcol1 {background-image: url(IMAGE URL); background-color: #301919; color: #FFDBDB; text-transform: uppercase}
.optcol2 {background-image: url(IMAGE URL); background-color: #1C0C0C; color: #FF6B6B; text-transform: none}
FireFox displays background image. Internet Explorer does not.
With the code "as is" the Admin Jump will only be visible to admin.
Edit this line of the javascript to include other members with admin powers. Separate the USER names (NOT display names) with a | . Do not put anything after the last name!
Example:
var forumStaff=/^(admin|user1)$/i // Forum staff user names.
Note: This just controls if the Admin Jump is visible or not.
There is no code check of the actual "powers" of the members in the list!
You can also hide the Member Jump and just use the Admin Jump!
Just edit this line:
var memHide=1; // 0=Show Member Jump, 1=Hide Member Jump.
If you are only using one skin, you can ignore the following.
For Multiple Skins:
Enter your skin names (in quotes and separated by commas) in this line:
var skins=["","Gold","Mystery","SkyBlue"]; // Skin names.
Put the skins in order by ID NOT alphabetical!
Using the example above, "Gold" is skin id=2, "Mystery" is skin id=3 etc.
If you only have one skin, change the first position in list to "". And of course, remove the skin names used in the examples above if you are putting in your own skin names.
Enjoy!
SubDevo
Tested in IE, FF, Opera and Safari
This code creates two Jumps. One for members and another for administrators. For members, it gives instant access to common links. Such as anything PM related, bookmarks and most recent posts of the forum.
The Admin Jump, has all the links from the admin page and sub-level links. For most of these, you will save 2 or 3 mouse clicks!
One click to access your global or main headers/footers. One click to access Customize Images, Modify skin and more!
Personally, I just use this code for the Admin jump and hide the member jump. It is a REAL timesaver! You will wonder how you got along without this before! ;D
Preview:
Preview 1 (Screenshot from FireFox)
Preview 2 (Screenshot from IE)
Support for Multiple Skins! The code automatically customizes the items in the Admin Jump for your forum! (Editing instructions at bottom of post)
Admin Jump Single and Multiple Skin Comparison
The code has two parts. The CSS style and the code for the jumps themselves to check weather you are a guest, member and/or administrator.
The jumps are not visible to guests.
<style type="text/css">
<!--
/* Member and Admin Jumps by SubDevo */
/* Please leave this header intact. Do not repost. */
/* [url]http://interoceandesigns.proboards.com[/url] or [url]http://lsdp.proboards.com[/url] */
#pmcontainer {position: relative; width: 750px; height: 16px; top: 0px;}
#pmdiv {position: absolute; left: 0px; bottom: 0px;}
#admindiv {position: absolute; right: 0px; bottom: 0px;}
.optcol1 {background-image: url(IMAGE URL); background-color: #301919; color: #FFDBDB; text-transform: uppercase}
.optcol2 {background-image: url(IMAGE URL); background-color: #1C0C0C; color: #FF6B6B; text-transform: none}
-->
</style>
<script type="text/javascript">
<!--
/* Member and Admin Jumps by SubDevo */
/* Please leave this header intact. Do not repost. */
/* [url]http://interoceandesigns.proboards.com[/url] or [url]http://lsdp.proboards.com[/url] */
var forumStaff=/^(admin)$/i // Forum staff user names.
var skins=["","Gold","Mystery","SkyBlue"]; // Skin names.
var memHide=1; // 0=Show Member Jump, 1=Hide Member Jump.
var memJump="Member Jump"; // Title of the Member Jump.
var admJump="Administrator Jump"; // Title of the Admin Jump.
var oData=[["Messages","",""],["Received Personal Messages","pm","Go to Inbox"],["View Sent Personal Messages","pm&view=2","Go to Outbox"],["Create a New Personal Message","pmsend","New Message"],["Backup All Your Personal Messages","pmbackup","Backup PMs"],["Mark All Your Personal Messages as Read","javascript:confirm('Are you sure you want to mark all of your messages as read?')?location='?action=pmmarkasread':location.href=document.location","Mark as Read"],["Change Your Personal Message Preferences","pmprefs","PM Preferences"],["More","</optgroup>",""],["View Most Recent Forum Posts","recent","Recent Posts"],["Modify Your Profile","javascript:location='?action=modifyprofile&user='+pb_username","Modify Profile"],["View Your Bookmarked Threads","bookmarks","Bookmarks"],["Change Your Bookmark Preferences","managebookmarks","▫ ▫ Preferences"],["","",""],["Customize Your Forum","",""],["Modify Forum Avatars","avatars","Avatars"],["Change General Forum Settings","settings","General Settings"],["Change News Fader Options","newsfader","News Fader"],["Headers and Footers","",""],["Backup All Your Headers and Footers Code","headersfootersdownload","Backup"],["Modify Board Header and Footer Code","headersfooters","Board Header/Footer"],["Modify Your Global Header and Footer Code","headersfooters2&id=*","Global Header/Footer"],["Modify Your Main Header and Footer Code","headersfooters2&id=-","Main Header/Footer"],["View Your Header and Footer Preferences","headersfootersprefs","Preferences"]];
var sData=[["Boards","",""],["Create a New Board","boardcreate","Create Board"],["Delete a Board","boarddelete","Delete Board"],["Modify a Board","boardmodify","Modify Board"],["Move a Board","boardmove","Move Board"],["Change Order of Boards","boardreorder","Reorder Boards"],["Recount Board Totals","recountboards","Recount Board Totals"],["Categories","",""],["Create a New Category","categorycreate","Create Category"],["Delete a Category","categorydelete","Delete Category"],["Modify a Category","categorymodify","Modify Category"],["Change Order of Categories","categoryreorder","Reorder Categories"],["Manage Members","",""],["Ban a Member","ban","Ban Member"],["Email All Members","emailall","Email All"],["Modify Member Rankings","modifyranks","Modify Rankings"],["Send a Personal Message to All Members","pmall","PM All"],["Search All Members","searchmembers","Search Members"],["Member Groups","",""],["Create a New Member Group","membergroupcreate","Create Group"],["Delete a Member Group","membergroupdelete","Delete Group"],["Modify a Member Group","membergroupmodify","Modify Group"],["View Log of Forum Changes","viewsecuritylog","View Security Log"],["Manage Posts","",""],["Attachments - Stats","attachments","Attachments - Stats"],["Attachments - View List","attachmentslist","Attachments - View List"],["Delete Old Posts","deleteoldposts","Delete Old Posts"],["Delete Threads / Posts by Member","deletespecific","Delete Posts by Member"],["Restrictions","",""],["Modify Your Censored Words List","censoredwords","Censored Words"],["Modify Your Reserved Names List","reservednames","Reserved Names"]];
var fData=[["Create a New Skin","skinscreate","Create Skin"],["Delete a Skin","skinsdelete","Delete Skin"],["Set a Skin as Default","skinsdefault","Set Default Skin"]];
if(!skins[0]){
fData.push(["Customize Images","boardimages&skin=1","Customize Images"],["Modify Skin","skinsmodify2&skin=1","Modify Skin"]);
fData.sort();
}else{
mBuild(skins,"Modify ","skinsmodify2&skin=",["Modify Skin","",""],1);
mBuild(skins,"Customize Images for ","boardimages&skin=",["Customize Images","",""],1);
}
oData.push(["Skins / Forum Colors","",""]);
mBuild(fData,0,0,0,0); mBuild(sData,0,0,0,0);
function mBuild(fx,fa,fb,fc,fd){
if(fd){oData.push(fc);}
for(var x=0;x<fx.length;x++){
oData.push((fd) ? [fa+skins[x]+" Skin",fb+(x+1),skins[x]+" Skin"]:fx[x]);
}
}
var cc="<div id='pmdiv' style='display: none'>"; var cd="<div id='admindiv' style='display: none'>";
var ce="</optgroup></select></div>"; var nGrp='<optgroup class="optcol1" label="';
var nOpt=['<option class="optcol2" title="','" value="/index.cgi?action='];
var xa='<select size="1" name="'; xb='" onchange="document.location.href=this.value"><option selected value="">';
var str=xa+'pmjump'+xb+memJump+'</option>';
for(var x=0;x<oData.length;x++){
var nx=(x==5|x==9)?'" value="':nOpt[1];
if(!oData[x][0]){cc+=str+ce; str=xa+'adminjump'+xb+admJump+'</option>'; x++;}
if(!oData[x][2]){var ng=oData[x][1]+nGrp+oData[x][0]+'">'; str+=ng; x++;}
str+=nOpt[0]+oData[x][0]+nx+oData[x][1]+'">'+oData[x][2]+"</option>";
}
document.write("<center><div id='pmcontainer'>"+cc+cd+str+ce+"</div></center>");
if(pb_username!="Guest"){
if(!memHide){document.getElementById("pmdiv").style.display="block";}
if(pb_username.match(forumStaff)){document.getElementById("admindiv").style.display="block";}
}
//-->
</script>
Code Placement:
Place the CSS portion in your Global Header along with your other forum CSS. Place the rest of the code (intact) somewhere in your Global Header or Footer depending on where you want it to appear on your page. You may have to experiment on code placement till you get it to appear where you want it.
Each jump is in its own DIV. Both of these DIVs are placed into this div: #pmcontainer. In this code, it is centered for a fixed width forum. You may use a percentage instead of px if your forum is NOT fixed width.
The member jump is placed at the far left, the admin jump at the far right. Changing the width of #pmcontainer, will move both of the jumps closer together or move them apart. Change the "top" value to move your Jumps up or down from its current position. Negative values move up, positive down. Change "left" value in #pmdiv to move the Member Jump to the right. Change "right" value in #admindiv to move the Admin Jump to the Left.
Look at the preview pics (above the Code box), for placement of the divs.
Edit the Yellow sections.
These are the DIVs...
#pmcontainer {position: relative; width: 750px; height: 16px; top: -55px;}
#pmdiv {position: absolute; left: 0px; bottom: 0px;}
#admindiv {position: absolute; right: 0px; bottom: 0px;}
These "style" the look of your "jumps"...
.optcol1 {background-image: url(IMAGE URL); background-color: #301919; color: #FFDBDB; text-transform: uppercase}
.optcol2 {background-image: url(IMAGE URL); background-color: #1C0C0C; color: #FF6B6B; text-transform: none}
FireFox displays background image. Internet Explorer does not.
With the code "as is" the Admin Jump will only be visible to admin.
Edit this line of the javascript to include other members with admin powers. Separate the USER names (NOT display names) with a | . Do not put anything after the last name!
Example:
var forumStaff=/^(admin|user1)$/i // Forum staff user names.
Note: This just controls if the Admin Jump is visible or not.
There is no code check of the actual "powers" of the members in the list!
You can also hide the Member Jump and just use the Admin Jump!
Just edit this line:
var memHide=1; // 0=Show Member Jump, 1=Hide Member Jump.
If you are only using one skin, you can ignore the following.
For Multiple Skins:
Enter your skin names (in quotes and separated by commas) in this line:
var skins=["","Gold","Mystery","SkyBlue"]; // Skin names.
Put the skins in order by ID NOT alphabetical!
Using the example above, "Gold" is skin id=2, "Mystery" is skin id=3 etc.
If you only have one skin, change the first position in list to "". And of course, remove the skin names used in the examples above if you are putting in your own skin names.
Enjoy!
SubDevo