OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



rightSidebarCode the search view

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.

rightSidebarCode the search view

Postby cristianviza » Fri Aug 16, 2013 3:20 pm

Hello everybody!
I need help for find code $rightSidebarCode, I want modify the search view http://www.subimelafoto.com.ar/visualizer.php?url=348snapshot17.png, but I don't found .
Regards Cristian
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: rightSidebarCode the search view

Postby asmecher » Fri Aug 16, 2013 3:51 pm

Hi Cristian,

The sidebars are put together from the block plugins; that's the navigation block plugin, which is implemented in plugins/blocks/navigation. (The template is plugins/blocks/navigation/block.tpl.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: rightSidebarCode the search view

Postby cristianviza » Wed Aug 21, 2013 1:00 pm

Hi asmecher, thanks for you advice. I could modify search menu in rightsidebar.
Now I want to change the order of appearance "NOTIFICACIONES" -> http://sia1.subirimagenes.net/img/2013/08/21/130821095453942160.png
, where is the file that load and link code is that set in $rightsidebarcode? I thought change order in this file. is correct my idea?

Regards Cristian
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: rightSidebarCode the search view

Postby asmecher » Wed Aug 21, 2013 1:58 pm

Hi Cristian,

You can set the order of blocks on Journal Setup step 5.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: rightSidebarCode the search view

Postby cristianviza » Mon Aug 26, 2013 6:35 am

Hi asmecher.

Here : classes/manager/form/setup/JournalSetup5Form.inc.php ??

Code: Select all
// Make lists of the sidebar blocks available.
      $leftBlockPlugins = $disabledBlockPlugins = $rightBlockPlugins = array();
      $plugins =& PluginRegistry::loadCategory('blocks');
      foreach ($plugins as $key => $junk) {
         if (!$plugins[$key]->getEnabled() || $plugins[$key]->getBlockContext() == '') {
            if (count(array_intersect($plugins[$key]->getSupportedContexts(), array(BLOCK_CONTEXT_LEFT_SIDEBAR, BLOCK_CONTEXT_RIGHT_SIDEBAR))) > 0) $disabledBlockPlugins[] =& $plugins[$key];
         } else switch ($plugins[$key]->getBlockContext()) {
            case BLOCK_CONTEXT_LEFT_SIDEBAR:
               $leftBlockPlugins[] =& $plugins[$key];
               break;
            case BLOCK_CONTEXT_RIGHT_SIDEBAR:
               $rightBlockPlugins[] =& $plugins[$key];
               break;
         }
      }


Regards Cristian
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: rightSidebarCode the search view

Postby asmecher » Mon Aug 26, 2013 9:36 am

Hi Cristian,

If I understand what you want to do, there's no need to edit the code; just use the setup form to change the order.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: rightSidebarCode the search view

Postby cristianviza » Wed Aug 28, 2013 1:25 pm

Hi asmecher,

YesI founddd :) . However I would like where set variable {$rightSidebarCode} (lib/pkp/templates/common/header.tpl). and variables $rightBlockPlugins , $disabledBlockPlugins (template/manager/setup/step5.tpl).

I don't understand where .php file set this.

Regards Cristian.
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: rightSidebarCode the search view

Postby asmecher » Wed Aug 28, 2013 2:49 pm

Hi Cristian,

The details of this are a little complicated -- they're implemented in lib/pkp/classes/plugins/BlockPlugin.inc.php. Basically, depending on what sidebar you're talking about, a plugin hook is called (Templates::Common::LeftSidebar or Templates::Common::RightSidebar) and the hook callback (the function called "callback") is used to build up content in order for all of the plugins registered against the hook.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest