| Author | Message |
|---|---|
Rocket Man Posts: 239 |
Happy Birthday! Or is it? It's handy in web applications to have a way to select dates in a rigid format, and to have a little calendar to make it easier for users to select dates. I've incorporated a plugin for Bootstrap that does just that. Inside a form, just use the following code: (form-datepicker "Enter your birth date" "date" show-birthdate "dp1")This will open up a little form box where you can type in a date, or if you click on the date box a calendar pops up. To see it in action, go to your User Profile page (click on your name on the upper right) and you can set your birthdate there! At some point I'll add a little feature that will send you a Happy Birthday email, just for fun. When I was implementing this I discovered that SQLite wants dates in a YYYY-MM-DD HH:MM:SS.000 format and this calendar wants it in MM-DD-YYYY format. It's quite easy to convert between the two, but I might add some date functions to Rockets to make this easier. Of course everyone has their own preferred date format, which complicates things still further... |
xerxes Posts: 63 |
I admire this work: it just gets better. Congratulations. I am not experienced in newLISP: how is this accomplished without using CGI? Or am I wrong, and there is a CGI somewhere ... I didn't find one. |
Rocket Man Posts: 239 |
Thanks! Rockets is currently running on Apache. In the /sites-enabled/ directory, I've configured the root directory to use CGI:
So any files with the .lsp extension are executed as CGI. The first line of each .lsp file must contain: #!/usr/bin/env newlispin order to run the newLISP interpreter. |
Rocketeer Posts: 16 |
Works for me. |
xerxes Posts: 63 |
Thanks for the explanation. I'll try to figure out how to make this run on Windows (I have two PCs: an Ubuntu & a Win 7, both 64 Bit). The Ubuntu installation should run as you say (I haven't yet tried), but I am unsure yet of how Win 7 will handle the scripts. |
ralph-moeritz Posts: 4 |
Rockets looks very cool indeed. Is there FastCGI support? |
Rocket Man Posts: 239 |
Hi ralph, for FastCGI see my response in the other thread :) xerxes, I haven't tested running Rockets on Windows. In theory you can run both Apache and newLISP on Windows as well as configure CGI apps (I once ran a webserver on Windows XP running Apache and PHP) but it might take a bit of fiddling. A Linux (Ubuntu is what I use) server is definitely recommended. |
Views: 183