$content['type'] = array ( 'name' => 'Annonces', 'type' => 'classifieds', 'description' => 'Annonces', 'title_label' => 'Titre', 'body_label' => '', 'min_word_count' => '0', 'help' => '', 'node_options' => array ( 'status' => true, 'promote' => false, 'sticky' => false, 'revision' => false, ), 'language_content_type' => '2', 'upload' => '0', 'galleria' => 0, 'nodewords' => 1, 'i18n_node' => '1', 'old_type' => 'classifieds', 'orig_type' => '', 'module' => 'node', 'custom' => '1', 'modified' => '1', 'locked' => '0', 'content_profile_use' => false, 'comment' => '2', 'comment_default_mode' => '4', 'comment_default_order' => '1', 'comment_default_per_page' => '10', 'comment_controls' => '3', 'comment_anonymous' => 0, 'comment_subject_field' => '0', 'comment_preview' => '0', 'comment_form_location' => '0', 'fivestar' => 0, 'fivestar_stars' => 5, 'fivestar_labels_enable' => 1, 'fivestar_label_0' => 'Cancel rating', 'fivestar_label_1' => 'Poor', 'fivestar_label_2' => 'Okay', 'fivestar_label_3' => 'Good', 'fivestar_label_4' => 'Great', 'fivestar_label_5' => 'Awesome', 'fivestar_label_6' => 'Give it @star/@count', 'fivestar_label_7' => 'Give it @star/@count', 'fivestar_label_8' => 'Give it @star/@count', 'fivestar_label_9' => 'Give it @star/@count', 'fivestar_label_10' => 'Give it @star/@count', 'fivestar_style' => 'average', 'fivestar_text' => 'dual', 'fivestar_title' => 1, 'fivestar_feedback' => 1, 'fivestar_unvote' => 0, 'fivestar_position_teaser' => 'hidden', 'fivestar_position' => 'below', 'notifications_node_ui' => array ( 'links' => true, 'teaserlinks' => true, 'block' => true, 0 => 1, 'form' => false, 'comment' => false, 'subform' => false, ), 'notifications_content_type' => array ( 'taxonomy' => true, 'thread' => true, 'nodetype' => false, 'author' => false, 'typeauthor' => false, ), 'ant' => 0, 'ant_pattern' => '', 'ant_php' => '', ); $content['fields'] = array ( 0 => array ( 'label' => 'Catégories', 'field_name' => 'field_classifieds_categories', 'type' => 'content_taxonomy', 'widget_type' => 'content_taxonomy_tree', 'change' => 'Change basic information', 'weight' => '2', 'expand_all' => 0, 'description' => 'Sélectionner la catégorie correspondant à l\'annonce', 'default_value' => array ( 0 => array ( 'value' => NULL, ), ), 'default_value_php' => '', 'default_value_widget' => NULL, 'group' => false, 'conditional_fields' => array ( 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 1, 'multiple' => '0', 'save_term_node' => 1, 'vid' => '3', 'parent' => '0', 'parent_php_code' => '', 'depth' => '', 'op' => 'Save field settings', 'module' => 'content_taxonomy', 'widget_module' => 'content_taxonomy_tree', 'columns' => array ( 'value' => array ( 'type' => 'int', 'not null' => false, 'sortable' => false, ), ), 'display_settings' => array ( 'weight' => '2', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'link', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 1 => array ( 'label' => 'Date d\'achat', 'field_name' => 'field_classifieds_date', 'type' => 'date', 'widget_type' => 'date_popup', 'change' => 'Change basic information', 'weight' => '3', 'default_value' => 'now', 'default_value2' => 'same', 'default_value_code' => '', 'default_value_code2' => '', 'input_format' => 'd/m/Y', 'input_format_custom' => '', 'year_range' => '-10:+0', 'increment' => '1', 'advanced' => array ( 'label_position' => 'above', 'text_parts' => array ( 'year' => 0, 'month' => 0, 'day' => 0, 'hour' => 0, 'minute' => 0, 'second' => 0, ), ), 'label_position' => 'above', 'text_parts' => array ( ), 'description' => '', 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 1, 'multiple' => '0', 'repeat' => 0, 'todate' => '', 'granularity' => array ( 'year' => 'year', 'month' => 'month', 'day' => 'day', ), 'default_format' => 'medium', 'tz_handling' => 'none', 'timezone_db' => 'Asia/Shanghai', 'op' => 'Save field settings', 'module' => 'date', 'widget_module' => 'date', 'columns' => array ( 'value' => array ( 'type' => 'varchar', 'length' => 20, 'not null' => false, 'sortable' => true, 'views' => true, ), ), 'display_settings' => array ( 'weight' => '3', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 2 => array ( 'label' => 'Etat', 'field_name' => 'field_classifieds_condition', 'type' => 'text', 'widget_type' => 'optionwidgets_select', 'change' => 'Change basic information', 'weight' => '4', 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_classifieds_condition' => array ( 'value' => '', ), ), 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 1, 'multiple' => '0', 'text_processing' => '0', 'max_length' => '', 'allowed_values' => '| new|Neuf excellent|Excellent good|Bon average|Moyen', 'allowed_values_php' => '', 'op' => 'Save field settings', 'module' => 'text', 'widget_module' => 'optionwidgets', 'columns' => array ( 'value' => array ( 'type' => 'text', 'size' => 'big', 'not null' => false, 'sortable' => true, 'views' => true, ), ), 'display_settings' => array ( 'weight' => '4', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 3 => array ( 'label' => 'Marque', 'field_name' => 'field_brand', 'type' => 'content_taxonomy', 'widget_type' => 'content_taxonomy_select', 'change' => 'Change basic information', 'weight' => '5', 'show_depth' => 1, 'group_parent' => '0', 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_brand' => array ( 'value' => '', ), ), 'group' => false, 'required' => 0, 'multiple' => '0', 'save_term_node' => 1, 'vid' => '7', 'parent' => '0', 'parent_php_code' => '', 'depth' => '', 'op' => 'Save field settings', 'module' => 'content_taxonomy', 'widget_module' => 'content_taxonomy_options', 'columns' => array ( 'value' => array ( 'type' => 'int', 'not null' => false, 'sortable' => false, ), ), 'display_settings' => array ( 'weight' => '5', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 4 => array ( 'label' => 'Veuillez préciser', 'field_name' => 'field_brand_suggestion', 'type' => 'text', 'widget_type' => 'text_textfield', 'change' => 'Change basic information', 'weight' => '6', 'rows' => 5, 'size' => '60', 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_brand_suggestion][0][value', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_brand_suggestion' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_brand_suggestion][0][value', ), ), ), 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => array ( 159 => '159', ), ), 'required' => 0, 'multiple' => '0', 'text_processing' => '0', 'max_length' => '', 'allowed_values' => '', 'allowed_values_php' => '', 'op' => 'Save field settings', 'module' => 'text', 'widget_module' => 'text', 'columns' => array ( 'value' => array ( 'type' => 'text', 'size' => 'big', 'not null' => false, 'sortable' => true, 'views' => true, ), ), 'display_settings' => array ( 'label' => array ( 'format' => 'above', 'exclude' => 0, ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 5 => array ( 'label' => 'Prix d\'achat', 'field_name' => 'field_purchase_value', 'type' => 'number_float', 'widget_type' => 'number', 'change' => 'Change basic information', 'weight' => '7', 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_purchase_value][0][value', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_purchase_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_purchase_value][0][value', ), ), ), 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 0, 'multiple' => '0', 'min' => '', 'max' => '', 'prefix' => '', 'suffix' => '€', 'allowed_values' => '', 'allowed_values_php' => '', 'op' => 'Save field settings', 'module' => 'number', 'widget_module' => 'number', 'columns' => array ( 'value' => array ( 'type' => 'float', 'not null' => false, 'sortable' => true, ), ), 'display_settings' => array ( 'weight' => '6', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 6 => array ( 'label' => 'Prix de vente', 'field_name' => 'field_sale_value', 'type' => 'number_float', 'widget_type' => 'number', 'change' => 'Change basic information', 'weight' => '8', 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_sale_value][0][value', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_sale_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_sale_value][0][value', ), ), ), 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 0, 'multiple' => '0', 'min' => '', 'max' => '', 'prefix' => '', 'suffix' => '€', 'allowed_values' => '', 'allowed_values_php' => '', 'op' => 'Save field settings', 'module' => 'number', 'widget_module' => 'number', 'columns' => array ( 'value' => array ( 'type' => 'float', 'not null' => false, 'sortable' => true, ), ), 'display_settings' => array ( 'weight' => '7', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 7 => array ( 'label' => 'Economie', 'field_name' => 'field_purcentage', 'type' => 'computed', 'widget_type' => 'computed', 'change' => 'Change basic information', 'weight' => '9', 'description' => '', 'default_value' => array ( ), 'default_value_php' => '', 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 0, 'multiple' => '0', 'code' => '$sale_price = $node->field_sale_value[0][\'value\']; $purchase_price = $node->field_purchase_value[0][\'value\']; if($purchase_price > 0 && $purchase_price > $sale_price) //purchase price greater than 0 to avoid divid by zero error { $node_field[0][\'value\'] = (($sale_price - $purchase_price)/$purchase_price)*100; } else { $node_field[0][\'value\'] = 0; } ', 'display' => 1, 'display_format' => '$display = $node_field_item[\'value\']."%";', 'store' => 1, 'data_type' => 'float', 'data_length' => '10', 'data_default' => '0', 'data_not_NULL' => 0, 'data_sortable' => 1, 'op' => 'Save field settings', 'module' => 'computed_field', 'widget_module' => 'computed_field', 'columns' => array ( 'value' => array ( 'type' => 'float', 'length' => '10', 'not NULL' => 0, 'sortable' => 1, 'default' => '0', ), ), 'display_settings' => array ( 'weight' => '8', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 8 => array ( 'label' => 'Description', 'field_name' => 'field_classifieds_description', 'type' => 'text', 'widget_type' => 'text_textarea', 'change' => 'Change basic information', 'weight' => '10', 'rows' => '5', 'size' => 60, 'description' => '', 'default_value' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_classifieds_description][0][value', ), ), 'default_value_php' => '', 'default_value_widget' => array ( 'field_classifieds_description' => array ( 0 => array ( 'value' => '', '_error_element' => 'default_value_widget][field_classifieds_description][0][value', ), ), ), 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 1, 'multiple' => '0', 'text_processing' => '0', 'max_length' => '', 'allowed_values' => '', 'allowed_values_php' => '', 'op' => 'Save field settings', 'module' => 'text', 'widget_module' => 'text', 'columns' => array ( 'value' => array ( 'type' => 'text', 'size' => 'big', 'not null' => false, 'sortable' => true, 'views' => true, ), ), 'display_settings' => array ( 'weight' => '9', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'default', 'exclude' => 0, ), 'full' => array ( 'format' => 'default', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), 9 => array ( 'label' => 'Image', 'field_name' => 'field_classifieds_images', 'type' => 'filefield', 'widget_type' => 'image_fupload_imagefield_widget', 'change' => 'Change basic information', 'weight' => '11', 'file_extensions' => 'jpg jpeg png gif', 'progress_indicator' => 'bar', 'file_path' => 'classifieds_images', 'max_filesize_per_file' => '', 'max_filesize_per_node' => '', 'max_resolution' => 0, 'min_resolution' => 0, 'custom_alt' => 0, 'alt' => '', 'custom_title' => 0, 'title_type' => 'textfield', 'title' => '', 'use_default_image' => 1, 'default_image_upload' => '', 'default_image' => array ( 'filename' => 'no_image.gif', 'filepath' => 'sites/default/files/imagefield_default_images/no_image_1.gif', 'filemime' => 'image/gif', 'source' => 'default_image_upload', 'destination' => 'sites/default/files/imagefield_default_images/no_image_1.gif', 'filesize' => 2689, 'uid' => '1', 'status' => 1, 'timestamp' => 1244012492, 'fid' => '189', ), 'fupload_mode' => 'multiple', 'fupload_previewlist_img' => '1_', 'fupload_previewlist_img_attributes' => '', 'fupload_previewlist_field_settings' => array ( 'imagefield_title' => true, 'imagefield_description' => true, 0 => 1, 'node_title' => false, 'node_description' => false, 'imagefield_alt' => false, ), 'fupload_previewlist_redirecturl' => '', 'fupload_title_replacements' => '_;{;};-', 'description' => 'Choisissez les images de votre produit', 'group' => false, 'conditional_fields' => array ( 'field_classifieds_categories' => 'conditional_field_no_value', 'field_classifieds_condition' => 'conditional_field_no_value', 'field_brand' => 'conditional_field_no_value', ), 'required' => 0, 'multiple' => '5', 'list_field' => '0', 'list_default' => 1, 'description_field' => '0', 'op' => 'Save field settings', 'module' => 'filefield', 'widget_module' => 'image_fupload_imagefield', 'columns' => array ( 'fid' => array ( 'type' => 'int', 'not null' => false, 'views' => true, ), 'list' => array ( 'type' => 'int', 'size' => 'tiny', 'not null' => false, 'views' => true, ), 'data' => array ( 'type' => 'text', 'serialize' => true, 'views' => true, ), ), 'display_settings' => array ( 'weight' => '10', 'parent' => '', 'label' => array ( 'format' => 'above', ), 'teaser' => array ( 'format' => 'hidden', 'exclude' => 0, ), 'full' => array ( 'format' => 'imagefield_galleria', 'exclude' => 0, ), 4 => array ( 'format' => 'default', 'exclude' => 0, ), 2 => array ( 'format' => 'default', 'exclude' => 0, ), 3 => array ( 'format' => 'default', 'exclude' => 0, ), 'email_plain' => array ( 'format' => 'default', 'exclude' => 0, ), 'email_html' => array ( 'format' => 'default', 'exclude' => 0, ), 'token' => array ( 'format' => 'default', 'exclude' => 0, ), ), ), ); $content['extra'] = array ( 'title' => '-1', 'language' => '1', 'menu' => '-2', 'taxonomy' => '0', );