Results 1 to 6 of 6

Thread: Shared Calendar Monthly View

  1. #1
    sgharp is offline Sugar Community Member
    Join Date
    Apr 2009
    Posts
    24

    Default Shared Calendar Monthly View

    Hi All,

    Are there any plans to provide additional view options in shared calendars? It would seem that the same code used to display the user's calendar could be used to display the shared calendars so I don't understand why this limitation ever existed. I'm not a PHP developer so there's probably a very good reason.

    We are using v5.2 CE and the main complaint I get from users has to do with the calendar feature. They're trying to push me to Google calendar or Exchange server just to get improved calendar features. I'd rather have my teeth drilled.

    Any ideas, thoughts, wisdom, suggestions, etc.?

    TIA.....

  2. #2
    emaggi is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Italia, near Verona
    Posts
    103

    Default Re: Shared Calendar Monthly View

    Hi we released today the synchronization between Google and SugarCRM Calendar.
    http://www.opensymbol.it/en/sugarcrm/sugarapps
    http://www.sugarforge.org/projects/sugarapps/
    Ing. Enrico Maggi
    Opensymbol Srl
    tel +39.0444.189826
    skype: enricomaggi
    enrico.maggi@opensymbol.it
    www.opensymbol.it

  3. #3
    snikwahj is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    38

    Default Re: Shared Calendar Monthly View

    Hi,

    Are you asking to have the Calendar module display a shared calendar view where all users calendars are displayed so each user can see a full list of all other users calendar data?

    If so then that option did exist in Sugar but was switched off a few versions ago due to performance issues. If there are a large number of system users than such a shared calendar view will take up a lot of system resource to display and might end up not being worth it. However, it is fairly easy to switch shared views back on again if you want to (and you think there are few enough users for it to be useful) although it will need to be done by hand and the change is not upgrade safe. You could however do what I do and simply remember to look out for changes during upgrades and simply re-apply the "fix".

    The code you need to look at is in the file modules/Calendar/templates/templates_calendar.php and you need to look for the function template_calendar(& $args)

    In that function there is a section like this:

    //$ids = get_user_array(false);
    //$ids = array_keys($ids);
    $ids = array($current_user->id);


    and to get the calendar showing a full list of users in the shared view you simply need to reverse the commenting in those lines. i.e .make it look like this:

    $ids = get_user_array(false);
    $ids = array_keys($ids);
    //$ids = array($current_user->id);


    That will make the shared view show the calendar details for all users. One big but here though is that it also includes the admin user and it may well be that you don't want normal users to see the system admins calendar data. The fix for this is still straightforward though. Simply change the above lines to:

    //$ids = get_user_array(false);
    //$ids = array_keys($ids);
    //$ids = array($current_user->id);
    //CUSTOM USER BUILD IGNORING ADMIN USER [id = 1] SO USERS DON'T GET ADMINISTRATOR DISPLAYED IN SHARED CALENDAR
    $ids = array();
    foreach(get_user_array(false) as $key => $value) {
    if ($key != "1") $ids[] = $key;
    }
    //END CUSTOM USER BUILD SECTION


    This is a PHP coding change but it should be easy enough to follow what is being done here. In simple terms we are just getting a full list of system users with get_user_array(false) and then checking each one to see if it is the admin user (which has an id of 1). If it is we don't show that one but we do choose to show all the rest.

    It would be quite easy to adapt this technique to accomplish "Team" shared calendars by grouping teams together and checking for that in the loop instead.

    Hope this helps,

    JH.

  4. #4
    vaineh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    31

    Default Re: Shared Calendar Monthly View

    is it possible to view a shared calendar but to display by month not week?

  5. #5
    snikwahj is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    38

    Default Re: Shared Calendar Monthly View

    Quote Originally Posted by vaineh View Post
    is it possible to view a shared calendar but to display by month not week?
    Possible but not necessarily useful. I doubt any user has a monitor big enough to display consecutive month views for each user which would be the scenario using the above technique.

    The only way to sensibly show the data would be to have a single month view that co-displayed all users calendar data in one table. However a system would not need to have many users for that view to become unusable.

    If you did want to take that route though it would require some hefty (and not in any way upgrade-safe) development. That sort of thing is outside the scope of a help forum I'm afraid.

    HTH,

    JH.

  6. #6
    najibx is offline Junior Member
    Join Date
    Nov 2008
    Posts
    2

    Angry Re: Shared Calendar Monthly View

    hello there,

    I can't got this to work. We only have 10 people using the CRM.
    This part, does not get me anywhere ...
    $ids = get_user_array(false);
    $ids = array_keys($ids);
    //$ids = array($current_user->id);

    Tried the second part instead, got a blank page (only top menu).
    I have Version 6.2.0beta3 (Build 6247). I also have installed ECalendar.

    Anyhow, how do you accomplish "Team" shared calendars?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Default calendar view to monthly view
    By Systems Navigator in forum Help
    Replies: 6
    Last Post: 2011-02-22, 04:04 PM
  2. How can I change the Shared calendar view to be monthly?
    By darcy.rippon in forum Developer Help
    Replies: 7
    Last Post: 2009-04-10, 10:34 AM
  3. Calendar Shared View Issue
    By Fenris in forum Installation and Upgrade Help
    Replies: 4
    Last Post: 2007-08-24, 08:49 PM
  4. Replies: 0
    Last Post: 2006-01-14, 04:23 PM
  5. Replies: 0
    Last Post: 2005-10-07, 04:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •