I’ve posted some review comments on the Disqus plugin, and I see you’ve also identified it as a good candidate for OMP support as well. Let me know when you’re ready to package the plugin up (taking or leaving my comments as you’d like).
Just one minor comment on the Allowed Uploads plugin – strictly cosmetic – and I think this one would also be a good candidate for some minor changes to make it applicable to OMP as well. Likewise, let me know when you’re ready to go.
I’d be happy to test with OMP. For the most part, you’d just need to swap out variable and function names – journalId for contextId, $request->getJournal() for $request->getContext(), etc.
Regards,
Alec Smecher
Public Knowledge Project Team
GitHub - ajnyga/allowedUploads: OJS/OMP 3.1+ plugin for limiting the allowed submission file types should be ready.
However, there is one small thing. When you enable the plugin an try to add a filetype that is not allowed, the red notification box does not show up immediately. It only shows up after you have succesfully uploaded a file in the third stage of the file upload wizard. It seems that the notifications get stuck and are triggered when the file upload is successfully finished. Any ideas how to fix that? I mean there is actually no need for the red notification, but I am not sure how to control that.
Hi @ajnyga
I’m following this conversation. Just interested how to install and configure Disqus plugin. Do I need to perform some additional steps to make it work? I’m receiving a fatal error on my local OJS 3.1.0-1 installation (latest XAMPP with PHP 7.2) with plugin from master branch:
PHP Fatal error: Uncaught Error: Call to a member function get_template_vars() on null in C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\plugins\\generic\\disqus\\DisqusPlugin.inc.php:126\nStack trace:\n#0 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\lib\\pkp\\classes\\plugins\\HookRegistry.inc.php(107): DisqusPlugin->addDisqus('Templates::Arti...', Array)\n#1 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php(1169): HookRegistry::call('Templates::Arti...', Array)\n#2 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\cache\\t_compile\\6267f877acd9b945f8a07db7bb24329a969a952a^%%A2^A2D^A2DEEC56%%articleMainText.tpl.php(317): PKPTemplateManager->smartyCallHook(Array, Object(TemplateManager))\n#3 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\lib\\pkp\\lib\\vendor\\smarty\\smarty\\libs\\Smarty.class.php(1870): include('C:\\\\xampp2\\\\htdoc...')\n#4 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\lib\\pkp\\classes\\template\\PKPTemplateManager.inc.php(419): Smarty->_smarty_include(Array)\n#5 C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\cache\\t_compile\\89d777ad47fee49321727969b42b912e77adc9cd^%%2 in C:\\xampp2\\htdocs\\ojs-3.1.0-1-theme\\plugins\\generic\\disqus\\DisqusPlugin.inc.php on line 126, referer: http://ojs-3.1.0-1-theme.test/index.php/psp/index
Tagging @anupent because of interest in installing this plugin.
Hi, it seems I made a small typo when I tried to add the OMP support (stopped when I realized that OMP does not have the same template hook as OJS has).
Thanks! I just had one minor comment about escaping, but when that’s handled, feel free to build a .tar.gz and upload it to the Releases area of your github repository. That’s where I’ll direct the Plugin Gallery to get the source from (md5 signed).
Regards,
Alec Smecher
Public Knowledge Project Team