Create a custom plugin

Is there a a good plugin sample for ojs3 ?

I would like to build a simple plugin to manage a few contents like:

social media links,
image slider
footer widgets(contacts, quicklinks )

and the like.

Thanks in advance!

For social media links: GitHub - pkp/addThis: OMP/OJS3 compatible integration of AddThis social media sharing
If you are thinkin adding links to the social media accounts of a specific journal, you should check out how block plugins work: GitHub - pkp/makeSubmission: A sidebar block plugin for Open Journal Systems and Open Monograph Press which adds a link to the submissions page.

For image sliders, I have seen people discussing those here on the forum. You could do a search. I think that most use a theme plugin to do that, which of course would work, but you can achieve it fairly easily with a generic plugin as well.

For footer widgets I do not have a good example to give. But I know that the developers have been planning to expand the current sidebar block scheme to include other block areas as well. Block plugins are basically the same thing as widgets in OJS. I think @NateWr mentioned this at some point?

Thank you for the guidance.
I would like to learn how to use the generic plugins more for the purposes that users are able to make updates without coding. I would like to make my own custom plugin, if I can get a good sample it would be great! am still trying to build mine but am stuck at hooks, there is no documentation for hooks, and how to make custom hooks…

Thanks again!

Hi @jkkenzie,

It sounds like you primarily want to build tools for customizing the reader-facing website. If so, you’ll probably want to explore the Theme API:

https://www.gitbook.com/book/pkp/pkp-theming-guide/details

For widgets, I’d recommend looking at the existing block plugin /plugins/blocks/makeSubmission. It gives the simplest demonstration of a block plugin.

We do have plans to extend this to support more than one block area (“sidebar” or “widget area” if you’re more accustomed to WordPress terminology).

Big thanks, this is very helpful. I will look into this. hope to contribute back.