| 21 | = Setting up profiles = |
| 22 | |
| 23 | == 1- Create the necessary content type filters == |
| 24 | These are the data types that you can later use in the profiles. T |
| 25 | |
| 26 | The 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 | |
| 28 | Note that callback_funct is a method of the object to be verified, so it must not have a static classname. |
| 29 | |
| 30 | Example: 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 | ); |
| 34 | Note 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 | |
| 36 | You'll probably need at least the following filters: |
| 37 | === Avatars === |
| 38 | array ( |
| 39 | array ( |
| 40 | 'isContentType', |
| 41 | array ( |
| 42 | array ( |
| 43 | 'Avatar', |
| 44 | ), |
| 45 | ), |
| 46 | ), |
| 47 | ) |
| 48 | === Hyperlink only === |
| 49 | array ( |
| 50 | array ( |
| 51 | 'isExactContentType', |
| 52 | array ( |
| 53 | array ( |
| 54 | 'HyperLink', |
| 55 | ), |
| 56 | ), |
| 57 | ), |
| 58 | ) |
| 59 | |
| 60 | === SimpleLangstring only === |
| 61 | array ( |
| 62 | array ( |
| 63 | 'isExactContentType', |
| 64 | array ( |
| 65 | array ( |
| 66 | 'TrivialLangstring', |
| 67 | ), |
| 68 | ), |
| 69 | ), |
| 70 | ) |
| 71 | |
| 72 | === SimplePictures === |
| 73 | array ( |
| 74 | array ( |
| 75 | 'isContentType', |
| 76 | array ( |
| 77 | array ( |
| 78 | 'SimplePicture', |
| 79 | ), |
| 80 | ), |
| 81 | ), |
| 82 | ) |
| 83 | |
| 84 | === SimpleString only === |
| 85 | array ( |
| 86 | array ( |
| 87 | 'isExactContentType', |
| 88 | array ( |
| 89 | array ( |
| 90 | 'SimpleString', |
| 91 | ), |
| 92 | ), |
| 93 | ), |
| 94 | ) |
| 95 | |
| 96 | == 2- Create a profile template == |
| 97 | This 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 | ---- |