OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Record Display

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

Record Display

Postby josipkp » Fri May 08, 2009 1:10 pm

Hi,

We are trying to do some changes to display record information:

1) Trying to include the source archive name with link to itself info
In plugins/schemas/dc/summary.tpl we add:

 | {translate key="archive.archive"}
{if $archive}
<a class="action" href="{url op=archiveInfo path=$theArchive->getArchiveId()}">{$theArchive->getTitle()|escape}</a>
{else}
{** wrong *}
<a class="action" href="{url op=archiveInfo path=$record->getArchiveId()}">{$theArchive->getTitle()|escape}</a>
{/if}

when the selection comes from Browse Archives menu, it is ok, but, when comes from Search, I don't know what I should put in href to point to .../index.php/browse/archiveInfo/<id>

Could you help us?


2) Trying to include a partial description (abstract) for the paper
In plugins/schemas/dc/summary.tpl we add:

<br>
{foreach from=$parsedContents.description item=descr}
&middot; {$descr|strip_unsafe_html|truncate:200|default:"&mdash"}<br>
{/foreach}
<br>

but, of course, all abstracts appears, because I don't know how to recognize the abstract locale.
We would like to put, mainly, the description corresponding to currentLocale variable; if does not exist, put anyone.

Could you give us the directions to do that?


We observed that the fontSize plugin is not inside the Harvester 2.3.
Then, we:
1) created a plugins/blocks/fontSize directory and moved to it

2) copy the fontSize plugin from OJS
cp -pR <ojsPath>/plugins/blocks/fontSize/* .

3) copy the sizer.tpl from OJS
cp <ojsPath>/templates/common/sizer.tpl <harvesterPath>/templates/common

4) changed the icon names in templates/images/icons
small.gif to font_small.gif
large.gif to font_large.gif
medium.gif to font_medium.gif

Maybe this could be useful for others.


Thank you in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: Record Display

Postby asmecher » Mon May 11, 2009 8:13 am

Hi Josi,

1. Use the page="browse" attribute in the {url ...} call.

2. Smarty's documentation should cover fetching values from arrays -- OTOH, there are a few things you could try:
Code: Select all
{$parsedContents.description.en_US}
...or, alternately, embed an {if ...} statement in the {foreach ...} to see which locale you're looking for.

Smarty sometimes is a little picky in its syntax; it might help to debug by splitting the array lookup into a few steps, i.e.:
Code: Select all
{assign var=abstracts value=$parsedContents.description}
{$abstracts.en_US}
...rather than doing both array lookups in the same Smarty tag.

If you like, consider filing the font size plugin in Bugzilla along with a patch to implement it. Contributions are much appreciated!

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

Re: Record Display

Postby josipkp » Tue May 12, 2009 8:38 am

Thank you for your answer Alec Smecher.

1) About the title and abstract locale:
Looking in the records table, the field Contents had the language information:
<dc:title xml:lang="pt_BR">Comunicação ... construção da cidadania</dc:title>

but, this information does not appears in parsed_contents:
a:11:{s:5:"title";a:1:{i:0;s:85:"Comunicação ... construção da cidadania";}s:7:"creator";a

just the language defined for the article
s:8:"language";a:1:{i:0;s:5:"pt_BR";}

I think we need transpose this information to parsed_contents.
To include this information on the title (or abstract), changing the string size, could be a solution, but changes the original metadata, that is not good (?). For example:
a:11:{s:5:"title";a:1:{i:0;s:92:"[pt_BR] Comunicação ... construção da cidadania";}s:7:"creator";a

What do you suggest?

2) About bugzilla
We will try to discover how this works to put the steps there.

Thank you,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: Record Display

Postby asmecher » Tue May 12, 2009 10:09 am

Hi Josi,

Try changing the parseContents function in plugins/schemas/dc/DublinCorePlugin.inc.php to make it use the locale name as the key in the values array. You'll need to either flush and re-harvest your archives, or use the tools/rebuildSearchIndex.php script, before the change will take effect. Don't forget to consider content for which no xml:lang attribute has been specified, but if you think the change would be worth including in future releases, please consider filing a patch in Bugzilla.

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


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: Google [Bot] and 1 guest