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
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.

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 0 guests

cron