Simple Machine Codes

Forum Coding => SMF For Free Codes => Topic started by: Agent Moose on April 23, 2008, 10:33:49 pm



Title: Contact Page
Post by: Agent Moose on April 23, 2008, 10:33:49 pm
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://smcodes.smfforfree3.com/index.php/topic,846.0.html (http://smcodes.smfforfree3.com/index.php/topic,846.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 :)


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 07:56:19 am
Could u make the contact page apear before the logout button?


Title: Re: Contact Page
Post by: legend 1234 on April 24, 2008, 08:39:13 am
i dont see were it appears though ?

were is it supposed to appear exactly

coz i added it and i see no dif anywere

legend 1234


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 09:10:02 am
you will see it behind the logg out button


Title: Re: Contact Page
Post by: legend 1234 on April 24, 2008, 10:17:16 am
yea i know but its not there

oo well

legend 1234


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 10:37:10 am
lol, maybe you filled in wrong...


Title: Re: Contact Page
Post by: Celebrus on April 24, 2008, 10:41:06 am
i dont see were it appears though ?

were is it supposed to appear exactly

coz i added it and i see no dif anywere

legend 1234

Forum URL?


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 10:47:56 am
i dont see were it appears though ?

were is it supposed to appear exactly

coz i added it and i see no dif anywere

legend 1234

I don't see it anywhere on the forum. What's the URL?


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 10:56:22 am
i found it, button is called "Contact Us"


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 11:03:52 am
Nope. I still don't see it, even the Contact Us tab that you've found.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 11:10:16 am
its under special Links


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 11:11:31 am
its under special Links

What does that mean?


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 11:12:38 am
what site are you looking for the contact us page?


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 11:14:53 am
my own test forum.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 11:16:31 am
give me the code, i will see if you filled it wrong


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 11:25:01 am
I think it's not working because I'm using IE 7.0 because in SMF for free Support forum people with Mozilla FF can see it perfectly.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 11:35:01 am
lol thats werid, and funny


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:15:36 pm
Moose, Is It Possible To Place
Contact Page Before Log Out Button?  ???


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 02:17:55 pm
Im trying not to use any Jquery in the code, As I did.  So it will take me awhile to accually get it beside the Lougout tab.

And this should work in IE 7.  I have it and it worked fine for me.


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 02:21:34 pm
Im trying not to use any Jquery in the code, As I did.  So it will take me awhile to accually get it beside the Lougout tab.

And this should work in IE 7.  I have it and it worked fine for me.

I'm not the only one who has IE 7 and doesn't see the contact tab. On the SMF for Free Support forum simply sibyl also doesn't see the contact tab anywhere.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:23:00 pm
Well, I Can Se My Contact Page.


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 02:24:18 pm
Well, I Can Se My Contact Page.

I know you can because you said you could before.  ::)


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 02:25:11 pm
Alright.  I will see what I can do about this.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:27:33 pm
Well i just know contact page works fine for me, just
asking if when u get time could do so it could be behind
the log out button, becuse it looks werid right now.


Title: Re: Contact Page
Post by: Phoebe Jordan on April 24, 2008, 02:28:51 pm
Alright.  I will see what I can do about this.

Thanks so much. I hope it can be fixed because I requested the Contact Page and now when it's there it isn't working because I use IE instead of Mozollia FF.


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:30:07 pm
have you checked if you done somthing wrong
with code?


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 02:39:17 pm
Well, I decided to use Jquery for the tab part.  So it will be behind the Logout button, and it will work in IE 7 


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:40:26 pm
Tell Us When Its Finished  ;)


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 02:41:39 pm
Already done :)


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 02:42:21 pm
what is the code then?


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 02:57:11 pm
Its in the first post of the topic


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 03:01:56 pm
u changed the code?


Title: Re: Contact Page
Post by: Agent Moose on April 24, 2008, 03:04:30 pm
Sure did :)


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 03:08:21 pm
okay, ill add it  :D


Title: Re: Contact Page
Post by: Mr_smith on April 24, 2008, 03:14:49 pm
how i change Contact To Contact Us?


Title: Re: Contact Page
Post by: Mr_smith on April 26, 2008, 10:25:27 am
how i change Contact To Contact Us?
anyone?  ???


Title: Re: Contact Page
Post by: Agent Moose on April 26, 2008, 03:26:12 pm
Please edit your post so it will not be double posting.

Just change this part in the code:
Code:
$(".maintab_back:contains(Logout) , .maintab_back:contains(Register)").before("<td class='maintab_back'><a href='" + loc + "/index.php?action=Contacts'>Contacts</a></td>");

To This:
Code:
$(".maintab_back:contains(Logout) , .maintab_back:contains(Register)").before("<td class='maintab_back'><a href='" + loc + "/index.php?action=Contacts'>Contact Us</a></td>");


Title: Re: Contact Page
Post by: demon on April 26, 2008, 04:02:24 pm
Goode code Agent you own at this.


Title: Re: Contact Page
Post by: Mr_smith on May 10, 2008, 11:53:57 am
How Can I CHange Contacts Intoo Contact Us?


Title: Re: Contact Page
Post by: robo123 on May 10, 2008, 01:41:59 pm
oo, awesome code moose  O0