OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



TOC article title as a link

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

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

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

TOC article title as a link

Postby aidanfindlater » Mon Nov 27, 2006 7:17 pm

I'm trying to set up the article title to link directly to the galley PDF (this publication uses a single PDF per article, no HTML versions). I haven't found anything about this in the documentation or forums.

Any ideas?
aidanfindlater
 
Posts: 5
Joined: Sat Sep 23, 2006 1:35 pm

Postby asmecher » Tue Nov 28, 2006 12:45 pm

Hi aidanfindlater,

This will require a modification to templates/issue/issue.tpl; rather than looping through each galley and generating a link on the right-hand side:
Code: Select all
{if $hasAccess}
{foreach from=$article->getGalleys() item=galley name=galleyList}
        <a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getGalleyId()}" class="file">{$galley->getLabel()|escape}</a>
{/foreach}
{/if}
...you'll need to determine which galley is the PDF galley and generate a link instead of the current title display, which is done with:
Code: Select all
{if !$hasAccess || $article->getAbstract() != ""}<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)}" class="file">{translate key=$abstractLabel}</a>{/if}
Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Mar 27, 2007 9:46 am

Dear Alec,

As you know, I am working on a journal of Design. Currently, I am trying to implement (customize) the TOC layout with small pictures shown next to the title of articles. The image files are named with the submission ID and put in the {$publicFilesDir} folder. But, I have problems to get the articleID and set the <img src=""> within the {foreach .../foreach} loop. I wonder that is there defined variable of {$articleID}? Is it possible to write the codes as such:
Code: Select all
{foreach from=$section.articles item=article}
   <table width="100%">
     <tr valign="top">
         <td><img src="{$publicFilesDir}/{$articleID}&'.jpg'"></td>
         <td >{$article->getArticleTitle()|strip_unsafe_html}</td>
         <td >Links for Abstrct,PDF, and Html</td>
     </tr>
   </table>
{/foreach}
Could you give me some suggestions? Thank you very much.

Best Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Tue Mar 27, 2007 10:24 am

Hi Yaliang,

Try using:
Code: Select all
{$article->getArticleId()}
...instead of...
Code: Select all
{$articleID}
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: 8851
Joined: Wed Aug 10, 2005 12:56 pm

How to add an editorial article in the TOC?

Postby yaliang » Tue Mar 27, 2007 5:06 pm

Dear Alec,

Thanks for your suggestions. I'll try it later.
Sorry, I got one more question. In most of the journals (on-line and print), there usually is an editorial article before the articles.
I think maybe I should use the submission process to create the article ID and add it to the current issue. However, in this way, it will need to add a journal section for that, such as Editorial. But the authors might be confused for selecting the sections while submitting their manuscript. Is there any easier method to create it? Thank you very much.

Best Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Tue Mar 27, 2007 5:16 pm

Hi Yaliang,

You can create a section that only Editors can submit to. Take a look at the options on the section form; you may also want to omit the section title from the table of contents.

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: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Mar 27, 2007 5:41 pm

Hi Alec,

Thanks again. Sorry for two more questions.
1. Is there a list of the $article variable in the OJS Tech document? I want to add a 'Multimedia' link among the Abstrct,PDF, and Html hyperlinks. Is it possible to use {$article->get Supplementary()}? In addition, could I link it directly to the file, such as a Flash embedded in a Html file, not to open the Supplementary window to let the users select and download the file?

2. Is it possible to display the file size next to the PDF and Multimedia? It might help the reduce readers frustrations in waiting for downloading a big file.

Best Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Wed Mar 28, 2007 9:40 am

Hi Yaliang,

1. Why not upload the multimedia as an additional galley? That wouldn't require any modification to OJS. (The methods available on Article objects are implemented in classes/article/Article.inc.php, along with some documentation.)

2. You should be able to use {$galley->getNiceFileSize()} to generate a user-friendly file size for a galley object.

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: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Wed Mar 28, 2007 11:11 am

Dear Alec,

Thanks for your useful suggestions.

Best Wishes,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Excuse me, I got one more questiong in combining Cov and TOC

Postby yaliang » Fri Mar 30, 2007 6:13 am

Dear Alec,

Excuse me, I still have problems to deal with the TOC page.
I know the two template files (view.tpl and issue.tpl) are used to display different information (Cover and TOC). And it is set by the Cover option in the ISSUE DATA page or the {if !$showToc && $issue} in the view.tpl file.

However, is it possible to show the two information in a single page (i.e. Cover on the top of TOC)? I try to copy/paste the {include file="issue/issue.tpl"} within {if !$showToc && $issue}, some data was retrieved except the contents within:
Code: Select all
{foreach name=sections from=$publishedArticles item=section key=sectionId} ...{/foreach}
I wonder that is there any function I should call or initial in the view.tpl file before {include file="issue/issue.tpl"}?
Please give me your suggestions.
Thank you very much.

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Fri Mar 30, 2007 2:56 pm

Hi yaliang,

You'll also need to modify pages/issue/IssueHandler (both the "current" and "setupIssueTemplate" functions with the same modification) to make sure that both the cover page information and the issue contents information are assigned to the template.

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: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Mon Apr 02, 2007 8:51 am

Dear Alec,

Thanks for your time and great suggestions. The first issue of our journal has just been released.

Best Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am


Return to OJS Technical Support

Who is online

Users browsing this forum: ctgraham and 2 guests