We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 3930 - Extend journal setup options to site
Extend journal setup options to site
Status: RESOLVED WORKSFORME
Product: OJS
Classification: Unclassified
Component: Site
2.4.x
Sun Linux
: P1 enhancement
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-12 11:18 PST by D Askey
Modified: 2014-12-11 05:30 PST (History)
4 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D Askey 2008-12-12 11:18:46 PST
It would be helpful to extend the journal setup options, specifically those in step 5 that concern the layout and design, to the site. Currently, one can upload custom CSS and a banner image, but there are no options for rearranging elements, adding a left sidebar, etc.

See support thread http://pkp.sfu.ca/support/forum/viewtopic.php?f=2&t=2267 for details of the discussion that led to this feature request.
Comment 1 imtechnology 2012-07-01 02:12:43 PDT
Is there any progress on this?

It was first reported in 2008 but the option still does not seem to be available.

Likewise it seems very important (at least to me) to add at the ability to add the static pages plugin to the main site.
Comment 2 Alec Smecher 2012-07-04 10:37:01 PDT
No progress to report -- the current work-around is to alter the plugin_settings table's contents for journal_id = 0 manually. The relevant setting names OTOH are "seq" (defines order of display), "enabled" (defines enabled/disabled state), and "context" (defines which sidebar is chosen). A better solution for this will be ported to OJS as we merge OMP technology into it in the next set of releases (post-2.4.0).
Comment 3 Alec Smecher 2013-03-25 11:55:55 PDT
Implemented in OMP 1.0 / OJS 3.0 (pending release) as part of OMP UI work.
Comment 4 Andrea Marchitelli 2013-10-30 09:58:48 PDT
(In reply to comment #2)
Hi Alec,
I'm trying to add a left-sidebar sitewide.

I created a sidebar in a journal and then I modified plugin_settings table's contents for journal_id = 0 manually, as you suggested but I can not find any left-sidebar on the site home.

Here my settings:
"menulaterale";"''";0;"seq";"0";"int"
"menulaterale";"''";0;"context";"1";"int"
"menulaterale";"''";0;"enabled";"1";"bool"
"menulaterale";"''";0;"blockContent";"<p>Menu</p>";"string"
Comment 5 Alec Smecher 2013-10-30 09:59:44 PDT
Andrea, don't forget to flush your cache (rm cache/*.php -f); the changes won't take effect until that's done.
Comment 6 Andrea Marchitelli 2013-10-30 10:07:43 PDT
I flushed the cache (via site admin interface and now via SSH) but I didn't get any new...
Comment 7 Alec Smecher 2013-10-30 11:08:49 PDT
Andrea, I'd suggest stepping into the plugin source e.g. to see if the register() function is being called; I don't have that plugin's source so I can't be sure beyond that.
Comment 8 Andrea Marchitelli 2013-10-30 11:24:00 PDT
It is the custom block plugin, the standard one
Comment 9 Alec Smecher 2013-10-30 11:44:26 PDT
Ah, got it -- you'll also need to configure the custom block plugin with journal_id=0.
Comment 10 Andrea Marchitelli 2013-10-30 23:08:17 PDT
Now I have in plugins_settings:

"menulaterale";"''";0;"blockContent";"<p>Menu laterale</p>";"string"
"menulaterale";"''";0;"seq";"0";"int"
"customblockmanagerplugin";"''";0;"blocks";"a:1:{i:0;s:12:"menulaterale";}";"object"
"customblockmanagerplugin";"''";0;"enabled";"1";"bool"
"menulaterale";"''";0;"context";"1";"int"
"menulaterale";"''";0;"enabled";"1";"bool"

Flushed the cache but nothing happened.
Comment 11 Andrea Marchitelli 2013-11-03 22:07:14 PST
Solved by creating a block plugin with the menu and manually set journal_id=0
Comment 12 Alec Smecher 2013-11-05 18:27:33 PST
Glad you got it going!
Comment 13 SamuelOPH 2014-12-01 04:57:53 PST
Hi guys

(TL:DR version on the end)

I'm having a few problems related to this, so I will post it here as this seems the best place do discuss it (maybe I'm wrong, but I didn't see any mention to this database workaround on the forum).

I'm currently helping my university on a migration to OJS 2.4.5 and part of my job is the customization of a few things.

One of the things I need is to place three images with links to the other 3 journals we have on the right sidebar, so this has to be site-wide.

I did create the custom block and enabled custom block manager, made the way I wanted and placed it on the lowest position (happens to be seq 9). So far so good.

Then I changed 6 entries from the plugin_settings's table (changed journal_id to 0), the entries were: 4 related to my custom block (blockContent, context, enabled, seq) and the other two were the customblockmanagerplugin's.

My problem is that the block is missing, and besides that, when I reload the page, the changed entries are recreated by OJS, so I end up with 4 more entries (2 of the original entries aren't created as the newly created blocks are empty [missing blockContent for example]). The block is still missing.

Also, I didn't understand the "Solved by creating a block plugin with the menu and manually set journal_id=0" part, I guess that is what I did, the custom block was created with my OJS's site.

I don't know what to do to troubleshoot this nor if it's version related.

Extra info:
I removed the developedby and helpblockplugin by changing enabled to 0 on the entries that had journal_id=0 and it worked.

TL:DR
I created a block plugin with the menu, manually setted journal_id=0 on the entries discussed here and the block doesn't show, besides the entries being recreated in the table.
Comment 14 Alec Smecher 2014-12-02 15:29:14 PST
SamuelOPH, a new thread on the support forum (http://pkp.sfu.ca/support/forum) is the best place for questions like this.

The problem you're having is that plugins generated by the Custom Block plugin depend on the Custom Block plugin itself being enabled. Since it's not written to work in the site context (as opposed to a journal context) anything created with it won't be loaded either.

You could try enabling the Custom Block plugin itself on the site level, but I suspect you'll run into some coding you may or may not want to tackle.

When I suggested creating a block plugin, I meant the old-fashioned way -- by putting code in plugins/blocks -- rather than using the Custom Block plugin to do it.
Comment 15 SamuelOPH 2014-12-11 05:30:27 PST
Thank You very much Alec!

I decided to create my own block, based on that tutorial on the wiki (basing it on DevelopedByBlock), that was enough for my needs.

Now our OJS looks a little better, I'm planning to do a little how-to on all modifications that I made to put on the forum/wiki later, and if I get the time enable the CustomBlockPlugin, probably this would be very useful until We get OJS 3.

Also, sorry for not posting on the forum.