We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problems with using Repeet with the calendar

Development and Programming

redbloc's avatar
redbloc
24 posts
16 years ago
redbloc's avatar redbloc

Hey all, I’m building a calendar / timetable using the calendar function with the Repeet plugin. Rather than just having a title and link of the post in the calaendar, I’m putting the data from the post there, using this:

{exp:weblog:entries weblog="schedule" year="{segment_2}" month="{segment_3}"  day="{day_number}" limit="5" orderby="classtime"}

However, the day=”{day_number}” is causing this error message.

Warning: mktime() expects parameter 5 to be long, string given in D:\Domains\happobiken.com\wwwroot\ninja\modules\weblog\mod.weblog.php on line 1833
Warning: mktime() expects parameter 5 to be long, string given in D:\Domains\happobiken.com\wwwroot\ninja\modules\weblog\mod.weblog.php on line 1834

Anyone got any ideas? Here’s the entire code… Any help would be appreciated.

{exp:repeet:get_ids weblog="schedule" parse="inward" calendar="yes"}
{exp:repeet:calendar weblog="schedule"  interval_field="event_repeat" include_field="event_dates" exclude_field="exclude_dates" switch="calendarToday|calendarCell" entry_id="{repeet:entry_ids}" show_future_entries="yes" show_expired="yes"}

<table class="calendarBG" border="0" cellpadding: "6" cellspacing="1" summary="Monthly Schedule">
      <tr class="calendarHeader">
         <th colspan="7"><a href="http://www.happobiken.com/index.php?/schedule/{date" title="View all events in {date format=">{date format="%F %Y"}</a></th>
      </tr>
      <tr>
        {calendar_heading}
        <td class="calendarDayHeading">{lang:weekday_abrev}</td>
        {/calendar_heading}
      </tr>
      {calendar_rows }
      {row_start}<tr class="calendarRow">{/row_start}
        {if entries}
        <td class='{switch}' >{day_number}

{exp:weblog:entries weblog="schedule" year="{segment_2}" month="{segment_3}"  day="{day_number}" limit="5" orderby="classtime"}
<div class="calendarEvent">{title}
with {teacher}

{segment_2}
{if classtime !=""}
{classtime}
{/if}
</div>
{/exp:weblog:entries}
</td>
        {/if}
        {if not_entries}
        <td class='{switch}' >{day_number}</td>
        {/if}
        {if blank}
        <td class='calendarBlank'> </td>
        {/if}
      {row_end}</tr>{/row_end}
    {/calendar_rows}
    <tr class="calendarMonthLinks">
       <td colspan="3">
         <div class="calendarPrevMonth"><a href="http://www.happobiken.com/index.php?/schedule/{previous_date"><< {previous_date format="%M %Y"}</a></div>
       </td>
       <td></td>
       <td colspan="3">
         <div class="calendarNextMonth"><a href="http://www.happobiken.com/index.php?/schedule/{next_date">{next_date format="%M %Y"} >></a></div>
       </td>
     </tr>
   </table>
  {/exp:repeet:calendar}
{/exp:repeet:get_ids}
       
redbloc's avatar
redbloc
24 posts
16 years ago
redbloc's avatar redbloc

Anyone? Bueller? Bueller?

       
Mr. Wilson's avatar
Mr. Wilson
131 posts
16 years ago
Mr. Wilson's avatar Mr. Wilson

That doesn’t look like a Repeet problem, per se. Note that the error messages are coming from the Weblog module. I suspect you are running into a parse order problem. If that is, indeed, what is happening, you might try something like:

<td class='{switch}' >{day_number}
{embed="calendar/.day_inner" day_number="{day_number}"}
</td>

And then in the calendar/.day_inner template:

{exp:weblog:entries weblog="schedule" year="{segment_2}" month="{segment_3}"  day="{embed:day_number}" limit="5" orderby="classtime"}
<div class="calendarEvent">{title}
with {teacher}

{segment_2}
{if classtime !=""}
{classtime}
{/if}
</div>
{/exp:weblog:entries}

Untested, off-the-top-of-my-head.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.