The path to all the parent classes for code overriding

Hey I’ve been trying to find the parent classes on which the whole system resides so I could do the changes I need.

Hi @fatima,

Which of our applications are you using, and what version? Can you describe what you’d like to do in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

I’m using ojs version 2.4.6. I’ve currently been trying to bring the register option on the crossref plugin page to the submissionsArchive.tpl but since I’m not able to backtrack the code, it’s quite confusing to override.

Hi @fatima,

Are you trying to drop Javascript code into the .tpl file? Note that Smarty templates use the { and } characters for their own syntax, so you may need to wrap Javascript code in {literal}{/literal} tags before the template will compile properly. See http://www.smarty.net/ for information on Smarty syntax.

Regards,
Alec Smecher
Public Knowledge Project Team

Hey @asmecher,
I want to basically add this piece of code from articles.tpl from the cross ref to submissionsArchives.tpl

{iterate from=articles item=articleData}
				{assign var=article value=$articleData.article}
				{assign var=issue value=$articleData.issue}
				{if $article->getData('crossref::registeredDoi')}
					{capture assign="updateOrRegister"}{translate key="plugins.importexport.common.update"}{/capture}
					{capture assign="updateOrRegisterDescription"}{translate key="plugins.importexport.common.updateDescription"}{/capture}
				{else}
					{capture assign="updateOrRegister"}{translate key="plugins.importexport.common.register"}{/capture}
					{capture assign="updateOrRegisterDescription"}{translate key="plugins.importexport.common.registerDescription"}{/capture}
				{/if} 

But its not working despite of including the main file in the header.
One more thing I want to know is that what is the key representing? are they the array access keys or just the message keys. Kindly elaborate I really need to get this thing done asap.

Thanks for your coordination.

Hi @fatima,

That code depends on the articles template variable, which isn’t available in the template you’re adding it to. You’ll need to work with the PHP code, not just the Smarty templates, to ensure that the necessary variables are available where you need them.

Regards,
Alec Smecher
Public Knowledge Project Team