OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



'Program' section and html parsing

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.

'Program' section and html parsing

Postby m.giordano » Thu Apr 17, 2008 9:02 am

Hi,

we have noticed that the text input in Program page is not parsed as html, that is, if we write html code in the Plain Text Program field, the html tags are displayed as plain text.
Information about Program and Sessions are usually complex and structured, from a layout standpoint. Wouldn't it be better if that field parsed the html tags, like other similar fields in the application do?
Is there a way to accomplish this?

Thanks and regards

Marco

PS: input for future releases: what about a timetable tool which allows to manage sessions, rooms, speakers, so that Program page becomes just a layout of dynamical data?
m.giordano
 
Posts: 29
Joined: Wed Jan 09, 2008 4:02 am

Re: 'Program' section and html parsing

Postby jmacgreg » Thu Apr 17, 2008 3:39 pm

Hi Marco,

We're in the process of beta-testing OCS 2.1, and while your recommendations re: the Program page won't make it in to this release, I'm happy to report that 2.1 will indeed ship with a scheduler. The scheduler will allow you to create buildings/rooms, and to assign presentations and special events to each. These will then be displayed in a timetable.

If you have the time or the inclination, you can view further information on testing OCS 2.1 here: viewtopic.php?f=7&t=2896

We'll take your comments regarding the Program field under advisement. You may be able to recreate the functionality you described by looking at other HTML-capable forms behind the scenes, and see if you can replicate what's going on. As it is, we do include the option to upload a richer program (HTML or PDF, for example), but I can understand the desire for what you describe.

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

Re: 'Program' section and html parsing

Postby asmecher » Thu Apr 17, 2008 5:23 pm

Hi Marco,

Just to add to James' comments -- in fact, OCS 2.1 will ship with TinyMCE, a popular Javascript WYSIWYG editor. All HTML-capable fields in OCS will use this editor to allow word processor-style HTML editing, as well as the option to code HTML by hand, and the Program field will include this feature.

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

Re: 'Program' section and html parsing

Postby m.gori » Mon Apr 21, 2008 7:01 am

Hi there,

a simple trick to avoid the "html parsed and transformed into plain text", is to eliminate the escape command inside the PHP template - that is, for instance, in program.tpl - regarding the variable displaying that text.
So basically a code line such as:
<div>{$program|escape|nl2br}</div>
would become:
<div>{$program|nl2br}</div>
and that's it, the HTML tags will finally be recognized as they are supposed to :wink:

Hope this was somewhat helpful.

Regards,
Marco
m.gori
 
Posts: 8
Joined: Thu Dec 20, 2007 7:23 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest