As the developers of Open Journal Systems, Open Conference Systems, Open Harvester Systems, and Open Monograph Press, the PKP team are experts in helping journal managers and conference organizers make the most of their online publishing projects. PKP Publishing Services offers support for:

As a customer of PKP Publishing Services, you will not only receive direct, personalized support from the PKP Development Team, but will be contributing to the ongoing development of the PKP applications. All funds raised by PKP Publishing Services go directly toward enhancing our free, open source software. For more information, please contact us.

I have to add one field to step 3 (an editors introduction/summary to the article) in the submission form. Loosely following this example http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=2731#p9820 I tried to insert the new field into the following files, adding my new field whereever I found references to the 'abstract' field, which I use as a guideline:

The additional field does show in the submission and review forms, yet its contents are not saved. I guess I have to add the name new field to a class or model definition, but I couldn't find exactly where that belongs. Any help would be much appreciated!

Last edited by bgarnicnig on Mon Dec 13, 2010 12:15 pm, edited 1 time in total.

thanks for the pointer, that first thread you mention was the one I was following in my humble attempt at implementing the additional field. I just cross-checked all the files from that thread to the files I already edited, and I think I changed all those which apply for my modification (Article data, not Author data) - is there any file I'm missing? Thanks for reconsidering my request.

Did you add the field name (the value of the attribute 'name' for the input you added to the template file) to the array in MetadataForm::readInputData()? That will tell the form class to read that value, then in the execute() method of MetadataForm, you can access that value by calling $this->getData('fieldname') (e.g. $submission->setBlah($this->getData('blah');). If you're following the pattern used to saved abstracts, then that field would be localized, so you'd also have to add the name to the array in MetadataForm::getLocaleFieldNames() -- You'd also have to add the field to classes/article/ArticleDAO::getLocaleFieldNames() (I think that's it--you might want to do a grep of OJS for 'abstract' to see if it needs to be anywhere else). This means that the field is stored in the article_settings table, and you won't have to add a column to the articles table. This also means that people can enter different values into that field for different languages.

Otherwise, I'd highly recommend using a debugger, such as the one that comes with Eclipse, to step through the code and find out where your value is getting lost

but i have a problem when in step3.tpl in {if $currentJournal->getSetting('metaAgregado')}. didn't not show any change, buy I change metaAgregado by metaDiscipline for example, show my changes. because I have this problem, where initialize getSetting function ? what parameter ??Thank You

The $currentJournal object represents the journal (with settings stored in the journal_settings table in MySQL), and it sounds to me like you're trying to add article-level metadata (which is generally stored in article_settings). Unless you're creating a journal setting with that name, which I don't see in the process you outline above, it won't exist.

Yesss !! asmecher,you are right! I'm trying to add article-level metadata. I want to put more metadata than it has since the ojs default in step 3 . This way is correct ? .... or nouu . what files I need modify ??

It's an educated guess from this perspective, but it sounds like you're on the right track. I think you're confused about the purpose of the "{if $currentJournal->getSetting('metaDiscipline')}" line, though: that's used to test whether the journal is configured with that metadata field enabled. If so, then the field is presented for editing on the metadata forms; if not, it's hidden. In your case, I suspect you'll always want that field shown regardless of the journal's configuration, so those {if ...} statements aren't necessary for the new field.

Hello dear Friends,After a couple of days I managed to find all of the files needed to add an additional field in the Authors section => mailing address. So, here is the simplest way for me to to describe it:open the following documents:

And after that everything is as it goes with the other fields. For example take the middle name field and go around the files looking for it. Remember that you have to add a new column in your sql script called with the proper name e.g. mailing_address.

Look up for the sql code in the AuthorDAO.inc.php, and the calling script in both PKPAuthor.inc.php and PKPAuthorDAO.inc.php files.

Thank you for the help here in this forum. You are doing a great job! I you like this way of resolving this task or have any kind of notes I'll be glad to hear them.