SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 12:39:17 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1] 2 3
  Print  
Author Topic: [Code] Contact Page  (Read 1325 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 627


Do not PM me for Code Support or Request


View Profile WWW
« on: April 23, 2008, 10:32:40 pm »

Add this to your headers if you don't have it:
Code:
<script src="/jquery.js"></script>

Footers:
Code:
<script>
var Me = 0;
var Contact = new Array();
Contact[Me++]=["NAME","EMAIL"];

var loc = window.location.href.split("/index.php")[0];
$(".maintab_back:contains(Logout) , .maintab_back:contains(Register)").before("<td class='maintab_back'><a href='" + loc + "/index.php?action=Contacts'>Contacts</a></td>");
if(location.href.match(/action=Contacts/i)){
document.title = "Contacts";
document.getElementById("bodyarea").innerHTML = "<br><br><div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>Who do you want To Contact?</div><div id='Contacts'><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><span id='ContactLinks'></span></center></td></tr></table></div></div><br><div id='ContactTable'><div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;'><span id='Title'></span></div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><span id='The_Contacts'></span></td></tr></table></div></div></div><br>";

for(x=0;x<Contact.length;x++){
document.getElementById("ContactLinks").innerHTML += " [<a href='javascript:Contacts(" + x +")'>"  + Contact[x][0] + "</a>] ";
function Contacts(x){
document.title = Contact[x][0];
document.getElementById("Title").innerHTML = Contact[x][0];
document.getElementById("The_Contacts").innerHTML = "<form action='MAILTO:" + Contact[x][1] + "' method='post' enctype='text/plain'>Your Username: (If you don't have one, just use Guest)<br><input type='text'name='name' value='' size='40'><br>Your E-Mail Address:<br><input type='text' name='mail' size='100%'/><br>Why Are You Contacting " + Contact[x][0] + "?<br><text" + "area type='text' name='comment' cols='100%' rows='7'></text" + "area><br><input type='submit' value='Send'/> <input type='reset' value='Reset'/></form>";
};};};
</script>

Original Request: http://www.smfsupport.com/support/code_requests/req_contact_page-t14126.0.html

NAME = The Username of the contact
EMAIL = The Email Address of the Contact.

To add more contacts, add more of these lines:
Contact[Me++]=["NAME","EMAIL"];

Enjoy Smiley
« Last Edit: May 01, 2008, 03:01:19 pm by Agent Moose » Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #1 on: April 24, 2008, 03:43:35 am »

wow very nice code this will come in handy! great work!
Logged

legend 1234
SMF For Free Full Member
*
Offline Offline

Posts: 224


Legend 1234


View Profile WWW
« Reply #2 on: April 24, 2008, 07:38:37 am »

umm ive added it to my forums

but now wat ?

were do they go to contact me or something >?

legend 1234
Logged

Need help with something ? General support l Guides and tuts l codes
Dusty
SMF For Free Hero
*
Offline Offline

Posts: 971


:P im dusty!


View Profile
« Reply #3 on: April 24, 2008, 07:40:25 am »

i like thatcode, we have it on are forum
Logged


Newest..
legend 1234
SMF For Free Full Member
*
Offline Offline

Posts: 224


Legend 1234


View Profile WWW
« Reply #4 on: April 24, 2008, 07:46:26 am »

lol dusty thats not the code i used for our forum

im trying to see wat this 1 does

i added it but i couldnt see nothing different at all lol

legend 1234
Logged

Need help with something ? General support l Guides and tuts l codes
pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #5 on: April 24, 2008, 08:01:53 am »

i got this added on my test forums but when i press send it takes me to emails do you know how to make it via private message?
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3038



View Profile WWW
« Reply #6 on: April 24, 2008, 08:37:55 am »

i got this added on my test forums but when i press send it takes me to emails do you know how to make it via private message?

Only Members can use the personal message option.  I use a contact page for members and guests to contact me when they can't log-in or something.
Logged

pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #7 on: April 24, 2008, 08:38:57 am »

oh okay thank you LaundryLady ill use the pm one i used before. (if i can remember how to do it again.)
Logged

Qub1
SMF For Free Full Member
*
Offline Offline

Posts: 109


View Profile WWW
« Reply #8 on: April 24, 2008, 09:41:23 am »

Omg, i was just working on a Project i called Contact Us!!! I was just making this code!
 Cry Cry buck2 buck2 buck2 buck2 Cry Cry
Logged

legend 1234
SMF For Free Full Member
*
Offline Offline

Posts: 224


Legend 1234


View Profile WWW
« Reply #9 on: April 24, 2008, 09:46:06 am »

haha qub1 im using the code u made its sweet Smiley

and i still cant see this code on my forums lol

legend 1234
Logged

Need help with something ? General support l Guides and tuts l codes
Phoebe Jordan
SMF For Free Member
*
Offline Offline

Posts: 42


View Profile WWW
« Reply #10 on: April 24, 2008, 10:50:04 am »

haha qub1 im using the code u made its sweet Smiley

and i still cant see this code on my forums lol

legend 1234

Yeah I can't see where the contact page is supposed to be on my forums.
Logged

pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #11 on: April 24, 2008, 10:50:56 am »

there should be a 'CONTACT' tab it worked for me.
Logged

Phoebe Jordan
SMF For Free Member
*
Offline Offline

Posts: 42


View Profile WWW
« Reply #12 on: April 24, 2008, 10:52:31 am »

there should be a 'CONTACT' tab it worked for me.

I don't see the contact tab.
Logged

pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #13 on: April 24, 2008, 10:53:27 am »

hmm weird i can see one whats your URL?
Logged

simply sibyl
Global Moderator
*
Online Online

Posts: 8028


I am not a dude!


View Profile WWW
« Reply #14 on: April 24, 2008, 10:53:52 am »

Phoebe Jordan.. leave your forum url with the code in place please so someone can see what you did and help you out with it.
Logged



Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.873 seconds with 18 queries.