![]() |
| |||||||
| IPB General Support Post your questions here, no bug reports. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Active Forumer ![]() | Hi, I got this code from a friend, it must send PM to the newest registered member automaticlly, but i have one problem that i don't know where to past it. Can somebody search for this? Here is the code: Code: <script language="javascript" type="text/javascript">
<!--
appearFrom = ["Admin", 1]
msgTitle = "Title"
msgContents = "Contents.\n" + "Contents.\n"
// Write in the contents
// \n is the simple for go down .Never use enter.
// + is space between to line
// ok happy"
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[i].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[i].innerHTML == msgTitle && b[i].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(true)
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(true)
break
}
break
}
}
//-->
</script>
|
![]() | |
| |
| | #7 (permalink) |
| Banned | Can a mod please tell me if this is truly possible, and where can I put this? P.S. I have 2 boards, and one is not Forumer, so if it is possible- regardless of Forumer compatibility, please say so. ![]() -Mark ![]() |
| |
| | #8 (permalink) |
| Active Forumer ![]() | You should also try putting it in the Board Header. ACP >> Skins & Templates >> HTML Templates >> Global HTML elements >> Board Header put it above the giant JS Code. EDIT: ERP... your code is set to operate only on the index.php? part. Put it in the board header and then try going to: http://YOURFORUM.#.forumer.com/index.php? ^^With the questionmark there. I know I have to have the questionmark then nothing after it to do the IPDynamic Lite as first page modification. Last edited by Iyeru; 09-13-2005 at 06:04 AM. |
![]() Banned FMODS.com Member Do not give me support I do not already know... | |
| |
| | #9 (permalink) |
| VIP Team | Since this isn't part of the default Forumer board install, we don't offer official support here. However, you can head over to FMods.com (A Forumer-owned company), and we'll be able to help ya out with it there. Thanks for understanding. ![]() -shane |
![]() Owner/CEO - ComputerHelpForum.org Administrator - Revision3.com Administrator - Scopetech.net Lowe's (my employer) Department Manager - Lumber/Building Materials/Millwork | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quick Arcade V1.0 | jcink | General Chat Area | 118 | 10-04-2006 10:38 PM |
| The newest registered member | elmazagangi | IPB Skinning Help | 6 | 08-18-2005 03:42 AM |
| Add Code To Body And Head Tags | Dimitri | IPB General Support | 1 | 12-20-2004 04:11 PM |
| Send Automatic Pm To Newbies | mclaren | IPB General Support | 3 | 08-08-2004 05:33 PM |
| Quick Arcade V 1.0 | 12369874 | IPB Skinning Help | 11 | 08-08-2004 01:14 PM |