Results 1 to 9 of 9

Thread: Contacts - hiding Mass Update

  1. #1
    rogersugarsugar is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    38

    Default Contacts - hiding Mass Update

    User wants to remove or hide the mass update (lower part) on the Contacts list, and show more contacts instead.

    I can't seem to find a way to do this, having looked in the user's "My Account", the admin's account record for the user, or the Studio stuff.

    Can this be done?

    Thanks.

  2. #2
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: Contacts - hiding Mass Update

    As far as I know it is not possible to hide the mass update. Not on user level and not as admin.

    There is an admin setting "Listview items per page" (Admin > System Settings) where you can define the number of items per page for all modules and all users.

    If you want to change the number of items only for the contacts module (but for all users) you may change the file modules/Contacts/ListView.php.

    Change:
    Code:
    echo $qsd->GetQSScripts();
    $lv->setup($seedContact, 'include/ListView/ListViewGeneric.tpl', $where, $params);
    To:
    Code:
    echo $qsd->GetQSScripts();
    $entriesPerPage = 80;
    $lv->setup($seedContact, 'include/ListView/ListViewGeneric.tpl', $where, $params, 0, $entriesPerPage);
    Last edited by simple; 2007-08-15 at 11:44 PM. Reason: better, still a hack
    Cheers Pascal
    Simplicity GmbH

  3. #3
    aleksserbia is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    30

    Default Re: Contacts - hiding Mass Update

    the answer is Yes,but i need little time to find what i changed.
    if no one helps you ,i will post this until end of week.
    for a start you need to change file yoursugar\include\listview\listview.php like this -
    var $show_mass_update_form = false;
    next there are some functions in include\massudate.php like getDisplayMassUpdateForm one of them need to comment return like this return;
    for a start ,
    when i find my changes i will post it
    Alex

  4. #4
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Contacts - hiding Mass Update

    No, don't do that! You'll disable it for every single module, and you will mess around in include/ (you DON'T want that).

    go to modules/Contacts/ListView.php and add this to the listview object:

    $lv->show_mass_update_form = false;
    $lv->show_mass_update = false;

    maybe it's $lv, maybe $listview...

  5. #5
    aleksserbia is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    30

    Default Re: Contacts - hiding Mass Update

    Ivangool,

    you have right ,you need to change in module you wont to hide mass update sub panel file listview.php and find this
    $params = array('massupdate' => true);
    if(!empty($_REQUEST['orderBy'])) {
    $params['orderBy'] = $_REQUEST['orderBy'];
    $params['overrideOrder'] = true;
    if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
    }
    set now $params = array('massupdate' => false);
    this will hide separately mass update for that module only ,e.g. contacts\listview.php
    sorry for mistake ,but now you have full answer .
    Alex

  6. #6
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Contacts - hiding Mass Update

    Thnx for the update alex!

  7. #7
    aleksserbia is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    30

    Default Re: Contacts - hiding Mass Update

    My pleasure,
    good work
    c.u.
    Alex

  8. #8
    rogersugarsugar is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    38

    Default Re: Contacts - hiding Mass Update

    Quote Originally Posted by simple
    As far as I know it is not possible to hide the mass update. Not on user level and not as admin.

    There is an admin setting "Listview items per page" (Admin > System Settings) where you can define the number of items per page for all modules and all users.
    If I have to mess with the code, it will mean more headaches in the future with updates, etc. This item is likely as far as I'll take it.

    Thanks.

  9. #9
    etalley is offline Sugar Community Member
    Join Date
    Aug 2007
    Posts
    17

    Default Re: Contacts - hiding Mass Update

    FYI for those who want to make the display of mass_update an admin option you can edit $show_mass_update like this
    include/ListView/ListViewDisplay.php
    PHP Code:
    if(!empty($params['massupdate']) && $params['massupdate'] != false) {
                global 
    $current_user;
                if (
    is_admin($current_user)){$this->show_mass_update_form true;}
                else{
    $this->show_mass_update_form false;} 
    this will remove the whole mass update div for non-admin users.
    !not upgrade safe!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mass Update Contacts to Projects
    By rellianceus in forum Developer Help
    Replies: 1
    Last Post: 2007-06-18, 11:09 PM
  2. Mass Update Contacts to Projects
    By rellianceus in forum Help
    Replies: 1
    Last Post: 2007-06-12, 11:33 PM
  3. Replies: 0
    Last Post: 2006-07-25, 11:45 AM
  4. Replies: 0
    Last Post: 2005-05-10, 08:33 AM

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
  •