Closed (fixed)
Project:
Event Views
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Aug 2008 at 16:15 UTC
Updated:
3 Apr 2010 at 01:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
thomas23@drupal.org commentedsubscribe
Comment #2
principessaDS commentedAttached is my start on porting. To say it needs some serious work would be an understatement, as
Testing, thoughts & help would be greatly welcomed.
Comment #3
killes@www.drop.org commentedEvent views is its own project, moving over there.
Comment #4
aaron commentedDeprecate Event Views.
I don't think it's necessary to continue to have a separate Event Views. The module would at its bare bones consist only of this:
with the obligatory event_views.info file and event_views.views.inc.
Seems simpler to just use event.views.inc and forgo having to enable a module that does nothing that Views 2 doesn't already do (as far as automatically including a properly named .inc file).
Comment #5
MTecknology commentedHow can I subscribe without needing to make a post?
Comment #6
pfaocleCurrently trying the code from #3 as modules/event/events.views.inc, seems OK so far. I'm not using arguments but simple filtering and sorting is working.
Comment #7
Morn commentedThe patch (#3) doesn't work anymore with Views 6.x-2.0-rc2, in the Sort options of Views I get
Error: handler for event > event_start doesn't exist!"any idea how to correct this in the patch?
Comment #8
thomas23@drupal.org commentedHave you read about the API change in the release notes? Could this be where the rub is?
Cheers.
Comment #9
Morn commentedComparing, for example profiles.views.inc from rc1 and rc2 you can see that a lot was changed (reduced) from line 221
on now we have there
replacing lots of code
I think something similar must be done at event.views.inc
Comment #10
chasz commentedis this still being worked on or being squeezed out?
Comment #11
principessaDS commentedI have not had a chance to work further on the ported include file I originally uploaded in #2, nor have I had a whole lot of feedback on it either. Note also that I am not the maintainer of this module, just trying to help out.
Views 2 6.x-2.0-rc2 was released long after I logged off last night. If you will have a bit of patience, I will try to track down the issue in the next few days. As always, constructive help and suggestions are welcome.
Comment #12
pfaoclemerlinofchaos did post something on his blog about API changes - there's also a comment which might help.
Comment #13
principessaDS commentedI'll preface this with a few caveats:
There are a few hoops to jump through for this version due to the API changes in Views.
Edit your event.module file, adding the following code at the bottom of the file:
These files are strictly to deal with the Views API changes in 6.x-2.0-rc2; I have not yet mucked about with the issues listed in post #2.
NB: Edited for clarity in response to posts #15 through #18.
Comment #14
Morn commented(#13) It works!!
I Use the event start_date field for sorting an everything looks fine.
Thank you for the help
Comment #15
chasz commentedcan u run this by me again please LOL
one and 2 confused me !! insert into folder or file?
Comment #16
Morn commentedFor (#15)
1. I inserted the folder (its new)
2. I inserted the file
Comment #17
chasz commentedhow did you guys get this to work with drupal 6,4?
Comment #18
Morn commented@cahsz
I am using Drupal 6.4:
I first installed the new versions of Views and cck and verifyed that they work (don't forget update.php).
After confirming that all is OK, except the event views, I deleted the event folder and replaced with an event folder
Version prepared as in #13 (don't install the offficial event views module!!).
Then I runned update.ph, cleared caches and that was it.
Comment #19
chasz commentedi am sorry but that made absolutely NO sense
Comment #20
nedosa commentedThis is cool. It worked for me. One thing I'm having problems with is filtering View items based on the start date. I'd like to use the "between" filter, where only events that are between the current date and some future date appear.
Thanks again.
Comment #21
miiimoooWoohoo! Method also works with:
Views 6.x-2.0-rc4
event HEAD
Thanks.
Comment #22
bshensky commentedI dig it! As of 09 October 2008 04:00 GMT, method also works with
views-6.x-2.0-rc5
event-6.x-2.x-dev
Talk about a lifesaver!
Thanks a million - hope we get a working event_views for 6.x someday...
Comment #23
weldong commentedhi, I tried principessaDS's procedure and it works except I am having trouble with getting a view to work where it Lists the date (1st by years, then by months) that I can do easily in drupal 5.x
It is basically working except the Link Text for the links are blank, and therefore no links
I get:
* (138)
* (2)
and I should get
* 2008 (138)
* 2009 (2)
the source code of the page reveals the links are generated correctly (listed below), if I go to /event/2008, I get simular results, just a LI for each item and a count but no text to click on but source code reveals the links are correct). If someone can point me in the direction where this code is generated, I will be happy to try to fix myself.
Thanks in advance!!
Comment #24
weldong commentedThe bug in #23 occurs in function summary_name and function_title in event_handler_argument{month,day,year,fulldate}.inc . By commenting these functions out, I at least get text to the links (being the number of the day, month, year, etc).
Comment #25
ivrh commentedHi. Could not make exposed filters to work (event start date and end dates).
What I found is that this patch is trying to compare values from the database with the values from exposed filter. The issue was that the DB values are stored in YYYY-MM-DD HH:SS format, while values in the exposed filters are converted into UNIX timestamp.
This change (to the file "event_handler_filter_date.inc") below make them working fine:
Namely the chaged lines were:
$this->query->add_where($this->options['group'], "UNIX_TIMESTAMP({$field}) >= %s", $a);
$this->query->add_where($this->options['group'], "UNIX_TIMESTAMP({$field}) <= %s", $b);
and
$this->query->add_where($this->options['group'], "UNIX_TIMESTAMP({$field}) {$this->operator} '%s'", $value);
all $field variables are now prefixed with UNIX_TIMESTAMP() function.
This works with Views 2.0 and Drupal 6.5.
Comment #26
duntuk commentedi couldn't get the filters to work to show only current or upcoming events... it would show all events, no matter what i put in the filter.
Basically trying to replicate the functionality of the upcoming events block which comes with events module--however, trying to add extra functionality by showing only events that under a specific taxanomy, for instance.... current block shows all upcoming events, no way of filtering.
Comment #27
Shiny commentedWorks in everyway, except filters.
(tested on postgresl 8.3 + php5-cgi + lighttpd)
Perhaps this can be made an issue on the events project, and get the fully working parts into the events module, and then deal with filters seperately
Comment #28
marcingy commentedOK this doesn't need to be included in the event module it can stay as a seperate module. The events views module simply needs to have the hooks_views_api included within it. The includes can then live with that sub directory and the code can be developed out with the main events module. I'm sure Killes split the code out for a reason. And if he wants a co-mainter for this module I'm more than willing to take on the role ;-)
Comment #29
pfaocle#13 Still working in the most part for me (although I'm not doing anything too complex) - I guess what we need is a patch for #13 against the last 6.x-2.x-dev release for review.
Comment #30
domesticat commentedSeems to work pretty well after basic testing.
Comment #31
mradcliffeIt looks like the issue with the filter is doing a typecast from datetime to integer when adding the seconds to the date.
Instead mysql or postgresql's date operators need to be used, or do it in php (most likely scenario as dates are pretty different in mysql and postgresql). Though I can't remember if postgresql is supported in event at all.
postgresql: now() + interval '1 day'
mysql: date_add(now(),interval 1 day)
In my implementation of event_views from august (http://drupal.org/node/342129#comment-1137911) I did things in php. Note that code is radically different from this module.
I used php 5's new date functionality reluctantly. For instance,
Comment #32
Toddv commentedsubscribe
Comment #33
Toddv commentedIn case it's helpful to the maintainers: The code in #25 did not solve the time problem for me, date values displayed "12/31/1969 - 16:33". I doubled checked caches and such. Thanks for your efforts folks! (using d6.8, event 6.x-2.x-dev)
Comment #34
Fr0s7 commentedI agree, since #13 does not work for me using Drupal 6.8 and Event 6.x-2.x-dev. (Had no expectations, but it was fun to try. ;p )
Comment #35
Morn commented#13 still working for me with Drupal 6.8 and event 6.x-2.x-dev Version from Dec. 28. (I only use a start date filter)
Comment #36
kelvinwong commented#13 is not working on Drupal 6.9, Event 6.x-2.x-dev (2009-Jan-02) & Views 6.x-2.2
I got "Error: handler for event > event_start doesn't exist!"
Comment #37
socialnicheguru commentedI agree with comment #36.
I get Event views is not compatible with this version of Drupal which is 6.9
Comment #38
Morn commented#13 still working for me with Drupal 6.9 and event 6.x-2.x-dev Version from Jan. 26. (I only use a start date filter)
At #36-#37, did you copy the directory includes and the file event.views.inc to the event directory, and modified event.module as stated in #13?
Comment #39
Nick_h commentedVerified that this works with the Views 6.x-2.2
Comment #40
adam_b commentedsubscribe
Comment #41
Equ commentedsubscribe, we need this module. thanx.
Comment #42
srjoshLet me know if I can be of service to this update; we need this module too.
Comment #43
liliplanet commentedsubscribe
Comment #44
fasdalf@fasdalf.ru commentedSubscribe
Comment #45
momper commentedsubscribing
Comment #46
Equ commentedSorry for this question, but is anyone actually working on this? We are using Event module for a long time, at the same time we've been waiting for the Views integration. Without Event + Views we can't move forward.
Comment #47
mradcliffeWho knows what the status of the module is since killes hasn't commented on anything here for months.
It could be deprecated and the code put back into event as the main patch above does. Or it could still live on its own as its own module. I went ahead and coded my own version of event views to my own liking because it was actually easier than porting the 5.x for that project (time/budget constraints). It's actually pretty easy to hack out basic views support, I think it took me 4-5 hours.
At this point it probably won't get resolved until there's an actual release of the event module for 6.x (I've been using devel successfully since Q3 2008).
http://drupal.org/project/issues/event?status=Open&priorities=All&catego...
Comment #48
esplinter commentedSubscribe
Comment #49
Morn commented#13 still working with drupal 6.10 and event 6.x-2.x-dev (26 March Version) -
That patch should be included in the actual dev. event version in order to have an event Version with included Views 2 support.
Comment #50
srjoshQuoted from an email from Gerhard Killesreiter :
hope that helps.
Comment #51
eileenmcnaughton commentedsubscribe
Comment #52
mgiffordI'd just assumed that this would be here so I could create a custom calendar block.
subscribe
Comment #53
domesticat commentedI've been following this issue for a while, and I'm wondering if maybe someone should state the obvious here. From what I've seen, it seems like Event is mostly being maintained for legacy users while most forward development seems to be coming from the cck + views + calendar side.
If you can demonstrate otherwise, please speak up?
I ended up doing a conversion from the 6.x version of Event to the 6.x version of CCK + views + calendar. I used this page from PingVision to get me started, though that script was not what I ended up using. I am hesitant to post my copy of the script until I could have someone help me test it -- if you are interested, have a site you can play with, and are comfortable with editing PHP/mySQL statements, contact me privately through this site and we'll give it a go.
Major caveat: Please note that I have no knowledge of how repeating events worked under Event, and I have zero idea if this script could be used for repeating events under Event.
The end result of my script was pretty seamless for us. I took the existing 'event' nodes, added on a CCK field for the new start time, used the script to generate the date fields in the format that CCK expects, and then inserted those fields into the database. I then created new versions of my views, blocks, and pages doing sorts based off of the CCK date fields, and once I had those matching the old versions, I turned off the Event module.
Again - if you're interested, comfortable with script hacking, and can be patient with someone who is carrying a massive work overload, contact me. Maybe we can get something going that will solve the long-term needs of the people in this thread.
Comment #54
eileenmcnaughton commentedHi,
I had been wondering about how important events are when views can do much the same thing but OG Calendar seems to rely on it which the customer wants - but maybe the results of OG Calendar can be achieved using views 2 anyway?
Comment #55
cka3o4h1k commentedSubscribe
Comment #56
barm commentedI am trying to edit date_browser view of calendar style.
There is not events date arguments (like event start date ...) in section "Date field(s):" of argument "date".
When I trying to make my own argument and select "Event:Start date", then I read:
* The calendar_style style requires a Date argument.
* The Date browser style requires the Date: Date argument.
Where am I wrong?
Comment #57
barm commentedsorry.
Comment #58
thierry.beeckmans commentedI've noticed this module and hoped I could use it. But apparently it didn't work for me (drupal 6.10), are there changes in the views2 api since this module was written?
Anyway, based upon another views implementation, I added some primitive functionality for what I needed: Managing the start & end date.
This is based upon the existing views classes, this means that the existing date functionality from views remains the same.
1. Add the following code to the event.module:
2. Place the attached files in your event module. Remove the .txt extension!
3. List your modules under /admin/build/modules (in order to let the system detect the newly added files & detect the views hook)
Comment #59
drupal centric commented#13 worked a treat for me using Views 6.2.5 and Event 6.x-2.x-dev, thanks.
Comment #60
momper commentedComment #61
liliplanet commentedThank you so much, definitely works in every way ..
Comment #62
chrism2671 commentedIs this now committed to the dev trunk?
Comment #63
killes@www.drop.org commentedI was about to add it to CVS but it looks a bit incomplete. Can somebody post a view that was created with this?
Comment #64
dikovina commented#58 - works great!
Comment #65
killes@www.drop.org commentedchanging status
Comment #66
somebodysysop commentedHas anyone who has gotten this to work got it to work with Drupal 6.13 core?
Comment #67
emdalton commentedI was not able to get #58 to work with Drupal 6.12. I guess I'll work on migrating my data to CCK instead. A note explaining that the module is no longer being maintained would seem appropriate....
Comment #68
hchall commentedOn upgrading from Drupal 5 to Dupal 6.13, I am getting 'broken/missing handler' for 'event_start' and 'event_end' fields when trying to convert my views1 to views2. I would like to filter nodes on this important data, and wonder if you or other developers are working on a solution, or if I need to abandon such hope and mirror this information to CCK date fields (Date API). #58 fix did not work.
That is, what can I do to make this fix a priority?
Comment #69
somebodysysop commentedFor the record, I abandoned hope and converted my event dates to cck.
I used the cck date module and date api. I created a cck field called eventstart. I used "now" as the default from and to dates. I used "date" as the format.
I then used this code to convert all the event dates to the cck eventstart field:
You may have to change the $timezone, but otherwise, should work. Note that you use the "event" content type for this new "eventstart" field, you will have to modify your existing views to replace the event.module "event_start" field with cck "eventstart".
Comment #70
niek_kloots commentedIt works with:
Drupal 6.13
Views 6.x-2.6
Event 6.x-2.x-dev (2009-Mar-16) example: http://openwaterswimming.eu
doesn't work with:
Event 6.x-2.x-dev (2009-Jul-05) example: http://noww.nl
both sites use all the same modules. Only the event dev. is different.
Comment #71
doughold commented#58 worked like a charm, events dev from Aug 29...Views2 6.x-2.6
Comment #72
niek_kloots commentedNow #58 works for me also.
Drupal 6.13
Events dev from Aug 29
Views2 6.x-2.6
Still would like the choice between days or date in the upcoming event block included
issue http://drupal.org/node/78271
Comment #73
TRex2003 commentedsubscribe
Comment #74
Rob_Feature commentedI just want to give a shoutout to SomebodySysop on #69. Brilliant! This is obviously an updated version of this code (which does NOT work).
Just wanted to say thanks...
I'd recommend putting your solution somewhere that Google and Drupal search can find it!I took the liberty of archiving it for others here. It's gold for people who want to make the switch. Thanks!Comment #75
mauryg commentedI am running:
Drupal 6.14
Event 6.x-2.x-dev (2009-Aug-28)
Event Views 6.x-2.x-dev (2009-Jun-28)
Views 6.x-2.6
Observed the reported Error: handler for event > event_start doesn't exist!" when trying to convert my Views1 views.
I added the snippet and files suggested by #58 (Many thanks).
Disabled the Event Views module.
Disabled and re-enabled the event module and ran update.php.
Views1 views converted to Views2 and could be edited as expected.
Needed to reset the event start time fields in the views editor.
The live preview showed the correct information to be displayed as a block view.
The block views showed on the designated pages as desired.
Comment #76
MTecknology commentedIs the original issue still a problem or can we close this issue?
Comment #77
niek_kloots commentedYes because it still isn't an integrated part of the module but a patch.
After every new release one have to add the code from #13 and hope that the patch still works.
Comment #78
juanjo_vlc commented#58 works for me!
Thanks a lot.
I think this must be a priority and has to be bundled as a contribution to de Event module.
Start Date is the most important field while filtering events, i think, and I can't get it without this solution.
Comment #79
fnikola commentedComment #58.
Step#2. I assume it means to place these 3 files in the event module directory.
Step#3. What does "List your modules under /admin/build/modules" mean?
Thanks.
Comment #80
niek_kloots commentedThe files goes into your event module with the following names:
event.views_.inc
event_handler_field_date.inc
event_handler_filter_date.inc
so skip the _.txt
Step#3 Go to http://yoursite.com/admin/build/modules and activate the modules
It works on my site http://openwaterswimming.eu
Keep a link to this page with you favorites because every time there is a new version for the events module you have at least to repeat coment 58 step #1
Unfortunely the maintainer(s) doesn't like to implement all of this in the event module.
Comment #81
agoel@axelerant.com commentedThe file should be named event.views.inc
Comment #82
daigorocub commentedJust for the record, #58 worked for me but I needed the Arguments handler, so I made one.I tryed to use the date field handler already in the views module, but it didn't work.
I also altered the event.views.inc file.
Both files go to folder sites/all/modules/event.
Thanks and enjoy!
Comment #83
snipe commented#58 works cool with D6.15, looking for arguments
trying #82
Thanks again
Comment #84
snipe commentedOkey... looks good
looking for year and month combination
will write something for it
Comment #85
cparrish817 commented#58 just saved my life.
Event 6.x-2.x-dev
Event-Views 6.x-2.x-dev
Drupal 6.15 (converted from Drupal 5.7)
Comment #86
narovi commentedsubscribing
Comment #87
crystaldawn commentedI've uploaded a new development snapshot that closes all of the drupal 6 / views API 2 problems. Closing all issues related to this problem.
Comment #88
niccottrell commentedAbout step #3 - activate which modules? I already had event and event views enabled. Should I see new module names appeared after the files are in place?
Comment #89
crystaldawn commentedThis is no longer needed. DL the new release, unzip it, disable it, UNINSTALL IT (this is super important, dont miss this step), and then re-enable it and you'll be all set to go. There is however an issue with timezones not working, but for my implementations that didnt matter anyways. But I'll get that fixed up soon enough.