26
I'm currently using drupal to make a website for a French Linux Assoce. I'm discovering drupal world and I'll share on this page some informations I've used to configure my drupal modules 
CiviEvent
2011/06/25 : Display right content from CiviEvent in Calendar popup
- symptom : Calendar module is written to search informations in a node from Drupal and not from CiviCRM...
- Here is patch to /sites/all/modules/calendar/jcalendar/jcalendar.js, so it queries CiviCRM Event instead of default Drupal Node
replace line :
url: Drupal.settings.basePath + "?q=jcalendar/getnode/"+nid+"/"+ids,
with this line :
url: Drupal.settings.basePath + "?q=civicrm/event/info&html=1&snippet=1&id="+nid,
2011/06/26 : Create a separate "Calendar" and "Upcoming Events" block for Anonymous and Authenticated users
Quick steps :
- clone civicrm_events view, for example : civicrm_public_events and civicrm_private_events
- for civicrm_public_events
- check the defaut filter : isPublic=True
- change the default permission : anonymous user
- in "Events page", change Path from events to events_public
- for civicrm_private_events
- remove the default filter isPublic=True as we want both public and private events
- change the default permission : authenticated user
- in "Events page", change Path from events to events_private
Rq : you need to provide different paths for each private and public view (I've first used the same name... so it did'nt work and I had public & private events all together)
- add each block in your site
- change permission to each block (click 'Configure') for only Anonymous or Authenticated users
=> that works ! Calendar and "Upcoming Events" should be different for anonymous and authenticated users !
2011/06/26 : Hide private events from Anonymous users
- Here is a patch to /sites/all/modules/civicrm/CRM/Event/Page/EventInfo.php
92a93,104
>
> // Modif de Thus0
> if (! $values['event']['is_public']){
> // form is private
> global $user;
> if (!$user->uid) {
> // if user is anonymous
> CRM_Utils_System::setUFMessage( ts( 'You do not have permission to view this event' ) );
> return CRM_Utils_System::permissionDenied( );
> }
> }
>





