Results 1 to 4 of 4

Thread: How to hide shared calendar for users?

  1. #1
    Milano2 is offline Member
    Join Date
    Dec 2008
    Posts
    5

    Default How to hide shared calendar for users?

    Hi,

    I want to hide shared calendar button for all users/employees. Only administrators should see this button and should have access to shared calendar.

    Probably I should edit modules/Calendar/Calendar.php but I don't knew where and which php function use.
    Any help will be appreciated

    ps. and sorry for my English

    My SugarCRM version: 5.1.0b

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to hide shared calendar for users?

    Hi Milano

    Add this code


    PHP Code:
        global $current_user;
        
        if(! 
    is_admin($current_user)) {
            foreach(
    $tabs as $id => $tab) {
                if(
    $tab == 'year') {
                    unset(
    $tabs[$id]);
                }
            }
        } 
    Just after the line containing this code

    PHP Code:
    $tabs = array('day''week''month''year''shared'); 
    At the modules/Calendar/templates/templates_calendar.php.
    Remember this is not an upgrade safe customization.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    Milano2 is offline Member
    Join Date
    Dec 2008
    Posts
    5

    Default Re: How to hide shared calendar for users?

    It is working! Thank you very much

    ps. in your code is small mistake. In my case:
    Code:
    if($tab == 'year')
    should be:
    Code:
    if($tab == 'shared')
    THANKS!

  4. #4
    FishGuts is offline Senior Member
    Join Date
    Apr 2009
    Posts
    26

    Default Re: How to hide shared calendar for users?

    I stumbled across this thread while looking for a way to remove the shared calendar button. The code described here worked. Thank you

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to hide users?
    By rehlers in forum General Discussion
    Replies: 4
    Last Post: 2008-11-06, 04:42 PM
  2. Hide calls in calendar
    By holyfire in forum Developer Help
    Replies: 5
    Last Post: 2007-10-04, 12:51 PM
  3. Pb with Shared Calendar
    By cedtfc in forum Help
    Replies: 3
    Last Post: 2007-03-14, 08:54 PM
  4. Calendar error after install of Shared Calendar by Month
    By stikekar in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2006-11-30, 08:47 AM
  5. Replies: 0
    Last Post: 2005-10-07, 04:15 PM

Tags for this Thread

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
  •