Results 1 to 5 of 5
Like Tree3Likes
  • 1 Post By sts
  • 1 Post By christianknoll
  • 1 Post By lijith

Thread: Edit config file during package installation

  1. #1
    iqbalmp is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    cochin
    Posts
    26

    Question Edit config file during package installation

    Hi,

    I have created a custom package from studio and published (I got a zip file); also this can be installed smoothly in any other installation. But I want to add some custom entries in to sugarcrm config array during installation of this package; how can I achieve this ?

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: Edit config file during package installation

    You could add some files to your package and change the manifest.php file in your zip file. Here you'll find some documentation about the manifest file and examples: CRMStage - SugarCRM Article - SugarCRM Manifest Development Guide
    iqbalmp likes this.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  3. #3
    iqbalmp is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    cochin
    Posts
    26

    Default Re: Edit config file during package installation

    sts,

    Thank you for the fast reply, I will try the solution provided.

  4. #4
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Edit config file during package installation

    with the manifest you can execute php code past installation. With that write a short script that will append entries to the config.php .. ugly but the only solution I would see.

    christian.

    Quote Originally Posted by iqbalmp View Post
    Hi,

    I have created a custom package from studio and published (I got a zip file); also this can be installed smoothly in any other installation. But I want to add some custom entries in to sugarcrm config array during installation of this package; how can I achieve this ?
    iqbalmp likes this.

  5. #5
    lijith's Avatar
    lijith is offline Sugar Community Member
    Join Date
    Jun 2009
    Location
    India
    Posts
    67

    Default Re: Edit config file during package installation

    Can use the below code to save the variables to the config array.

    Code:
    require_once('modules/Configurator/Configurator.php');
    $configurator = new Configurator();
    $configurator->readOverride(); // This will retrieve all the config override aray
    $configurator->saveOverride($override); // This will save the string to the config_override.php file.
    Last edited by lijith; 2012-02-09 at 05:07 AM.
    iqbalmp likes this.
    Lijith M Gopinath
    email : phpbugs@live.com
    website : PHP-Bugs

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Installation hang at config.php file
    By widodude in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2010-08-10, 09:33 AM
  2. Replies: 3
    Last Post: 2008-02-21, 10:26 PM
  3. Change in the Config file
    By vaishjan in forum Developer Help
    Replies: 0
    Last Post: 2006-06-14, 09:33 AM
  4. new module package file structure
    By ensiate in forum Developer Help
    Replies: 6
    Last Post: 2006-05-23, 12:50 AM
  5. config.php file breakdown
    By scliburn in forum Help
    Replies: 2
    Last Post: 2005-11-18, 05:24 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
  •