It will literally be the coolest thing of the week when it comes out! Custom fields means a lot to me. Thanks for working on this, as always we appreciate what you do Daniel. Many possibilities will open up with this.
So my christmas present for you is ready
Just pushed a new dev. release for ccomment, that supports custom fields. (you'll find it in the dev. section)
In the backend under ccomment -> custom fields you can configure the custom fields. They can be configured both for all components or just for specific components.
In the frontend then when you click on the form, the custom fields should show. The values that the user entered in the custom field will show below their comment. The one thing that I'm not sure about is the design. Not really happy with the way they look right now. If you have ideas how to style them let me know!
This is really exciting! Pardon the delay, had to renew my subscription and had some holiday distractions.
A few things I should highlight:
1. When saving a custom field without a title, it does not save and dumps all the data. I understand that a title is a required field, so what I'm suggesting is for the validator in the backend to check this before attempting to save. This will prevent users from doing a bunch of work only to have it removed. After putting in a title, saving worked of course but had to re-fill out the data.
2. Near the bottom of custom field options it says "When it's not checked the field validation is enabled and the user will not be able to submit a hotspot unless he fills this field."
It should say "comment" instead of "hotspot". Also I suggest changing the "he" to "he/she", but that's up to you.
3. Will checkboxes be added? They are mentioned in text twice, but there is no field type for them.
4. Not sure we need to have it say "Custom fields" after posting the comment. The viewer should be able to figure out what the data means based on how the administrator constructs it. The reason I'm proposing the removal of the text is because it's a little more clutter to the nicely fashioned Ccomment form.
5. When viewing the list of custom fields in the backend, the titles should link to the edit page of the custom form. I know you can edit the custom field by clicking the checkbox and then clicking the edit button, but this isn't as friendly. Joomla articles in the backend for example allow you to click the title to edit the article.
I should send you an email soon regarding styling the custom forms. Overall I'm really excited about the direction of CComments.
I discovered a few more issues with custom fields:
- When I add a title field along side with another field, the entire custom fields display twice on the article.
- In the backend of Custom fields there is an option called "When to show", if I say "Specific Components" and have it set to "com_content", the custom field does not display at all.
- After publishing a comment that has the custom field "title", when I edit the comment the data filled in disappears.
I also suggest have a display label option for each custom field. For many of us it doesn't make much sense to say "Title: This is a great article". I understand the top label "Custom Fields". There should be a yes/no option to enable/disable the label for that custom field.
Okay fixed all things from your first post.
I added a checkbox type, but don't plan to add checkboxes.
About your second post.
- I don't understand what you mean with the title field???
- if the custom field is set to com_content it should show in com_content entries. Are you sure that you are commenting in com_content?
- yes, edit is not implemented yet
I would hide the label with a template override and not with an option. But will think about this a little more.
I personally only need a single checkbox which you happened to have made. But I am curious about why you decided not to allow many? Too many fields per record?
The title issue might not be purely the title field causing this (other fields might be affecting this). I'll get back to figuring out this mystery once editing comments is fixed unless I manage to figure it out before then. I want to prove my issues so that you know exactly what I'm talking about.
My most recent support ticket mentioned why the EasySocial avatars are not loading. If you're still unsure by why this is happening I can provide some easy evidence that will put it all in good light. Anyways, once again your work for Ccomments goes greatly appreciated!
Ahahaa! Comments are not loading because I have a bug in the query to load the avatars. It's working in my case, because I have only 1 user -> me. But in your case you try to load the avatars of 2 users and the query fails
That thing with the repeating custom fields is funny. I'll have to look into it. Most probably I've done something wrong.
I'll let you know once I've fixed those issues.
Yeay, three issues fixed with the new update. It's becoming more stable.
Daniel Dimitrov wrote: The problem with the path to easyblog's avatar is still there. Don't know which easyblog function to use to get the path. Waiting for feedback from Mark.
You mean EasySocial. EB is cool too. It's the weekend, so hopefully we hear something on Monday or Tuesday. Thanks for sending out a request to Mark.
As for the checkbox, right now it outputs "Checkbox 1" instead of a actual checkbox. I'm trying to get my comment custom fields to look like this:
(notice the actual checkbox?)
Styling wise I know how to make it look right. Once again I appreciate the fixes.
I looked into the checkbox deal a little more. The site mentioned above uses an image to display the checked checkbox. So perhaps instead of showing the number 1, it could show a font icon instead? Or at the very least assign a class to the dd tag that uses the class "icon-checkbox". Joomla 3 has a standard list of classes for the font icons
as seen here
A minor issue is that custom fields show up regardless to whether or not I fill them out. So for example if I don't fill out any custom fields at all, the text "Custom Fields" still displays below the comment along side with the field title. It doesn't make sense to the viewer to display this when there is no actual data for the custom fields being filled out. I keep that information optional for my users.
I re-read this entire thread looking over all the issues. The title issue you were confused about is now resolved. The specific component issue was actually my fault. I didn't realize it was a select list (I thought it was a text one) which is why I did not select com_content. That part works as expected too.
I've written some docs that I haven't published yet.
>. You can enter the following options:</para
> parameter can be either <option
> or <option
>. This would define if the field is selected per default or not. The <option
> variable can be either <option
> or <option
>. This would define whether the selected value would be shown translated in the frontend (once the user has submitted the form). For example if you enter lorem as default value for the field and the translate option is set to true, then you can specify the following language variable:</para
>COM_COMMENT_CUSTOMFIELDS_CHECKBOX_VALUE_REPLACESLUG_REPLACEVALUE="My translated value"</programlisting
So basically if you add translate=true -> you'll be able to translate the value. Now with your above example I realize that a better option would be to have a
value_checked=whatever -> even image or div, whatever you want as htmu
This would be better I think. Then you could decide how you want it styled for each checkbox.
Also in the latest dev. release -> the custom fields should not show when they are not filled out.
The "value_checked=" and "value_unchecked=" is a great idea! Be sure not to require "value_unchecked=" so that if we wanted it blank, we could display nothing if desired. I see this possibly being problematic when assigning classes which would look like "value_checked=<i class="icon-checkbox"></i>". The issue due to the double equal sign. I suppose I could just pick unique HTML elements and then work off of the ccomment class above it. Also I'm curious if this data would be filled into the Options field?
I have a question regarding field types. With the field type "Select List" how does one create a null value? So for example if I post a comment I want by default for nothing to be filled out. Another scenario is if the user chooses to change their mind and want nothing to display in the select list field type. I could probably put up a blank value, but I want that custom field hidden if the user did not fill anything out in the select list. The other fields allow this, select list should too.
I suggest adding a custom fields link in the administrator sub menu as seen in this screen shot:
Awesome, Ccomments 5.3 is working really good. I hope I'm not asking for too much, but a date field would also be a really cool field type. Basically I am using Ccomments as a logging system for places people travel to. Allowing people to be able to say when an event took place would help people better know when the best time to go to that place is as well as reminding the signer when the event took place.
Here is a screen shot to give you some inspiration:
For my case I only need the date, but understand if you want to include the time too. An end date isn't required for my project but would be a neat addition. A date field will keep me happy for a while! The screen shot above used EasySocial to get the date picker. A basic date custom field would also work too depending on your flavor of interest.