Nuke one more hooked function.

from plugins/username/setup.php
...
$squirrelmail_plugin_hooks['options_display_save']['username'] =
    'username_save_options';
...

Add 'username_save_options' to forced_prefs disabled hooks.

$fp_disabled_hooks=array('username_show_options','username_save_options');

When username plugin is enabled, it tries to save own options.
forced_prefs plugin removed those options from display preferences form.
username plugin fails to extract vars, but still tries to set them.
options are set to empty string or zero.

Yes, I am real living person.

> Thanks Tomas.
>
> When I set
>
>> from plugins/forced_prefs/config.php
>> ...
>> $fp_disabled_hooks=array('username_show_options');
>> ...
>
> it works all right. The forced options are not displayed. But when I
> try to change any of the options in the "display preferences", once I
> submit the change and refresh the left panel, the username goes away.
> It becomes again displayed only after a relogin. This problem occurs
> only for the display preferences, not any other settings like personal
> information, folder settings etc.
>
> I am sorry about the list posting. Now I am replying to all.
>
> Tomas, that was a great piece of reply. You are a very good teacher.
> Are you really one?
>
> kmnair
>
>
>
>
> On 5/6/06, Tomas Kuliavas <[EMAIL PROTECTED]> wrote:
>> Settings are not displayed only when plugins use SquirrelMail option
>> widgets and forced_prefs plugin is loaded after other plugins. widgets
>> are
>> special functions that create option from configuration data provided by
>> plugin. Compare fortune plugin in SquirrelMail 1.5.1 with abook_take
>> plugin.
>>
>> in fortune plugin options are added with optpage_loadhook_display hook.
>> in
>> abook_take they are added with options_display_inside hook. forced_prefs
>> plugin can't automatically remove abook_take options.
>>
>> If you want to hide options that added not with widgets, you must
>> disable
>> functions attached to option hooks. It can be done with forced_prefs
>> $fp_disabled_hooks setting.
>>
>> Username 2.3 plugin uses options_display_inside hook.
>>
>> from plugins/username/setup.php
>> ...
>> $squirrelmail_plugin_hooks['options_display_inside']['username'] =
>>  'username_show_options';
>> ...
>>
>> add 'username_show_options' to $fp_disabled_hooks.
>>
>> from plugins/forced_prefs/config.php
>> ...
>> $fp_disabled_hooks=array('username_show_options');
>> ...
>>
>> displayed username is controlled in username plugin. I think username
>> plugin has configuration option, that does not add domain after
>> username.
>> If it does not work - username plugin should be modified.
>>
>> Please keep conversation on mailing list.
>>
>> > Thanks Tomas.
>> >
>> > Sorry I did not note the comma after the first line in the sample. It
>> > works now.
>> >
>> > But there is a problem. Actually, these enforced settings should not
>> > show up in the options right? But many of them  do and I am able to
>> > change them.
>> >
>> > The font option and left pane width options do not show up. But the
>> > show username and username position options show up.
>> >
>> > And how can I show username alone in the left pane, without adding the
>> > domain name?
>> >
>> > Regards
>> >
>> > kmnair
>> >
>> >
>> >
>> >
>> > On 5/6/06, Tomas Kuliavas <[EMAIL PROTECTED]> wrote:
>> >> Add commas.
>> >>
>> >> $fp_forced_settings = array(
>> >>  'show_html_default' => '1',
>> >>  'sort' => '0',
>> ... stripped other enforced vars ...
>> >> );
>> >
>> >
>> > $fp_forced_settings = array(
>> >            'show_html_default' => '1'
>> > Line41:        'sort' => '0'
>> ... stripped other enforced vars ...
>>
>>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
> --
> squirrelmail-users mailing list
> Posting Guidelines:
> http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
> List Address: [email protected]
> List Archives:
> http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
> List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id)95
> List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
squirrelmail-users mailing list
Posting Guidelines: 
http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: [email protected]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to