Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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>
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
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
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
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
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
).
Offline
#406 2009-11-17 15:37:08
- kevinpotts
- Member
- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
Re: smd_calendar: complete schedule / event / calendar / diary
Just as a general FYI, because I’m not sure what it means, my instance of <txp:smd_article_event />
was not hiding past calendar events. I tried specifying allspanned="0"
, but that did nothing. However, guessing this was based off <txp:article_custom />
, I tried time="future"
and it works — now only future events are displayed. The only caveat is that events that occur today are not shown.
Kevin
(graphicpush)
Offline
#407 2009-11-17 17:35:43
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_calendar: complete schedule / event / calendar / diary
RedFox wrote:
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!
Joop, would you mind posting a tag trace of page 3? At least the part that contains the smd_calendar tags and the pagination links?
Offline
#408 2009-11-18 11:36:40
Re: smd_calendar: complete schedule / event / calendar / diary
Joop, would you mind posting a tag trace of page 3? At least the part that contains the smd_calendar tags and the pagination links?
Else … do you mean this?
[edit]
Thanks uli!
Code is deleted!
And on /agenda/?pg=2
(3,4 too!) I get this error >
Tag foutmelding -> Textpattern Notice: De modelpagina agenda heeft nog geen txp:article tag on line 504
textpattern/publish.php:504 trigger_error()
index.php:33 textpattern()
[edit]
Oops … :%
Troubles with <txp:article_custom limit="1" section="agenda" status="sticky" form="singlenolink" />
… and everything ok with <txp:article limit="1" status="sticky" form="singlenolink" />
… how come?
[edit]
Shame on me … :%%%%% > textpattern.org/tips/337/article-vs-articlecustom
Last edited by RedFox (2009-11-18 16:50:02)
Offline