Forum Replies Created
-
AuthorPosts
-
anderlyMemberWould be great to see some action filters/hooks we could tap into, etc. For instance, for the ‘select2’ field, I really just need to alias that as type ‘select,’ but without touching the core I can’t, and it ends up with extra code when I do it as a plugin.
anderlyMember@sschat I’ve started a GitHub repo for Piklist Field Addons here (https://github.com/anderly/piklist-field-addons). Thought, maybe we could combine our efforts into one project if you’re so inclined. I’ve taken a similar approach to the Piklist core code that auto-loads classes, so it should be fairly easy to extend. Right now, I only have one field type based on the Select2 library (http://ivaynberg.github.com/select2/), but I also plan on adding this datetimepicker (http://trentrichardson.com/examples/timepicker/).
Also, if/when we have a reasonable number of additional field types, I was thinking we could optionally add a settings page where a user could check which field types they’d like loaded similar to the way this plugin (http://wordpress.org/extend/plugins/jquery-ui-widgets/screenshots/) does it with jquery ui widgets.
Let me know if you’re interested and feel free to fork my GitHub repo and add your slider and switch fields.
Cheers,
Adam Anderly
anderlyMemberHere ya go: https://github.com/anderly/piklist-field-addons/archive/master.zip
I’ve only added the “select2″ field type but am planning on adding some others such as this datetimepicker: http://trentrichardson.com/examples/timepicker/
Sample usage:
piklist(‘field’, array(
‘type’ => ‘select2′
,’field’ => ‘select’
,’label’ => ‘Select’
,’value’ => ”
,’choices’ => array(
” => ”
,’first’ => ‘First Choice’
,’second’ => ‘Second Choice’
,’third’ => ‘Third Choice’
)
,’options’ => array(
‘allowClear’ => true
,’placeholder’ => ‘Select an Option’
,’width’ => ‘200px’
)
));
anderlyMemberI’m a fan of this one (http://trentrichardson.com/examples/timepicker/). Nice extension to jQuery UI DatePicker and very customizable.
Been using it with https://github.com/rilwis/meta-box for awhile now.
I would look at that plugin for some other ideas for field types. I know there are some other good meta-box plugins as well.
You might want to look at http://ivaynberg.github.com/select2/ for multi-select as well.
Still would love to see this on GitHub to raise the profile of the project and increase contributions and add-ons.
Keep up the good works!
Cheers,
Adam
-
AuthorPosts