Contact Menu in home page!

View previous topic View next topic Go down

Contact Menu in home page!

Post by Sir Mayo ™ on 9/20/2013, 3:13 pm

So some of you may have noticed that we have a contact menu in our home page message where you select a user and then you choose you means of contact!
Heres how to install it!
Step 1
Go to ACP>Display>Generalties (under homepage on the left hand side!)

Step 2
Find the box that says homepage message!
in that box add this code
Code:
<form name="dynamiccombo">
<select name="stage2" size="1" onChange="displaysub()">
<option value="combo1">This is a place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>


<script>
<!--

//2-level combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

//STEP 1 of 2: DEFINE the main category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the first line, as it's used to display main title

var category=new Array()
category[0]=new Option("Contact Us ", "combo1") //THIS LINE RESERVED TO CONTAIN COMBO TITLE
category[1]=new Option("Username1 ", "combo1")
category[2]=new Option("Username2 ", "combo2")
category[3]=new Option("username3", "combo3")
category[4]=new Option("username4", "combo4")
category[5]=new Option("username5", "combo5")
//STEP 2 of 2: DEFINE the sub category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the LAST line, as it's used to display submain title

var combo1=new Array()
combo1[0]=new Option("Email","mailto:Email of Username1")
combo1[1]=new Option("PM ","Url of Pm to Username1")
combo1[2]=new Option("BACK TO CATEGORIES","")  //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE

var combo2=new Array()
combo2[0]=new Option("PM","Url of pm to username2")
combo2[1]=new Option("Email","mailto:Email of Username2")
combo2[2]=new Option("BACK TO CATEGORIES","")  //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE

var combo3=new Array()
combo3[0]=new Option("PM","Url of pm to user 3")
combo3[1]=new Option("Email","mailto:Email of Username3")
combo3[2]=new Option("BACK TO CATEGORIES","")  //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo4=new Array()
combo4[0]=new Option("PM","Url of pm to user 4")
combo4[1]=new Option("Email","mailto:Email of Username4")
combo4[2]=new Option("BACK TO CATEGORIES","")  //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE
var combo5=new Array()
combo5[0]=new Option("PM","Url of pm to user 5")
combo5[1]=new Option("Email","mailto:Email of Username5")
combo5[2]=new Option("BACK TO CATEGORIES","")  //THIS LINE RESERVED TO CONTAIN COMBO SUBTITLE

var curlevel=1
var cacheobj=document.dynamiccombo.stage2

function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true

}

function displaysub(){
if (curlevel==1){
populate(cacheobj.options[cacheobj.selectedIndex].value)
curlevel=2
}
else
gothere()
}


function gothere(){
if (curlevel==2){
if (cacheobj.selectedIndex==cacheobj.options.length-1){
curlevel=1
populate(category)
}
else
location=cacheobj.options[cacheobj.selectedIndex].value
}
}

//SHOW categories by default
populate(category)

//-->
</script>

<p align="center">This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript
Kit</a></p>
Step 3
Replace Username-UserName5 with the user names you want
as well as the Url's for username-username5 that link to a new pm window
then link their email by replacing  username-username5 with their email address but leave the mailto: part!

Step 4
Save


If you have any issues open a topic in the help section and we will get back to you!
avatar
Sir Mayo ™
Owner

Owner

Posts : 76
Join date : 2013-05-14
Age : 21
Location : USA

View user profile http://sir-mayo.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum