Need Help With Datebock plugin

If your using rails 1.2+ then just install it as a plugin: http://atmos.org/2007/2/1/datebocks-as-a-plugin

I couldn't get it to work but other people seem to not have a problem.

Plugin in link seems to be broken. Does anyone have another source for it? -Larry

If you wait about an hour you'll see the brand spankin new Datebocks plugin under a new name, but not a fork... more of an evolutionary step.

Cleaned up all the code and added a bunch of new features..

I''ll post an announcement on here when it's ready.

Nathaniel.

If you wait about an hour you'll see the brand spankin new Datebocks plugin under a new name, but not a fork... more of an evolutionary step.

Cleaned up all the code and added a bunch of new features..

I''ll post an announcement on here when it's ready.

Just announced it..

http://datetime.toolbocks.com

Thanks...

2 thoughts...

1 - perhaps it's just my Linux system but there isn't much contrast and the referenced web page is tough to read.

2 - It would appear that there is no easy way to switch from the old datebocks engine to this one and thus, there is no instruction on what to remove/replace but it doesn't seem like it would too much of a leap.

Craig

Remove the old plugin, ensure you are using engines 1.2, then replace the old datebocks_field with toolbocks_date_select helper method.

Next is to do the javascripts & stylesheet includes within the head tags, which is outlined on the website.

Colors should be better now, so more details on the site :slight_smile:

http://datetime.toolbocks.com

Nathaniel.

Yea, sorry about the typo :slight_smile: Seth caught it earlier.

Hey dlo,

Thanks for asking. Seems you have run across a bug I didn't catch earlier, and I managed to squash a couple more while I was at it as well.

If you update the plugin with the latest code at...

http://svn.toolbocks.com/plugins/datetime_toolbocks/

You'll get v3.0.1, which has it fixed. The website even has a few more samples of what you can do as well.

Also...

<%= toolbocks_date_select 'table_rate', 'start_date', { :value => session[:startdate] } %>

Should be what you are after. You might need to pass in a format as well, depending on how you want it to look. Options for that are:

['dd/mm/yyyy', 'dd-mm-yyyy', 'mm/dd/yyyy', 'mm.dd.yyyy', 'yyyy-mm-dd', 'iso', 'de', 'us']

Nathaniel.

Hey Dlo,

Paste the result of the javascript. If you have firebug installed, try loading that up?

Or if you are on some other browser.. let me know which one and the version.

Nathaniel.

Nathaniel,

Just curious as to why you've got this wrapped up in an engine when a plugin would seem to suffice? Seems a bit overkill for something that inserts javascript and a text field onto a page. Or am I missing something?

Glenn

Whether its a plugin or an engine doesn't make a difference.

Those who want to discourage you from using engines really should stop, but they unfortunately wont as they are blinded by some unknown force that compels them to cause needless fear and doubt in those that are considering it.

Simple as it gets, engines provide someting that Plugins don't. An intuitive way to manage assets. On load, all assets are moved over into the public directory. I consistently find myself modifying the assets, and all I need to do is update my svn and restart the server to see them active. No third step, running a rake task.

I have been considering having the engine also double as a standard plugin with an associative rake task, just to please those that consider it "overkill", but that is way on the back burner.

What measure to you have to assume that an "engine" is anything more than a "plugin" anyways? Have you done any benchmarks to see if it does indeed cause more load on the app? I seriously doubt this is not the case, and if it is, the numbers would be similar to comparing Ruby to Perl, where using one simply saves more time than using the other, forget about the "overkill" and start comparing what really matters.

Nathaniel.

Just released a new version. There are some major bug fixes that have been squashed in relation to the tool not working with Safari and IE7.

Everyone is recommended to upgrade.

http://datetime.toolbocks.com

Nathaniel.

Those who want to discourage you from using engines really should stop, but they unfortunately wont as they are blinded by some unknown force that compels them to cause needless fear and doubt in those that are considering it.

It was a simple and honest question.

What measure to you have to assume that an "engine" is anything more than a "plugin" anyways?

Overkill in the sense that beyond downloading/installing the dynarch calendar plugin the rest of ruby code could be easily wrapped up in a single method within application_helper

But as you said, engines allow you to manage the dynach assets.

> Those who want to discourage you from using engines really should > stop, but they unfortunately wont as they are blinded by some unknown > force that compels them to cause needless fear and doubt in those that > are considering it.

It was a simple and honest question.

My line was following the question of comparing engines vs plugins, not engine vs bare assets.

> What measure to you have to assume that an "engine" is anything more > than a "plugin" anyways?

Overkill in the sense that beyond downloading/installing the dynarch calendar plugin the rest of ruby code could be easily wrapped up in a single method within application_helper

But as you said, engines allow you to manage the dynach assets.

As you referenced, having the engine manage the assets allows for very simple upgrades, such as the one I just did for v3.0.3. All you should need to do is simply do an svn up and restart the server, and you will get the lastest copy of the dynarch libs as well as any javascript libs that have been modified. If I did changes to the helper method, no need to go into your own and change it up, that's all automatically done for you.

In simple, engines just make it simple, and save time.

Nathaniel.

Very strange. Does it at least work when you visit http://datetime.toolbocks.com ?

You might have to restart your server if you didn't already do so. You ma have old javascript old in your public dir which gets updated on restart.

Also, if you have a URL I can check out, I wouldn't mind seeing it for myself. There should be a javascript error that appears. If you can paste that in here, would definaely help track down the reason why it's not working for you.

Nathaniel.

Hey Dlo,

Sounds like you might not be including all the javascripts as required.

You can send it to me at nshb(at)inimit.com

If you have any externals, use svn export before you tar/zip it up so I make sure I get the same.

Nathaniel.