OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS 2.3.5 generic plugin: NavBar hook problem

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

OJS 2.3.5 generic plugin: NavBar hook problem

Postby smcphill » Thu Jun 16, 2011 12:10 am

System details: OJS 2.3.5 on linux using mysql 5.1, apache2.2, php 5.3.2

I'm in the process of writing a generic plugin that needs to add a nav menu item. I'm using the "Templates::Common::Header::Navbar::CurrentJournal" hook to get the job done.

The problem is that my added menu item only shows up on the "Plugin Management" page </index.php/test/manager/plugins>, or (rather curiously) the list of generic plugins </index.php/test/manager/plugins/generic>.

It doesn't show on any other journal page.

I've stripped everything else out of the plugin in an attempt to figure out what's going wrong, but haven't made much progress. Can anyone give me some tips on what I might be doing wrong? I've attached the nav link code i'm using in a dummy plugin for reference; it's so simple I'm really not sure what could go wrong

I've had a look at some existing generic plugins (thesis abstracts, books for review) and I can't see anything different in them...
Attachments
steve-ojs-plugin.tar.gz
dummy plugin with navbar
(1.08 KiB) Downloaded 93 times
smcphill
 
Posts: 7
Joined: Thu Sep 01, 2005 6:24 pm

Re: OJS 2.3.5 generic plugin: NavBar hook problem

Postby smcphill » Thu Jun 16, 2011 12:18 am

I'll keep this for other fools who make the same mistake I did :)

pro tip: run
Code: Select all
php tools/upgrade.php upgrade
after copying a plugin into the plugin dir. Or use the install page (which i guess does the same thing)
smcphill
 
Posts: 7
Joined: Thu Sep 01, 2005 6:24 pm

Re: OJS 2.3.5 generic plugin: NavBar hook problem

Postby ashahid » Sat Mar 30, 2013 4:57 am

Hi Everyone!

I am newbie to OJS plugin development;

I have added a link in header menu using a plugin. The problem I am facing is that I can see the link in menu items when I am on System Plugin page but cannot see that item when I am on user home or somewhere else.

Dear smcphil, I tried your solution, It worked on my local machine but on live it did not. I have executed the script with the help of cron job but no luck.

Can anyone please help me on this?

Thanks,
Shahid
ashahid
 
Posts: 1
Joined: Sat Mar 30, 2013 4:43 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests