You are viewing the PKP Support Forum | PKP Home Wiki

Adding a new step to schedConfSetup

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page. While these are OJS-specific, the OCS codebase is similar enough to OJS they should be of help. There is also an [url=http://pkp.sfu.ca/ocs_documentation[/url]OCS Documentation[/url] page with some more general documentation that might also be of interest.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a technical support question, try the OCS Technical Support subforum.

Adding a new step to schedConfSetup

Postby spatialguru » Sat Jul 26, 2008 11:22 pm

Hi, as I just noted in bug 3713, I'm struggling with maintaining separate themes, headers, footers, logos between Schedule Conferences under the same Conference. Each year ours change layout, style, etc. So I thought I'd try to clone the Conference Setup Step 3 (to start with) into a Schedule Conference Setup Step 4. I think I'm 75% of the way there, just need a few ideas to get it right.

The short story: * If I save edits to Step 4 form I created, it seems to overwrite settings for the Conference, is it something to do with the code below referring to conference settings?

Here's the long story of what I've done...

  • copied /templates/manager/setup/step3.tpl -> /templates/manager/schedConfSetup/step4.tpl
  • edit schedConfSetup/index.tpl to include pointer to step4.tpl ( also copied from setup/index.tpl)
    -- will now show on /manager/schedConfSetup/4 - but page is not active
  • add entry to schedConfSetup/setupHeader.tpl to include pointer to step4.tpl copied from setup/setupHeader.tpl
    -- will now show in header between steps
  • Edit pages/manager/SchedConfSetupHandler.inc.php to change range of steps from 3 to 4 (lines 30, 59, 162, 167)
  • copied /classes/manager/form/setup/ConferenceSetupStep3Form.inc.php to /classes/manager/form/schedConfSetup/SchedConfSetupStep4Form.inc.php (note change from step 3 to 4 in filename)
  • Edited the above SchedConfSetupStep4.inc.php - basic stuff, plus used $schedConf instead of $conference near end.
  • Now I'm stuck. If I save edits to Step 4 in the form, it seems to overwrite settings for the Conference, is it something to do with the settings used at the bottom of the following code? Or are there more things I need to change to fix the save operation?

Code: Select all

class SchedConfSetupStep4Form extends SchedConfSetupForm {

        function SchedConfSetupStep4Form() {
                        4,  // CHANGED FROM 3 to 4 - NOT SURE IF I NEED TO ??
                                'homeHeaderTitleType' => 'int',
                                'homeHeaderTitle' => 'string',
                                'pageHeaderTitleType' => 'int',
                                'pageHeaderTitle' => 'string',
                                'navItems' => 'object',
                                'conferencePageHeader' => 'string',
                                'conferencePageFooter' => 'string',
                                'itemsPerPage' => 'int',
                                'numPageLinks' => 'int'

         * Get the list of field names for which localized settings are used.
         * @return array
        function getLocaleFieldNames() {
                return array('homeHeaderTitleType', 'homeHeaderTitle', 'pageHeaderTitleType', 'pageHeaderTitle', 'navItems', 'conferencePageHeader', 'conferencePageFooter');

        function readInputData() {

         * Display the form.
        function display() {
                //$conference = &Request::getConference();
                $schedConf = &Request::getSchedConf();

                // Ensure upload file settings are reloaded when the form is displayed.
                $templateMgr = &TemplateManager::getManager();
                        //'homeHeaderTitleImage' => $conference->getSetting('homeHeaderTitleImage'),
                        'homeHeaderTitleImage' => $schedConf->getSetting('homeHeaderTitleImage'),
                        'homeHeaderLogoImage'=> $schedConf->getSetting('homeHeaderLogoImage'),
                        'pageHeaderTitleImage' => $schedConf->getSetting('pageHeaderTitleImage'),
                        'pageHeaderLogoImage' => $schedConf->getSetting('pageHeaderLogoImage'),
                        'homepageImage' => $schedConf->getSetting('homepageImage')



Posts: 112
Joined: Mon Jun 25, 2007 1:23 pm
Location: British Columbia, Canada

Return to OCS Development

Who is online

Users browsing this forum: No registered users and 2 guests