Title: Male/Female option
The Zombie - October 19, 2004 10:45 PM (GMT)
Why doesn't the board have it? I know there's coding you can put in the wrappers that will let us show our gender...
König Warrior - October 19, 2004 10:51 PM (GMT)
I would do it if I knew how.. but I don't..
The Zombie - October 19, 2004 11:00 PM (GMT)
*Anime fallover*
Errr... okay I shall educate you then.
GO to Skinning and Styles under the Admin CP. Select Board Wrappers and stick the followong in Footer:
<script type="text/javascript">
<!--
/*
Copyright © 2003 - 2004 SolidSnakeDesigns.com
All Rights Reserved
This code may not be redistributed without express permission from the creator.
This header must stay intact at all times.
*/
var URLDefault = "http://invisionfree.com/"
var GetTag = document.getElementsByTagName
var GetID = document.getElementById
var WS = GetID("WebSite")
var genders = ["Male","Female"]
function getGend(which){
if(which == 1 || which == 2){
if(WS.value.match(/^http:\/\/$/) || WS.value.length == 0){
WS.value = URLDefault + "---" + which
} else if(WS.value.length > 7){
WS.value += "---" + which
}
}
}
function remIt(){
if(WS.value.match(/(---)/)){
WS.value = WS.value.replace("---" + RegExp.rightContext,"")
GetID("gender").selectedIndex = RegExp.rightContext
}
}
function makeSel(){
var sel = document.createElement("select")
sel.id = "gender"
sel.className = "forminput"
sel.options[0] = new Option("--")
for(g=0;g<genders.length;g++){
sel.options[g+1] = new Option(genders[g],genders[g])
}
return sel
}
function addOp(){
var re = /(Date of Birth|member title)/i
var oTable = GetTag("table")
for(o=0;o<oTable.length;o++){
with(oTable[o]){
if(width=="100%" && rows[0].cells[0].innerHTML.match(re)){
var addR = oTable[o].insertRow(2)
var addC = addR.insertCell(0)
addC.innerHTML = "<b>Your Gender</b>"
addC.className = "pformleft"
addC = addR.insertCell(1)
addC.className = "pformright"
addC.appendChild(makeSel())
}
}
}
}
function popRC(){
var re = /Information/i
var pTable = GetTag("table")
for(p=0;p<pTable.length;p++){
with(pTable[p]){
if(cellSpacing=="1" && cellPadding=="6" && firstChild.firstChild.innerHTML.match(re)){
var addR = pTable[p].insertRow(4)
var addC = addR.insertCell(0)
addC.className = "row3"
addC.innerHTML = "<b>Gender</b>"
addC = addR.insertCell(1)
addC.className = "row1"
if(unescape(innerHTML.match(/---(\d)/)) && RegExp.$1.match(/(1|2)/)){
addC.innerHTML = genders[Math.floor(RegExp.$1 - 1)]
var RCInn = rows[1].cells[1].getElementsByTagName("a")
RCInn[0].href = RCInn[0].href.replace("---" + RegExp.$1,"")
} else {
addC.innerHTML = "<i>No Information</i>"
}
}
}
}
}
if(location.href.indexOf("act=UserCP&CODE=01")!=-1){
addOp();
document.theForm.onsubmit = function(){ getGend(GetID("gender").selectedIndex) }
window.onload = remIt
}
if(location.href.indexOf("showuser")!=-1){
popRC();
}
function minPro(){
var theGender = ""
var pTD = GetTag("td")
for(c=0;c<pTD.length;c++){
if(pTD[c].className.match(/post(2|1)/i) && pTD[c].innerHTML.match(/Posts:/i)){
var thisTd="";
var gotTD="0"
for(i=c;i<pTD.length;i++){
if(pTD[i].innerHTML.match(/<div/i) && pTD[i].className=="darkrow3" && gotTD=="0"){
thisTD = i;
gotTD = 1;
}
}
var A = pTD[thisTD].getElementsByTagName("A")
for(a=0;a<A.length;a++){
if(A[a].href.match(/---(\d)/)){
theGender = RegExp.$1
A[a].href = A[a].href.replace("---" + RegExp.$1,"")
}
}
if(theGender.match(/(1|2)/)){
var meNum = /\W\w+\WMember No/i
var shoGen = "<br />Gender: " + genders[Math.floor(theGender - 1)]
shoGen += "<br />Member No"
pTD[c].innerHTML = pTD[c].innerHTML.split(meNum).join(shoGen)
}
}
}
}
minPro()
//-->
</script>
That should give us the gender option. I'm quite familiar with the Admin functions on invision so I can do quite a bit with the Admin CP.
König Warrior - October 19, 2004 11:04 PM (GMT)
It shall be done!
EDIT: I put it in.. now to see if it works.
EDIT2: And it does!
The Zombie - October 19, 2004 11:09 PM (GMT)
Alright I see it.
EDIT: I thought I meesed it up when I pasted it.
EDIT2: Also a little thanks for the help and coding would be nice.
Zelos - October 20, 2004 02:14 AM (GMT)
Why didn't it work when I tried adding it when I made the board...
König Warrior - October 20, 2004 02:22 AM (GMT)
I don't know, the board likes me better, lol, jk.
Thanks Chaos.
The Zombie - October 20, 2004 12:03 PM (GMT)
Zelos - You may have put it into the wrong box or you might have used the another gender code tht had bugs in it.
KW - Your welcome. :lol:
Capitila - October 20, 2004 12:33 PM (GMT)
Why the thanks..? It's not like you wrote the code. :P
But yeah, seems to not be working.
Retaliation - October 20, 2004 02:32 PM (GMT)
| QUOTE (Capitila @ Oct 20 2004, 06:33 AM) |
Why the thanks..? It's not like you wrote the code. :P
But yeah, seems to not be working. |
It seems to work...kinda...it does display 'Gender: male' for you...
The Zombie - October 20, 2004 03:10 PM (GMT)
Cap - The thanks is mainly for the education on where to stick the code and providing him with the code. It says plain as day who wrote it in the code itself. I just provided the education and the pre-written code. Thata what the thanks was for.
Wolven Zero - October 20, 2004 03:46 PM (GMT)
Guess what?
It only works with IE! GAH! That means people who use Netscape and Mozilla won't see the thing. -_-
Retaliation - October 20, 2004 03:53 PM (GMT)
| QUOTE (Steel @ Oct 20 2004, 09:46 AM) |
Guess what?
It only works with IE! GAH! That means people who use Netscape and Mozilla won't see the thing. -_- |
Eh?
Hmm...then if someone were to change yourgender to 'female'....you'd never know...
*evil chuckle* :P
Wolven Zero - October 20, 2004 03:57 PM (GMT)
Want me to do that for you, Mr.Tucker? ;)
Zelos - October 20, 2004 04:55 PM (GMT)
That's probably why it didn't work for me, I was using Firefox when I tried to install it...
Retaliation - October 20, 2004 05:13 PM (GMT)
| QUOTE (Steel @ Oct 20 2004, 09:57 AM) |
| Want me to do that for you, Mr.Tucker? ;) |
Ah, but I'd notice, Mr. Pooley, and then I'd have to let Libbie kill you. ;)
The Zombie - October 20, 2004 05:20 PM (GMT)
Uhhh... :huh: Tucker? Pooley? What the hell are you two talking about!?
Retaliation - October 20, 2004 05:40 PM (GMT)
| QUOTE (blackchaos13 @ Oct 20 2004, 11:20 AM) |
| Uhhh... :huh: Tucker? Pooley? What the hell are you two talking about!? |
Tucker is my real last name, Pooley is Steel's real last name.
Wolven Zero - October 20, 2004 06:11 PM (GMT)
| QUOTE (Retaliation @ Oct 20 2004, 06:13 PM) |
| QUOTE (Steel @ Oct 20 2004, 09:57 AM) | | Want me to do that for you, Mr.Tucker? ;) |
Ah, but I'd notice, Mr. Pooley, and then I'd have to let Libbie kill you. ;)
|
Noticed how he hasn't been online? It's because he's already dead! :P
Retaliation - October 20, 2004 06:16 PM (GMT)
| QUOTE (Steel @ Oct 20 2004, 12:11 PM) |
| QUOTE (Retaliation @ Oct 20 2004, 06:13 PM) | | QUOTE (Steel @ Oct 20 2004, 09:57 AM) | | Want me to do that for you, Mr.Tucker? ;) |
Ah, but I'd notice, Mr. Pooley, and then I'd have to let Libbie kill you. ;)
|
Noticed how he hasn't been online? It's because he's already dead! :P
|
:rolleyes:
Yeah...and noticed how neither of you were really getting anywhere in your battle? Your victory over him isn't as assured as you'd like to think, kiddo.
In any case, you ain't changing my gender anytime soon, so it's a moot point. :P
Tilly - October 20, 2004 08:45 PM (GMT)
Boo, IE only code...is there any that works for all recent broswers?
On the other hand, I could make a transparent PNG with "if you can read this, your broswer supports PNGs properly" written in white, and IE users would just see white :p...
JammerLea - October 20, 2004 09:10 PM (GMT)
1. I'm using IE and I don't see anything gender related on anyone's info.
2. I'm not even seeing an option to set my own gender.
I'm at school using an iMac, but everything else works, so I wouldn't think that that should be a problem, though it could be a factor...
Augh! I remember seeing another code that dealt with gender but I can't find it on the support forums now. x__x Gah, I just was an hour of my life!
Retaliation - October 20, 2004 09:16 PM (GMT)
| QUOTE (JammerLea @ Oct 20 2004, 03:10 PM) |
1. I'm using IE and I don't see anything gender related on anyone's info.
2. I'm not even seeing an option to set my own gender.
I'm at school using an iMac, but everything else works, so I wouldn't think that that should be a problem, though it could be a factor...
Augh! I remember seeing another code that dealt with gender but I can't find it on the support forums now. x__x Gah, I just was an hour of my life! |
Well, you might not be able to see it, but I see a gender bar for you. Just like everybody else, and I'm using IE...
*shrugs*
Maybe the code's just...picky?
JammerLea - October 20, 2004 09:28 PM (GMT)
Hm, maybe. I'll check it when I get back to my apartment. This is IE 5.2 for Mac...
Silly, silly iMacs. *pokes them*
Crap! I forgot I was gonna work on some digital work. x_x And here I waste time looking at stuff here. XD ZE is like a bad addiction.
König Warrior - October 20, 2004 09:38 PM (GMT)
Hmm.. I may have missed something, but Jammer, your thing says Male..
The Zombie - October 20, 2004 09:50 PM (GMT)
I forgot to mention that... default gender is male... and I have no clue why it don't work for you Jammer...
JammerLea - October 20, 2004 10:09 PM (GMT)
IE 6.0 on PC
Well, it works on my apartment computer. Guess the coding is a just little screwy. Dang, where's Hatch when you need him?
Yayz~ I'm female~ *jig*
Tilly - October 20, 2004 11:37 PM (GMT)
That's nice. Unless I use a browser I hate (and don't even have on one computer), I'm male? Oh well...I'll just confuse people then :p.
Retaliation - October 20, 2004 11:56 PM (GMT)
| QUOTE (Tilly @ Oct 20 2004, 05:37 PM) |
| That's nice. Unless I use a browser I hate (and don't even have on one computer), I'm male? Oh well...I'll just confuse people then :P. |
Heh, no, you're listed as female...
Sky Dragon - October 20, 2004 11:56 PM (GMT)
| QUOTE (Tilly @ Oct 20 2004, 05:37 PM) |
| That's nice. Unless I use a browser I hate (and don't even have on one computer), I'm male? Oh well...I'll just confuse people then :P. |
I dunno...For you, Tilly, it says "Female" on my computer...which is evil <_< <_< <_< <_< <_<
EDIT: Raargh. While I was typing, Retal posted essentially the same thing! Oh, Well!
Anyhoo, this is kinda cool...No more confusing people. :D :D :D
WILL'S RANDOM WORD OF THE DAY: Starry-ness (My Spanish V AP teacher said that today, and when I heard that, I immediately thought "Tilly" and chuckled somewhat...blame Fic-ness.) :P :P :P :P :P :P :P
I abuse Emoticons. :) :) :)
Tilly - October 21, 2004 12:12 AM (GMT)
Hey, how'd it get to be female? Did someone poke it?
Confusing people is fun, though...*whines*
Cherry - October 21, 2004 06:29 AM (GMT)
*confused!!!* *sigh* dam you tilly.....you've confused me.....*lol*