开发者

Joomla: mod_login parameters not showing up in administrator backend

开发者 https://www.devze.com 2023-04-06 21:39 出处:网络
I am trying to change the Name/username parameter value to \"开发者_运维知识库Name\" in the mod_login parameters. But for my Joomla installation (Joomla! 1.5.23), only a few parameters are shown (Cach

I am trying to change the Name/username parameter value to "开发者_运维知识库Name" in the mod_login parameters. But for my Joomla installation (Joomla! 1.5.23), only a few parameters are shown (Caching + Encrypt Login Form).

Is there a way to display more parameters in the backend? If not, where can I edit the parameter? Is there an ini file somewhere?


Usually modules parameters are stored in an XML file within the directory with the same name as the module, under the 'modules' folder (if admin modules, those are under 'administrator/'). In that file are stored the parameters used by a module, which are shown in the module configuration in Back-End.

As for mod_login, those params are not editable, but if you open the mod_login.php file (under administrator/modules/mod_login/) you'll find the html relative to that form.

<p id="form-login-username">
        <label for="modlgn_username"><?php echo JText::_('Username'); ?></label>
        <input name="username" id="modlgn_username" type="text" class="inputbox" size="15" />
    </p>

    <p id="form-login-password">
        <label for="modlgn_passwd"><?php echo JText::_('Password'); ?></label>
        <input name="passwd" id="modlgn_passwd" type="password" class="inputbox" size="15" />
    </p>

Add a value="(your value here)" and it set.

Alternatively, if you want to do things well done, open the XML file and add

<param name="name_default" type="text" default="Name" label="Default value for username" description="Default value for username" />

And in mod_login.php you call this parameter with

 $default_value = $params->get('name_default');

And just put into the form:

<input name="username" id="modlgn_username" type="text" value="<?php echo $default_value;?>" class="inputbox" size="15" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号