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
  • 2
  • 3
  • …
  • 6
ZetaBoards Auto-PM on Registration v1.2
Tweet Topic Started: Jun 8 2009, 05:59 PM (5,828 Views)
Reid Jun 8 2009, 08:12 PM Post #11
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Viral
Jun 8 2009, 07:30 PM
Reid
Jun 8 2009, 06:51 PM
Don't get me wrong, I also like your use of OOP as well. OOP. <3

:P
I only thought of using it because it seemed boring without it. Normally I wouldn't see any use.
You know, I made an OOP script not long ago that was similar to jQuery. It needs some work though - because I found out about element.apply() which is a very useful tool, apparently. :P
The Resource Board
Offline Profile Goto Top
 
Devil Jin Jun 9 2009, 06:58 AM Post #12


Posts:
4
Group:
Member
Member
#517
Joined:
Aug 9, 2008
Is there a version for Invisionfree? This code is good and I wanna use a similar one for my Invisionfree board. You can show me the link? Thanks in advance.
Offline Profile Goto Top
 
Aerial Jun 9 2009, 07:12 AM Post #13
Member Avatar


Posts:
177
Group:
Member
Member
#2,952
Joined:
May 8, 2009
Coding language
HTML/CSS
DarkZeroXX
Jun 9 2009, 06:58 AM
Is there a version for Invisionfree? This code is good and I wanna use a similar one for my Invisionfree board. You can show me the link? Thanks in advance.
http://zbcode.com/topic/551991/2/#new
Offline Profile Goto Top
 
Viral Jun 9 2009, 08:48 AM Post #14


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
What does element.apply() do?

Oh, and you do not what with() does right? It's seriously one of my favourite optimisation expressions when using OOP.
Edited by Viral, Jun 9 2009, 08:49 AM.

Posted Image
Offline Profile Goto Top
 
Devil Jin Jun 9 2009, 10:25 AM Post #15


Posts:
4
Group:
Member
Member
#517
Joined:
Aug 9, 2008
theAquaventure
Jun 9 2009, 07:12 AM
DarkZeroXX
Jun 9 2009, 06:58 AM
Is there a version for Invisionfree? This code is good and I wanna use a similar one for my Invisionfree board. You can show me the link? Thanks in advance.
http://zbcode.com/topic/551991/2/#new
Thank you in advance! I really needed that! Now to place the code.
Offline Profile Goto Top
 
Reid Jun 9 2009, 01:37 PM Post #16
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Viral
Jun 9 2009, 08:48 AM
What does element.apply() do?

Oh, and you do not what with() does right? It's seriously one of my favourite optimisation expressions when using OOP.
You can do something like this:
Code:
 
z = function(){
this.style.display = 'none';
}
z.apply(document.getElementById('submenu'))
And it will hide the submenu. Pretty interesting; I found out about it while I was looking through console.log(jQuery.each.toString()) in firebug.

Edit: and yes, I do know what with() does. :D

Edit #2: and I apologize for above, I had forgotten the syntax. It should have been constructor.apply(element). :P
Edited by Reid, Jun 9 2009, 01:41 PM.
The Resource Board
Offline Profile Goto Top
 
Dorith Jun 10 2009, 02:17 AM Post #17
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
This is just me trying to learn some coding from coders. But what is "wJf3V99o_I8hI_c8q-P" exactly? Did you just give a variable a random name like that? Or does it actually serve a specific purpose?

Edited by Dorith, Jun 10 2009, 02:26 AM.
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
Viral Jun 10 2009, 05:22 AM Post #18


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
It's random.

Posted Image
Offline Profile Goto Top
 
LimeSkzzXx Jun 12 2009, 07:21 AM Post #19


Posts:
1
Group:
Member
Member
#3,189
Joined:
Jun 11, 2009
It's not working for me either. :( And for me it's kinda important, in a way. Here's how I put it in...

Spoiler: click to toggle
<script type="text/JavaScript">
//<![CDATA[
// Automatic PM on Registration - Created by Viral - http://zbaio.zetabin.com
var pm = {};
pm.newmessage = "New Message";
pm.from = "` Eidyia";
pm.subject = "Welcome to Caerus Falls!";
pm.content = 'Hello, and welcome to our forum. :) We hope you enjoy it here. Now that you've registered, don't forget to post your character profile in the Pending Profiles forum. Then you can begin RolePlaying! However, to get your character really going, why don't you go ahead and set up a mailbox at the Post Office or start a Journal? You're character is going to need someplace to stay for a while, so if you want, you could check into the Rusty Inn (but if you really want to sleep outside, we won't disturb you... well, some of us won't.) So once you're ready, go ahead and pick a spot, start your first IC topic, and then go join the Virgin Club to let everyone know you're ready to play!

Oh, and I almost forgot the most important step! Head on over to the Hello, Goodbye and introduce yourself, chop-chop!

` Eidyia :)';
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("c_nav_txt");
nav.innerHTML = nav.innerHTML.replace("wJf3V99o_I8hI_c8q-P",pm.subject);
}
$("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've tried putting it in above copyright and then putting it in below the board. Am I supposed to put it in both or something?
Offline Profile Goto Top
 
Reid Jun 12 2009, 05:31 PM Post #20
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Yours is configured incorrectly.
Code:
 
pm.content = "Hello, and welcome to our forum. :) We hope you enjoy it here. Now that you've registered, don't forget to post your character profile in the Pending Profiles forum. Then you can begin RolePlaying! However, to get your character really going, why don't you go ahead and set up a mailbox at the Post Office or start a Journal? You're character is going to need someplace to stay for a while, so if you want, you could check into the Rusty Inn (but if you really want to sleep outside, we won't disturb you... well, some of us won't.) So once you're ready, go ahead and pick a spot, start your first IC topic, and then go join the Virgin Club to let everyone know you're ready to play!"
Just make the quotes on the beginning and end double quotes and you should be fine. If you have any double quotes on the inside, put a backslash before them (like \" )
The Resource Board
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Create your own social network with a free forum.
Learn More · Register for Free
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • …
  • 6

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