Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#196 2007-03-12 18:00:54
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Hello All,
This is a hefty post…bear with me. : )
I’m looking for a way to do something very similar to what JMK posted:
JMK Wrote:
Is there a more elegant solution to showing a list of all events taking place this year
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-01-01” date_to=“2007-01-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-02-01” date_to=“2007-02-28” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-03-01” date_to=“2007-03-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-04-01” date_to=“2007-04-30” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-05-01” date_to=“2007-05-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-06-01” date_to=“2007-06-30” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-07-01” date_to=“2007-07-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-08-01” date_to=“2007-08-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-09-01” date_to=“2007-09-30” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-12-01” date_to=“2007-10-31” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-12-01” date_to=“2007-11-30” />
<tag>Month</tag>
<txp:zem_event_list date_from=“2007-12-01” date_to=“2007-12-31” />
This works well…except when listings start running into the next year.
(like right now, I already have events for Jan and Feb of 2008).
Which means if you use the method above, you have to keep reordering the list after each month passes, or make a giant list of date ranges for several years in advance.
Not really a viable solution for sites that get turned over to clients to maintain.
Here’s a thought:
Add 2 new attributes to zem_event_list:
<txp:zem_event_list listby=“month” remove=“1” sort=“zem_event_date.event_date asc” />
listby is a fictional tag that would output events by month starting with the current month.
remove is another fictional tag that could be set to remove individual events after their dates pass or leave them.
Not sure how to address recurring events that span multiple months? (like a theatre event or art exhibition)
Maybe all of this can already be done with existing tags…I could be totally overthinking this.
Just putting some thoughts out there…
Any Ideas?
—
Tom
Last edited by renobird (2007-03-12 18:02:20)
Offline
#197 2007-03-12 22:36:54
- jmk
- Member
- Registered: 2006-09-04
- Posts: 49
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
you are, if i may be so blunt, really overthinking it. it is really rather easy.
the default configuration of zem_event_list is to start from today and go all the way to the end. which also means that it automatically shows only events in the future.
now if you add to the zem_event_display form this really wonderful tag
<txp:if_different><txp:zem_event_date format="%B" class="" wraptag="" /></txp:if_different>
then you will have a line above an event saying the respective month, but only if it has changed from the previous. so in effect it is doing what i (and what i gathered. you too) want.
Last edited by jmk (2007-03-12 22:39:11)
Offline
#198 2007-03-13 04:32:59
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
jmk,
Thanks! I didn’t know about the <txp:if_different> tag…that’s pretty sweet.
I’ll check it out and see if it does what I need.
I figured I was over thinking it…sometimes the simple solution is the most difficult to see. : )
Cheers Mate.
thanks again for the help.
—
Tom
Offline
#199 2007-03-13 13:38:59
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Okay, good people with Zem_Event interest. This plugin is taking a leap. I hope.
I present you with Zem_Event_Code, which is really nothing more than the open code for Zem_Event. Why are we doing this? Well, because while we are waiting for Alex to get back in touch with me about bug squarshing (we have $250 raised for that project), we can think about moving forward with this plugin in a new way.
Open Invitation:
I would like anybody who is skilled in PHP, or knows people who are to work with this code to produce a stronger more extensive plugin. The Google Code project presents this as an opportunity. There have been several snippets of new PHP code in this thread already, all of which I believe deserve a spot in the plugin.
Lets see where this goes :)
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#200 2007-03-13 15:22:35
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Matt,
That’s great news about Zem_Event_Code!
I wish I had the skills to help.
Matt and JMK,
<txp:if_different /> is awesome! Works perfectly.
I see now that I should have read JMK’s post on navigation by years a bit more carefully.
You had already posted the solution I needed…I just missed it.
Cheers to you both.
—
Renobird.out
P.S. The site I’m working on has a pretty extensive events calendar, I’ll be sure to post a link when it’s done.
I don’t know how I could have done it without this plugin.
Offline
#201 2007-03-16 01:56:52
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
I’ve just started a tentative patch to add auto_delete (events/articles or both) capabilty to zem_event, the patch at present goes as follows:
--- zem_event-0.30.orig 2007-03-15 18:43:58.000000000 -0700
+++ zem_event-0.30.new 2007-03-15 18:43:58.000000000 -0700
@@ -113,7 +113,13 @@
if (!in_array('repeat_to',$cal))
safe_alter('zem_event_calendar', 'add repeat_to date default null');
+//add event and-or entry delete (article and event data) status fields
+ if (!in_array('delete_entry',$cal))
+ safe_alter('zem_event_calendar', 'add delete_entry tinyint(2) default 0');
+ if (!in_array('delete_event',$cal))
+ safe_alter('zem_event_calendar', 'add delete_event tinyint(2) default 0');
+
if (!safe_row('id', 'txp_category', "type = 'event' and name = 'root'")) {
safe_insert('txp_category', "type = 'event', name = 'root', title = 'root'");
}
Would this be the kind of thing you are going to put on zem_event_code?
Offline
#202 2007-03-16 02:15:47
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Rick,
I would think so, can you explain further? Implementation from the write screen? Or auto delete about event date passed?
Just making sure I understand?
What would the att look like?
And THANKS for starting off our contributions to the zem_event plugin, that’s great!
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#203 2007-03-16 02:45:51
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Rick,
I think this is exactly what we had in mind. You can attach the patch to an issue if you want (you just need a google login) or we can set you up with svn commit access.
Oh you can also anonymously checkout from SVN it would probably ensure the patch applies seamlessly.
Last edited by hakjoon (2007-03-16 02:47:52)
Shoving is the answer – pusher robot
Offline
#204 2007-03-16 03:16:28
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Mathew – The general idea is to add two checkmark controls to the write screen and save the result to the new database fields when the article and event is saved; from there a function or plugin could be written to use those field contents to auto delete events or articles and events when the event has passed.
hakjoon – Not having used svn before I’m not sure how comfortable I would be with commit access, perhaps when the patch is presentable. Is my Google login enough or would I need something specific to zem_event_code?
For any that may be asking the same question, my google gmail login was enough.
Last edited by rsilletti (2007-03-16 03:22:35)
Offline
#205 2007-03-16 03:20:03
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Google login is enough. We can start off with patches and then as you feel more confortable you can get more power.
Are you on windows or on Mac/*nix? If on Windows TortoiseSVN makes it pretty easy.
Shoving is the answer – pusher robot
Offline
#206 2007-03-16 03:28:09
- rsilletti
- Moderator

- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
I’m using a Mac with OSX 10.2.8, I’m generating diff files with rvm_plugin_diff. I have Fedora on a laptop, but it has modem problems.
Offline
#207 2007-03-16 11:10:13
- two7s_clash
- Member

- From: VA
- Registered: 2007-02-13
- Posts: 15
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Hola-
I’m using zem event with great glee and due appreciation. I am trying to do something a odd with the mini display… I want to display multiple instances, say maybe the past, current, and previous month. Or a separate mini cal for everymonth for now until the beginning of the year. Feasible?
Existing is plagiarism.
Offline
#208 2007-03-16 11:30:44
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
two7s,
Don’t know :), never tried it.
Give it a go with the date parameters.
FYI: there are some outstanding bugs to be fixed on the minical. Should be around the corner.
:)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#209 2007-03-16 11:41:06
- producemedia
- New Member
- Registered: 2007-02-21
- Posts: 9
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
Just a quick question.
Does the event description field support textile?
I would like to add images to the description.
Offline
#210 2007-03-16 13:35:09
Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]
producemedia,
best way to find out is too try it :)
It was textile enabled, though I don’t know if that includes images?
That might be a neat way of making an thumbnail styled calendar?
M
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline