OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How to make Archive show only previous conferences?

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

How to make Archive show only previous conferences?

Postby darwin » Thu Sep 27, 2012 2:22 am

Hi, I need to change archive.tpl to show only previous conferences, not current.
Here is part of archive.tpl:

<h3>{translate key="conference.archive"}</h3>
{if not $schedConfs->eof()}
{iterate from=schedConfs item=schedConf}
<h4><a href="{url schedConf=$schedConf->getPath()}">{$schedConf->getFullTitle()|escape}</a></h4>

Is it possible to change this template to show all conferences except current in Archive page?
darwin
 
Posts: 10
Joined: Tue Sep 18, 2012 2:05 am

Re: How to make Archive show only previous conferences?

Postby darwin » Tue Oct 09, 2012 5:51 am

I'm trying to write a plugin, witch compares schedconfs endDate and current date in order to make current conf not appear in archive page. First I'm trying to get endDates and display it in archive page.
This is the problem: to get schedconf enddate i'm using code:
Code: Select all
 function getEndDate() {
      $schedConf =& Request::getSchedConf();
         $endDate=date("Y-m-d",$schedConf->getSetting('endDate'));
         return $endDate;

In archive.tpl inserted smarty function witch returns result of my getEndDate() function, then I get error message: Fatal error: Call to a member function getSetting() on a non-object. Clear that Request::getSchedConf() depends on schedconf url.

Question: how to get schedconf endDate when visiting archive page?
darwin
 
Posts: 10
Joined: Tue Sep 18, 2012 2:05 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest