Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorChrisBlank
    • CommentTimeJun 25th 2010 edited
     permalink
    Hello,
    I have once again a problem.
    I get a warning and a notice in Administration area at Plugins->Pluginname
    Warning: No suitable language file was found plugin:pluginname in D:\xampp\htdocs\flatpress\fp-includes\core\core.language.php on line 56
    Notice: Undefined index: pluginname in D:\xampp\htdocs\flatpress\admin\main.php on line 182

    Content of: plugin.pluginname.php
    <?php
    /*
    Plugin Name: pluginname
    Version: 1.0
    Plugin URI: http://chris-blank.de
    Description: Some problems...
    Author: ChrisBlank
    Author URI: http://chris-blank.de
    */
    if (class_exists('AdminPanelAction')){
    class admin_plugin_pluginname extends AdminPanelAction {
    var $langres = 'plugin:pluginname';
    function setup() {
    $this->smarty->assign('admin_resource', "plugin:pluginname/admin.plugin.pluginname");
    }
    function main() {
    $this->smarty->assign('showit', "test");
    }
    }
    admin_addpanelaction('plugin', 'pluginname', true);
    }
    ?>

    Content of tpls/admin.plugin.pluginname.tpl
    <h2>PluginName</h2>
    {include file=shared:errorlist.tpl}
    {$showit}


    Can anyone tell me whats wrong?

    EDIT: The warning is history. i created the lang/lang.en-us.php
    content:
    <?php
    $lang['admin']['plugin']['submenu']['pluginname'] = 'PluginName';
    ?>


    But the Notice is still there:
    Notice: Undefined index: pluginname in D:\xampp\htdocs\flatpress\admin\main.php on line 182
    •  
      CommentAuthorChrisBlank
    • CommentTimeJun 26th 2010
     permalink
    After 4 hours searching I finally found a solution. For posterity here is my solution:
    I have to add the status messages in lang/lang.en-us.php although they are not used.

    $lang['admin']['plugin']['pluginname']['msgs'] = array(
    1 => 'pluginname configuration successful saved.',
    -1 => 'pluginname configuration not saved.'
    );