OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Showing the issue description alongside cover image

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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

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.

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 OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Showing the issue description alongside cover image

Postby jamilj » Tue Nov 05, 2013 6:39 pm

Hello,

Can anyone tell me if it is possible to show the description of each of my issues when they are displayed under "Home > Archives". I do not have actual descriptions but I found that the cover alone is insufficient in the listing. So I'm populating the issue description field with a formatted contents listing upon import. Unfortunately, the only way I can get the description to show in the archive listing is by disabling the cover image. (Note: it is not a problem that the contents are repeated in the individual issue view because I can just hide that block with CSS; indeed, CSS hiding would perhaps have been a better tactic here considering that user-stylesheets are supported.)

This brings up a broader issue with regard to modifications that would typically require PHP filters or actions. Does OJS support a user-customized "functions.php" file (or OJS equivalent)? If so, I'm sure I could figure this out myself. I know there will be quite a few similar sorts of changes that I would like to implement so any help in that regard would be much appreciated.
jamilj
 
Posts: 39
Joined: Sun Aug 25, 2013 10:36 pm

Re: Showing the issue description alongside cover image

Postby jamilj » Tue Nov 05, 2013 6:46 pm

jamilj wrote:Note: it is not a problem that the contents are repeated in the individual issue view because I can just hide that block with CSS


I spoke too soon. It does not appear that OJS uses classes or ids to distinguish between archival and "singular" or individual pages. Inserting these tags, as well as others to distinguish between different sets of pages (i.e., "archives", "issues", "authors") would make it much, much easier to do CSS customization.

Apparently, there is another related issue with regard to rendering of HTML blocks. At least in the "Description" under "Issue Data", all CSS classes and ids are stripped out of the final page output; oddly, they are still retained in the back end when you view the content as "HTML" (using the button). But on the user side they are stripped out. Further, certain tags, like "<h3>" are removed entirely. This appears to be a straightforward bug.
jamilj
 
Posts: 39
Joined: Sun Aug 25, 2013 10:36 pm

Re: Showing the issue description alongside cover image

Postby asmecher » Tue Nov 05, 2013 7:39 pm

Hi jamilj,

Take a look at the "allowed_html" entry in config.inc.php; OJS uses HTML Purifier to make sure that user-supplied HTML is "safe" (i.e. clear of XSS attacks, embedded Javascript, etc). The attributes and elements that are being stripped are likely not specified as allowed in that setting.

To customize the way issues are displayed, take a look at templates/issue/issue.tpl; that's likely where the modification would be best placed (if I understand your intentions). OJS uses Smarty for its templates.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests