This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Add a new field
#1

Hello
How can I add a new field called School
Because my site is targeted toward teachers and students, and I would like to know shools my visitors come from
Actualy I am using Website field as a School field (by Translating "web site" into "School" Blush )
The problem is that script expectes a URL pattren and return an error upon submit Huh

So
1- Is there any quick fix for that?
2- In fiture relaeses, is it possible to include Custom fields so Admins can define extra field depending on peticular needs ?

Thanks
Chafik
Reply
#2

Quick fix would be to comment out line 149 in comments/includes/app/processor.php
PHP Code:
<?php 
validate_website
($website); //validate website

A custom field is a good idea for a future version. I will add it to the roadmap.

Have you completed the interview?
Reply
#3

1: While there is no "quick fix", you can try the "town" field instead of the url field. It works quite well actually.
2: Possibly. I'll give it a shot myself after I get through a bunch of other things I have to do. (not too soon in other words)

EDIT: While Steven beat me to it, the town field is still better than the url field unless you want a link to the school's website, and you won't have to edit any files Tongue

I'm giving you three guesses...
Reply
#4

Yeah the town field would be better. I assumed you were already using that.

Have you completed the interview?
Reply
#5

Yes, I also need Town field
So waiting for a better solution, I will comment out the URL validation line, althought I do apreciate keeping the Web Site field
Reply
#6

Well, you can't really add fields without editing the database to accommodate them. The next best thing I can think of is having the school be entered along with the town. It works when you separate them with a dash.

I'm giving you three guesses...
Reply
#7

(03-Jan-2011, 08:56 PM)Static Wrote:  Well, you can't really add fields without editing the database to accommodate them. The next best thing I can think of is having the school be entered along with the town. It works when you separate them with a dash.
Hm, not sure this is a good idea. Having mixed data in a DB field can cause DB problems during any SQL run ( I may be wrong? ) Personally, I'd rather wait for the custom fields to be included.
Reply
#8

1. What do you need the field(s) for?
2. Should its data be validated?
3. Do you want its data to be displayed? If so, where?

Have you completed the interview?
Reply
#9

(14-May-2011, 06:54 PM)Steven Wrote:  1. What do you need the field(s) for?
2. Should its data be validated?
3. Do you want its data to be displayed? If so, where?

The answers to these questions really depend on the user. But I'd like to know if this feature is provided anytime soon. At the moment I'm afraid to create my own database columns because one day if the "new field" functionality is provided, it'd be a pain in the back to integrate existing data into the Commentics-generated field.

In my end;

1. A score field that allows the user to score the content out of 10 beside the comment.
2. It'll be a dropdown, or a Javascript shining clickable star thing, so no.
3. At the top of the comment body.
Reply
#10

At the moment I'm doing a complete re-write of all the code, as well as adding several new features, and hope to release by the end of this year. I'd like one of those new features to be extra fields so I'm going to see whether it can be done but a lot depends on how everything else goes. If it isn't added in the next version then it will be in the version or two after. In any case it may not be necessary for you to move the data from your own database columns. The data will still be accessible so it may just mean that the code that inserts and retrieves it is all that needs to be modified. It's also worth saying that the extra fields will only be for standard types (text, checkbox, select etc) so a star rating field won't be likely.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)