Greetings,
Many Thanks. That helped.
Greetings,
Many Thanks. That helped.
After testing child theme I can say that customizing less files is fairly easy. In addition they have big functionality. Not doing much I can now completely change look of the journal pages.
Recommend to everyone
One more question. How can I look at the changes I made in my child theme without restarting it. For now I see them only when changing to another theme and then go back to child.
Hi all, it is interesting discussion. Actually, most of what you discussed are big question for me because I know nothing about web programming. I just follow your posts and hardly think to understand. I am a journal editor, currently run OJS 2. I fall in love with OJS3 and want to use it as my journal. I have installed Boostrap and child theme in my OJS 3. When I activated child theme (I download https://github.com/NateWr/default-child), it seems the layout back to default theme. I searched the sample child theme, it looks great. Is there other ready-use child theme for OJS 3? or at least, documentation on how to customize it.
Good day,
Some basic programming skills are required.
Files with .less extension are simply to modify. They are like css but better
Files with extension .tpl are smarty templates. Somewhat between php and html. Don`t know much about them for know.
So you can simply read corresponding guidelines. There are a lot of them in the internet. I`m too not a programmer.
For changes to the template files, you can go to Administration > Clear Template Cache.
The compiled CSS files are a bit more annoying. You can delete them from /cache
in your OJS directory. I find the following command useful for quickly clearing cached templates and CSS while developing:
cd cache
rm -r *.php *.css HTML t_compile/*.php
One of the things I want to do is write a little developer plugin that forces CSS to be recompiled every time. That would make development a little bit easier.
Not at the moment, though this is definitely planned. At the recent PKP sprint work was started on a few more child themes. Follow the PKP blog for more i nformation about this.
As @Vitaliy said, customizing the themes does require some basic programming skills. But we hope to encourage the community to build and share custom themes so that in time non-programmers have a variety of options to work with.
When I switch to the Bootstrap theme, everything looks great except that my logo image is very tiny. The .less files generally seem pretty straightforward, but I canāt figure out whatās happening with that image.
Iāll keep poking around, but if Iām missing something basic Iād love to know about it
Thanks!
Hi @BBourne
I have asked this issue. The reply can be read through the link
Thank you, @kawahyu!
Hi @NateWr and all,
Thanks so much for your comments and explanations on this thread so far.
Iām a medical student and a programmerish, and a research body I work for would like to set up a new academic journal using OJS3.
I have successfully installed a bare-bones OJS3 on my server, and have added the bootstrap3 theme (thank you for working on this!!!). Separately, I have added a sample child theme baed on your instructions at https://github.com/NateWr/default-child. Both of these render fine on my journalās site.
Now Iām trying to make a new child theme based on bootstrap3 rather than on the default theme, as it is my hope that bootstrap3 will continue to be updated, and I want to make sure my customisations wonāt all be broken with every update. However, I simply cannot work out how to do this. Everything I try gives me the same: a totally unstyled page, with just raw html and those typical bright blue links etc.
I have tried:
Switching line 17 of DefaultChildThemePlugin.inc.php
from class DefaultChildThemePlugin extends ThemePlugin {
to class DefaultChildThemePlugin extends BootstrapThreeThemePlugin {
Adding the bootstrap and jquery files to my child theme explicitly, e.g. $this->addStyle(ābootstrapā, āstyles/bootstrap.lessā); and so on (although I understand that all these things should be inherited from BootstrapThreeThemePlugin)
ā¦and more.
I have managed to hack on a new theme option to bootstrap3, which renders correctly, but in order to customise this very much I will have to start editing the template files in bootstrap3/templates, which obviously I do not want to do (although I have tried this and obviously am able to customise my hacked-on theme in this way).
My code for the hacked on extra theme option is on branch nsamr-theme of GitHub - DeckOfPandas/bootstrap3: A community-built theme for OJS 3.0 that implements Bootstrap 3 components., forked from GitHub - NateWr/bootstrap3: A community-built theme for OJS 3 that implements Bootstrap 3 components. today, and is running live at http://www.journal.nsamr.ac.uk.gridhosted.co.uk/ojs/index.php/jnsamr/index (horrible dev linkā¦sorry). The page will look familiar as Iāve just used the styling for Flatly at the momentā¦
If you could help me at all with this Iād be very grateful. Itās likely Iāve just misunderstood something, in which case I apologise for the length of this post!
Iām a super keen member of the Open Source software community in health tech, and will of course keep on working in the Open. Iād love to contribute back to bootstrap3/OJS3 when I get more familiar with it all
Helen
@deckofpandas I can reply in more detail tomorrow, but a quick note: it sounds like your CSS code is not getting generated. This happens when the LESS canāt compile. Check your apache error log to see if you have an error mentioning the LESS Parser. The error message should point to the particular LESS code thatās causing a problem.
@deckofpandas Are you able to share the code for the child theme youāre having trouble with? If you can create a repo for that on GitHub, I can check it out and run through it to see where there might be mistakes.
Offhand, I can tell you that you donāt need to change DefaultChildThemePlugin extends ThemePlugin
to DefaultChildThemePlugin extends BootstrapThreeThemePlugin
. In fact, every theme, child theme or otherwise, should extend ThemePlugin
.
Instead, you should probably adjust the class name to something like NsamrThemePlugin extends ThemePlugin
. Then where you see $this->setParent('defaultthemeplugin');
, you should use $this->setParent('bootstrapthreethemeplugin');
.
And then generally change instances of default child to nsamr. That way the theme yiou create is unique to you.
If you share the code for the child theme, it might be easier for me to take a quick look and see where else youāre going wrong.
Setting $this->setParent(); to ābootstrapthreethemepluginā wasnāt that obvious. Now itās clear that this should match the lowercase name of the parent themeās class.
Thank you very much for this detail, it would be great if you could include it in the readme on git.
Have a good one!
Yeah thatās a little awkward. Weāve been working on a theming guide that should cover details like this in an easier, step-by-step fashion. Weāre hoping to release it alongside OJS 3.0.2 in the coming months (the docs cover some new Theme API features that will go into 3.0.2).
It was more than 6 months ago I modified the theme and made JS based slideshow (Camera) to work. The J scripts are loaded in footer. I forgot how and where I load the scripts. Could you help me remember which file I need to modify to include JS? Thanks!
You know what? Just found it. It is DefaultChildThemePlugin.inc.php with this modification.
public function init() {
$this->setParent('defaultthemeplugin');
$this->modifyStyle('stylesheet', array('addLess' => array('styles/remove-borders.less')));
$this->addStyle('slidestyle', 'slide/css/camera.css');
$this->addScript('slidermobile', 'slide/scripts/jquery.mobile.customized.min.js');
$this->addScript('slidereasing', 'slide/scripts/jquery.easing.1.3.js');
$this->addScript('slidestart', 'slide/scripts/startcamera.js');
$this->addScript('slidermain', 'slide/scripts/camera.min.js');
}
Hi all,
I just found very beautiful premium ojs 3 theme but the price is unreachable, here the link Demo Journal A
Is any way how to modify the default theme or even create a new one to be like that theme?
Thanks in advance
Hi @eddhie,
Have you run into the Bootstrap theme for OJS 3.0? See https://pkp.sfu.ca/2016/09/02/bootstrap-theme-for-ojs-3/ for details. This should be easy to customize if youāre familiar with Bootstrap. Itās free & open source.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi everyone!
I am trying to create a child theme of the bootstrap3 theme based on the instructions in this thread. I donāt know why, but it seems like parts of the stylesheets donāt load correctly. Hereās a screenshot:
Iād really appreciate any help!
Hmm, I just noticed that this only happens on the homepage. All the other pages work fine.
The error log reveals that there is indeed a css file that canāt be loadedā¦
Hi @zathoum,
Check your PHP error log for details.
Regards,
Alec Smecher
Public Knowledge Project Team