OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



editor expertise?

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

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 OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

editor expertise?

Postby arachne » Sun May 13, 2007 2:16 pm

Just wondering if you were considering a separate search screen for editor expertise, akin to the search for Reviewer Interests under 'Select Reviewer'.

We have several section editors, and it would be great if there was a handy way to search for editor expertise (to assign submissions) in the same way that we can search for reviewers. That way, their 'expertise' could be stored in their profile like the 'reviewer interests' (could just use their existing Reviewer Interests in fact).

So when I go into 'Select Section Editor' for a submission, the drop-down search parameters (First name, etc) would also include 'Expertise' and I could pop a term into the existing search box to get a match from the 'Reviewer Interests' part of their profile.

Or is there some sort of handy code floating around for this that I've missed?
:D

cheers,
jenea
arachne
 
Posts: 52
Joined: Sun Feb 11, 2007 3:46 pm
Location: Vancouver

Postby asmecher » Mon May 14, 2007 8:52 am

Hi Jenea,

If you'd like to add the Interests field to the "Assign Editor" search field list, follow these steps:
  • Edit pages/editor/EditorHandler.inc.php
  • Find the following lines (approx. 281 - 286):
    Code: Select all
    $templateMgr->assign('fieldOptions', Array(
            USER_FIELD_FIRSTNAME => 'user.firstName',
            USER_FIELD_LASTNAME => 'user.lastName',
            USER_FIELD_USERNAME => 'user.username',
            USER_FIELD_EMAIL => 'user.email'
    ));
  • Add the interests field:
    Code: Select all
    $templateMgr->assign('fieldOptions', Array(
            USER_FIELD_FIRSTNAME => 'user.firstName',
            USER_FIELD_LASTNAME => 'user.lastName',
            USER_FIELD_USERNAME => 'user.username',
            USER_FIELD_EMAIL => 'user.email',
            USER_FIELD_INTERESTS => 'user.interests'
    ));
Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8453
Joined: Wed Aug 10, 2005 12:56 pm

Postby arachne » Tue May 15, 2007 11:05 am

Briiliant, that will be a great help for us.

Additional Q: I tried to expand the character limit on the 'interests' box but even though I changed it wherever I could find it (i.e. in templates\user\prfile.tpl and manager\people\userProfileForm.tpl), and it did indeed expand on the profile change/add page, when I went to simply view the profile later (manager/userProfile/x on the site) it had truncated back to 255 characters. (I even tried replacing the code from the bio box to create an unlimited bogger entry box - which worked fine in the user-entry templates but not the profile view screen).

I figure there's some other thing governing the size of the 'interests' output but not in the templates...? can't find it though.

Solution? Or just stick to 255?

cheers,
j.
arachne
 
Posts: 52
Joined: Sun Feb 11, 2007 3:46 pm
Location: Vancouver

Postby asmecher » Tue May 15, 2007 12:45 pm

Hi Jenea,

You'll also need to increase the length of the field in your database using something like:
Code: Select all
ALTER TABLE users CHANGE interests interests TEXT;
Be warned, though, that the usual OJS upgrade process will truncate this field back to 255 characters unless you modify the XML descriptor before upgrading. I can describe how to do this and it's quite easy.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8453
Joined: Wed Aug 10, 2005 12:56 pm

Postby arachne » Thu May 17, 2007 11:11 am

Great, thanks again!

Yes, I would appreciate the XML directions if you have a minute. I am afraid many of my customizations will go 'poof' with an upgrade, as they're mostly tinkering direct in the code, not using plug-ins etc. But that'd the limit of my expertise at this point so....

cheers,
j.
arachne
 
Posts: 52
Joined: Sun Feb 11, 2007 3:46 pm
Location: Vancouver

Postby asmecher » Thu May 17, 2007 11:28 am

Hi Jenea,

The OJS schema is described in the dbscripts/xml/ojs_schema.xml file. In it, you will find the users table described as follows:
Code: Select all
        <!--
          *
          * TABLE users
          *
          -->
        <table name="users">
                <field name="user_id" type="I8">
                        <KEY/>
                        <AUTOINCREMENT/>
                </field>
                <field name="username" type="C2" size="32">
                        <NOTNULL/>
                </field>
(...more fields below...)
Find the field called "interests":
Code: Select all
                <field name="interests" type="C2" size="255"/>
Change this line to:
Code: Select all
                <field name="interests" type="X"/>
Changing the descriptor doesn't do anything in and of itself, but when you follow the process below, it'll make sure that OJS doesn't truncate the data in the interests field back down to 255 characters.

When you need to upgrade OJS, I'd suggest following these steps:
  • Download and extract a stock installation of the version you're upgrading from
  • Use the "diff" tool to compare this stock installation against your modified version and generate a patch:
    Code: Select all
    diff -u -r /path/to/stock/version /path/to/modified/version
    (You'll probably need to make liberal use of the -X option to the diff tool in order to avoid comparing the public directory, cache directory, etc.)
  • Review and keep that generated patch so that you have a reference of the changes you made before.
Now that you know what you changed over the period that the old version was installed, you can go ahead with the upgrade process. You have two options:
  • Use the patch-based method, which will maintain your modifications unless they conflict with changes made in the update
  • Replace the files in your installation with the files from the new version, and then manually re-add the changes described in the patch file you saved earlier.
See the docs/UPGRADE document for further details.

The key, of course, is to back absolutely everything up before tinkering with something like an upgrade.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8453
Joined: Wed Aug 10, 2005 12:56 pm

Postby arachne » Thu May 17, 2007 3:19 pm

Great, thanks for al the help on this. Learning curve ahead for sure - so if you don't come out with 2.2 tomorrow, I'll be just as happy!
:wink:
arachne
 
Posts: 52
Joined: Sun Feb 11, 2007 3:46 pm
Location: Vancouver


Return to OJS Development

Who is online

Users browsing this forum: Bing [Bot] and 3 guests