- 09/12/2013 at 12:25 pm #269055
MitchParticipantPost count: 77
So having run out of fields using ‘Country’ and ‘Department’ as ‘Custom Fields’ (I also tried Dates, but couldn’t get it to work – hacky workaround, I know) :) I’m back to inquiring about the Custom Fields feature. Is it on a roadmap? If so, is there a timeframe? Will it be an add-on?
Thanks!09/19/2013 at 7:43 pm #269615
I’ve hired two separate freelancers to try and accomplish this for me through hackery. I have one guy working on an ajax solution now and he’s reasonably close but I am beginning to lose faith. Custom fields would elevate this plugin enormously.09/20/2013 at 2:05 pm #269643
Custom fields are definitely still on the roadmap. Time frame is hard to pin down but 0.7.9 finally has me to the point in all the code restructuring where things like this are relatively easily added.
With the release of 0.7.9, this should be somewhat easy for your freelancers to do. actually they should do it with very little editing to the Connections core at all and if they are very clever in the implementation I belie it could be pulled off by creating and extension plugin for Connections. Matter of fact, that is exactly how I’m going to do it. Changes to the core to make this more efficient would is to add hooks so plugins can manipulate the core query to include metadata and a few other things that’ll be part of the version .809/22/2013 at 6:16 pm #269716
Ok, I spent this gorgeous Sunday afternoon creating a custom metabox and field API for Connections. The framework is very solid; even though it doesn’t actually save/retrieve the custom data just yet.
I am looking for input; so if you could install the alpha release of Connections and the Connections Metabox and Field Demo plugins and provide some, that would be terrific! You could install this on a production site as the only real change to the Connections core is including the PHP file that contains the new API and initialize it. It also couple CSS tweaks for the fields related to the custom fields. The demo plugin nothing but register new meta boxes and fields.
The second plugin is just a demo plugin that adds 4 custom meta boxes with over a dozen different custom fields to the bottom the the add/edit entry admin pages using the new API.
Link to the Connections version 0.8-alpha.1 plugin.
Link to the Connections Custom Fields and Metaboxes Demo plugin.
What’s left to do?
- Add another, almost, dozen field type to the API.
- Write an API for saving/retrieving the custom data.
- Document the demo plugin and upload it to GitHub.
- Figure out how this interfaces with the template API.
What’s the future hold for this?
09/25/2013 at 1:50 pm #269963
- There will be a separate Extension Connections to add/managing custom metabox and fields. Will this be free or paid? Undecided. I would actually prefer free, but this will increase support.
- The API is designed from the ground up to be extensible on its own. What this means; I’ll be able to create extension custom fields for things like galleries; sliders maps and more. Cool, yes?
MitchParticipantPost count: 77
At least you had a gorgeous Sunday, although the 3/4 inch of rain we had makes for an easier work day. :)
So, I’m not as smart as I come across sometimes. LOL. I updated to 0.7.9.1 and it seemed to override the above alpha version? When I had loaded 0.8 it still said .7.9 (which I know is normal) but then .7.9.1 overrode 0.8?
Regardless, even when I had .8 working, I have to admit I couldn’t figure out what I do with the new meta boxes. Sorry. :( Do you have any quick tut on it? Something so I can help test? I can’t tell how it affects layout/display, where they would show in cmap, etc..
It looks like it will be a fantastic addition to an already great plugin, I just couldn’t get my arms around the initial usage structure.
Any guidance? Thanks.09/25/2013 at 4:28 pm #269986
Right, 0.8 is where I branched off to develop this API. The version will bump when I merge this feature branch into the main dev branch. Software Version Control mumbo jumbo…
Installing it and the demo plugin, at this point, only shows [eye candy] the “officially” supported custom fields the API can create. There isn’t actually a way to save the fields [working on it, more below] or show them in a template yet. Actually not sure how I’ll even show the data in a template yet. I’m guessing I’ll just dump the custom fields if they exists after the core fields. Any finer control would require making PHP changes to the template. I’m thinking this would be a great fit for Connections qT…
I started working the meta API. Thats the how the data for the custom fields will be saved and retrieved at the code level, nothing a user will have to worry about. I thought a good tactic would be to mimic the way WP does it … boy, was that a rabbit hole I shouldn’t have gone down. Wasted 6/7 hours. I should’ve just gone ahead and done what I was going to do as I’d have a good chunk of it down by now.10/02/2013 at 7:04 pm #270567
Just started using Connections and would love to see this implemented as I would like to add music-related fields. Looking forward to your solution!10/02/2013 at 10:48 pm #270583
It’s coming along very nicely. The APIs I’m building into Connections to support this is already infinitely extensible; no exaggerating.
I’d say I’m about half done and the APIs will be in the next release; 0.8. Keep in mind this will still require a bit a PHP coding to add a custom field and then display it in the template. I haven’t quite worked out the user interface stuff or how it’ll be packaged. At the very least when 0.8 drops, I’ll post a howto on how to add custom fields by dropping some code in the theme’s functions.php file and how to edit the templates to show the custom fields that were added.
Currently, there is built in support for about a dozen different fields types and I will be adding another dozen, roughly. This will just be the core fields, a dev could add extend the API to support any type of field imaginable…
So, when you say music related fields, what would those be? Could you describe what those fields would be and what you would enter?10/04/2013 at 2:47 pm #270703
Sure. Sorry for the long post.
Background – I manage a site for a traditional jazz band. It is made up of area high school students. The band is in their fourth year of existence and the alumni list is starting to get long, so I have chosen your plugin to help me manage not only the alumni but the current members as well.
The band is a standard trad jazz setup with a front line and rhythm section, so 9 instruments (including vocals).
Currently I am using the Title field for their primary instrument and the Organization field for the school they attend. I would like to make those Instrument and School. School is self-explanatory, yes? I can probably list the instruments as categories, but getting just current members’ primary instrument listed on the site with their name and school is why I want a field for that. I can use categories to list the other instruments they played while in the band.
A date field that allows me to create start and end dates for each member would be helpful as well. How I would use it follows below.
As the alumni list grows, I plan to eliminate the current db dump for a page that uses text fields, lists, image links, or some combination of that to search the db. A date field in the db that covers each members time with the band would really help with results. Every year there are members leaving and joining. Searching during a particular time frame will be a common occurrance, as I don’t anticipate members looking for someone more than three years earlier than they were in the band – they would have been in elementary school during those years. They also won’t search more than a year or two after they leave the band because in most cases, the bands’ average turnover rate will eliminate anyone they would know. Searching by time frame will also help the director and the band sponsors when they search for info.
There is also a need for tracking the festivals attended, awards won, and scholarships earned for each member. Since not all of those are going to be the same, fields would be a great way of keeping track of, and searching, that info.
I hope that helps.10/09/2013 at 1:42 pm #271063
Thanks for the excellent description. It is very helpful to have a real word use cases.
I just started work on adding repeatable fields support to the API. Looks like I should make sure to add a date range field to the API too.
I’m about 80% complete now. I working on tweaking the core logic for saving/updating/deleting the meta data. After that’s completed I should only have add the saving/updating/deleting to the API and add a couple methods for actually displaying it in the templates.10/10/2013 at 12:07 pm #271129
When I release the update that contains the new Meta API and new Custom Metabox and Fields API I’m also going to post a new extension for Connections to the WP plugin repo for business hours. What’ll it’ll do is add a new field so one can enter business hours and it’ll add a new widget that can be added the to theme’s sidebar. The widget will only be shown when viewing a single entry and will display the business hours.
I think this will a great little way to expose the this new core functionality to everyone while I continue to develop other ways to better exploit it for users.10/10/2013 at 1:15 pm #271132
Here’s another interesting idea. Specialized templates that have add their own custom fields. Much like theme’s can do with posts. Very doable, easy infact, using what is already built.10/14/2013 at 8:49 pm #271436
Thanks, Steven. I will check out your suggestions and I look forward to the update.10/14/2013 at 8:53 pm #271437
Where would I find information on creating a specialized template?10/15/2013 at 11:20 am #271518
There is no step by step or tutorial available. All the doc is inline with the code.
I suggest referencing one of the core templates, such as the default template. The functions you can use are in the
class.output.phpfile and the
class.template-parts.phpfile. Both have a lot of documentation.10/19/2013 at 10:47 am #271871
ytayar1ParticipantPost count: 4
Hi there! Very interested by the api as well, and will be happy to be informed as soon as you go further in the project!
cheers11/09/2013 at 12:42 pm #273307
Mathew AndersonParticipantPost count: 1
Excellent, thank you Steven for working on custom fields. It should really go without saying that this is a feature that’s to be included. Especially when paying several dollars for extensions.
For my specific site, we want to present a range of events that users are going to, or that like, etc. So some of the custom fields will need to be dynamic and have a drop down selection or multi-checkbox feature if possible.
Keep up the good work! Great to see this.11/18/2013 at 5:08 pm #273933
Please add my voice to the request. HUGELY useful! I would like to be able to add at least 4 or 5 specific fields.
How would the contents of custom fields interact with search? Could they be used as a way to sort – eg (in shortcode) category=”blah” my_custom_field=”duh”?11/19/2013 at 3:01 pm #274025
Not certain about search yet. I think what I would have to do is create a Search API for Connections that way it could be extended easily. Search needs some serious love too…
I hadn’t thought about making the field data filterable by shortcode options. Since each custom field has to be registered with a unique ID thru the API, that ID could be the shortcode option name. I “just” have to come up with a way to let the shortcode know that it is a valid option and that it needs to query the meta data table. I’ve logged these under my notes for this feature so I can take them into account as I finish it.11/19/2013 at 9:11 pm #274049
Thanks Steven for the work on this! Please let us know if there’s any testing we can do to help out.