Re: [Radiant] Page Event Extension

2009-11-26 Thread subsorama

On 24 Nov 2009, at 22:10, subsor...@gmail.com wrote:

 It looks like it filters the events by date in the same manner as the blog 
 archive page type filters blog posts by date. 

Just replying to myself incase this proves useful for anyone. 

The Archive Events page does indeed work like the Standard Archive page types 
and allow you to list events filtered by start_date, however the tags for the 
Event Day page seem to return events for the entire month, instead of for a 
single day, instead of what the archive title indicates. 

Here are some amendments to the event_day_index_page.rb page that seem to 
correct that and list events just for a single day. 

  class  ArchiveFinder
def event_day_finder(finder, year, month, day)
  new do |method, options|
start = Time.local(year, month, day)
finish = start.tomorrow
add_condition(options, event_datetime_start = ? and 
event_datetime_start  ?, start, finish)
finder.find(method, options)
  end
end
  end

  tag archive:children do |tag|
year, month, day = $1, $2, $3 if request_uri =~ 
%r{/(\d{4})/(\d{2})/(\d{2})/?$}
tag.locals.children = ArchiveFinder.event_day_finder(parent.children, year, 
month, day)
tag.expand
  end

  tag archive:unless_children do |tag|
year, month, day = $1, $2, $3 if request_uri =~ 
%r{/(\d{4})/(\d{2})/(\d{2})/?$}
if ArchiveFinder.event_day_finder(parent.children, year, month, 
day).find(:all).empty?
  tag.expand
end
  end

The only trouble with this is that it limits all events pages to be the 
children of the Events Archive page.


Another way to list all events for a single day in the future is to use the 
route handlers extension and filter the events by url/date:

Route: route\/(\d{4})/(\d{2})/(\d{2})/?$
Fields: start_year,  start_month,  start_day

Although this means creating a page for each month of the year...


Does anyone know of a good trick to find all children of the root instead of 
using parent.children?
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Page Event Extension

2009-11-24 Thread subsorama
Hello, 

I was just taking a look at the Page Event Extension and wondered if anyone 
knew what the day, month, season and year pages were and how they worked?

Are they like archive pages in that the grab the url in order to display events 
for that date? What tags enable you to do this - the only ones I see look like 
they require the dates manually setting...

Also does anyone know what the season page is and why it only looks like it has 
two seasons -presumably these are months?

Looks like a really interesting extension, would love to hear from people about 
how it works. 

Thanks, 

Dominic
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread Anton Aylward
subsor...@gmail.com said the following on 11/24/2009 10:03 AM:
 Hello,
 
 I was just taking a look at the Page Event Extension and wondered if
 anyone knew what the day, month, season and year pages were and how
 they worked?

Try installing it  and you'll see that these are fields added to pages

The 'calendar' is a dedicated page.

 Looks like a really interesting extension, would love to hear from
 people about how it works.

it works real well.  Just follow the instructions.


-- 
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Knuth
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread subsorama
Hmm, 

How do you list the shows via the archives?

I can see r:events:in_range:each but that requires start=/mm/dd 
manually specified in the tag. 

r:events:upcoming:each limit=10 just seems to list all upcoming events but 
is not scoped to the date in the archive...

Is creating a simple list of events scoped by month/day possible?



On 24 Nov 2009, at 15:31, Anton Aylward wrote:

 subsor...@gmail.com said the following on 11/24/2009 10:03 AM:
 Hello,
 
 I was just taking a look at the Page Event Extension and wondered if
 anyone knew what the day, month, season and year pages were and how
 they worked?
 
 Try installing it  and you'll see that these are fields added to pages
 
 The 'calendar' is a dedicated page.
 
 Looks like a really interesting extension, would love to hear from
 people about how it works.
 
 it works real well.  Just follow the instructions.
 
 
 -- 
 Beware of bugs in the above code; I have only proved it correct, not
 tried it. -- Knuth
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread Anton Aylward
subsor...@gmail.com said the following on 11/24/2009 11:53 AM:
 Hmm,
 
 How do you list the shows via the archives?
 
 I can see r:events:in_range:each but that requires
 start=/mm/dd manually specified in the tag.
 
 r:events:upcoming:each limit=10 just seems to list all upcoming
 events but is not scoped to the date in the archive...
 
 Is creating a simple list of events scoped by month/day possible?

We're talking at cross purposes, then.

The Page Event archive is quite separate from the Archive.
Its for events that appear in the calendar.  Presentations, meetings,
trade shows, things like that.

Think C*A*L*E*N*D*A*R

You have fields on those pages that say when the EVENT is to occur, and
that has nothing to do with when the page was written, published or updated.

I presume you don't mean shows in your sentence in that sense.
Its about shows as a noun, trade SHOWS, theatrical SHOWS, not as the verb.

The Archive ties in with when the page was published, as in a Blog.
Its quite separate and nothing to do with this plugin.


I'm using Page Event for a site that has no blogging.  The upcoming
Events section take the next 3 from the /events.  Which is what its
supposed to do.

I think you have the wrong idea of what this is for.

Think in terms of a CALENDAR of events.
Now, instead of the matrix of the calendar, 28. 29, 30 or 31 days per
page, think in terms of a linear list that may be over more than one
page of the calendar, as might be the case with a once-a-month event.

Think C*A*L*E*N*D*A*R


-- 
It's not a good idea to believe anything about security when read
in the mass media.  by the time it gets there it is usually
sensationalized to the point where it's more about hype and
marketing than anything else.
   - Ryan Permeh [ta...@millcomm.com] on Vuln-Dev
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread subsorama
Sorry I should have been clearer, by shows I did mean events and by archives I 
meant the additional page types this extension adds:

http://github.com/mghaught/radiant-page-event/tree/master/app/models/

e.g. event_archive_page.rb, event_month_index_page.rb, event_day_index_page.rb 
etc

I understand I can list all future events, I also understand I can have a 
calendar but you can reveal more detailed event information in a list (a short 
description, content parts etc). I'd like to be able to have a *list* of all 
upcoming events but scoped to a certain month or a certain day.

I saw that this could be done manually with the r:events:in_range:each 
start=/mm  finish=/mm tag for each month but it would get 
impossible to manage on a more granular level for each day of the year. As I 
saw this extension added additional page types I simply wanted to know if 
anyone knew how they worked and what they added; they don't seem to alter the 
calendar behaviour and my first thought was that they would organise events by 
year/month/day just like the archive extension does for blog pages.

I've just been poking around with it some more and it seems that the 'event 
month index page' does seem to have gained at least some of this functionality. 

r:archive:children:eachr:link /br //r:archive:children:each 

This seems to list events starting in the month (defined by url) but only 
events starting in that month and not events that carry over from the end of 
the previous month, those are only listed on the month they started - I'm not 
sure of its functionality

I'm confused at to what these additional page types actually do...?

Cheers, 

Dominic



On 24 Nov 2009, at 17:43, Anton Aylward wrote:

 subsor...@gmail.com said the following on 11/24/2009 11:53 AM:
 Hmm,
 
 How do you list the shows via the archives?
 
 I can see r:events:in_range:each but that requires
 start=/mm/dd manually specified in the tag.
 
 r:events:upcoming:each limit=10 just seems to list all upcoming
 events but is not scoped to the date in the archive...
 
 Is creating a simple list of events scoped by month/day possible?
 
 We're talking at cross purposes, then.
 
 The Page Event archive is quite separate from the Archive.
 Its for events that appear in the calendar.  Presentations, meetings,
 trade shows, things like that.
 
 Think C*A*L*E*N*D*A*R
 
 You have fields on those pages that say when the EVENT is to occur, and
 that has nothing to do with when the page was written, published or updated.
 
 I presume you don't mean shows in your sentence in that sense.
 Its about shows as a noun, trade SHOWS, theatrical SHOWS, not as the verb.
 
 The Archive ties in with when the page was published, as in a Blog.
 Its quite separate and nothing to do with this plugin.
 
 
 I'm using Page Event for a site that has no blogging.  The upcoming
 Events section take the next 3 from the /events.  Which is what its
 supposed to do.
 
 I think you have the wrong idea of what this is for.
 
 Think in terms of a CALENDAR of events.
 Now, instead of the matrix of the calendar, 28. 29, 30 or 31 days per
 page, think in terms of a linear list that may be over more than one
 page of the calendar, as might be the case with a once-a-month event.
 
 Think C*A*L*E*N*D*A*R
 
 
 -- 
 It's not a good idea to believe anything about security when read
 in the mass media.  by the time it gets there it is usually
 sensationalized to the point where it's more about hype and
 marketing than anything else.
   - Ryan Permeh [ta...@millcomm.com] on Vuln-Dev
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread Anton Aylward
subsor...@gmail.com said the following on 11/24/2009 03:04 PM:

 
 I'm confused at to what these additional page types actually do...?

You've got me confused now.
Which extensions are you talking about?

you're refering to

r:archive 
and
r:events ...

Those are two separate extensions.  The first comes with the basic
Radiant - check the gem if you haven't frozen it into your working tree.

The second is a separate plugin that you download and install manually.

The Radiant core archive code  extracts the Archive pages from their
original place in the Radiant distribution.

Pages of page-type=archive are intended to provide behaviour similar to
a blog archive or a news archive. Child page URLs are altered to be in
%Y/%m/%d format (2004/05/06).

Looking at the code of the archive extension I see that its based on
date published, as you would expect or a blog.

The Page Event code adds extra fields and its operation is based on
those extra fields.

The Archive is based on each page having one specific date.

The Page Event is oriented around the idea of a calendar, so that means
an event may have a start data and an end date, as would be the case for
a conference, a trade show or a Broadway show.

They are two completely different things with different objectives.

Trying to use them together is going to tie you into knots.

-- 
The art of progress is to preserve order amid change and to preserve
change amid order.
--Alfred North Whitehead
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Page Event Extension

2009-11-24 Thread subsorama
I'm referring to the the Page Events Extension that I linked to:

http://github.com/mghaught/radiant-page-event

As well as the event and calendar support it extends radiant by also adding 
several pages types, 

event_archive_page.rb, event_month_index_page.rb, event_day_index_page.rb etc.

These look similar to the page types added by the Archive extensions but are 
added by the Page Event Extension - they are not added by the Archive 
extension. In the admin area on any particular page, for the page type you can 
choose Event Archive, Event Month Index, Event Day Index ... as well as the 
selections for the Blog extension; Archive, Archive Month Index, Archive Day 
Index. 

Two different things. 

It looks like it filters the events by date in the same manner as the blog 
archive page type filters blog posts by date. 

You can filter manually with the r:events:in_range:each tag. I'd like to know 
if you can filter based on the url like the page types suggest and what these 
page types do?



On 24 Nov 2009, at 21:42, Anton Aylward wrote:

 subsor...@gmail.com said the following on 11/24/2009 03:04 PM:
 
 
 I'm confused at to what these additional page types actually do...?
 
 You've got me confused now.
 Which extensions are you talking about?
 
 you're refering to
 
 r:archive 
 and
 r:events ...
 
 Those are two separate extensions.  The first comes with the basic
 Radiant - check the gem if you haven't frozen it into your working tree.
 
 The second is a separate plugin that you download and install manually.
 
 The Radiant core archive code  extracts the Archive pages from their
 original place in the Radiant distribution.
 
 Pages of page-type=archive are intended to provide behaviour similar to
 a blog archive or a news archive. Child page URLs are altered to be in
 %Y/%m/%d format (2004/05/06).
 
 Looking at the code of the archive extension I see that its based on
 date published, as you would expect or a blog.
 
 The Page Event code adds extra fields and its operation is based on
 those extra fields.
 
 The Archive is based on each page having one specific date.
 
 The Page Event is oriented around the idea of a calendar, so that means
 an event may have a start data and an end date, as would be the case for
 a conference, a trade show or a Broadway show.
 
 They are two completely different things with different objectives.
 
 Trying to use them together is going to tie you into knots.
 
 -- 
 The art of progress is to preserve order amid change and to preserve
 change amid order.
--Alfred North Whitehead
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant