Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#391 2009-10-05 19:35:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

Re: smd_calendar: complete schedule / event / calendar / diary

RedFox wrote:

Is it possible to do paging to the next (or prev) month instead of 10 events (limit) or so?

Ooooh, now you’re asking. I don’t think so because it’s based on the TXP system of numerical limits. But there might be a way of doing it by faking the paging. You might have to make your own next/prev links based on adding ?pg=N to a link after you’ve found that you’ve reached the beginning of the next month / end of the previous month. It might not work, but it might be a way of simulating paging by month. I’m not sure if it’s actually possible to do in the plugin but it’s not a bad idea. I might take a look and see if I can manage it.

On next (or prev) page, the page doesn’t find the (rel path!) stylesheet … why is that?

It looks like the trailing slash on the next/prev links is causing the problem. agenda-list?pg=2 works but agenda-list/?pg=2 doesn’t. Can you alter those?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#392 2009-10-05 19:58:53

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: smd_calendar: complete schedule / event / calendar / diary

maniqui wrote:

Molly, 4.0.8 may be your TXP version, not your PHP version.
Check the diagnostics tabs.

Regarding how to switch to PHP5, some hostings provide the option to enable it on their control panel, or even adding a line to the .htaccess file. You should contact your hosting to check if that’s possible.

Molly, for example my diagnostics tab shows PHP version: 5.2.8 about 10 lines down.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#393 2009-10-05 20:17:35

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Bloke wrote:

I might take a look and see if I can manage it.

:)

Offline

#394 2009-10-05 20:43:56

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Bloke wrote:

It looks like the trailing slash on the next/prev links is causing the problem. agenda-list?pg=2 works but agenda-list/?pg=2 doesn’t. Can you alter those?

Oops … eh … no … or can I?

[edit]
With some support it’s working now > http://forum.textpattern.com/viewtopic.php?pid=218327 … :)

Last edited by RedFox (2009-10-27 13:11:48)

Offline

#395 2009-10-15 16:39:48

Josefin
Member
Registered: 2008-01-30
Posts: 18

Re: smd_calendar: complete schedule / event / calendar / diary

Hi!
I still havent fixed that todays date won´t show, it just makes an empty box for todays date (and it’s not the css, it’s actually empty)
I use the miniclone calender. This is what my code looks like:

<txp:smd_calendar section=“nat_kalendarium” cellform=“miniclone” id=“nat_kalendarium”> <txp:permlink><txp:smd_cal_info type=“day” /></txp:permlink>
</txp:smd_calendar>

Why does not todays date show?

Also: If i put two events on the same day, the calender will break up, because it will show the date for each event. How do I only show one date but all events if you click it?

Offline

#396 2009-10-15 16:57:03

molly
Member
From: Virginia
Registered: 2004-08-15
Posts: 44
Website

Re: smd_calendar: complete schedule / event / calendar / diary

molly wrote:

Hi Stef –

I have the latest version of your plugin (v 0.42c) running on this page:
http://www.beerrun.com/tasting-events-calendar

And I have 3 articles with a stepfield set up with “second sunday ?month ?year”, same goes for the third and fourth Sundays.

Something is wrong with November. The first Sunday is Nov. 1, but the articles are off by one week. The software seems to be missing the fact that November 1 is a Sunday.

What can I do about this? Thanks in advance!

Hi again Stef – I moved to a new server running php version 5.2.9. My “second sunday” entry is still appearing on the 3rd Sunday in November. Would be grateful for a fix! Thanks.

Last edited by molly (2009-10-15 16:59:50)

Offline

#397 2009-10-15 18:17:57

Josefin
Member
Registered: 2008-01-30
Posts: 18

Re: smd_calendar: complete schedule / event / calendar / diary

Josefin wrote:

Hi!
I still havent fixed that todays date won´t show, it just makes an empty box for todays date (and it’s not the css, it’s actually empty)
I use the miniclone calender. This is what my code looks like:

<txp:smd_calendar section=“nat_kalendarium” cellform=“miniclone” id=“nat_kalendarium”> <txp:permlink><txp:smd_cal_info type=“day” /></txp:permlink>
</txp:smd_calendar>

Why does not todays date show?

Also: If i put two events on the same day, the calender will break up, because it will show the date for each event. How do I only show one date but all events if you click it?
—-

Oh, I seem to have found the missing “today”. in: <txp:smd_if_cal flag=“event”> I had <txp:smd_if_cal flag=“SMD_ANY”> Wrong of me.

But I still cant figure out how to show a date only once, even if the day has two events. I have a miniclone calendar that highlights the dates that has events attached to them, but if I put two events on, lets say oct 20, the date will appare twice in the calendar.

Offline

#398 2009-10-27 13:21:38

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: smd_calendar: complete schedule / event / calendar / diary

The calendar (paging) is working fine at > http://dorpshuiswapse.nl/txp/agenda/ … although landing on the first ‘next’ page doesn’t give a link towards the next (?php=3) page … !? … and there are several other pages. What’s wrong here?

<txp:smd_article_event stepfield="custom_1" omitfield="custom_2" time="future" wraptag="table" limit="20" break="" section="agenda" eventlimit="52" paging="1">
<txp:if_different>
      	<tr>
        <th colspan="4"><txp:posted format="%B %Y" /></th>
     </tr>
</txp:if_different>
     <tr>
         <td><txp:posted format="%d" /></td>
         <td><txp:posted format="%a" /></td>
         <td><txp:title /></td>
         <td><txp:posted format="%H:%M" /> uur</td>
         <td><txp:custom_field name="agenda_mededeling" /></td>
     </tr>  
</txp:smd_article_event>
<p class="paging"><txp:newer showalways="1">prev</txp:newer> | <txp:older showalways="1">next</txp:older></p>

Thanks for any help!

Last edited by RedFox (2009-10-28 05:42:16)

Offline

#399 2009-11-04 08:23:13

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: smd_calendar: complete schedule / event / calendar / diary

Any news on an update?

Offline

#400 2009-11-14 10:23:48

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

Re: smd_calendar: complete schedule / event / calendar / diary

any chance anyone can post code examples of calendars or send me some and i’ll post so i can see different ways of displaying this calendar pleease? Small, Large, Full Calendars

Offline

#401 2009-11-14 10:29:42

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: smd_calendar: complete schedule / event / calendar / diary

I think Stef is really busy … anyone else something to say about my earlier post?

Last edited by RedFox (2009-11-14 10:30:19)

Offline

#402 2009-11-14 12:34:48

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: smd_calendar: complete schedule / event / calendar / diary

+ 1 for some examples !

Offline

#403 2009-11-14 16:03:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: smd_calendar: complete schedule / event / calendar / diary

RedFox wrote:

… anyone else something to say about my earlier post?

Joop, I can’t see the problem because I don’t see any paging?

Offline

#404 2009-11-14 16:20:35

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Joop, I can’t see the problem because I don’t see any paging?

Sorry! > http://dorpshuiswapse.nl/txp/agenda

The paging works towards ../agenda/?pg=3 and then ‘next’ isn’t a link anymore. And there are other pages … http://dorpshuiswapse.nl/txp/agenda/?pg=4 … etc!

Offline

#405 2009-11-14 20:43:42

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: smd_calendar: complete schedule / event / calendar / diary

There are some code examples on the plugin help.
I suggest just to use the size="large", even for creating mini-calendars.

And here some code examples:

A large calendar, using a cellform="calendar-cell" for displaying the day ({day}) and a list of that day’s events.

 <txp:smd_calendar section="termine" select="month" eventwraptag="li" cellform="calendar-cell" class="large" stepfield="custom_1" skipfield="custom_2" omitfield="custom_3" extrafield="custom_4" yearwidth="0, 5" />

Form “calendar-cell”

<h4>{day}</h4>
<txp:variable name="has_events" value='{events}' />
<txp:if_variable name="has_events" value="">
<txp:else />
<ul>{events}</ul>
</txp:if_variable>

A “fake” small calendar. I say “fake” because is a size="large" calendar fine-tuned to be rendered as a mini-cal, using the form small-calendar-cell.

<txp:smd_calendar size="large" section="test" select="month" class="small" stepfield="custom_1" skipfield="custom_2" omitfield="custom_3" extrafield="custom_4" showskipped="0" cellform="small-calendar-cell" />

Form “small-calendar-cell”:

<txp:variable name="has_events" value='{events}' />

<txp:smd_if field="{day}" operator="le" value="9">
  <txp:variable name="day" value="0{day}" />
<txp:else />
  <txp:variable name="day" value="{day}" />
</txp:smd_if>

<txp:smd_if field="{month}" operator="le" value="9">
  <txp:variable name="month" value="0{month}" />
<txp:else />
  <txp:variable name="month" value="{month}" />
</txp:smd_if>

<txp:if_variable name="has_events" value="">
  {day}
<txp:else />
  <a href="/events/?date={year}-<txp:variable name='month' />-<txp:variable name='day' />">{day}</a>
</txp:if_variable>

(there are some conditionals to recreate two-digit (%d) numbers and use them to create a functional link to that date on /events/ section, which will use an article_custom or an smd_article_event to display events for that day (?date).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB