Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • ZetaBoards Auto-PM on Registration v1.2
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • …
  • 4
  • 5
  • 6
ZetaBoards Auto-PM on Registration v1.2
Tweet Topic Started: Jun 8 2009, 05:59 PM (5,825 Views)
IncomingGank Nov 5 2009, 06:51 PM Post #41
Member Avatar


Posts:
275
Group:
Dedicated
Member
#3,556
Joined:
Nov 5, 2009
Coding language
None
It's a bit long for a code but I really like it. Saves me the trouble of PMing members when they join.
Posted Image
Offline Profile Goto Top
 
Viral Nov 5 2009, 07:06 PM Post #42


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
demon: No, that's not possible.

Thatz: Replace all ' with \' and " with \" (only in your message and other parts you edited). Also, you can't have any line breaks, so wherever you hit the return/enter key, remove it. So everything is on one line. If you need a line break, use \n instead.
Edited by Viral, Nov 5 2009, 07:08 PM.

Posted Image
Offline Profile Goto Top
 
BadWolf111 Dec 11 2009, 10:45 PM Post #43


Posts:
2
Group:
Member
Member
#3,550
Joined:
Oct 31, 2009
Coding language
None
Spoiler: click to toggle
<script type="text/JavaScript">
//<![CDATA[
// Auto PM on Registration Created by Viral - http://zbaio.zetabin.comvar pm = {};
pm.id = $("#top_info strong a").text();
pm.newmessage = "New Message";
pm.from = "System Message";
pm.subject = "Welcome to Celestial Maelstrom, " + pm.id;
pm.content = "Hello, and Welcome to our forum. We hope your enjoy your stay here, but we must insist that you read the rules and Don't Break them! There is also some good information in the Rules Section. Also note, you can have 5 songs on the Music Player. Happy Posting! /n ~The Staff";
pm.sent = "One minute ago";
pm.url = "#";
pm.id = $("#top_info strong a").text();
pm.sendmessage = function()
{
$.get(main_url+"msg/?c=2",{},function(data)
{
pm.xc = $("input[name=xc]",data).val();
pm.secure = $("input[name=secure]",data).val();
$.post(main_url+"msg/?c=3&sd=1",{name:pm.id,xc:pm.xc,msg:0,fwd:0,convo:0,draft_edit:0,secure:pm.secure,title:"wJf3V99o_I8hI_c8q-P",post:pm.content,track:1},function(){window.name = window.name.replace("reg=1","");pm.getmessage();});
});
}
pm.toast = function(url,newmessage,from,subject,sent)
{
$("#copyright").after('<div id="pmtoast" style="display: block;"><a id="pmlink" href="'+url+'"><big>'+newmessage+'</big><small>From:</small><strong>'+from+'</strong><br/><small>Subject:</small><strong>'+subject+'</strong><br/><small>Sent:</small><strong>'+sent+'</strong></a><a id="pmclose" href="#">Close</a></div>');
$("#pmclose").click(function(){$(this).parent().hide("slow");});
}
pm.getmessage = function()
{
$.get(main_url+"msg/?folder=-2",{},function(data){
pm.data = $("table.pm.togglechecks tr.row1:first td:first a",data);
pm.url = pm.data.attr("href");
with(pm)
{
toast(url,newmessage,from,subject,sent);
}
});
}
pm.clean = function(){
if(document.title == "wJf3V99o_I8hI_c8q-P"){
document.title = pm.subject;
var theTitle = $("#boardmeta").next().children();
theTitle.eq(0).html(theTitle.html().replace("wJf3V99o_I8hI_c8q-P",pm.subject));
$("#main a[href="+$('#top_info strong a').attr('href')+"]").parent().html(pm.from);
var nav = document.getElementById("nav");
nav.innerHTML = nav.innerHTML.replace("wJf3V99o_I8hI_c8q-P",pm.subject);
$("#conversation").next().remove();
$("#conversation tr:first td:first img").remove();
}
$("table.pm.togglechecks tr a").each(function()
{
if($(this).text() == "wJf3V99o_I8hI_c8q-P")
{
$(this).text(pm.subject).parent().next().html(pm.from);
}
});
}
pm.register = function()
{
if(location.href.match(/\/register\/\?c=1/gi)){
$("button[type=submit]").click(function()
{
window.name = "reg=1";
});
}
}
pm.logged_in = function()
{
return $("#top_info small a").size() == 1;
}
pm.startAuto = function(){
if(window.name.match("reg=1"))
{
if(pm.logged_in() === true)
{
pm.sendmessage();
}
else
{
window.name = window.name.replace("reg=1","");
}
}
}pm.startAuto();
pm.register();
pm.clean();
//]]>
</script>


I have no idea why it wont work, i tried it in the Above Copyright, and Below the Board. To no avail. What am i doing wrong?
Offline Profile Goto Top
 
theschoot Dec 13 2009, 08:49 AM Post #44
Member Avatar
Want to learn Javascript :)

Posts:
79
Group:
Member
Member
#2,214
Joined:
Feb 3, 2009
Coding language
HTML/CSS
you knwo that it don'T work if you ahve email validation online, so i started a script for all newbies :D , but now it need to fusion with your code, can you look if that works :huh: would be great ^_^

Code:
 
<script type="text/javascript">
/*
// Newbie PM
// by theschoot of the DSE clan
*/
var groupname = "Newbie";
var id = $("#top_info").find("a:first").parent().html().slice(47,53);
var profileurl=main_url+"profile/"+id;

$.get(profileurl,function(zzz) {
var group = $("td.c_user:contains('Group')",zzz).find("dd:eq(1)").each(function () {
group = $(this).text();

if (group == groupname) {
$("#copyright").before('<div id="pmtoast" style="display: block;"><a id="pmlink" href="'+main_url+'pages\/new\/"><big>Welcome to DSE Forums</big><small>From:</small><strong>System Message</strong><br/><small>Subject:</small><strong>Welcome</strong><br/><small>Sent:</small><strong>One minute ago</strong></a><a id="pmclose" href="#">Close</a></div>');
$("#pmclose").click(function(){$(this).parent().hide("slow");
});
};
});
});
</script>
Edited by theschoot, Dec 13 2009, 08:49 AM.
Posted Image
Offline Profile Goto Top
 
Viral Dec 16 2009, 08:34 AM Post #45


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
That wouldn't work but it has given me an idea, thanks :) .

Posted Image
Offline Profile Goto Top
 
theschoot Dec 16 2009, 03:06 PM Post #46
Member Avatar
Want to learn Javascript :)

Posts:
79
Group:
Member
Member
#2,214
Joined:
Feb 3, 2009
Coding language
HTML/CSS
Viral
Dec 16 2009, 08:34 AM
That wouldn't work but it has given me an idea, thanks :) .
:P let me now if you finished your idea :)
Posted Image
Offline Profile Goto Top
 
stray77 Jan 4 2010, 10:26 PM Post #47
Member Avatar
I want to learn Javascipt/JQuery

Posts:
48
Group:
Member
Member
#3,629
Joined:
Dec 31, 2009
Coding language
HTML/CSS
This code does work great, but when there are times where my members do not get there PM and I did everything correct. are you sure that this code is compatible with all internet bowers?
Posted Image
Offline Profile Goto Top
 
Ruben O' Brien May 29 2010, 04:10 PM Post #48


Posts:
158
Group:
Member
Member
#3,783
Joined:
Apr 13, 2010
This code doesnt work for me at all. :-(
Posted Image

Posted Image
Offline Profile Goto Top
 
Jamaal Jun 12 2010, 10:42 AM Post #49
Member Avatar


Posts:
9
Group:
Member
Member
#3,863
Joined:
Jun 12, 2010
Coding language
HTML/CSS
Referred by:
God
This code hates me- never works, never responds or anything. It hates me, I hate it. Marriage prospect: warning.
Jamaal- Admin of Episteme Forums- A forum for intellectuals, and code testers Quotes of the Week
Funny: With the sexual tension between us we could power a search engine-Jamaal
Philiosophical: If a cake needs a baker, does a baker need a cake?- Anonymous
Random: Mmm.... Bananaaaassss...- Spongebob Squarepants
Offline Profile Goto Top
 
Spanishearl Feb 28 2011, 02:13 AM Post #50


Posts:
7
Group:
Member
Member
#2,503
Joined:
Mar 5, 2009
Coding language
None
This doesn't seem to work at all. I've tried in in both Above board, and copyright, and it doesn't PM anything, even when placed exactly as you have it without changing anything. Tried in both IE8, and FF (Latest).
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Free Forums with no limits on posts or members.
Learn More · Register Now
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • …
  • 4
  • 5
  • 6

Track Topic · E-mail Topic Time: 7:40 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy