Announcement Problem

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.
ozgur
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Announcement Problem

Postby ozgur » Mon Aug 25, 2008 10:12 pm

Hello,

I have a conference website based on OCS 2.0. I have a problem with announcements part. I enabled announcement under one of the sections of the Conference Manager tab and then added one new announcement which should appear in the scheduled conference. But it doesn't show in the homepage of the scheduled conference. I modified the code a litle but I don't think it should have affected announcement part. If anyone can help with it, I would be grateful. I am pasting the index.tpl found in templates/schedconf below. Thanks!
Ozgur

Code: Select all

{**
 * index.tpl
 *
 * Copyright (c) 2000-2008 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * Scheduled conference index page. Displayed when both a conference and a
 * scheduled conference have been specified.
 *
 * $Id: index.tpl,v 1.26 2008/05/24 00:08:03 asmecher Exp $
 *}
{*
 * The page and crumb titles differ here since the breadcrumbs already include
 * the conference title, but the page title doesn't.
 *}
{assign var="pageCrumbTitleTranslated" value=$schedConf->getSchedConfTitle()}
{assign var="pageTitleTranslated" value=$schedConf->getFullTitle()}
{include file="common/header.tpl"}

<h2>May 3-6, 2009 </h2>
<h2>Oshawa, Canada </h2>
<br />

<div>{$schedConf->getLocalizedSetting("introduction")|nl2br}</div>

{if $enableAnnouncementsHomepage}
   {* Display announcements *}
   <br />
   <center><h3>{translate key="announcement.announcementsHome"}</h3></center>
   {include file="announcement/list.tpl"}   
   <table width="100%">
      <tr>
         <td>&nbsp;</td>
      <tr>
         <td align="right"><a href="{url page="announcement"}">{translate key="announcement.moreAnnouncements"}</a></td>
      </tr>
   </table>
{/if}

<br />

{if $homepageImage}
<div align="center"><img src="{$publicConferenceFilesDir}/{$homepageImage.uploadName|escape}" width="{$homepageImage.width}" height="{$homepageImage.height}" style="border: 0;" alt="" /></div>
{/if}

<h3>{translate key="schedConf.contents"}</h3>

<ul class="plain">
   <li>&#187; <a href="{url page="schedConf" op="overview"}">{translate key="schedConf.overview"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="cfp"}">{translate key="schedConf.cfp"}</a></li>
   <li>&#187; <a href="{url page="presenter" op="submit" requiresPresenter="1"}">{translate key="schedConf.proposalSubmission"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="venue"}">{translate key="schedConf.venue"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="program"}">{translate key="schedConf.program"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="keynote"}">{translate key="schedConf.keynote"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="specialized"}">{translate key="schedConf.specialized"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="registration"}">{translate key="schedConf.registration"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="accommodation"}">{translate key="schedConf.accommodation"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="social"}">{translate key="schedConf.social"}</a></li>
   <li>&#187; <a href="{url page="about" op="organizingTeam"}">{translate key="schedConf.supporters"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="iab"}">{translate key="schedConf.iab"}</a></li>
   <li>&#187; <a href="{url page="schedConf" op="coop"}">{translate key="schedConf.coop"}</a></li>
    <li>&#187; <a href="{url page="schedConf" op="sponsors"}">{translate key="schedConf.sponsors"}</a></li>
</ul>

{$additionalHomeContent}

{include file="common/footer.tpl"}

jmacgreg
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am
Contact:

Re: Announcement Problem

Postby jmacgreg » Tue Aug 26, 2008 1:04 pm

Hi Ozgur,

Did you also check that x number of announcements should be showing up on the conference home page as well?

Cheers,
James

ozgur
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Re: Announcement Problem

Postby ozgur » Tue Aug 26, 2008 5:31 pm

Hi James,

It should show 4 recent announcements. It is showing the announcement when I click the announcements link found in the header. But, it doesn't show it in the home page.

Ozgur

ozgur
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Re: Announcement Problem

Postby ozgur » Sun Aug 31, 2008 3:01 am

A note to my previous note:

When I delete the following phrases from index.tpl

{if $enableAnnouncementsHomepage}

{/if}




In the home page of the site, it gives an error:

Announcements


Fatal error: Call to a member function wasEmpty() on a non-object in /home/content/i/c/h/ich2pcolpan/html/ocs/cache/t_compile/%%8E^8E6^8E6C5FE9%%list.tpl.php on line 32

jmacgreg
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am
Contact:

Re: Announcement Problem

Postby jmacgreg » Sun Aug 31, 2008 12:06 pm

Hi Ozgur,

You should be able to get rid of that last error by clearing your template cache; however, I don't think you should be removing those lines in the first place. Have you made changes to templates/common/header.tpl as well?

Cheers,
James

ozgur
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Re: Announcement Problem

Postby ozgur » Sun Aug 31, 2008 9:07 pm

Hi James.

Thanks for your help.

I didnt change anything templates/header.tpl

mcrider
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Announcement Problem

Postby mcrider » Mon Sep 01, 2008 2:17 pm

Hi Ozgur,

If the code between {if $enableAnnouncementsHomepage}...{/if} is only executed when you delete the if statement, and you double checked that the home page announcement option is not enabled (in 'Website management' step 2.4), then there most likely is changes elsewhere in the code. Have you made any changes to, e.g. pages/announcement/AnnouncementHandler.inc.php?

Also, if you could post more detailed debug information, we might have a better idea of whats going on--Could you set the "debug" and "show_stacktrace" options in config.inc.php to "On"?

Thanks,
Matt

ozgur
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Re: Announcement Problem

Postby ozgur » Sun Sep 07, 2008 6:53 pm

Hi Matt,

I have set set the "debug" and "show_stacktrace" options in config.inc.php to "On".

Please check the following link:

http://www.gcgw.org/gcgw09/index.php?conference=gcgw09&schedConf=gcgw09

I haven't made any changes to pages/announcement/AnnouncementHandler.inc.php

Thank you very much for your help!


Return to “OCS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest