OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Customize the OCS to disable some parts or change order

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Customize the OCS to disable some parts or change order

Postby roseknight » Wed Feb 11, 2009 7:03 pm

Hi there
Is that possible to disable some sections of the OCS? For example, if the program section already mentions the schedule, may I delete/disable the schedule section?
Is that possible to change the order of sections? For example, make the registration the first item in the navigation bar?
Is that possible to remove the top navigation bar and just keep the left side navigation bar? The top one looks pretty confusing for first time users.

Thanks a lot.
Jun
roseknight
 
Posts: 14
Joined: Thu Feb 05, 2009 3:02 pm

Re: Customize the OCS to disable some parts or change order

Postby jmacgreg » Wed Feb 11, 2009 10:39 pm

Hi Jun,

It's possible to make all the changes you list here -- but you'll need to get your hands dirty in the smarty template files. If you're not familiar with smarty, I would do the following:

a) check out http://smarty.net, and our Technical Reference and Customizing OJS document, from http://pkp.sfu.ca/ojs_documentation;
b) take a look at the template files, found in your templates/directory;
b) search the forum for keywords like 'smarty', 'customization', and variations on either the template files or user interface blocks you want to change.

Feel free to ask us for pointers as well.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Customize the OCS to disable some parts or change order

Postby roseknight » Thu Feb 12, 2009 3:25 pm

Hi James

Thank you very much for the hints.
I found the way. Here, I like to share the tips with everyone.

1. To change the navigation bar (change order of sections, remove sections), please change the file ocs\plugins\blocks\navigation\block.tpl
2. To change the scheduled conference home page (change order of sections, remove sections), please change ocs\templates\schedConf\index.tpl
3. To remove the top navigation bar or breadcomb, please change ocs\templates\common\header.tpl
roseknight
 
Posts: 14
Joined: Thu Feb 05, 2009 3:02 pm

Re: Customize the OCS to disable some parts or change order

Postby ramon » Tue Feb 18, 2014 1:08 pm

Hello all,

This is the only post I found regarding customization of OCS.

From what I gather, the only way to remove the scheduled conference navigation from the index page is to edit the respective template.
Am I correct? This is what PKP did with their conference (2013)?

Is there a way to check if the navigation block is enabled to hide it?
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby asmecher » Tue Feb 18, 2014 3:47 pm

Hi Ramon,

Can you describe what you want to do in a little more detail? -- Hide all scheduled conferences, hide all conferences, hide only specific scheduled conferences, ...

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

Re: Customize the OCS to disable some parts or change order

Postby ramon » Wed Feb 19, 2014 7:45 am

Hello Alec,

I just want to remove the Scheduled Conference information navigation (Conference content links) that are repeated at the end of the index page of said scheduled conference, much like the PKP 2013 conference.
The navigation is at the sidebar and is repeated after the Announcements block in the index.
We'd like to remove that.

I did hide the menu by editing ./schedConf/index.tpl.
However, we also customized that navigation block plugin, creating a new one and hiding the original, so we can change the order of thing without hacking core files.

We'd like to be able to hide or show the Scheduled Conference Navigation on the index page if either block plugin is enabled (our customnav our navigation).
This seems a bit difficult, but, it's an idea...
Another idea would be enabling us to create custom template files, which would then allow for customizing pages without actually hacking core files, much like Joomla does.
This provides page overrides without core hacking, breaking upgrades or customizations...
This was in the works, with a theme plugin, but haven't heard about this since.

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby asmecher » Wed Feb 19, 2014 1:52 pm

Hi Ramón,

We did this for the PKP conference by hacking templates too (commenting out with Smarty's {* and *} comment tags). We're unlikely to tackle this in a nicer way until we've figured out our roadmap for OCS; a lightweight alternative to conference-specific template modification would be to assign an HTML ID to the relevant elements and hide them with CSS.

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

Re: Customize the OCS to disable some parts or change order

Postby ramon » Thu Mar 06, 2014 12:26 pm

Hello Alec,

I figured that would be your answer.
We modified templates as well.

I also created a custom navigation plugin, copying from the original block navigation and changed the order.

Feature requests:
  1. PLEASE, add the public folder navigation plugin. This is essential for system management, where we don't have access to the server. We are unable to upload files via TinyMCE up to this day. The image upload plugin never worked for us....
  2. Create a "presenters" page, where we can upload a "mug" shot and info about presenters, without having to add a static page. The inability to upload images prevents the full use of the plugin.

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby asmecher » Thu Mar 06, 2014 2:03 pm

Hi Ramón,

1. I'm reluctant to add that plugin to the distribution for two reasons. First, it's a security risk -- if an outsider gains access to a Conference Manager account, they can use it to upload something malicious like a PHP back-door which can then be accessed directly via the web server. This can't be done for the files directory because that's typically placed outside the web server's root. A safer approach would be to get the JBImages uploader working -- a local test shows it working fine (for OCS 2.3.5, at least). Check your server's error log to see if it indicates anything. (Eventually the public files directory will probably be removed entirely.)

2. With the JBImages image uploader working, you could use the Biography field for that purpose.

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

Re: Customize the OCS to disable some parts or change order

Postby ramon » Mon Mar 10, 2014 12:37 pm

Hello Alec,

Thanks for the clarifications.
Now, I'd like to add an automatic link to any Static Page created in a conference, to my customnav plugin.
Is this possible?

How would I go about this?

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby ramon » Tue Mar 11, 2014 11:24 am

Hello all,

Sorry to bump the post, but, I need to know if this is possible.
Otherwise, we'll use the menu...

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby asmecher » Wed Mar 12, 2014 9:54 am

Hi Ramón,

I'm not sure what you mean by "customnav plugin".

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

Re: Customize the OCS to disable some parts or change order

Postby ramon » Wed Mar 12, 2014 10:15 am

Hello Alec,

Sorry... it's a custom navigation block plugin I created, by copying the original navigation block plugin.

My questions are:
  1. Is it possible to automatically/magically add the links to static pages in this (or any) block plugin without manually adding links all the time?
  2. I don't remember correctly, but, static pages are for Conferences only, correct? I mean, they are available to ALL scheduled conferences, is this assumption correct?

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Customize the OCS to disable some parts or change order

Postby asmecher » Wed Mar 12, 2014 12:33 pm

Hi Ramón,

The static pages are attached to the conference, not a specific scheduled conference.

To have a list of static pages generated would require code changes; the DAO contains all the required database operations (particularly getStaticPagesByConferenceId) but you'd need to have the front end call this and display all the returned results.

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

Re: Customize the OCS to disable some parts or change order

Postby ramon » Thu Mar 13, 2014 12:57 pm

Hello Alec,

I'm sorry but my programming skills are lacking, specially regarding SMARTY templates.
I still don't get it...
I copied from the StaticPages Plugin:
  1. StaticPagesDAO (renamed to: CustomNavDAO.php)
  2. From StaticPage.inc.php the following functions:
    1. function getPath()
    2. function setPath($path)
    3. function getStaticPageId()
    4. function setStaticPageId($staticPageId)

How do I use the variables in those functions in the block.tpl template?

I tried {$path|@print_r}, for example, but all it prints is 1.

I think I need another function, to get ALL the static pages by ConferenceId and add them to the content of the function getContents(&$templateMgr).

Am I right to assume this?
If so, how do I get this done???

Thanks for the help, and sorry for the trouble and silly questions...
_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Next

Return to OCS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 3 guests