You are viewing the PKP Support Forum | PKP Home Wiki

browse by issue

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.

browse by issue

Postby bar338 » Fri Jun 12, 2009 3:11 pm

I have the navigation block enabled on my entire website but attempting to use the browse by issue feature on the journal-listings page causes a problem. For one browse by issue does not print the name of the journal and more importantly if you have the browse by issue button on the journal listings page it doesn't do anything (doesn't find the issue page). Does anyone know of any good solutions for this problem short of rewriting a secondary issue archive.tpl file to handle requests from the journal listings page.

Thanks for your help.
Posts: 90
Joined: Tue Jun 09, 2009 11:54 am

Re: browse by issue

Postby bar338 » Sat Jun 13, 2009 7:43 am

I tried creating my own script to do this but i'm having some problems b/c i'm not very good with smarty. I am attempting to do it in php but I dont think i have it right, any suggestions would be appreciated.

Code: Select all
$jissue =& DAO.retrieve('SELECT * FROM issues WHERE journal_id = 1');
$array =& $jissue->toArray();

foreach ($array as $key => $element)) {
    $year =& $array[$key]['year'];
    $volume =& $array[$key]['volume'];
    $number =& $array[$key]['number'];
    $issue_id =& array[$key]['issue_id'];

    print "<a href='index.php/Heat_Mass_Transfer/issue/view/" . $issue_id . "'>Vol. $volume, No. $number ($year)</a>";

Eventually it will iterate through all the journals, but i'm just testing it with one journal right now to try and get it working. Is there an easier way to do this?
Posts: 90
Joined: Tue Jun 09, 2009 11:54 am

Re: browse by issue

Postby mcrider » Wed Jun 17, 2009 2:42 pm

Hi bar338,

So, what you're trying to do is have a block plugin that displays outside of a journal's context, that lists all issues for all journals? Do you have multiple journals? Have you enabled the plugin to work outside of the journal's context, i.e. the whole site (which requires modifying the database) ? This would be a lot easier to do with smarty, but I understand the learning curve required. Provide me with some more details I can see if I can help you out.

Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: browse by issue

Postby bar338 » Sat Jun 20, 2009 12:39 pm

I found a temporary solution to the problem but it may bite me in the butt later. Yes i'm trying to get the block to display outside the journals context and lists all the issues for all the journals. I'm not sure what needs to be modified in the database. One thing that has to be taken into account is that the issues have to be listed under their journals b/c each issue names may be the same between journals. I've done a little bit with smarty but i'm not an expert with it at all. What other details do you need to know?
Posts: 90
Joined: Tue Jun 09, 2009 11:54 am

Return to OJS Development

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest