Login / Status
developer.Resource
Home . Extensions . Repository
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

Extension Repository

The official extension repository only consists of freely available extensions. New documentation is rendered once a day.


Partner Management


InfoRatingsFeedback


  • Icon
    partner
    Title
    Partner Management
    Extension key
    ( partner )
    State
    beta, Not reviewed!
    Author
    David Bruehlmeier
    Category
    be
    Version
    0.5.21
    Manual
    Read online
    Downloads (total / this version)
    5536 / 394
    Rating
    none
    Updated
    25.05.2009
    Upload comment
    * Fixed issue when using extension FPDF > 0.2.0 * Fixed issue #3280
    Description
    This extension includes everything you need to manage partners (persons and organisations). You can save everything from addresses to occupations, from legal forms to birth dates. Unlimited contact information records (e.g. phone numbers) can be managed f
  • Dependencies
    • depends on php 3.0.0-0.0.0
    • depends on typo3 3.8.1-0.0.0
    • depends on static_info_tables
    Reverse dependencies

    The following extension versions depend on this extension:

    Version history
    • 0.5.20: Migrated the locallang*.php files to xml files. Thanks to Fabien Udriot for his contribution!
    • 0.5.19: Minor code-level improvements (no new features)
    • 0.5.18: Bugfix in birthday list.
    • 0.5.17: Bugfix (telephone extension '0' was not displayed)
    • 0.5.16: Added support for mm-fields in reports
    Download extension

    Download compressed extension .T3X file

  • Filename Size View Date Download
    class.ext_update.php 6.2 K View 01.04.2009 Download
    constants.txt 1.6 K View 01.04.2009 Download
    ext_conf_template.txt 1.4 K View 01.04.2009 Download
    ext_icon.gif 0.9 K View 01.04.2009 Download
    ext_localconf.php 5.5 K View 20.04.2009 Download
    ext_php_api.dat 48 K 01.04.2009 Download
    ext_tables.php 14.0 K View 20.04.2009 Download
    ext_tables.sql 12.2 K View 01.04.2009 Download
    flexform_ds.xml 18.4 K View 20.04.2009 Download
    locallang_db.xml 63 K View 20.04.2009 Download
    tca.php 54 K View 20.04.2009 Download
    api/class.tx_partner_contact_info.php 3.6 K View 01.04.2009 Download
    api/class.tx_partner_div.php 42 K View 19.05.2009 Download
    api/class.tx_partner_lang.php 2.9 K View 20.04.2009 Download
    api/class.tx_partner_main.php 6.8 K View 01.04.2009 Download
    api/class.tx_partner_query.php 36 K View 01.04.2009 Download
    api/class.tx_partner_relationship.php 10.9 K View 01.04.2009 Download
    cli/conf.php 182 View 01.04.2009 Download
    cli/create_report.php 3.1 K View 01.04.2009 Download
    csh/locallang_csh_MOD_partner.xml 6.8 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_contact_info.xml 5.1 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_main.xml 30 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_relationships.xml 4.9 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_contact_permissions.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_courses.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_hobbies.xml 9.2 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_legal_forms.xml 9.9 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_marital_status.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_occupations.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_org_types.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_rel_types.xml 12.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_religions.xml 9.3 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_status.xml 10.0 K View 20.04.2009 Download
    csh/locallang_csh_tx_partner_val_titles.xml 10.5 K View 20.04.2009 Download
    csh/img/field_visibility_default_settings.png 6.2 K View 01.04.2009 Download
    doc/TODO.txt 9.6 K View 01.04.2009 Download
    doc/TODO_new_ext.txt 1.1 K View 01.04.2009 Download
    doc/empty_partner_tables.sql 732 View 01.04.2009 Download
    doc/manual.sxw 191 K 25.05.2009 Download
    doc/partner_demo_data.sql 40 K View 01.04.2009 Download
    icons/icon_tx_partner_contact_info.gif 887 View 01.04.2009 Download
    icons/icon_tx_partner_contact_info_email.gif 877 View 01.04.2009 Download
    icons/icon_tx_partner_contact_info_fax.gif 893 View 01.04.2009 Download
    icons/icon_tx_partner_contact_info_mobile.gif 884 View 01.04.2009 Download
    icons/icon_tx_partner_contact_info_phone.gif 887 View 01.04.2009 Download
    icons/icon_tx_partner_contact_info_url.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_main.gif 864 View 01.04.2009 Download
    icons/icon_tx_partner_main_organisation.gif 145 View 01.04.2009 Download
    icons/icon_tx_partner_main_person.gif 164 View 01.04.2009 Download
    icons/icon_tx_partner_relationships.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_contact_permissions.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_courses.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_hobbies.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_legal_forms.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_marital_status.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_occupations.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_org_types.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_rel_types.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_religions.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_status.gif 0.9 K View 01.04.2009 Download
    icons/icon_tx_partner_val_titles.gif 0.9 K View 01.04.2009 Download
    icons/icon_web_txpartnerM1.gif 880 View 01.04.2009 Download
    icons/selicon_tx_partner_contact_info_type_0.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_contact_info_type_1.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_contact_info_type_2.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_contact_info_type_3.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_contact_info_type_4.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_default.gif 878 View 01.04.2009 Download
    icons/selicon_tx_partner_main_type_0.gif 0.9 K View 01.04.2009 Download
    icons/selicon_tx_partner_main_type_1.gif 0.9 K View 01.04.2009 Download
    inc/class.tx_partner_download_report.php 10.8 K View 20.04.2009 Download
    inc/class.tx_partner_format.php 39 K View 20.05.2009 Download
    inc/class.tx_partner_select.php 4.8 K View 20.04.2009 Download
    inc/class.tx_partner_tce_user.php 27 K View 20.04.2009 Download
    inc/class.tx_partner_tcemainprocdm.php 12.7 K View 01.04.2009 Download
    inc/class.tx_partner_user_fields.php 3.7 K View 01.04.2009 Download
    inc/class.ux_sc_mod_tools_em_index.php 1.2 K View 01.04.2009 Download
    inc/class.ux_t3lib_tcemain.php 10.5 K View 01.04.2009 Download
    mod1/clear.gif 46 View 01.04.2009 Download
    mod1/conf.php 1.4 K View 20.04.2009 Download
    mod1/index.php 9.0 K View 20.04.2009 Download
    modfunc1/class.tx_partner_reports.php 7.2 K View 20.04.2009 Download
    modfunc1/class.tx_partner_reports_birthdaylist.php 4.9 K View 20.04.2009 Download
    modfunc1/class.tx_partner_reports_email.php 7.9 K View 20.04.2009 Download
    modfunc1/class.tx_partner_reports_relationships.php 8.2 K View 19.05.2009 Download
    modfunc1/class.tx_partner_search.php 9.4 K View 20.04.2009 Download
    modfunc1/class.tx_partner_tools.php 3.3 K View 01.04.2009 Download
    modfunc1/class.tx_partner_tools_assignfeusers.php 13.6 K View 20.04.2009 Download
    modfunc1/class.tx_partner_tools_massrelationships.php 35 K View 20.04.2009 Download
    modfunc1/class.tx_partner_tools_reportdesigner.php 4.3 K View 20.04.2009 Download
    Preview for file partner-0.5.21-api__class__tx_partner_main__php:
    
    <?php
    /***************************************************************
    *  Copyright notice
    *
    *  (c) 2005 David Bruehlmeier (typo3@bruehlmeier.com)
    *  All rights reserved
    *
    *  This script is part of the TYPO3 project. The TYPO3 project is
    *  free software; you can redistribute it and/or modify
    *  it under the terms of the GNU General Public License as published by
    *  the Free Software Foundation; either version 2 of the License, or
    *  (at your option) any later version.
    *
    *  The GNU General Public License can be found at
    *  http://www.gnu.org/copyleft/gpl.html.
    *
    *  This script is distributed in the hope that it will be useful,
    *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    *  GNU General Public License for more details.
    *
    *  This copyright notice MUST APPEAR in all copies of the script!
    ***************************************************************/
    /**
    * API functions for reading/writing/processing partner-data
    *
    * @author David Bruehlmeier <typo3@bruehlmeier.com>
    */


        // Needed to make the script run under FE conditions
    require_once(PATH_t3lib.'class.t3lib_befunc.php');


    /**
     * This class contains functions needed to read data from the 'partner'-extension.
     * Please use only this class to access partner records, as this
     * represents the official API.
     *
     */
    class tx_partner_main {

        var 
    $countryToIso = array('country''po_country''nationality'); // Fields with country codes to be converted to ISO-codes
        
    var $languageToIso = array('mother_tongue''preferred_language'); // Fields with language codes to be converted to ISO-codes
        

        /**
         * Constructor of the class. Loads all configurations values needed to run.
         *
         * @return    void
         */
        
    function tx_partner_main()        {


        }



        
    /*********************************************
         *
         * READING DATA
         *
         *********************************************/


        /**
         * Gets a partner and writes the data into the class variable $this->data
         *
         * @param    integer        $uid: UID of the partner the get
         * @return    void
         */
        
    function getPartner($uid)        {
            global 
    $TYPO3_CONF_VARS;

            if (
    $uid)        {
                
    $rec = array();
                
                    
    // Read database
                
    $where 'tx_partner_main.uid='.$uid.t3lib_BEfunc::deleteClause('tx_partner_main');
                
    $res $GLOBALS['TYPO3_DB']->exec_SELECTquery('*''tx_partner_main'$where);
                if (
    $res)        {
                    
    $rec $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                }

                    
    // Get the user-defined fields
                
    if (is_array($TYPO3_CONF_VARS['EXTCONF']['partner']['user_fields']['tx_partner_main']))        {
                    foreach (
    $TYPO3_CONF_VARS['EXTCONF']['partner']['user_fields']['tx_partner_main'] as $field => $params)        {
                        if (
    $params['userFunc'])        {
                            
    $rec[$field] = t3lib_div::callUserFunction($params['userFunc'], $params$rec'');
                        }
                    }
                }
                
                    
    // Replace internal values from static_info_tables with ISO-codes
                /*
                foreach ($rec as $k=>$v)        {
                    if (in_array($k, $this->countryToIso)) $rec[$k] = tx_partner_div::convertToIso('static_countries', $v);
                    if (in_array($k, $this->languageToIso)) $rec[$k] = tx_partner_div::convertToIso('static_languages', $v);
                }
                */

                    // Write the record into the class variable
                
    $this->data $rec;
            }
        }


        
    /**
         * Reads the contact information for the current partner. The result will be made available as an array of contact-info objects
         * in $this->contactInfo.
         *
         * 1 = Only contact info marked as 'standard'
         * 2 = All contact info
         *
         * @param    integer        $scope: Scope for the reading the contact info (optional, default: 2=all)
         * @return    void
         */
        
    function getContactInfo($scope=2)        {

                
    // Check if a partner has already been loaded
            
    if (!is_array($this->data)) return false;

                
    // Get only the standard contact info
            
    if ($scope == 1)        {
                
    $this->contactInfo tx_partner_div::getContactInfo($this->data['uid'], 1);
            }

                
    // Get all the contact info
            
    if ($scope == 2)        {
                
    $this->contactInfo tx_partner_div::getContactInfo($this->data['uid'], 2);
            }
        }


        
    /**
         * Reads the relationships for the current partner. The result will be made available as an array of relationship objects,
         * $this->relationshipsAsPrimary for relationships where the current partner is the primary partner and in
         * $this->relationshipsAsSecondary for relationships where the current partner is the secondary partner.
         *
         * The $scope can be set as follows:
         * 1 = Only relationships where the current partner is the PRIMARY partner (result in $this->relationshipsAsPrimary)
         * 2 = Only relationships where the current partner is the SECONDARY partner (result in $this->relationshipsAsSecondary)
         * 3 = All relationships (result in $this->relationshipsAsPrimary and $this->relationshipsAsSecondary)
         *
         * @param    integer        $scope: Scope for the reading the relationships (optional, default: 3=all)
         * @param    string        $restrictToRelationshipTypes: If you want the result to be restricted to certain relationship types, you can provide a comma-separated list with all allowed relationship types here
         * @return    void
         */
        
    function getRelationships($scope=3$restrictToRelationshipTypes='')        {

                
    // Check if a partner has already been loaded
            
    if (!is_array($this->data)) return false;

                
    // Get the relationships as MAIN partner
            
    if ($scope == or $scope == 3)        {
                
    $this->relationshipsAsPrimary tx_partner_div::getRelationships($this->data['uid'], 0$restrictToRelationshipTypes);
                if (
    $this->relationshipsAsPrimary)    {
                    foreach (
    $this->relationshipsAsPrimary as $theRelationship)    {
                        
    $this->relatedPartnerAsPrimary[$theRelationship->data['uid_secondary']] = t3lib_div::makeInstance('tx_partner_main');
                        
    $this->relatedPartnerAsPrimary[$theRelationship->data['uid_secondary']]->getPartner($theRelationship->data['uid_secondary']);
                    }
                }
            }

            if (
    $scope == or $scope == 3)        {
                
    $this->relationshipsAsSecondary tx_partner_div::getRelationships($this->data['uid'], 1$restrictToRelationshipTypes);
                if (
    $this->relationshipsAsSecondary)    {
                    foreach (
    $this->relationshipsAsSecondary as $theRelationship)    {
                        
    $this->relatedPartnerAsSecondary[$theRelationship->data['uid_primary']] = t3lib_div::makeInstance('tx_partner_main');
                        
    $this->relatedPartnerAsSecondary[$theRelationship->data['uid_primary']]->getPartner($theRelationship->data['uid_primary']);
                    }
                }
            }
        }
        
        function 
    __toString() {
            return 
    $this->data['label'];
        }



        
    /*********************************************
         *
         * PROCESSING DATA
         *
         *********************************************/

        /**
         * @return    void
         */
        
    function insertPartner()        {


        }


        
    /**
         * @return    void
         */
        
    function updatePartner()        {

        }


        
    /**
         * @return    void
         */
        
    function deletePartner()        {


        }


    }

    if (
    defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/partner/api/class.tx_partner_main.php']) {
        include_once(
    $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/partner/api/class.tx_partner_main.php']);
    }

    ?>