Avatar

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

admin

About

Username
admin
Joined
Visits
8,800
Last Active
Roles
Administrator

Comments

  • It is something we debated with for a while and may be subject to change in the future but it was to match the default language folder and language setting in the main fuel/application/config/config.php file which is "english".
  • In MY_fuel.php can you change the languages parameter to use "en" => "en" instead of "english" => "en"?
  • That's a little trickier. The field name is used as the key value of the error message (second parameter). In this case, because it is a repeatable field, the key may be something like 'awards[0][year]'. What is the array that get's returned from th…
  • You can use the method "add_error" on your products_model: http://docs.getfuelcms.com/libraries/my_model#func_add_error
  • What language is used for the default URL (without the language segment)? We'll usually have the default language (english), use that URL instead of a language segment.
  • If the validation is being run on the products model instead of the awards model, then that would make sense. The model should take care of it's own validation. Did you set those fields as required on the awards_model? If so, then it's most likely r…
  • There is an "on_before_insert" and an "on_before_update" hook you can use and they get run on the methods "insert" and "update" respectively. The save method calls the "on_before_insert" method if a key value is set (e.g. id) otherwise it runs "on_…
  • If you are wanting the be able to export the contacts entered into a database, you can set the parameter "exportable" on your module. This will create a button in the list view called "Export" which will output a CSV file. You can modify the format …
  • The Blocks module only has a view field. However, there are block layouts you can create that work on a per page basis and allow you to setup form fields: http://docs.getfuelcms.com/general/layouts#layouts_block_layouts
  • For the client side, you can do a normal CI controller and use something like form_builder. Here is an example from an older version of FUEL: https://github.com/daylightstudio/FUEL-CMS/blob/v0.9.3/fuel/application/controllers/contact.php The syntax…
  • 1. The required attribute when used in the form_fields method only shows the asterisk next to it in the label but the actual validation should be done in the on_before_validate hook. The only time the validation for a required field will run will be…
  • That is correct. You can look at the MY_Model::save method to see how the hooks run when you use save. on_before_post and on_after_post hooks are actually called in the fuel/modules/fuel/controllers/module.php controller.
  • There is no on_after_create hook but there is an on_after_save(). To get the prices information you can use the model property "normalized_save_data" like so: function on_after_save($values) { // should contain all data submitted including pri…
  • You can load the model and retrieve it with the foreign key value: $CI =& get_instance(); $CI->load->model('tableB_model'); $tableb_record = $CI->tableB_model->find_by_key($values['tableb_id']); ....
  • I'm not quite sure I follow the question, but the $values array automatically injects the "id" into the $values array after it saves and is available after the on_after_save hook. Also, not sure if you know this but the save method will return the i…
  • I would first focus on the developing the upload, parsing, saving, renaming and resizing logic you mentioned first using a controller that extends the Module controller (perhaps in a "fuel" subfolder fuel/application/controllers/fuel/articles.php). …
  • Here it is: https://github.com/daylightstudio/FUEL-CMS/tree/develop The easiest way to make updates is to use Git and add the following as a remote repository to pull from: https://github.com/daylightstudio/FUEL-CMS.git Then you can pull from the …
  • You can try something like the following to add filters to your list view: In your fuel/application/config/MY_fuel_modules.php file, add the following filtering parameters to your modules configuration: $config['modules']['another_module'] = array(…
  • Of these breadcrumb items, "Home" > "News" > "Archive" > "2014" > "09", which are in the CMS in the navigation module? Those that aren't in the CMS will need to either be added (e.g. "Archive"), or dynamically appended (e.g. 2014, 09). I…
  • If you are using the Navigation module, the parent_id is actually the "id" record value and not the uri_segment. So you'll need to do something like the following to get that record first: $nav_record = $this->fuel_navigation_model->find_by_lo…
  • There is a "file_name" parameter you can set in your image file field. The file field type can also have placeholder values that will look at the post values upon submit to substitute: http://docs.getfuelcms.com/general/forms#file
  • Are you using the Navigation module in the CMS or the $nav array to render the breadcrumb?
  • This sounds like you may want to add an upload field in your form_fields method (the "file" field type) and then leverage an on_after_post type hook. This post talks a little bit about a similar idea using a file field type to upload a file (in thei…
  • Try adding the following to your MY_fuel.php file: // append the current language value to the site URL automatically $config['add_language_to_site_url'] = TRUE;
  • The navigation doesn't look at pages in the CMS to render, but either the $nav array or the Navigation module if there are any records in there. What does your current $nav array look like (or at least the relevant parts concerning the home, news, a…
  • To upload an image from your levels model, you'll need to add those file upload fields in your levels_model::form_fields method like so: ... $fields['image'] = array('type' => 'file', 'folder' => 'uploads'); // assets/uploads must be writable…
  • Are you wanting to upload XML files and associate them with each article or just have a place to upload XML files in general without necessarily relating them to an article? Regarding the cron jobs, you may want to try the Cronjobs module: https://g…
  • It refers to either. A page in the CMS with a location value of "my_page" will be returned. If there is a corresponding view file as well, the one in the CMS will take precedence. To force it to either a static view or the one in the CMS, you can pa…
  • The above link has the example to do this using: $vars['my_var'] = 'My Variable'; $this->fuel->pages->render('my_page', $vars); However, have you considered using a static "block" to house that logic and then insert the block into the layou…
  • Do you want the menu item to stay at "Home" > "News" > "Archive" for those pages or do you want it to be "Home" > "News" > "Archive" > "2014" > "09"... etc ? If you want the former, you can use the "selected" or "active" (alias) pa…