Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#451 2007-09-11 09:07:31

kevinmcdougall
Member
Registered: 2007-02-08
Posts: 55

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

zem_event is a fantastic TXP plugin! Though I do find it a bit tricky at times.

I’m having trouble with the zem_event_list tag, I’m using it in two locations on the page, once as a sidebar showing a selection of events, and once in the main body to display a list of events within the currently browsed section/category.

Problem is that the pagination for one seems to overide the other. The sidebar is displaying a selection of 4 events without any pagination being displayed, while the main body displays a paginated list, but the pagination being displayed refers to the sidebar list and not the main body ie. I know there are only 2 events in a particular section and category, yet the pagination being displayed refers to all events as filtered by the criteria in the sidebar.

Anyone know how to overcome this?

Offline

#452 2007-09-13 18:37:51

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I am trying to format zem_event_time and I have read over http://php.net/strftime but still can’t get what I want.

For example, I want my time to be: 8:30 not 08:30 . Better yet 8:30 PM.

Can you tell zem_event_time to just output what is placed in the start and finish times as text?


Art Rogue – Fine Art Photography

Offline

#453 2007-09-16 13:02:04

sisushka
Member
Registered: 2007-07-30
Posts: 14

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hello,

I hope you could help me.
I’m having problems with highlighting the upcoming events as well as the past ones in a minicalendar. I used the mini-calnedar example from demo site, I specified the class full in my css but it doesn’t change anything.

Have you any ideas what might have caused it?

Thanks in advance.

- S.

Offline

#454 2007-09-17 01:23:06

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

matt – what server you on?

on windows server I use format="%#I:%M%p" successfully to get 8:30pm

see this comment regarding the “#” flag:
http://au.php.net/manual/en/function.strftime.php#46315

Offline

#455 2007-09-17 02:16:38

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I’m on Media Temple.


Art Rogue – Fine Art Photography

Offline

#456 2007-09-17 02:48:42

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

give that a go & report back!

Offline

#457 2007-09-17 02:59:25

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

<txp:zem_event_time format="%I:%M %p" /> worked fine.

The result is the following: 08:00 pm

I wish I could get rid of the 0 in front of the 8 though.

Last edited by mattmikulla (2007-09-17 03:01:12)


Art Rogue – Fine Art Photography

Offline

#458 2007-09-17 03:59:30

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

so %#I didn’t help there?

Offline

#459 2007-09-23 16:23:46

sisushka
Member
Registered: 2007-07-30
Posts: 14

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hello :)

Is there any way to have two different zem_event_calendars on site? I basically need the Slovak one (showing the slovak events) and the English one (showing the events written in English). How could I do two separate calendars? Any ideas, please?

Thankies in advance :)

Offline

#460 2007-09-29 11:00:42

sisushka
Member
Registered: 2007-07-30
Posts: 14

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Is there any way how to let only the articles from specified category to be displayed in zem_event_calendar? Does the atribute category work for zem_event_calendar?

Offline

#461 2007-10-03 06:19:35

cybikorpg
New Member
Registered: 2007-10-03
Posts: 1

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

If you know anything, please assist.

Hi! I need help. I have been looking for a week for a solution to this problem but no remedy as of now.

When I attempt to install the plugin zem_event to my textpattern i receive the error: “Badly formed or empty plugin code.”

Using any version of the plugin this occurs. I am running textpattern 4.0.4 and would downgrade if I could find an old version. It is important that I have a working calendar and zem seems like the best method for integrating a great one into textpattern. If anyone has suggestions or can fix the code, please post!

Thanks.

Last edited by cybikorpg (2007-10-09 17:09:07)

Offline

#462 2007-10-05 10:03:20

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hi all,

I’m still struggling to get zem_event to sort elements as I need. I’m using txp:zem_events_list to display a list of events and need everything to sort as follows:

  • Main heading (zem_event_category)
    • Sub heading 1 (Category1)
      • Sub heading 2 (zem_event_date.event_date)
        • Sub heading 3 (zem_event_date.event_time)

I’m using the txp:if_different tag to create information blocks in a table. The 3 sub heading are no problem, but I can’t get zem_event_category to be the main sort element. I’m using the following code:

sort="zem_event_category asc, Category1 asc, zem_event_date.event_date asc, zem_event_date.event_time asc"

But this returns the following error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource on line 290. The textbook entry for zem_event_list states “sort: This attribute’s value will be used as a SQL order by clause and can thus contain every table row of the textpattern database table followed by SQL sort order indications asc and desc respectively.”

Any help would be greatly appreciated.

Last edited by decoderltd (2007-10-15 17:09:43)

Offline

#463 2007-10-08 10:55:06

ettober
New Member
Registered: 2004-08-10
Posts: 5

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

hi!
I think I need some help… I’m trying to make work zem_event with MLP, I’m aware of the reported problem with mini_calendar but this is not a blocking problem for me, I’m just trying to display a list of event with infos on start/end dates/time and locations on a multilanguage site.
I get this: when I clone an event it loose all his event attributes, then when browsing the public area with my second language I can see my events displayed correctly with date and location but can’t get any event_name/permalink.

It’s just me? Is there some workaround to fix this?

Thanks in advance for your help!

Ettore
———-

txp 4.0.5, MLP l10n 0.6.600, zem_event 0.35, textdrive

Offline

#464 2007-10-15 12:30:43

infrarosso
New Member
Registered: 2007-10-15
Posts: 6

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I had a problem using minical_nav. Basically i wanted that not only the beginning day of an event would be highlighted but also all the days in between the start date and the end day. For doing that i (with a friend of mine, thx marco!) made a sort of hack on the plugin. Trying to debug that i realized that there was a problem in the firsts 9 days of each months, due to a formatting matter of the date itself. I don’t know if it was an incompatibility between the pluging and my hack but still, i solved it (actually marco did it :P) and that’s the result. If you want to use it, simply modify the plugin changing the old zem_event_mini_calendar function with that one. I hope it is clear ;)

function intervallo_giorni($from, $to){

  $efrom = explode("-", $from);
  $afrom = mktime(11, 00, 00, $efrom[1], $efrom[2], $efrom[0]);
  if (isset($to)) {
	  $eto = explode("-", $to);
	  $ato = mktime(11, 00, 00, $eto[1], $eto[2], $eto[0]);
  } else 
	{ $ato = $afrom;  }
  for($i=$afrom;$i<=$ato;$i=$i+86400){
    $w[] = date("Y-m-d", $i);
  }
  return $w;
}


function zem_event_mini_calendar($atts) {
	// a mini calendar intended as a navigation control for sidebars etc
	global $pretext;

	extract(lAtts(array(
		'table'       => 'table',
		'tr'          => 'tr',
		'td'          => 'td',
		'th'          => 'th',
		'caption'     => 'caption',
		'col'         => 'col',
		'colgroup'    => 'colgroup',
		'thead'       => 'thead',
		'tbody'       => 'tbody',
		'cellspacing' => '',

		'date'       => gps('date'),
		'class'       => __FUNCTION__,
		'class_row_num' => 'number',
		'class_row_day' => 'day',
		'class_event' => '',
		'class_empty' => '',
		'class_noday' => '',
		'class_link'  => '',
		'labeltag'    => 'h3',
		'section'     => @$pretext['s'],
	),$atts));

	$y = ''; $m = '';
	if ($date)
		@list($y, $m, $d) = split('-', $date);
	if (!is_numeric($y))
		$y = strftime('%Y');
	if (!is_numeric($m))
		$m = strftime('%m');

	// day number of the first of the month (Sunday = 0)
	$first = mktime(0,0,0,$m, 1, $y);
	$firstday = strftime('%w', $first);
	// number of days in the month
	$numdays = strftime('%d',strtotime('-1 day', strtotime('+1 month', $first)));

	$out = array();

	# caption
	$out[] = doTag(strftime('%B %Y', $first), 'caption');

	# column groups
	$row = array();
	for ($d=1; $d<=7; $d++)
		$row[] = doTag('', 'col', strftime('%a', mktime(0,0,0,$m, ($d+7-$firstday), $y)));
	$out[] = doTag(n.join(n, $row).n, 'colgroup');

	# table headings
	$row = array();
	for ($d=1; $d<=7; $d++)
		$row[] = doTag(strftime('%a', mktime(0,0,0,$m, ($d+7-$firstday), $y)), $th, '', ' scope="col"');
	$out[] = doTag(n.tr(n.join(n, $row).n).n, 'thead');

	$body = array();

	$numrows = ceil(($numdays + $firstday)/7);
	$days = array();
	$w = zem_event_timeq("$y-$m-01", "$y-$m-$numdays");
	$rs = safe_rows('zem_event_date.*', 'zem_event_calendar,zem_event_date,textpattern', 'zem_event_calendar.id=zem_event_date.event_id and zem_event_calendar.article_id = textpattern.ID and textpattern.Status >= 4 and textpattern.Posted <= now()');
	foreach ($rs as $r) {
		//added
		$ww = intervallo_giorni($r['event_date'], $r['finish_date']);
		foreach ($ww as $zz) {
			$days[$zz]=true;
		}
		//end Added
        //$days[$r['event_date']] = true;

	}

	# display each cell in the calendar, 7 x 5 grid
	for ($w=0; $w<$numrows; $w++) {
		$day_row = array();
		for ($d=1; $d<=7; $d++) {
			$daynum = ($w*7) + $d;
			$dayofmonth = $daynum - $firstday;

			if (checkdate($m, $dayofmonth, $y)) {
				// this is a real day
				$Odayofmonth = sprintf("%02s", $dayofmonth);
				if (isset($days["$y-$m-$Odayofmonth"])) {
					$url = '<a class="'.$class_link.'" href="'.pagelinkurl(array(
						'date' => "$y-$m-$dayofmonth",
						's'    =>$section,
						'c'    =>@$pretext['c'],
						'q'    =>@$pretext['q'],
					)).'">'.$dayofmonth.'</a>';

					$day_row[] = doTag($url, $td, $class_event);
				}
				else {
					$day_row[] = doTag($dayofmonth, $td, $class_empty);
				}
			}
			else {
				// just a blank to fill in the grid
				$day_row[] = doTag('&nbsp;', $td, $class_noday);
			}


		}
		$body[] = doTag(n.join(n, $day_row).n, $tr, $class_row_day);
	}

	$out[] = doTag(n.join(n, $body).n, 'tbody');

	return doTag(n.join(n, $out).n, $table, $class, ($cellspacing === '' ? '' : ' cellspacing="'.$cellspacing.'"'));
}

//p.s. forgive me but i'm still not able to use textile properly :(

Last edited by infrarosso (2007-10-15 12:34:04)

Offline

#465 2007-10-18 12:43:12

lreynolds
Member
From: Burlington, ON, Canada
Registered: 2007-02-09
Posts: 30
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I’m not sure if anyone is still looking, but after seeing the post about using # to remove the leading 0 in the time, I tried that, but it didn’t work. However, if i use %l for the time (l is a lower case L) it works great.

So, using format=”%l:%M%p” gets me 7:30pm. I’m on Dreamhost, so it is unix based.

Offline

Board footer

Powered by FluxBB