Script codes in bootstrap ojs 3.1

Deal all,
I added script codes in Additional Content. However, it disappears. Is there any setting to allow script?


Scripts codes are removed intentionally to prevent malicious scripts.
I suggest you write the script in footer.tpl of you child theme. (I have done that).


would you mind to give steps to do?

I hope you are using a child theme (or leave it, whatever theme you are using).

In your theme folder, there should be a footer.tpl file in /plugins/themes/YOUR-THEME/templates/frontend/components

If you don’t have that file there, copy that file from lib/pkp/templates/frontend/components.

Then you get your codes from and paste within that file.


1 Like

Thanks a lot @anupent
I am using manuscript jats, it is strange. I dont find footer in both footer.tpl file in /plugins/themes/YOUR-THEME/templates/frontend/components and lib/pkp/templates/frontend/components

HI @kawahyu

If your theme hasn’t some file, most likely it is not overriding Parent Theme.
You can check how to overriding it in this guide:

Israel Cefrin
Public Knowledge Project Team

Hi @anupent
Would you mind to share your footer.tpl in your theme directory?
Thanks in advance

hi @kawahyu
Here is the code:

 * templates/frontend/components/footer.tpl
 * Copyright (c) 2014-2017 Simon Fraser University
 * Copyright (c) 2003-2017 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 * @brief Common site frontend footer.
 * @uses $isFullWidth bool Should this page be displayed without sidebars? This
 *       represents a page-level override, and doesn't indicate whether or not
 *       sidebars have been configured for thesite.

	</div><!-- pkp_structure_main -->

	{* Sidebars *}
	{if empty($isFullWidth)}
		{call_hook|assign:"sidebarCode" name="Templates::Common::Sidebar"}
		{if $sidebarCode}
			<div class="pkp_structure_sidebar left" role="complementary" aria-label="{translate|escape key="common.navigation.sidebar"}">
                {* Left sidebar items can be added here*}				
			</div><!-- pkp_sidebar.left -->
</div><!-- pkp_structure_content -->

<div id="pkp_content_footer" class="pkp_structure_footer_wrapper" role="contentinfo">

	<div class="pkp_structure_footer">
	<!--addThis script-->	
			<!-- Go to to customize your tools -->
			<script type="text/javascript" src="//**-**##**##**##**##"></script>
	<!-- backTop script -->	
	    <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>	
		{if $pageFooter}
			<div class="pkp_footer_content">
				<div class="row">
					<div class="col-sm-3"><p id="eIssn"><strong>Online ISSN: 2542-2618</strong></p></div>
					<div class="col-sm-3"><p id="pIssn"><strong>Print ISSN: 2392-4632</strong></p></div>
					<div class="col-sm-6"><p id="anupCredit">Site Maintained by: <strong>Anup Acharya </strong><a href="" target="orcid.widget" rel="noopener noreferrer" style="vertical-align:top;"><img src="" style="width:1em;margin-right:.5em;" alt="ORCID iD icon"></a></p></div>
				<div class="row">
					<div class="col-sm-6">
						<a id="ccby1" href="" target="_blank" rel="license noopener"><img style="border-width: 0;" src="" alt="Creative Commons License" /></a>
					<div class="col-sm-6">
						<div id="ojsBrand">
							<a href="" target="_blank" rel="noopener">
								<img src="" alt="OJS Brand" />
				<div class="row">
					<div class="col-sm-12">
						<p id="ccby2">This work is licensed under a <a href="" target="_blank" rel="license noopener"><strong>Creative Commons Attribution 4.0 International License</strong></a> which permits use, distribution and reproduction in any medium, provided the original work is properly cited.</p>
</div><!-- pkp_structure_footer_wrapper -->

</div><!-- pkp_structure_page -->

{load_script context="frontend"}

{call_hook name="Templates::Common::Footer::PageFooter"}


Then you need some css tweaks too.


1 Like