Forums | Mahara Community
Support
/
want to add extra fields in content section
26 September 2013, 2:54
Hi,
I want to add extra text or wyswing fields like teaching info in content->profile section
like introduction field, also once added i also want add thes on my profile
I request you to please help me as soon as possible.
27 September 2013, 11:36
Hi Sonam,
Currently it requires a code change to add new fields to the profile. Each field is stored as a separate type of Artefact Plugin, and the "Content -> Profile" page and the Profile blocks are hard-coded as to which Artefact types they display.
If you're comfortable with the PHP programming language, it should be relatively easy to add new ones by copying the pattern for existing ones. Look in artefact/internal/lib.php (which is where all the existing profile field artefact types live) and in artefact/internal/blocktype/profileinfo/lib.php (which is where the Profile block lives), and I think artefact/internal/index.php is the "Content -> Profile" page.
I'd like to make the Profile fields be more customizable (something like Moodle's "custom fields" feature), but it's not currenly on the development road map for any specific point in the future.
Cheers,
Aaron
27 September 2013, 11:37
Oh, although one easy hack, is that if you just want to rename profile fields, you can do that by overriding the language strings that describe those fields. See https://mahara.org/interaction/forum/topic.php?id=5719&offset=0&limit=10#post24610 for how to do that.
Cheers,
Aaron
27 September 2013, 20:06
thanks Aaron!!
I very much comfortable table in php... i tried to add fields in artefact/internal/lib.php and also and in artefact/internal/blocktype/profileinfo/lib.php . they are also visible on the profile page, but when i tried to save it it is giving me some errors.
Apart from these pages is there any another page where i need to add something and also is there any my sql table where i need to enter coulumn name.
i request you please elaborate the steps. I really need to add fields.
Thanks in advance
sonam
30 September 2013, 12:55
Hi Sonam,
What are the error messages you're getting?
Cheers,
Aaron