Is it compatible with event 2.x ??

Comments

killes@www.drop.org’s picture

No, not yet.

killes@www.drop.org’s picture

Status: Active » Needs review
StatusFileSize
new10.11 KB

Here's a preliminary patch. needs the latest event 5.2. Needs lots of testing.

gracearoha’s picture

what does this patch do?

darren oh’s picture

Updates OG Calendar to work with the upcoming release of the Event module.

gracearoha’s picture

I used the patch on og_calendar 5x.2x-dev (dec 18)

and received the following message:

patching file og_calendar.module
Hunk #1 FAILED at 18.
Hunk #2 FAILED at 102.
Hunk #3 FAILED at 111.
Hunk #4 FAILED at 172.
4 out of 4 hunks FAILED --

am i patching the wrong version?

gerhard killesreiter’s picture

I guess the initial patch ot applied?

gracearoha’s picture

it does not look like the patch was applied.
i must have done something wrong with my patching. i just tried it again and found that most of it succeeded except for the first part:

patching file og_calendar.module
Hunk #1 FAILED at 18.
Hunk #2 succeeded at 99 (offset -3 lines).
Hunk #3 succeeded at 108 (offset -3 lines).
Hunk #4 succeeded at 169 (offset -3 lines).

najibx’s picture

Hmm ...I didn't apply the patch. Getting this msg :

Could not access any events for the Sarang Buaya group.

darren oh’s picture

StatusFileSize
new9.61 KB

Updated the patch.

gracearoha’s picture

so, is this patch included in the latest dev version of og calendar (May 7)?

gracearoha’s picture

Okay. I answered my own question - it is not applied to the dev version of May 7th. So i applied it and came up with this:

Hunk #1 FAILED at 19.

I am also using: D5.7, event 5x 2x dev (May 8), and og 5x 7.1.
I can now see the group calendar when i click on the calendar link from the group details menu, but it does not show any events at all. (I tried creating new events and updating old events). All events group events show in the public calendar even though i have marked them to show only in the group.

Also, at the top of the menu where it shows the current month, "May 2008", there is a link that says "Next". This takes me to "April 2008" and then stops and there is not any link to go backwards.

darren oh’s picture

No, it has not been reviewed.

Anonymous’s picture

Assigned: Unassigned »
Status: Needs review » Postponed

@Darron

Since this patch has not been reviewed over the past couple of month and no one has responded to this issue since May I will postpone this issue for Drupal6

Anonymous’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: » Unassigned
Category: support » bug
Status: Postponed » Active

Hi Darren,

I have incorporated the patch into a new development release for Drupal 6 which has been commited into CVS and which will be released soon.

There is one problem that needs to be resolved and that is restricting the content on the calendar to the group and not show public content not connected with any groups.

It looks as though this problem should be resolved at line 129 og_calendar.module

list($thead, $tbody) = event_calendar_month('page', $date, NULL, NULL, array('og_nid' => $gid));

because if you the follow the code you will see that array('og_nid' => $gid) should be restricting the content on the event calendar to the group .

I will be moving onto other things tomorrow so if anyone would like to look into this that would be great if not ill get back to this later next month

Best, Paul

kyle.vh’s picture

with apologies:
can someone clarify the status here?

Should I patch my module, or update to a newer dev?
I would like to use this feature, I didn't realize that updating to event 2.x would kill it. should have been paying closer attention.

Anonymous’s picture

Update to the latest development version on D6 when your ready to test this version of the module

thijsvdanker’s picture

Status: Needs review » Active

I had the same problems and dove into it.
This implementation of hook_db_rewrite_sql() did the trick for me!

/**
 * Implementation of hook_db_rewrite_sql().
 */
function og_calendar_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
  if ($args["event_get_events_event"] && $args["og_nid"]) {
    $array = array();
    $array['join'] = "JOIN {og_ancestry} og ON og.nid = n.nid";
    $array['where'] = "group_nid = " .$args["og_nid"];
    return $array; 
  }
}

I also added a small check to the calendar page to make sure it's a group-type of node that's being viewed

function og_calendar_page($group = NULL, $year = NULL, $month = NULL, $day = NULL) {  
  if ($group && og_is_group_type($group->type)) {

This is my first ever patch to anything on Drupal, so if I did something out of the ordinary (coding standards, patch file) please let me know!

thijsvdanker’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

Overlooked some things about patch submission http://drupal.org/patch/submit.
Changed the status!

Anonymous’s picture

Assigned: Unassigned »
Status: Active » Needs review

Thanks Thijsvdanker,

I'll review that patch in the morning.

Much appreciated.
Paul

kyle.vh’s picture

I tried this patch and it seems to work great! Thanks for your effort.

btw, i can't patch the file through terminal, it will fail. but if I manually implement the changes they work great. I thought I'd just give you some feedback there since it sounded like your first patch.
Again, thanks for your effort.

kyle

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Thanks it works , ill get that committed.

Kudos, Paul

Anonymous’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.