However, since I am not in the DefaultThemePlugin class or ThemePlugin class but in a subclass of GenericPlugin I cannot access the corresponding $this to get to the baseColor. How is it anyway possible that I can read the variable in a generic plugin?
I am currently using version 3.4.0.0 pulled from OJS main branch on github.
thanks for the idea but according to my understanding I have to use a generic plugin because I use different hooks and want to change the application and its database at different places.
I don’t want to give the user an additional option to customize the baseColour, I just want to get this colour to use it in a html galley created by the plugin. Is there a possibility to get the variable baseColour for example with the function getOption in a generic plugin like explained here Use "getOption('baseColour');" in generic plugin or alternatively by a direct request to the database?
I’d still use the theme plugin. There is at least 1 task related to the front-end appearance that the plugin should do. Hooks are the same.
I’m afraid that don’t understand the idea. If just using the color in HTML galleys, without exposing it to a user, wouldn’t be easier just to upload a custom CSS through a dashboard?
With the implementation of the generic plugin I am currently developing, many things are already implemented that change OJS, such as an extension of the submission metadata input with the hook Templates::Submission::SubmissionMetadataForm::AdditionalMetadata or adding additional fields to the database. The issue with the baseColour should be integrated in this plugin. So would these steps also be possible with a thematic plugin?
If I understand the documentation here (https://docs.pkp.sfu.ca/dev/plugin-guide/en/categories#generic) correctly, a generic plugin should be used for such changes. Since code has already been implemented accordingly, it would be the easiest to find a way to get the baseColour in a generic plugin.
So is there a way that works the way I described here?
Yes, if I just want to use a single static color that would be the easiest of course. But the color in the galley should be updated accordingly when the baseColour in the OJS application is changed by the user. I hope it is a bit clearer this way!
thanks for the idea, I tried it right away, it works for me. However, the query is now limited to the DefaultThemePlugin. Is there a similar possibility to query the baseColour independent of the currently installed ThemePlugin?
Or do I understand something wrong here and the baseColour is not definable for all but only for some ThemePlugins as it is for example the case for the DefaultThemePlugin?