Results 1 to 2 of 2

Thread: [Avatar] multipe avatars ??

  1. #1
    New user
    Join Date
    12-18-12.
    Posts
    2

    Default [Avatar] multipe avatars ??

    Hi,

    I installed AVATAR extension, running with XTMEMBERS.
    Members of my website can upload their picture,
    but I would like to add the possibility for them to upload their firm logo.
    So I tried to create a new avatar field :

    I created new field, extending the database in system/modules/avatar/config/database.sql adding a new entry :

    Code:
    CREATE TABLE `tl_member` (
      `avatar` varchar(255) NULL default '',
      `avatarjob` varchar(255) NULL default '',
    
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    then, extending the DCA, and adding a translation :

    Code:
    $GLOBALS['TL_DCA']['tl_member']['fields']['avatarjob'] = array
    (
    	'label'				=> &$GLOBALS['TL_LANG']['tl_member']['avatarjob'],
    	'exclude'			=> true,
    	'inputType'			=> 'avatarjob',
    	'eval'				=> array('filename'=>'member_%s', 'feEditable'=>true, 'feGroup'=>'helpdesk')
    );
    And also, added a lines in xtmembers/dca/tl_members.php to display my new field :

    Code:
    if (array_key_exists("avatarjob", $GLOBALS['TL_DCA']['tl_member']['fields']))
    {
    	$GLOBALS['TL_DCA']['tl_member']['fields']['avatarjob']['eval']['feViewable'] = true;
    }
    Checkbox field appears well in the BE, but not the upload menu.
    I activated checkbox to display/edit it in FE (also clearing the cache, etc) but won't appear in FE...

    Thanks for your help

  2. #2
    User
    Join Date
    07-08-10.
    Location
    Madrid, Spain
    Posts
    145

    Default Re: [Avatar] multipe avatars ??

    any solution ?... I've got the same question !

    Thanks
    Eric
    Contao 2.8 -> 3.0
    Evizer Web Agency

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
  •