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
Spiffy Registration Calendar v1.0
Topic Started: Sep 3 2008, 12:28 PM (430 Views)
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
What it does: Adds a 'spiffy' calendar to the registration form for the DOB.
Where it goes: Explained further on.
Browsers Checked: FF3.0.1 · Opera 9.26 · IE 7 · IE 8 · Safari 3.1.2 · Chrome 0.2.149.27
Note: There isn't much to edit, unless you want to style the calendar.
Code:

Place this in the JavaScripts section (very top of Board Templates)
 
Code: HTML
 
<script type="text/javascript" src="http://moregfx.com/jQuery-UI/core.js"></script>
<script type="text/javascript" src="http://moregfx.com/jQuery-UI/datepicker.js"></script>
<link rel="stylesheet" href="http://moregfx.com/jQuery-UI/datepickerstyle.css" type="text/css" media="screen" />
<link rel="stylesheet" href="http://moregfx.com/jQuery-UI/style.css" type="text/css" media="screen" />


Place this Below the Board / Theme Layout / Above Copyright
 
Code: HTML
 
<script type="text/javascript">
//<![CDATA[
/////////////////////////////////////////
/////////sexy calendar by viral//////////
/////////////////////////////////////////
if(location.href.match(/\/register\/\?c=1$/i)){
$("select#bday_type").prev().prev().prev().prev().before('<input type="hidden" id="dp" />');
$("#dp").datepicker({
onSelect: function(date) {
date=date.split("/");
while(date[0].charAt(0) == "0"){
date[0] = date[0].split("")[1];
}
while(date[1].charAt(0) == "0"){
date[1] = date[1].split("")[1];
}
$("#dp").next().next().val(date[0]).next().val(date[1]).next().val(date[2]);
},
yearRange: "-100:-9",
showOn: "button",
buttonImage: "http://ui.jquery.com/repository/latest/demos/functional/templates/images/calendar.gif",
buttonImageOnly: true
});
$(".ui-datepicker-trigger").attr("alt","").attr("title","");
}
//]]>
</script>
<style type="text/css">.ui-datepicker-trigger{margin-bottom:2px;cursor:pointer;}</style>


Styling the Calendar (optional):

Spoiler: click to toggle


Versions:
1.0 - Base scripts.

Preview: http://s1.zetaboards.com/RegisterPop/register/
Offline Profile Quote Post Goto Top
 
Xoidmin
Member
[ *  * ]
wow, I can't believe anyone has commented on this because it's really nice.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Thanks Xoidmin :) .
Offline Profile Quote Post Goto Top
 
Zefer
Member Avatar
I <3 PHP
[ *  * ]
Nice code, but I really don't think it's worth so much wrapper space.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
It uses hardly any wrapper space at all o.0 .
Offline Profile Quote Post Goto Top
 
Brian
Member Avatar
Still a fan of the Fightin' Irish

How about using a lot of the same coding and customize it to allow users to enter a calendar event.


Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Sure, I'll try that out, but I haven't actually ever used the calendar stuff, or seen the calendar page so I'd need to familiarize myself with that first.
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor

That's really cute, but honestly seems kinda pointless for that specific use :P People's birthdays are a date which they know. They don't need to know which day it was. Clicking on a day on the calendar makes the day order shift around which is fairly confusing :P
Brian's suggestion seems to be more appropriate in my opinion.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Lol, it's not really meant to be used for specific purposes, just to add it a bit of 'coolness' to the board :P .Though, I'm not too sure what you meant by the day ordering :/ .
Offline Profile Quote Post Goto Top
 
Brian
Member Avatar
Still a fan of the Fightin' Irish

My only other suggestion would be to invert the year list as the more recent years are more likely to be used.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply