Is it possible to add an upload function in theme settings?

Hello there,

I would like to add an image upload function in my theme settings (OJS 3.1). But so far this isn’t included in the addOption-Code. Is there another way to add this?

Kind regards
Daniela

Hi @Daniela,

No, the theme options don’t yet support a file upload option. I would like to implement a theme option of this type. Our next major version, 3.2, will include some changes to the journal settings area which I hope will make it easier to extend the types of theme options.

In the meantime, there isn’t much that can be done without some tricky coding work in your theme. If you want to explore this, I’d recommend you start by looking at PKPAppearanceForm.inc.php and how the image upload control is added in the homepageImage.tpl template. Then look at how theme.tpl loads the theme options template and how ThemePlugin.inc.php hooks in to save the options.

Hi @NateWr

thank you for the reply :slight_smile: I think I wait with my modification until the 3.2. It’s good to hear there will be some more themes options.

Kind regards
Daniela

Hello again,

just to be sure: There aren’t new theme options in 3.2, are they? I’ve taken a look at ThemePlugin.inc.php, but there are only the usual options.

Kind regards
Daniela