[commits] [Wiki] created: ImpH4DisplayUserName

Wiki Guest wikiguest at horde.org
Tue Aug 9 18:23:23 UTC 2011


guest [146.164.76.15]  Tue, 09 Aug 2011 18:23:23 +0000

Created page: http://wiki.horde.org/ImpH4DisplayUserName

[[toc]]
+++ Notes
**IMP 5, Horde 4**
**Modifies traditional and dynamic views to display username beside  
the name of the opened folder**.

This describes modifications to IMP 5.0.8 (Horde 4.0.7).

Tested on Debian 6.0 (squeeze), horde-4.0.7 and imp-5.0.8.
----
+++ Modifications

||~ File ||~ Variables, Function(s) ||
|| imp/mailbox.php || $title ||
|| imp/lib/Views/ListMessages.php || getBaseOb, $ob->label ||


//Last updated 2011-08-09//
----
+++ Descriptions
----
++++ mailbox.php
* Modify $title to add username.
> Traditional view.

Backup your original imp/mailbox.php. Edit mailbox.php and add a new  
line 354 with the following code:
**Form:**
<code type="php">
$pagetitle = $title = IMP::$mailbox->label;
$refresh_title = sprintf(_("_Refresh %s"), $title);
</code>
**To:**
<code type="php">
$pagetitle = $title = IMP::$mailbox->label;
$title = $pagetitle . htmlspecialchars(' of '.  
$injector->getInstance('Horde_Core_Factory_Identity')->create()->getName());
$refresh_title = sprintf(_("_Refresh %s"), $title);
</code>
----
++++ ListMessages.php
* Modify $ob->label to add username.
> Dynamic view.

Backup your original imp/lib/Views/ListMessages.php. Edit  
ListMessages.php and alter line 495 (getBaseOb) with the following code:
**Form:**
<code type="php">
$ob->label = htmlspecialchars($mbox->label);
</code>
**To:**
<code type="php">
$ob->label = htmlspecialchars($mbox->label . ' of ' .  
$GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create()->getName());
</code>



More information about the commits mailing list