Changes between Version 5 and Version 6 of doc/developer/UserProfiles

Show
Ignore:
Timestamp:
05/10/07 22:55:54 (13 years ago)
Author:
benoitg
Comment:

Some docs on actually setting up profiles

Legend:

Unmodified
Added
Removed
Modified
  • doc/developer/UserProfiles

    v5 v6  
    1 Author: Benoit Grégoire, [[Timestamp]] 
     1Contributors: Benoit Grégoire, Last update: 2007-05-10 
    22Feel free to contribute and/or format better 
    33[[PageOutline]] 
     
    1919It became absolutely obvious that we can't agree on a set of simple fields applicable to all wireless groups.  Even within groups, reaching a consensus can be very difficult.  So the entire generic system had to go in at once. 
    2020 
     21= Setting up profiles = 
     22 
     23== 1- Create the necessary content type filters == 
     24These are the data types that you can later use in the profiles.  T 
     25 
     26The format for each Content type filter is a criteria array:  an array of functions call performed on the content type.  For each one, the method must exist and return true.Format is array(array(callback_funct, array(callback_funct_parameters)) 
     27 
     28Note that callback_funct is a method of the object to be verified, so it must not have a static classname. 
     29 
     30Example:  To get Simple content types that are a subclass of file, the array would be 
     31 array(array('isSimpleContent'), 
     32 array('isContentType',array(array('File'))) 
     33 ); 
     34Note the second callback: isContentType, takes a SINGLE parameter, but that parameter is an array.  Since the $criteria_array specifies callback parameter as a list, passing 'File' to isContentType is written as array(array('File')) 
     35 
     36You'll probably need at least the following filters: 
     37=== Avatars === 
     38array ( 
     39  array ( 
     40    'isContentType', 
     41    array ( 
     42      array ( 
     43        'Avatar', 
     44      ), 
     45    ), 
     46  ), 
     47) 
     48=== Hyperlink only === 
     49array ( 
     50  array ( 
     51    'isExactContentType', 
     52    array ( 
     53      array ( 
     54        'HyperLink', 
     55      ), 
     56    ), 
     57  ), 
     58) 
     59 
     60=== SimpleLangstring only === 
     61array ( 
     62  array ( 
     63    'isExactContentType', 
     64    array ( 
     65      array ( 
     66        'TrivialLangstring', 
     67      ), 
     68    ), 
     69  ), 
     70) 
     71 
     72=== SimplePictures === 
     73array ( 
     74  array ( 
     75    'isContentType', 
     76    array ( 
     77      array ( 
     78        'SimplePicture', 
     79      ), 
     80    ), 
     81  ), 
     82) 
     83 
     84=== SimpleString only === 
     85array ( 
     86  array ( 
     87    'isExactContentType', 
     88    array ( 
     89      array ( 
     90        'SimpleString', 
     91      ), 
     92    ), 
     93  ), 
     94) 
     95 
     96== 2- Create a profile template == 
     97This is the list of fields available in the profile, as well as optional labels when the user edits them, and when other users view them. 
     98 
     99== 3- Associate the profile template to the network == 
     100== 4- Edit your own profile to test == 
     101---- 
    21102= Data model (only new tables shown) = 
    22103 
     
    70151 * Profile edit interface for end user is implemented in Profile::getAdminAdminUI() and called from User::getAdminUI(). 
    71152 * Profile fields admin interface for network administrator is called from Network::getAdminUI(). 
    72  
    73 = UI notes = 
    74  * When deleting a field from the network, ask the administrator to confirm if any user have data in the field (list how many user's data you'll wipe out) 
    75  
    76 = Possible profile reports = 
    77  * Profile usage (% of users with a profile) 
    78  * Field usage (% of users with a profile that filled the field)