Module name reference

edited September 2011 in Feature Requests
I've noticed that the default value for a module's instruction is set to the module name. Problem is that having module indexes like courses_disciplines you end up having "Here you can manage the courses_disciplines for your site.".

Should the reference be the module_name index in each module section? in the _fuel_modules.php config?

Comments

  • edited 2:39PM
    Yep... thanks for the report. I'll fix that.
  • edited 2:39PM
    I see the module name is now humanized. But in my case the only way I managed to specify the keys is with a prefix (ie. $config['modules']['bio_categories']) which get still returns the prefix in the instruction.

    For example in:

    $config['modules']['bio_categories'] = array(
    'module_name' => 'Categories',
    'module_uri' => 'bio/categories',
    'model_name' => 'bio_categories_model',
    'model_location' => 'bio',
    'table_headers' => array(
    'id',
    'name',
    'precedence',
    'published'
    ),
    'nav_selected' => 'bio/categories',
    'instructions' => 'Here you can manage categories.'
    );

    ...shouldn't the Instruction read the lowercase value of 'module_name', as I suspect that most people would use a sensible name that would easily be understandable in the instructions.
  • edited September 2011
    If I remove the prefix I end up with an error message:

    Severity: Notice --> Undefined property: Module::$model_name D:\wamp\www\fpse\fuel\modules\fuel\controllers\module.php 79

    Am I possibly doing something wrong? Is there someplace I should specify my module prefix?
  • edited 2:39PM
    I think I see the issue and believe I have a fix locally which I can push soon. The fix was to add the following to the fuel/modules/fuel/libraries/Fuel_modules.php file around line 127 and then change the default value for instructions to NULL on line 85:
    // set instructions if (empty($return['instructions'])) { $return['instructions'] = lang('module_instructions_default', strtolower($return['module_name'])); }

    Try this out and see if that fixes your issue.
Sign In or Register to comment.