|
Automatic Welcome PM v1.5; Originally by MKII, Edited by Dove
|
|
Topic Started: Jan 23 2005, 08:02 PM (7,027 Views)
|
|
CavsFan23
|
Sep 5 2005, 12:14 PM
Post #31
|
- Posts:
- 317
- Group:
- Members
- Member
- #52,144
- Joined:
- April 23, 2005
|
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>
|
|
|
| |
|
Air_Force
|
Sep 5 2005, 01:42 PM
Post #32
|
- Posts:
- 29
- Group:
- Members
- Member
- #65,297
- Joined:
- August 17, 2005
|
amazing code dude!
|
|
|
| |
|
avfc1
|
Apr 30 2007, 01:40 PM
Post #33
|
- Posts:
- 13
- Group:
- Members
- Member
- #56,624
- Joined:
- June 5, 2005
|
Is it possible to have a message automatically sent to people once they are masked as a certain user group?
|
|
|
| |
|
DesKai
|
May 13 2007, 10:48 AM
Post #34
|
Keep staring, I might do a trick
- Posts:
- 17
- Group:
- Members
- Member
- #118,992
- Joined:
- July 12, 2006
|
It's not working for me either
|
|
|
| |
|
penk_88
|
Jun 26 2007, 09:24 AM
Post #35
|
- Posts:
- 9
- Group:
- Members
- Member
- #152,687
- Joined:
- April 5, 2007
|
great code..XDD~~ thanks
|
|
|
| |
|
JasonBurrows
|
Aug 22 2007, 09:55 AM
Post #36
|
Owner & Founder of Animal Crossing Town!
- Posts:
- 151
- Group:
- Members
- Member
- #147,204
- Joined:
- February 13, 2007
|
It's in my footers and it won't work?
|
|
|
| |
|
Lackster
|
May 27 2008, 02:57 PM
Post #37
|
- Posts:
- 181
- Group:
- Members
- Member
- #143,032
- Joined:
- January 9, 2007
- I'm Browsing With
- Firefox 3
- My Board URL
- ZNS
|
same with me it dont work
|
|
|
| |
|
..nadia..
|
Oct 23 2008, 01:19 PM
Post #38
|
- Posts:
- 27
- Group:
- Members
- Member
- #174,548
- Joined:
- September 16, 2008
|
hi, is not working for me either
|
|
|
| |
|
SOHK_Luda007
|
Jul 12 2009, 11:06 AM
Post #39
|
- Posts:
- 5
- Group:
- Members
- Member
- #184,216
- Joined:
- July 12, 2009
- I'm Browsing With
- Firefox 3
- My Board URL
- http://z3.invisionfree.com/SOHK
|
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.
|
|
|
| |
|
Grandam99
|
Aug 5 2009, 07:14 PM
Post #40
|
- Posts:
- 729
- Group:
- Members
- Member
- #56,265
- Joined:
- June 1, 2005
|
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.
|
|
|
| |
| 1 user reading this topic (1 Guest and 0 Anonymous)
|