Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Automatic Welcome PM v1.5; Originally by MKII, Edited by Dove
Topic Started: Jan 23 2005, 08:02 PM (7,027 Views)
CavsFan23
Member Avatar
Member
 *   *   *  
Whats wrong, it didnt work. I tried and registered on my board to see if it worked and it didnt.


...?


Quote:
 
<script language="javascript" type="text/javascript">
<!--
/*
Automatic Welcome PM
Originally by MKII
*/

appearFrom = ["CavsFan23", 1]
msgTitle = "Welcome Message :: Welcome to H2N"
msgContents = "Us staff members will like to welcome you to Halo 2 Nation. We are basicly a+ forum to discuss Halo 2, and also online. But there+ are other forums like the General Chat, Xbox, Technology, etc. We want this to be a large Halo+ forum as well as a good general chat place.

We are glad that you have joined,and we hope you try your best to contribute. Thank you for joining+ and remember to tell your friends.

H2N Staff

http://www.s13.invisionfree.com/Halo2_Nation\n"

home = "http://"+location.hostname
home += location.pathname.match(/\/[^\/]+\//) ? "/" + location.pathname.substr(1).substr(0, location.pathname.substr(1).indexOf("/") + 1) : location.pathname + "/"
home += "index.php?"

if(document.forms['REG'])
document.forms['REG'].onsubmit = function()
{
if(!Validate())
return false
document.cookie = "newMember=1; expires=" + new Date("1/1/2010").toGMTString()
return true
}

userLinks = document.getElementById("userlinks")
userName = userLinks.getElementsByTagName("A")[0].innerHTML.replace(/<[^>]+>/g, "")

if(userLinks.innerHTML.match("Logged in")&&document.cookie.match("newMember=1"))
{
document.cookie = "newMember=0; expires=" + new Date().toGMTString()
document.write("<iframe src='" + home + "act=Msg&CODE=4&MODE=1&entered_name=" + escape(userName) + "&msg_title=" + escape(msgTitle) + "&Post=" + escape(msgContents) + "' style='display:none'></iframe>")
alert("You have a new personal message from "+ appearFrom[0])
}

if(location.href.match(/act=Msg&CODE=0*1/))
{
td = document.getElementsByTagName("TD")
for(i = 0; i < td.length; i++)
if(td.innerHTML.replace(/<[^>]+>/g, "") == msgTitle)
{
a = td[i + 1].getElementsByTagName("A")
a[0].href = home + "showuser=" + appearFrom[1]
a[0].innerHTML = appearFrom[0]
a[1].href = a[1].href.replace(/MID=\d+/, "MID=" + appearFrom[1])
}
}

if(location.href.match(/MSID=\d+/))
{
b = document.getElementsByTagName("B")
for(i = 0; i < b.length; i++)
if(b.innerHTML == msgTitle && b.parentNode.className == "postdetails")
{
td = document.getElementsByTagName("TD")
for(n = 0; n < td.length; n++)
if((td[n].className == "post1") && td[n].width != "100%")
{
a = td[n - 2].getElementsByTagName("A")[0]
if(a.innerHTML.replace(/<[^>]+>/g,"") != userName)
break
a.href = home + "showuser=" + appearFrom[1]
a.innerHTML = appearFrom[0]
div = td[n + 1].getElementsByTagName("DIV")
for(x = 0; x < div.length; x++)
if(div[x].className == "signature")
div[x].removeNode(false)
a = td[n + 3].getElementsByTagName("A")
for(x = 0; x < a.length; x++)
if(a[x].href.match(/MID=\d+/))
a[x].href = a[x].href.replace(/MID=\d+/, "MID=" + appearFrom[1])
td[n + 1].colSpan = "2"
td[n].removeNode(false)
break
}
break
}
}

//-->
</script>
Offline Profile Quote Post Goto Top
 
Air_Force
Member
 *  
amazing code dude!
Offline Profile Quote Post Goto Top
 
avfc1
Member
 *  
Is it possible to have a message automatically sent to people once they are masked as a certain user group?
Offline Profile Quote Post Goto Top
 
DesKai
Keep staring, I might do a trick
 *  
It's not working for me either
Offline Profile Quote Post Goto Top
 
penk_88
Member
 *  
great code..XDD~~ thanks
Offline Profile Quote Post Goto Top
 
JasonBurrows
Member Avatar
Owner & Founder of Animal Crossing Town!
 *   *  
It's in my footers and it won't work?
Offline Profile Quote Post Goto Top
 
Lackster
Member Avatar
Dare You Enter The Gate
 *   *  
same with me it dont work
Offline Profile Quote Post Goto Top
 
..nadia..
Member
 *  
hi, is not working for me either
Offline Profile Quote Post Goto Top
 
SOHK_Luda007
Member
 *  
This code is great!!! I implemented it and it works fantastically!

If anyone would like help getting theirs to work, post what info you would like in it and I will post it back here for you.

I have found that you do not need the "+"

Whne you are typing your messege do not hit enter at all.

Example:

Welcome to my forum, we are glad you joined. Hopefully you enjoy your stay and have a great time while you are here.

If you have questions please contact an admin.

Thanks.

That ^^^^ Would look like this in code form:

Quote:
 
Welcome to my forum, we are glad you joined. Hopefully you enjoy your stay and have a great time while you are here.\n\nIf you have questions please contact an admin.\n\nThanks./n


of course you still need the quotations and other coding that is in his code.
Edited by SOHK_Luda007, Jul 12 2009, 11:07 AM.
Offline Profile Quote Post Goto Top
 
Grandam99
Member Avatar
Member
 *   *   *   *  
I had a test board made a while back, (wonderwoman skin testing site) that I disabled the new registration before, I just opened it for the new registration to test out this new code, and it seems to be working perfectly, so I have installed it on my pretty new site with few members on it, for those of you having problems, this is the way you change the code. This is what I have:

Code:
 
<script language="javascript" type="text/javascript">
<!--
/*
Automatic Welcome PM
Originally by MKII
*/

appearFrom = ["GrandPrix08", 1]
msgTitle = "Welcome Aboard"
msgContents = "Welcome and Thanx for joining Pontiac-Tribute.com. I hope you have a wonderful time and look forward to communicating with you. Also, be sure to check out our Arcade that has hundreds of games you can play and even participate or create a tournament, located just under our site banner. Our goal is to have everyone mourn the death of once a great brand, and at the time, to have some fun. Thank you for becomming our newest family member"

home = "http://"+location.hostname
home += location.pathname.match(/\/[^\/]+\//) ? "/" + location.pathname.substr(1).substr(0, location.pathname.substr(1).indexOf("/") + 1) : location.pathname + "/"
home += "index.php?"

if(document.forms['REG'])
document.forms['REG'].onsubmit = function()
{
if(!Validate())
return false
document.cookie = "newMember=1; expires=" + new Date("1/1/2010").toGMTString()
return true
}

userLinks = document.getElementById("userlinks")
userName = userLinks.getElementsByTagName("A")[0].innerHTML.replace(/<[^>]+>/g, "")

if(userLinks.innerHTML.match("Logged in")&&document.cookie.match("newMember=1"))
{
document.cookie = "newMember=0; expires=" + new Date().toGMTString()
document.write("<iframe src='" + home + "act=Msg&CODE=4&MODE=1&entered_name=" + escape(userName) + "&msg_title=" + escape(msgTitle) + "&Post=" + escape(msgContents) + "' style='display:none'></iframe>")
alert("You have a new personal message from "+ appearFrom[0])
}

if(location.href.match(/act=Msg&CODE=0*1/))
{
td = document.getElementsByTagName("TD")
for(i = 0; i < td.length; i++)
if(td.innerHTML.replace(/<[^>]+>/g, "") == msgTitle)
{
a = td[i + 1].getElementsByTagName("A")
a[0].href = home + "showuser=" + appearFrom[1]
a[0].innerHTML = appearFrom[0]
a[1].href = a[1].href.replace(/MID=\d+/, "MID=" + appearFrom[1])
}
}

if(location.href.match(/MSID=\d+/))
{
b = document.getElementsByTagName("B")
for(i = 0; i < b.length; i++)
if(b.innerHTML == msgTitle && b.parentNode.className == "postdetails")
{
td = document.getElementsByTagName("TD")
for(n = 0; n < td.length; n++)
if((td[n].className == "post1") && td[n].width != "100%")
{
a = td[n - 2].getElementsByTagName("A")[0]
if(a.innerHTML.replace(/<[^>]+>/g,"") != userName)
break
a.href = home + "showuser=" + appearFrom[1]
a.innerHTML = appearFrom[0]
div = td[n + 1].getElementsByTagName("DIV")
for(x = 0; x < div.length; x++)
if(div[x].className == "signature")
div[x].removeNode(false)
a = td[n + 3].getElementsByTagName("A")
for(x = 0; x < a.length; x++)
if(a[x].href.match(/MID=\d+/))
a[x].href = a[x].href.replace(/MID=\d+/, "MID=" + appearFrom[1])
td[n + 1].colSpan = "2"
td[n].removeNode(false)
break
}
break
}
}

//-->
</script>


Hope that helps.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code Snippets · Next Topic »
Add Reply