Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Apr 24th, 2017, 12:08pm


Board Hacks
Important News
Please read the notes posted with any codes carefully, as they will usually tell you where they need to go.
Welcome to the Conforums Hacks Board!

All codes here have been tested but we accept no responsibility if these codes do not work on your board, or have an adverse effect when used in combination with other codes.

This board is read only. Any queries or requests for codes should be made on the Coding Forum

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
GIzzy



« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: User's Location in mini profile  (Read 7271 times)
Garet
Conforums Elite
Senior Member


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 2073
xx User's Location in mini profile
« Thread started on: Dec 12th, 2006, 3:35pm »

Well, what this code does is that the next time that someone modifies their profile it will 'Save' their location and then display it in their mini profile.

Click here for Preview

Global Footers (Main & Board Footers)
Cross Browser: IE & FF


If you have any problems, issues or questions then feel free to ask.


<script type="text/javascript">
<!--

/*Users Location in Mini Profile, by Zando*/
var zFo=document.creator
var tdz=document.getElementsByTagName("td")
var inp=document.getElementsByTagName("input")
if(location.href.match(/action=profile&username/) && !navigator.userAgent.indexOf("Opera")!=-1){
if(zFo.usertext.value.match(/{=}(.+){\/=}/)){
zFo.usertext.value=zFo.usertext.value.replace(/{=}(.+){\/=}/, '')
}
for(a=0;a<inp.length;a++){
if(inp[a].name.match(/moda/) && inp[a].value.match(/Change profile/)){
inp[a].onclick=function(){
var zTempText=zFo.usertext.value
zFo.usertext.value=zTempText+'{=}'+zFo.location.value+'{\/=}';
};
}
}
}
for(z=0;z<tdz.length;z++){
if(((tdz[z].width=="30%" && tdz[z].align=="center" && tdz[z].vAlign=="middle" && tdz[z].className.match(/windowbg(2)?/))||(tdz[z].width=="20%" && tdz[z].vAlign=="top" && tdz[z].className.match(/windowbg(2)?/))) && tdz[z].innerHTML.match(/{=}(.+){\/=}/)){
var zFinLoc=RegExp.$1
tdz[z].innerHTML=tdz[z].innerHTML.replace(/{=}(.+){\/=}/, '');
tdz[z].innerHTML+='<center><font size="1">Location: '+zFinLoc+'</font></center>';
if(tdz[z].innerHTML.match(/Location: (.+){\/=}{=}(.+)/)){
tdz[z].innerHTML=tdz[z].innerHTML.replace(/Location: (.+){\/=}{=}/, 'Location: ');
}
}
}

//-->
</script>
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls