How to add the graphical abstract and custom table of content

Dear OJS 3 master,
Now we are implementing the OJS 3 in our web publication system. Our question is which part of the ojs that we have to change to edit the issue table of content and add the graphical abstract in the table of content list such as in the picture that we attached below.

Thaks.
Best Regard

Hi @Tarmizi,

Depending on exactly what you want to do, I suspect you want to edit templates/frontend/objects/article_summary.tpl. Note that editing template files directly isn’t the best long-term plan – better would be to create a child theme. There’s documentation in this forum and elsewhere on how to do that.

Regards,
Alec Smecher
Public Knowledge Project Team

Hai @asmecher we are so glad for your comment and explanation.
Our next question is, if we want to add the graphical abstract in the article summary of the table of content like picture that we attached previously is we need to add the custum metadata? Or what code source that we have to add in the article_summary.tpl file?

Thanks.
Tarmizi

Hi @Tarmizi,

That will take some coding, and again, it’ll depend on what you want to do. I can’t walk you through modifications in detail, but if you get stuck somewhere specific, I may be able to provide guidance.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher

Our detailed question as follow.

I have added the additional component in the workflow setting and named it as “Graphical Abstract” so that the authors can upload their graphical abstract in the submission form.

If I want the uploaded graphical abtract to appear in the article summary, is it possible?

I have tried editing the article_summary.tpl as below, would you like to tell me what code that I have to add in the line? Is it possible?

We are really appreciated for your guidance.

Thanks

Hi @Tarmizi,

I can’t guide you through this in detail, but broad strokes:

  • You’ll have to fetch any files in this category somewhere in the PHP code, and provide them to the template manager so that they’ll be available within your templates.
  • Consider that users could potentially upload several of these files, so you’ll need to know how to handle multiples.

There’s not a single specific function you can use to get files that have a specific component, but you can get them all and then filter them for the component, e.g. by component ID (not the best, but certainly the easiest):

$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
$submissionFiles = $submissionFileDao->getLatestRevisions($article->getId(), SUBMISSION_FILE_PROOF);
$graphicalAbstractFiles = array();
foreach ($submissionFiles as $submissionFile) {
    if ($submissionFile->getGenreId() == 123) {
        // This is one of the files we want. Add it to a list.
        $graphicalAbstractFiles[] = $submissionFile;
    }
}
// Assign the list to the template manager.
$templateMgr->assign('graphicalAbstractFiles', $wantedSubmissionFiles);

NOTE: This code is totally untested – just for example purposes.

Regards,
Alec Smecher
Public Knowledge Project Team

im sorry join in discussion. I also experienced something like that, I want to add a grapichal abstract, is there a way, thank you