2 of 3
2
Calendar Enhancements
Posted: 10 June 2008 03:58 PM   [ Ignore ]   [ # 19 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

As good as EE is, I find it pretty unfathomable that you can’t access the custom fields in the calendar view.  In my opinion this is mandatory, WHY!!!??  Does Mr. Wilson’s hack still work, for all I can tell that file has changed drastically. Please do this asap, or let me know if there is a workaround for 1.6.3

Profile
 
 
Posted: 10 June 2008 04:03 PM   [ Ignore ]   [ # 20 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

It’s strictly a performance issue, tcfleck.  For some data sets, it wouldn’t cause a problem, but for content-heavy sites with frequent entry intervals (say a news site as an example, with 30+ articles per day), then fetching that much data (nearly 900 entries) could be unpleasantly intensive, particularly since the calendar in most cases does not even make up the primary content of the page.

 Signature 
Profile
MSG
 
 
Posted: 10 June 2008 04:08 PM   [ Ignore ]   [ # 21 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

Okay but that doesn’t exclude the necessity to allow people (not running news sites) who would like to have a upcoming event calendar, to display custom fields related to each event.

If there is a workaround that works with EE 1.6.3 I will gladly shut up about this and use it. I just can’t find one.

Profile
 
 
Posted: 10 June 2008 04:13 PM   [ Ignore ]   [ # 22 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

You could always use an embedded template and pass the entry_id to a streamlined weblog entries tag (or even the query module for a truly lightweight approach if you don’t mind referencing the field_id_# directly).  If your dataset is light, and you implement caching mechanisms appropriately, it could be a perfectly acceptable solution.

 Signature 
Profile
MSG
 
 
Posted: 10 June 2008 04:26 PM   [ Ignore ]   [ # 23 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

I’m not a php wiz.  Could you expand on what this would entail.  Heres an example of the type of thing I would like:


http://www.nectarlounge.com/calendar.html


Since the rest of the site I am developing is in ee, it seems perfectly reasonable for ee to handle this.

Profile
 
 
Posted: 10 June 2008 04:32 PM   [ Ignore ]   [ # 24 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

My suggestion would not use PHP at all, simply the embed tag with an embed variable to pass the {entry_id} from the calendar tag to the embedded template.

{embed="foo/bar" entry_id="{entry_id}"}

The embedded template could contain either a weblog entries tag, using the entry_id= parameter with the embedded variable:

{exp:weblog:entries weblog="foo" dynamic="off" entry_id="{embed:entry_id}" disable="categories|member_data|pagination|trackbacks"}

Or the query module, which would use a direct SQL query:

{exp:query sql="SELECT field_id_42 AS my_field FROM exp_weblog_data WHERE entry_id = '{embed:entry_id}' LIMIT 1"}
    {my_field}
{
/exp:query}

 Signature 
Profile
MSG
 
 
Posted: 10 June 2008 04:36 PM   [ Ignore ]   [ # 25 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

I think I follow. How would I then get that to output to the calendar tag.

Profile
 
 
Posted: 10 June 2008 05:07 PM   [ Ignore ]   [ # 26 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

The embed tag would go inside your calendar tag on the parent template, within the {entries} tag pair.

 Signature 
Profile
MSG
 
 
Posted: 10 June 2008 05:11 PM   [ Ignore ]   [ # 27 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

Oh that seems preeeety simple.  I’ll try it this evening and see if I can get it to work. Thanks.

Profile
 
 
Posted: 11 June 2008 11:34 AM   [ Ignore ]   [ # 28 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

DEREK! MY BUDDY! you sir are a genius, it works flawlessly.  Thank you much.

Profile
 
 
Posted: 11 June 2008 12:57 PM   [ Ignore ]   [ # 29 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

Okay now I have a different problem, perhaps more severe.  When I do this, the future entries do not show up.
If I use the embed, it only respects past, and present events.  Any ideas?

Profile
 
 
Posted: 11 June 2008 01:53 PM   [ Ignore ]   [ # 30 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

Glad to be of assistance, tcfleck.  What is the full code you are using in the embedded template?

 Signature 
Profile
MSG
 
 
Posted: 11 June 2008 01:55 PM   [ Ignore ]   [ # 31 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

{exp:weblog:entries site="##" weblog="event" entry_id="{embed:entry_id}"}
<h3><a href="{title_permalink=events/index}">{title}</a></h3>
<
h4>{cf-supporting}</h4>
{related_entries id="cf-venue"}
<a href="{title_permalink=venues/index}">{title}</a>
{/related_entries}
{
/exp:weblog:entries}

Profile
 
 
Posted: 11 June 2008 03:03 PM   [ Ignore ]   [ # 32 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

nevermind you need the show_future_entries on the entries tag in the embedded template

Profile
 
 
Posted: 11 June 2008 03:40 PM   [ Ignore ]   [ # 33 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15867
Joined  06-03-2002

Correct, and I would add the dynamic= and disable= parameters too, as demonstrated in my sample tag above.

 Signature 
Profile
MSG
 
 
Posted: 11 June 2008 03:45 PM   [ Ignore ]   [ # 34 ]  
Summer Student
Total Posts:  19
Joined  09-19-2007

Will do.  Thats for performance correct?

Profile
 
 
Posted: 11 June 2008 03:54 PM   [ Ignore ]   [ # 35 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15484
Joined  05-15-2004

The disable one, yes. dynmiac=“off” will ensure that that nothing in the URL will actually override the tag.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 04 September 2008 01:56 AM   [ Ignore ]   [ # 36 ]  
Grad Student
Rank
Total Posts:  75
Joined  09-26-2005

Any chance I can get help with a similar query to Derek’s above, but more complex?

I’m using the Free Form plugin from Solspace to setup a standalone edit form, and I’m using the Multiple Site Manager as well, to create several nearly identical sites, each with a calendar, among other things.

So, instead of using Status to allow members to close events via the SAEditF, which won’t work because Free Form is not able to work properly with the MSM, I’m using a custom field which basically says, Close this Event? And if the member selects “Yes,” the entry does not display.

Anyway, I still need to display the title in the calendar, so I need the query to get the title from one table, and the custom field value from the other table.

And, since I suck at MySQL, I’m asking for help with this query.

Any takers?

Thanks in advance!
Ken

Profile
 
 
   
2 of 3
2
 
‹‹ Plugin Editor      {path=logout} parameter ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65074 Total Logged-in Users: 25
Total Topics: 82207 Total Anonymous Users: 15
Total Replies: 441811 Total Guests: 184
Total Posts: 524018    
Members ( View Memberlist )
Newest Members:  mackskithbtggAdminempoleongwishPasha MahardikarmarkdurandomcatClutch BearingsAdil