treehouse : what would you like to learn today?
Web Design Web Development iOS Development

PHP Coding issue

  • Hi,

    I recently used Perch to create a site and have had numerous problems with the extra applications like gallery, calendar and events. I thought I had sorted everything out but now I have noticed that for some reason the events listing is being divided up into past and future events, with all the past events being displayed correctly and all the future events being displayed in the background. Can anyone help me figure out how to display all the events in the centeral scroll panel.

    http://www.tavcafe.com/events.php

    Here is the code I used:

    <?php include('perch/runtime.php');?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    http://www.w3.org/1999/xhtml">

    TAV Cafe - Events

    div.scroll

    {

    background-color:transparent;

    position:absolute;

    left:380px; top:200px;

    width:600px;

    height:550px;

    z-index:3;

    font-family: Skia, CallunaSans-Regular;

    font-size:16px;

    color:#a76d2f;

    line-height:140%;

    word-spacing:1px;

    overflow:scroll;

    }

    <?php $opts = array( 'filter'=>'eventDateTime', 'match'=>'eqbetween', 'category'=>array('gigs', 'Events'), 'sort'=>eventDateTime, 'sort-order'=> ASC, 'display'=>date, 'value'=>$_GET['id'], 'template'=>'events/listing/event-day.html', ); perch_events_custom($opts); ?>

  • Can you post your event-day.html template as well.

  • Hi Andy,

    I have tried several times to post the event-day.html template code but for some reason when I hit post the text posted is not what I have pasted into the text box. I can't work out what is going on!!

    Ren

  • <perch:before>
      <li>
          <span class="day"><perch:events id="eventDateTime" format="j" /></span>
          <ul>
    

    a rel="nofollow" href="/event-detail.php?id=

    ">... span class="value-title" title=""> - span class="value-title" title=""> - span class="event summary ">
                  <perch:if exists="image">
          <img src="<perch:events id="image" type="image" label="Image" width="340" crop="true" />" alt="<perch:events id="eventTitle" />" />
      </perch:if>
      <perch:if exists="eventTitle">
      <perch:events id="heading" type="text" label="Heading" required="true"
      </perch:if>
      <perch:events id="event_date" type="date" label="Date of event" format="%A, %e %B %Y" />
              </li>
    


  • that worked!

  • My document is not valid. What I don't understand is why is there so many closing tag errors? What does this mean? Why aren't they closed properly?

    http://validator.w3.org/check?uri=http://www.tavcafe.com/events.php&amp;charset=(detect+automatically)&amp;doctype=Inline&amp;group=0