OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Question about OJS2.3.7

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Question about OJS2.3.7

Postby Joesitou » Mon Oct 15, 2012 6:26 pm

Hello,

I would like to ask how to show the keyword in abstract page in OJS2.3.7.
I have tried to enable the reading tools in Journal Management and select Indexing metadata (displays item's indexing metadata provided by author and system) in reading tools options.

thanks a lot.
Best regards,

Joesitou
Joesitou
 
Posts: 15
Joined: Fri Sep 14, 2012 3:05 am

Re: Question about OJS2.3.7

Postby Joesitou » Mon Oct 15, 2012 9:25 pm

Sorry, I think it is my careless to do some wrong setting. Now, the keyword is showed in abstract page.

in advance, I still have a question how to add link to the keyword, and click the keyword to find the article that include that keyword.

Thanks a lot,
Best Regards,

Joesitou
Joesitou
 
Posts: 15
Joined: Fri Sep 14, 2012 3:05 am

Re: Question about OJS2.3.7

Postby springday » Wed Oct 24, 2012 6:40 am

Hello Joesitou,

you can modify your template for the abstract page a little bit to get linked article keywords. However, depending on how your keywords are saved in OJS, it requires some programming logic. It's not good style to put too much programming logic into a template. So here's a dirty solution.

How are your subjects separated? Do you only have one subject listed per journal? Then you won't need to go through the trouble of "expoding" your subject text, as I'm doing in the following example. You can considerably simplify this code. If you have several subjects per article delimited by a semicolon, then you can use the code below. If you use a different delimiter, just exchange

In the file /templates/article/article.tpl you'll find those lines:

Code: Select all
{if $article->getLocalizedSubject()}
      <div id="articleSubject">
      <h4>{translate key="article.subject"}</h4>
      <br />
      <div>{$article->getLocalizedSubject()|escape}</div>
      <br />
      </div>
   {/if}


Change this code to:

Code: Select all
{if $article->getLocalizedSubject()}
      {assign var='localizedSubjectString' value=$article->getLocalizedSubject()|escape}
      {assign var='numberOfDelimiters' value=$localizedSubjectString|substr_count:";"}
      {assign var='subjects' value=$localizedSubjectString|explode:";":$numberOfDelimiters+1}
      <div id="articleSubject">
      <h4>{translate key="article.subject"}</h4>
      <br />
      <div>
      {foreach from=$subjects item=subject}
         {php}$this->assign('param', array("subject" => $this->get_template_vars('subject'))){/php}
         <a href="{url page="search" op="advancedResults" params=$param}">{$subject}</a>
      {/foreach}
      </div>
      <br />
      </div>
   {/if}</div>


If you use not a semicolon but a different delimiter for article subjects, change the delimiter in the third and fourth lines of the above code.

Again: This is not good style. Use it at your own risk. If you wonder what's better style: Move the subject-logic into /pages/article/ArticleHandler.inc.php. There's the function "view()" that takes care of preparing the template for the abstract page. A cleaner solution would do the subject preparation there and then assign it as a template variable.

Best regards,
Kai Weber
springday
 
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Google [Bot], mel and 2 guests