$sort_img = ($sort_dir ? 'za.png' : 'az.png');
$sort_title = ($sort_dir ? _("Sort Ascending") : _("Sort Descending"));
$col_arrow = Horde::link(Horde_Util::addParameter($url, array($view . '_sortby' => $col_name, $view . '_sortdir' => $sort_dir ? 0 : 1)), $sort_title) .
- Horde::img($sort_img, $sort_title, null, $GLOBALS['registry']->getImageDir('horde')) . '</a> ';
+ Horde::img($sort_img, $sort_title) . '</a> ';
$col_class = 'selected';
} else {
/* Column not currently sorted, add link to sort by
function getMenu($returnType = 'object')
{
$menu = new Horde_Menu();
- $img_dir = $GLOBALS['registry']->getImageDir();
+ $img_dir = Horde_Themes::img();
$scope = Horde_Util::getGet('scope', 'agora');
/* Agora Home. */
/* Thread list, if applicable. */
if (isset($GLOBALS['forum_id'])) {
- $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', $GLOBALS['registry']->getImageDir());
+ $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', Horde_Themes::img());
if ($scope == 'agora' && Horde_Auth::getAuth()) {
- $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', $GLOBALS['registry']->getImageDir());
+ $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', Horde_Themes::img());
}
}
}
$url = Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'scope', $scope);
- $menu->add($url, _("_Search"), 'search.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add($url, _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
if ($returnType == 'object') {
return $menu;
$view_bodies = $GLOBALS['prefs']->getValue('thread_view_bodies');
$abuse_url = Horde::applicationUrl('messages/abuse.php');
$hot_img = Horde::img('hot.png', _("Hot thread"), array('title' => _("Hot thread")));
- $new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts")), $GLOBALS['registry']->getImageDir('horde'));
+ $new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts")));
$is_moderator = $this->hasPermission(Horde_Perms::DELETE);
/* Loop through the threads and set up the array. */
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
<link rel="alternate" title="<?php echo _("Forums") ?>" href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('rss/index.php', true, -1), 'scope', $scope) ?>" type="application/rss+xml" />
</head>
$perpage = min($prefs->getValue('tilesperpage'), $conf['thumbnail']['perpage']);
$images = $gallery->getImages($page * $perpage, $perpage);
-$reloadimage = $registry->getImageDir('horde') . '/reload.png';
-$customimage = $registry->getImageDir('horde') . '/layout.png';
+$reloadimage = Horde_Themes::img('reload.png');
+$customimage = Horde_Themes::img('layout.png');
$customurl = Horde_Util::addParameter(Horde::applicationUrl('faces/custom.php'), 'page', $page);
$face = Ansel_Faces::factory();
$autogenerate = $face->canAutogenerate();
}
if (!empty($result)) {
- $imgdir = $registry->getImageDir('horde');
+ $imgdir = Horde_Themes::img(null, 'horde');
$customurl = Horde::applicationUrl('faces/custom.php');
require_once ANSEL_TEMPLATES . '/faces/image.inc';
} else {
$result = $faces->getFromPicture($image_id, $autocreate);
}
if (!empty($result)) {
- $imgdir = $GLOBALS['registry']->getImageDir('horde');
+ $imgdir = Horde_Themes::img(null, 'horde');
$customurl = Horde::applicationUrl('faces/custom.php');
$url = (!empty($args['url']) ? urldecode($args['url']) : '');
ob_start();
$links = Ansel_Tags::getTagLinks($tags, 'add');
$html = '<ul>';
foreach ($tags as $tag_id => $taginfo) {
- $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . '</a>' : '') . '</li>';
+ $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
}
$html .= '</ul>';
return $html;
*/
static public function getErrorImage($view = 'screen')
{
- return $GLOBALS['registry']->getImageDir() . '/' . $view . '-error.png';
+ return Horde_Themes::img($view . '-error.png');
}
/**
}
if ($conf['faces']['driver'] && Horde_Auth::isAuthenticated()) {
- $menu->add(Horde::applicationUrl('faces/search/all.php'), _("_Faces"), 'user.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('faces/search/all.php'), _("_Faces"), 'user.png', Horde_Themes::img(null, 'horde'));
}
/* Print. */
if ($conf['menu']['print'] && ($pl = Horde_Util::nonInputVar('print_link'))) {
$menu->add($pl, _("_Print"), 'print.png',
- $registry->getImageDir('horde'), '_blank',
+ Horde_Themes::img(null, 'horde'), '_blank',
Horde::popupJs($pl, array('urlencode' => true)) . 'return false;');
}
/* Use Horde's stylesheet code if we aren't ouputting css directly */
if (!$custom_only) {
- Horde::includeStylesheetFiles(array('additional' => $css));
+ Horde_Themes::includeStylesheetFiles(array('additional' => $css));
} else {
foreach ($css as $file) {
echo '<link href="' . $file['u']
$results['ansel/' . $owner]['name'] = $owner;
}
if (in_array('icon', $properties)) {
- $results['ansel/' . $owner]['icon'] =
- $registry->getImageDir('horde') . '/user.png';
+ $results['ansel/' . $owner]['icon'] = Horde_Themes::img('user.png');
}
if (in_array('browseable', $properties)) {
$results['ansel/' . $owner]['browseable'] = true;
$gallery->data['attribute_name']);
}
if (in_array('icon', $properties)) {
- $results[$retpath]['icon'] = $registry->getImageDir()
- . '/ansel.png';
+ $results[$retpath]['icon'] = Horde_Themes::img('ansel.png');
}
if (in_array('browseable', $properties)) {
$results[$retpath]['browseable'] = $gallery->hasPermission(
if ($gallery->isOldEnough() && !$gallery->hasPasswd()) {
$img = '<img src="' . Ansel::getImageUrl($imageId, 'thumb', true) . '" alt="[random photo]" />';
} else {
- $img = Horde::img(
- $GLOBALS['registry']->getImageDir() . '/thumb-error.png', '',
- '', '');
+ $img = Horde::img('thumb-error.png');
}
return Horde::link($viewurl, _("View Photo")) . $img . '</a>';
}
}
$remove_url = Horde::applicationUrl($remove_url, true);
$delete_label = sprintf(_("Remove %s from search"), htmlspecialchars($tags[$tagid]));
- $html .= '<li>' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label, '', $registry->getImageDir('horde')) . '</a></li>';
+ $html .= '<li>' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label) . '</a></li>';
}
return $html . '</ul>';
// horde from Horde_Date
$gallery_image = '<img src="' . $gallery_image . '" alt="' . $caption . '" />' ;
} else {
- $gallery_image = Horde::img($GLOBALS['registry']->getImageDir() . '/thumb-error.png', '', '', '');
+ $gallery_image = Horde::img('thumb-error.png');
}
/* Check for being called via the api and generate correct view links */
$thumbstyle = $mini ? 'mini' : $style['thumbstyle'];
if ($gallery->hasPasswd()) {
- $gallery_image = Horde::img($GLOBALS['registry']->getImageDir() . '/gallery-locked.png', '', '', '');
+ $gallery_image = Horde::img('gallery-locked.png');
} else {
$gallery_image = Ansel::getImageUrl(
$gallery->getDefaultImage($style['name']),
$gallery_image = '<img src="' . $gallery_image . '" alt="' . htmlspecialchars($gallery->get('name')) . '" />';
}
} else {
- $gallery_image = Horde::img(
- $GLOBALS['registry']->getImageDir() . '/thumb-error.png', '',
- '', '');
+ $gallery_image = Horde::img('thumb-error.png');
}
/* Check for being called via the api and generate correct view links */
EOT;
/* Special requirements for lightbox */
if (!empty($lbjsurl)) {
- $graphic_dir = Horde::applicationUrl($GLOBALS['registry']->getImageDir(), true, -1);
+ $graphic_dir = Horde::applicationUrl(Horde_Themes::img(), true, -1);
$imageText = _("Photo");
$labelOf = _("of");
$html .= <<<EOT
ob_start();
/* Create the js variables to pass to the lightbox script */
- $jsvars = array('graphics_dir' => Horde::applicationUrl($registry->getImageDir(), true, -1),
+ $jsvars = array('graphics_dir' => Horde::applicationUrl(Horde_Themes::img(), true, -1),
'image_text' => _("Photo"),
'of_text' => _("of"),
'start_page' => $page);
$url = $registry->bookmarks->getAddUrl($api_params);
} catch (Horde_Exception $e) {}
- $html .= '<li>' . Horde::link($url, '', 'widget') . Horde::img('trean.png', '', '', $registry->getImageDir('trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
+ $html .= '<li>' . Horde::link($url, '', 'widget') . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
}
/* Download as ZIP link */
$this->_view->gallery->hasFeature('zipdownload')) {
$zip_params = array_merge(array('actionID' => 'downloadzip'), $date);
- $html .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Download as zip file") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png') . ' ' . _("Download as zip file") . '</a></li>';
}
/* Image upload, subgalleries, captions etc... */
if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
/* Properties */
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Change properties") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png') . ' ' . _("Change properties") . '</a></li>';
if ($count) {
/* Captions */
if ($this->_view->gallery->hasFeature('image_captions')) {
}
/* Regenerate Thumbnails */
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset all thumbnails") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset all thumbnails") . '</a></li>';
/* Regenerate all views */
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Regenerate all photo views") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Regenerate all photo views") . '</a></li>';
/* Find faces */
if ($conf['faces']['driver'] && $this->_view->gallery->hasFeature('faces')) {
- $html .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter('faces/gallery.php', array_merge($date, array('gallery' => $id, 'page' => (!empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0))))), '', 'widget') . Horde::img('user.png','', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Find faces") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter('faces/gallery.php', array_merge($date, array('gallery' => $id, 'page' => (!empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0))))), '', 'widget') . Horde::img('user.png') . ' ' . _("Find faces") . '</a></li>';
}
} /* end if ($count) {} */
if (Ansel::isAvailable('photo_stack') && $this->_view->gallery->hasFeature('stacks')) {
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset default photo") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset default photo") . '</a></li>';
}
}
if (Horde_Auth::getAuth() &&
$this->_view->gallery->get('owner') == Horde_Auth::getAuth()) {
- $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Set permissions") . '</a></li>';
+ $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
} elseif (!empty($conf['report_content']['driver']) &&
(($conf['report_content']['allow'] == 'authenticated' && Horde_Auth::isAuthenticated()) ||
$conf['report_content']['allow'] == 'all')) {
}
if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete All Photos") . '</a></li>';
- $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete Entire Gallery") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png') . ' ' . _("Delete All Photos") . '</a></li>';
+ $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', 'horde') . ' ' . _("Delete Entire Gallery") . '</a></li>';
}
$html .= '</ul></div>';
$feedurl = Horde::url('rss.php', true);
$owner = $this->_view->gallery->get('owner');
$html = $this->_htmlBegin();
- $html .= Horde::link(Ansel::getUrlFor('rss_user', array('owner' => $owner))) . Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . ($owner ? sprintf(_("Recent photos by %s"), $owner) : _("Recent system photos")) . '</a>';
+ $html .= Horde::link(Ansel::getUrlFor('rss_user', array('owner' => $owner))) . Horde::img('feed.png') . ' ' . ($owner ? sprintf(_("Recent photos by %s"), $owner) : _("Recent system photos")) . '</a>';
$slug = $this->_view->gallery->get('slug');
- $html .= '<br />' . Horde::link(Ansel::getUrlFor('rss_gallery', array('gallery' => $this->_view->gallery->id, 'slug' => $slug))) . ' ' . Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Recent photos in %s"), htmlspecialchars($this->_view->gallery->get('name'), ENT_COMPAT, Horde_Nls::getCharset())) . '</a>';
+ $html .= '<br />' . Horde::link(Ansel::getUrlFor('rss_gallery', array('gallery' => $this->_view->gallery->id, 'slug' => $slug))) . ' ' . Horde::img('feed.png') . ' ' . sprintf(_("Recent photos in %s"), htmlspecialchars($this->_view->gallery->get('name'), ENT_COMPAT, Horde_Nls::getCharset())) . '</a>';
/* Embed html */
if (empty($this->_view->_params['image_id'])) {
$links = Ansel_Tags::getTagLinks($tags, 'add', $owner);
$html = '<ul>';
foreach ($tags as $tag_id => $taginfo) {
- $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . '</a>' : '') . '</li>';
+ $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
}
$html .= '</ul>';
return $html;
}
-}
\ No newline at end of file
+}
$gt = Horde_Ajax_Imple::factory(array('ansel', 'ImageSaveGeotag'));
$gtUrl = $gt->getUrl();
-$loadingImg = Horde::img('loading.gif', _("Loading..."), '', $registry->getImageDir());
+$loadingImg = Horde::img('loading.gif', _("Loading..."));
/* Obtain other geotagged images to possibly locate this image at */
$imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata(Horde_Auth::getAuth());
'name' => _("Error retrieving feed"),
'link' => '',
'desc' => _("Unable to retrieve requested feed"),
- 'image_url' => Horde::img('alerts/error.png', '', '',
- $registry->getImageDir('horde')),
+ 'image_url' => Horde::img('alerts/error.png'),
'image_link' => '',
'image_alt' => '');
$author = '';
Horde::includeScriptFiles();
?>
<title><?php echo htmlspecialchars($page_title, ENT_COMPAT, Horde_Nls::getCharset()) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<link rel="SHORTCUT ICON" href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php echo Ansel::stylesheetLinks() ?>
<?php echo Horde::wrapInlineScript(Ansel::initJSVars());?>
<?php Horde::outputInlineScript(); ?>
<?php echo $tabs->render('image'); ?>
<h1 class="header"><?php echo $title ?></h1>
-<link href="<?php echo $registry->getImageDir() ?>/../cropper.css" rel="stylesheet" type="text/css" />
+<link href="<?php echo Horde_Themes::img() ?>/../cropper.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<div style="float: right">
<form>
<input name="name" type="text" value="<?php echo $name ?>" />
-<input type="image" name="submit" src="<?php echo $registry->getImageDir('horde'); ?>/search.png" />
+<input type="image" name="submit" src="<?php echo Horde_Themes::img('search.png') ?>" />
</form>
</div>
<?php echo $title ?>
</td>
</tr>
<tr>
- <td align="right" valign="top"><?php echo Horde::img('required.png', '', '', $registry->getImageDir('horde')) ?><strong><?php echo _("Gallery Display Name") ?></strong> </td>
+ <td align="right" valign="top"><?php echo Horde::img('required.png') ?><strong><?php echo _("Gallery Display Name") ?></strong> </td>
<td>
<input name="gallery_name" id="gallery_name" type="text" value="<?php echo htmlspecialchars($gallery_name) ?>" size="50" maxlength="100" />
</td>
<?php
printf(_("Galleries grouped by %s"), $groupby);
echo ' ' . Horde::link(Ansel::getUrlFor('group', array())) .
-Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')); ?></a>
+Horde::img('reload.png', _("Refresh List")) ?></a>
</div>
<div class="anselActions widget">
<?php echo _("Group by:") . ' ' . implode(' | ', $groupby_links) ?>
echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
if (Ansel::isAvailable('rotate')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
}
if (Ansel::isAvailable('flip')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
}
if (Ansel::isAvailable('mirror')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
}
if (Ansel::isAvailable('grayscale')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
}
if (Ansel::isAvailable('text_watermark')) {
echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
}
$selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
?>
</div>
<br />
echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
if (Ansel::isAvailable('rotate')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
}
if (Ansel::isAvailable('flip')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
}
if (Ansel::isAvailable('mirror')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
}
if (Ansel::isAvailable('grayscale')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
}
if (Ansel::isAvailable('TextWatermark')) {
echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
}
$selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
?>
</div>
<?php
if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
echo Horde::link(Horde::applicationUrl($save_url), _("Save Change"))
- . Horde::img('save.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Save Change") . '</a> ';
+ . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
}
if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
echo Horde::link(Horde::applicationUrl($edit_url), _("Cancel Change"))
- . Horde::img('delete.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Cancel Change") . '</a>';
+ . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
}
?>
</div>
<?php
if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
echo Horde::link(Horde::applicationUrl($save_url), _("Save Change"))
- . Horde::img('save.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Save Change") . '</a> ';
+ . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
}
if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
echo Horde::link(Horde::applicationUrl($edit_url), _("Cancel Change"))
- . Horde::img('delete.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Cancel Change") . '</a>';
+ . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
}
?>
</div>
echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
if (Ansel::isAvailable('rotate')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
}
if (Ansel::isAvailable('flip')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
}
if (Ansel::isAvailable('mirror')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
}
if (Ansel::isAvailable('grayscale')) {
- echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+ echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
}
if (Ansel::isAvailable('text_watermark')) {
echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
}
$selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
?>
</div>
<form method="post" action="<?php echo Horde::applicationUrl(Horde_Util::addParameter($imageurl, 'actionID', 'resize'));?>">
Horde::addScriptFile('carousel.js', 'ansel');
}
-$graphic_dir = Horde::applicationUrl($GLOBALS['registry']->getImageDir(), true);
+$graphic_dir = Horde_Themes::img();
$lbcssurl = Horde::url($GLOBALS['registry']->get('themesuri', 'ansel') . '/lightbox.css', true);
?>
</td>
padding: 2px;
width: 16px;
height: 16px;
- background: url(<?php echo $registry->getImageDir() ?>/slideshow_prev.png);
+ background: url(<?php echo $graphic_dir ?>/slideshow_prev.png);
background-repeat: no-repeat;
z-index: 100;
cursor: pointer;
padding: 2px;
width: 16px;
height: 16px;
- background: url(<?php echo $registry->getImageDir() ?>/slideshow_next.png);
+ background: url(<?php echo $graphic_dir ?>/slideshow_next.png);
background-repeat: no-repeat;
z-index: 100;
cursor: pointer;
<span class="rightFloat">
<?php ($galleries_perpage < $num_galleries) ? printf(_("%d to %d of %d Galleries"), $start, $end, $num_galleries) : printf(ngettext("%d Gallery", "%d Galleries", $num_galleries), $num_galleries) ?>
</span>
- <?php echo @htmlspecialchars($list_title, ENT_COMPAT, Horde_Nls::getCharset()) . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')) . '</a>' ?>
+ <?php echo @htmlspecialchars($list_title, ENT_COMPAT, Horde_Nls::getCharset()) . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
</div>
<table width="100%" style="background:<?php echo $styleDef['background'] ?>;"><tr>
(!Horde_Auth::getAuth() ||
$this->gallery->get('owner') != Horde_Auth::getAuth()) &&
!empty($GLOBALS['conf']['report_content']['driver']) &&
- (($conf['report_content']['allow'] == 'authenticated' &&
+ (($conf['report_content']['allow'] == 'authenticated' &&
Horde_Auth::isAuthenticated()) ||
$conf['report_content']['allow'] == 'all')) {
}
?>
<div class="slideControls">
- <?php echo Horde::fullSrcImg('loading.gif', array('dir' => $registry->getImageDir('horde'), 'attr' => 'class="imgloading"'));?>
+ <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
<?php
if (empty($this->_params['hide_slideshow'])) {
echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
<noscript>
<?php echo '<img src="' . $this->_urls['imgsrc'] . '" alt="' . htmlspecialchars($this->resource->filename) . '" />' ?>
</noscript>
- <?php echo Horde::img('blank.gif', '', array('id' => 'photodiv', 'width' => $this->_geometry['width'], 'height' => $this->_geometry['height']), $registry->getImageDir('horde')) ?>
+ <?php echo Horde::img('blank.gif', '', array('id' => 'photodiv', 'width' => $this->_geometry['width'], 'height' => $this->_geometry['height'])) ?>
<div id="CaptionContainer" style="width:<?php echo $this->_geometry['width']?>px;">
<p id="Caption" style="display:none;">
<?php echo Horde_Text_Filter::filter($this->resource->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
</div>
</div>
<div class="slideControls">
- <?php echo Horde::fullSrcImg('loading.gif', array('dir' => $registry->getImageDir('horde'), 'attr' => 'class="imgloading"'));?>
+ <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
<?php
if (empty($this->_params['hide_slideshow'])) {
echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
<span id="listCounts" class="rightFloat">
<?php if ($this->_g_perPage < $this->_numGalleries) printf(_("%d to %d of %d Galleries"), $this->_start, $end, $this->_numGalleries); else printf(ngettext("%d Gallery", "%d Galleries", $this->_numGalleries), $this->_numGalleries) ?>
</span>
- <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')) . '</a>' ?>
+ <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
</div>
<?php if (empty($this->_params['api'])): ?>
<div class="anselActions widget">
. _("Owner") . '</a>';
if ($this->_sortDir) {
echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($refresh_link, array('sort' => $this->_sortBy, 'sort_dir' => 0))))
- . Horde::img('za.png', _("Ascending"), '', $registry->getImageDir('horde'))
+ . Horde::img('za.png', _("Ascending"))
. '</a>';
} else {
echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($refresh_link, array('sort' => $this->_sortBy, 'sort_dir' => 1))))
- . Horde::img('az.png', _("Descending"), '', $registry->getImageDir('horde'))
+ . Horde::img('az.png', _("Descending"))
. '</a>';
}
?>
<tr>
<td style="margin:5px;height:<?php echo $GLOBALS['conf']['screen']['height'] ?>px;vertical-align:top;">
<div id="Container">
- <?php echo Horde::img('blank.gif', '', array('id' => 'Photo', 'style' => 'display:none;'), $registry->getImageDir('horde')) ?>
+ <?php echo Horde::img('blank.gif', '', array('id' => 'Photo', 'style' => 'display:none')) ?>
</div>
</td>
</tr>
$registry->get('name'),
sprintf(_("Publish your photos to %s on %s."), $registry->get('name'), $conf['server']['name']),
Horde::applicationUrl(Horde_Util::addParameter('xppublish.php', 'cmd', 'publish'), true, -1),
- Horde::url($registry->getImageDir() . '/favicon.ico', true, -1));
+ Horde::url(Horde_Themes::img('favicon.ico'), true, -1));
exit;
}
*/
class Translate_Display {
-
+
function header($msg, $msg2 = '') {
global $cnt_i, $registry;
- $select_img = Horde::img('alerts/message.png', '', '', $registry->getImageDir('horde'));
+ $select_img = Horde::img('alerts/message.png');
print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="header">%s</td><td align="right" class="header">%s</td><td class="header" width="20">%s</td></tr></table>', $msg, $msg2, $select_img);
flush();
}
-
+
function warning($msg, $bold = true) {
global $cnt_i, $registry;
$item = ($cnt_i++ % 2);
- $select_img = Horde::img('alerts/warning.png', '', '', $registry->getImageDir('horde'));
+ $select_img = Horde::img('alerts/warning.png');
if ($bold) {
print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d" style="color: #ff0000">%s</td><td class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
} else {
}
flush();
}
-
+
function error($msg) {
global $cnt_i, $registry;
$item = ($cnt_i++ % 2);
- $select_img = Horde::img('alerts/error.png', '', '', $registry->getImageDir('horde'));
+ $select_img = Horde::img('alerts/error.png');
print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d" style="color: #ff0000"><b>%s</b></td><td class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
flush();
}
-
+
function info($msg = "", $bold = true) {
-
+
global $cnt_i, $registry;
-
+
if (empty($msg)) {
echo "<br />";
} else {
-
+
$item = ($cnt_i++ % 2);
-
- $select_img = Horde::img('select.png', '', '', $registry->getImageDir('horde'));
+
+ $select_img = Horde::img('alerts/select.png');
if ($bold) {
print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d"><b>%s</b></td><td class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
} else {
}
return Horde_Nls::getCharset();
}
-
+
function convert_string($msg) {
global $po;
$msg = preg_replace($f, $t, $msg);
return Horde_String::convertCharset(html_entity_decode($msg), Horde_Nls::getCharset(), Translate_Display::parseCharset($po->meta['Content-Type']));
}
-
+
function display_string($msg) {
global $po;
$msg = preg_replace($f, $t, $msg);
return Horde_String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), Horde_Nls::getCharset());
}
-
+
function get_percent($used, $total) {
if ($total > 0) {
$percent = sprintf("%2.2f", (($used * 100) / $total));
} else {
$percent = 0;
}
-
+
return $percent;
}
-
+
function create_bargraph ($used, $total, $text = true, $reverse = false, $small = false) {
if ($total > 0) {
$percent = round(($used * 100) / $total);
} else {
$percent = 0;
}
-
+
$html = '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">';
$html .= '<table border="0" width="100" cellpadding="0" cellspacing="0">';
$html .= '<tr height="10">';
-
+
if ($percent > 0) {
$html .= '<td nowrap="nowrap" width="' . ($percent) . '" bgcolor="#00FF00"></td>';
}
-
+
if ($percent != 100) {
$html .= '<td nowrap="nowrap" width="' . (100 - $percent) . '" ';
if ($reverse) {
$html .= ' bgcolor="#006699"></td>';
}
}
-
+
$html .= '</tr></table></td>';
-
+
if ($text) {
if ($small) {
$html .= '<td class="small"> ' . $percent .'% </td>';
$html .= '<td> ' . $percent .'% </td>';
}
}
-
+
$html .= '</tr></table>';
-
- return $html;
+
+ return $html;
}
-
+
}
?>
<title><?php echo $page_title ?></title>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
$editing = Horde_Util::getFormData('id');
$editing = !empty($editing);
- $hordeImgDir = $GLOBALS['registry']->getImageDir('horde');
- $beatnikImgDir = $GLOBALS['registry']->getImageDir();
+ $hordeImgDir = Horde_Themes::img(null, 'horde');
+ $beatnikImgDir = Horde_Themes::img();
$menu = new Horde_Menu();
$menu->add(Horde::applicationUrl('listzones.php'), _('List Domains'), 'website.png', $hordeImgDir);
// Limit the domain list to the current page
$domains = array_slice($beatnik->domains, $page*$perpage, $perpage);
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img();
// Hide fields that the user does not want to see
$fields = Beatnik::getRecFields('soa');
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php echo Horde::includeStylesheetFiles(); ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php echo Horde_Themes::includeStylesheetFiles(); ?>
</head>
<body>
$categoryUrl = Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/prefs.php'),
array('app' => 'horde', 'group' => 'categories'));
echo Horde::link($categoryUrl, _("Edit domain groups and colors"), 'widget', '_blank') .
- Horde::img('colorpicker.png', _("Edit categories and colors"), array('align' => 'absmiddle'), $registry->getImageDir('horde')) . '</a>';
+ Horde::img('colorpicker.png', _("Edit categories and colors"), array('align' => 'absmiddle')) . '</a>';
}
?>
</p>
<span style="float:right">
<?php
$link = Horde::link('#', _("Select Domain"), '', '', 'domainSubmit(true); return false;');
- sprintf('<ul><li>%s%s<br />%s</a></li></ul>', $link, Horde::img('tree/folderopen.png', '', '', $registry->getImageDir('horde')), ($menu_view != 'icon') ? Horde::highlightAccessKey(_("Select _Domain"), $accesskey) : '');
+ sprintf('<ul><li>%s%s<br />%s</a></li></ul>', $link, Horde::img('tree/folderopen.png'), ($menu_view != 'icon') ? Horde::highlightAccessKey(_("Select _Domain"), $accesskey) : '');
?>
</span>
<span style="float:right">
}
}
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img(null, 'horde');
$delete = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
$edit = Horde_Util::addParameter(Horde::applicationUrl('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
$rectypes = Beatnik::getRecTypes();
false,
array(
'icon' => 'folder.png',
- 'icondir' => $GLOBALS['registry']->getImageDir('horde') . '/tree',
+ 'icondir' => Horde_Themes::img(null, 'horde') . '/tree',
'url' => Chora::url('browsedir', '', array('rt' => $key))
)
);
$data = reset($data);
echo $data['data'];
} else {
- echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png') . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
}
?>
</div>
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
<table cellspacing="0" class="hrdiff">
<caption>
- <?php $blank = $registry->getImageDir('horde') . '/blank.gif' ?>
+ <?php $blank = Horde_Themes::img('blank.gif') ?>
<img class="unmodified" src="<?php echo $blank ?>" alt="<?php echo _("Unmodified") ?>" /> <?php echo _("Unmodified") ?>
<img class="added" src="<?php echo $blank ?>" alt="<?php echo _("Added") ?>" /> <?php echo _("Added") ?>
<img class="modified" src="<?php echo $blank ?>" alt="<?php echo _("Modified") ?>" /> <?php echo _("Modified") ?>
global $conf, $registry, $browser, $print_link;
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('listclients.php'), _("List Clients"), 'user.png', $registry->getImageDir('horde'));
- $menu->add(Horde::applicationUrl('addclient.php'), _("Add Client"), 'user.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('listclients.php'), _("List Clients"), 'user.png', Horde_Themes::img(null, 'horde'));
+ $menu->add(Horde::applicationUrl('addclient.php'), _("Add Client"), 'user.png', Horde_Themes::img(null, 'horde'));
return $menu;
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
}
asort($sorted_ledgers);
-$browse_img = Horde::img('accounts.png', _("Ledger"), null, $registry->getImageDir('fima'));
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$browse_img = Horde::img('accounts.png', _("Ledger"));
+$edit_img = Horde::img('edit.png', _("Edit"));
+$perms_img = Horde::img('perms.png', _("Change Permissions"));
+$delete_img = Horde::img('delete.png', _("Delete"));
-Horde::addScriptFile('tables.js', 'turba');
+Horde::addScriptFile('tables.js', 'horde');
$title = _("Manage Ledgers");
require FIMA_TEMPLATES . '/common-header.inc';
require FIMA_TEMPLATES . '/menu.inc';
function _buildTree(&$tree, $indent = 0, $parent = null)
{
- global $registry;
-
$menus = array(
array('add', _("Add Postings"), 'add.png', Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings')),
- array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), $registry->getImageDir('horde')),
+ array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), Horde_Themes::img(null, 'horde')),
array('accounts', _("Accounts"), 'accounts.png', Horde::applicationUrl('accounts.php')),
array('reports', _("Reports"), 'report.png', Horde::applicationUrl('report.php')),
);
$indent + 1,
false,
array('icon' => $menu[2],
- 'icondir' => isset($menu[4]) ? $menu[4] : $registry->getImageDir(),
+ 'icondir' => isset($menu[4]) ? $menu[4] : Horde_Themes::img(),
'url' => $menu[3]));
}
}
$html .= '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>' . "\n";
}
$html .= '<a href="#" onclick="openCalendar(\'' . $name . '_img\', \'' . $name . '\', \'updateWday(\\\'' . $name . '\\\');\'); return false;" title="Select a date">';
- $html .= Horde::img('calendar.png', _("Set date"), 'align="top" id="' . $name . '_img"', $GLOBALS['registry']->getImageDir('horde'));
+ $html .= Horde::img('calendar.png', _("Set date"), 'align="top" id="' . $name . '_img"');
$html .= '</a>' . "\n";
}
*/
function getMenu()
{
- global $conf, $registry, $browser, $print_link;
+ global $conf, $browser, $print_link;
$actionID = Horde_Util::getFormData('actionID');
+ $hordeimg = Horde_Themes::img(null, 'horde');
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
$menu->add(Horde::applicationUrl('postings.php'), _("_List Postings"), 'list.png', null, null, null, (basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'ledgers') ? 'current' : ($actionID === null ? null : '__noselection'));
$menu->add(Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
- $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $hordeimg);
$menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png');
if (Horde_Auth::getAuth()) {
$menu->add(Horde::applicationUrl('report.php'), _("_Reports"), 'report.png');
/* Import/Export. */
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $hordeimg);
/* Print. */
if (isset($print_link)) {
- $menu->add($print_link, _("_Print"), 'print.png', $registry->getImageDir('horde'), '_blank', Horde::popupJs($print_link, array('urlencode' => true)) . 'return false;', '__noselection');
+ $menu->add($print_link, _("_Print"), 'print.png', $hordeimg, '_blank', Horde::popupJs($print_link, array('urlencode' => true)) . 'return false;', '__noselection');
}
return $menu;
/* Generate page links. */
if ($pageOb['mode'] == 'list') {
- $graphicsdir = $registry->getImageDir('horde');
+ $graphicsdir = Horde_Themes::img(null, 'horde');
if ($pageOb['page'] == 1) {
$pageOb['pages_first'] = Horde::img('nav/first-grey.png', null, null, $graphicsdir);
$pageOb['pages_prev'] = Horde::img('nav/left-grey.png', null, null, $graphicsdir);
<div id="accountList">
<?php
-$params = array('icondir' => $GLOBALS['registry']->getImageDir(), 'icon' => '');
+$params = array('icondir' => Horde_Themes::img(), 'icon' => '');
$tree = Horde_Tree::factory('account_tree', 'Javascript');
foreach ($accounts as $accountId => $account) {
}
$accountExtra = '';
if (!$print_view) {
- if ($perm_delete && $accountId == 'root') { $accountExtra .= ' '.Horde::link('#', _("Delete all"), '', '', "Submit('delete_all'); return false;") . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; }
- if ($perm_edit && isset($account['edit_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['edit_link']), sprintf(_("Edit %s"), $accountLabel)) . Horde::img('edit-small.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; }
- if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; }
+ if ($perm_delete && $accountId == 'root') { $accountExtra .= ' '.Horde::link('#', _("Delete all"), '', '', "Submit('delete_all'); return false;") . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
+ if ($perm_edit && isset($account['edit_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['edit_link']), sprintf(_("Edit %s"), $accountLabel)) . Horde::img('edit-small.png', _("Edit")) . '</a>'; }
+ if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
if ($perm_edit && isset($account['add_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['add_link']), _("Create a New Account")) . Horde::img('new-small.png', '+') . '</a>'; }
if ( isset($account['view_link'])) { $accountExtra .= ' '.Horde::link(Horde::applicationUrl($account['view_link']), sprintf(_("View %s"), $accountLabel)) . Horde::img('search-small.png', _("Search")) . '</a>'; }
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
<div <?php if ($pageOb['page_count'] > 1) { echo 'style="width:40%" '; } ?> class="leftFloat">
<span dir="ltr"><?php echo htmlspecialchars($title) ?></span>
<?php if ($pageOb['mode'] == 'list'): ?>
- <?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), '', $registry->getImageDir('horde')) ?> </a>
+ <?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) ?> </a>
<?php if (!isset($_SESSION['fima_search'])): ?>
- <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search")) ?></a>
<?php else: ?>
- <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query"), '', $registry->getImageDir('horde')) ?></a>
- <?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query")) ?></a>
+ <?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
<?php endif; ?>
<?php endif; ?>
</div>
-
+
<?php if ($pageOb['mode'] == 'list'): ?>
<?php if ($pageOb['page_count'] > 1): ?>
<div style="width:20%" class="leftFloat">
<?php echo $pageOb['postings_count'] ?>
</div>
<?php endif; ?>
-
+
<?php if ( $GLOBALS['browser']->isBrowser('msie') && $GLOBALS['browser']->getMajor() < 7): ?>
<div class="clear" style="clear:none" /></div>
<?php else: ?>
<?php if ($pageOb['mode'] == 'list'): ?>
<?php if (!$headers_inc_count): ?>
<th id="checkheader" width="35" onclick="document.messages.checkAll.checked = !document.messages.checkAll.checked; makeSelection(-1);">
-<?php if (!$print_view): ?>
+<?php if (!$print_view): ?>
<label for="checkAll" class="hidden">_("Check _All/None")</label>
<input type="checkbox" class="checkbox" id="checkAll" name="checkAll" onclick="makeSelection(-1);" <?php echo Horde::getAccessKeyAndTitle(_("Check _All/None")) ?> />
<?php endif; ?>
<?php if ($pageOb['mode'] == 'list'): ?>
<th class="<?php echo ($sortby == $key) ? 'selected' : 'item' ?>" width="<?php echo $val['width'] ?>" onclick="document.location.href='<?php echo addslashes(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort'))) ?>';">
<?php if ($sortby == $key): ?>
- <?php echo Horde::link(Horde_Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::link(Horde_Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText) ?></a>
<?php endif; ?>
<?php echo Horde::widget(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], 'widget', null, null, $val['text']) ?>
<?php else: ?>
$sortText = sprintf(_("Sort by %s"), $value);
echo '<th class="' . (($sortby == $colId) ? 'selected' : 'item') . ' sortable" onclick="document.location.href=' . addslashes(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby', $colId)) . '">';
if ($sortby == $colId) {
- echo Horde::link(Horde_Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText, '', $registry->getImageDir('horde')) . '</a>';
+ echo Horde::link(Horde_Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText) . '</a>';
}
echo Horde::widget(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby', $colId), $sortText, 'widget', null, null, $value);
echo '</th>';
<div class="header">
<?php echo htmlspecialchars($title) ?>
<?php if (isset($_SESSION['fima_search'])): ?>
-<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
<?php endif; ?>
</div>
}
$delete_url = Horde::applicationUrl('edit/activity.php');
-$delete_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png');
Horde::addScriptFile('tables.js', 'horde');
require FOLKS_TEMPLATES . '/common-header.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('edit/friends/blacklist.php'),
- 'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('delete.png'),
'id' => 'user',
'name' => _("Remove")),
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")),
array('url' => Horde::applicationUrl('edit/friends/approve.php'),
- 'img' => Horde::img('tick.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('tick.png'),
'id' => 'user',
'name' => _("Approve")),
array('url' => Horde::applicationUrl('edit/friends/reject.php'),
- 'img' => Horde::img('cross.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('cross.png'),
'id' => 'user',
'name' => _("Reject")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('edit/friends/add.php'),
- 'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('delete.png'),
'id' => 'user',
'name' => _("Remove")),
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
}
$remove_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'delete');
-$remove_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde'));
+$remove_img = Horde::img('delete.png');
$edit_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'edit');
-$edit_img = Horde::img('edit.png', '', '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png');
$perms_url = Horde::applicationUrl('perms.php');
-$perms_img = Horde::img('perms.png', '', '', $registry->getImageDir('horde'));
+$perms_img = Horde::img('perms.png');
$members_url = Horde::applicationUrl('edit/friends/friends.php');
-$members_img = Horde::img('group.png', '', '', $registry->getImageDir('horde'));
+$members_img = Horde::img('group.png');
require FOLKS_TEMPLATES . '/common-header.inc';
require FOLKS_TEMPLATES . '/menu.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('edit/friends/add.php'),
- 'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('delete.png');
'id' => 'user',
'name' => _("Remove")),
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png');
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('edit/friends/add.php'),
- 'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('delete.png');
'id' => 'user',
'name' => _("Add")),
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png');
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
// Prepare actions
$actions = array(
array('url' => Horde::applicationUrl('user.php'),
- 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+ 'img' => Horde::img('user.png'),
'id' => 'user',
'name' => _("View profile")));
if ($registry->hasInterface('letter')) {
$actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+ 'img' => Horde::img('letter.png'),
'id' => 'user_to',
'name' => _("Send message"));
}
require FOLKS_TEMPLATES . '/edit/friends.php';
require FOLKS_TEMPLATES . '/edit/footer.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
*/
static function getMenu()
{
- $img = $GLOBALS['registry']->getImageDir('horde');
+ $img = Horde_Themes::img(null, 'horde');
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
$menu->add(self::getUrlFor('user', Horde_Auth::getAuth()), _("My profile"), 'myaccount.png', $img);
$menu->add(self::getUrlFor('list', 'friends'), _("Friends"), 'group.png', $img);
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'online') ?>" title="<?php echo _("Online users") ?>" />
<?php if (Horde_Auth::isAuthenticated()): ?>
<link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'friends') ?>" title="<?php echo _("Online friends") ?>" />
<link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'activity') ?>" title="<?php echo _("Friends activity") ?>" />
<link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'know') ?>" title="<?php echo _("People you might know") ?>" />
<?php endif; ?>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
<?php foreach ($activities as $activity) { ?>
<tr>
<td><a href="<?php echo $registry->get('webroot', $activity['activity_scope']) ?>" />
- <img src="<?php echo $registry->getImageDir($activity['activity_scope']) . '/' . $activity['activity_scope'] ?>.png" />
+ <img src="<?php echo Horde_Themes::img($activitiy['activity_scope'] . 'png', $activity['activity_scope']) ?>" />
<?php echo $registry->get('name', $activity['activity_scope']) ?></a>
</td>
<td><?php echo Folks::format_datetime($activity['activity_date']) ?></td>
<br />
<br />
-<h1 class="header"><?php echo Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Feeds") ?></h1>
+<h1 class="header"><?php echo Horde::img('feed.png') . ' ' . _("Feeds") ?></h1>
<table class="striped">
<tr><td><a href="<?php echo Folks::getUrlFor('feed', 'online') ?>"><?php echo _("Online users") ?></a></td></tr>
<tr><td><a href="<?php echo Folks::getUrlFor('feed', 'friends') ?>"><?php echo _("Online friends") ?></a></td></tr>
<title><?php echo $title ?></title>
<description><?php echo $title ?></description>
<image>
- <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+ <url><?php echo Horde_Themes::img('folks.png') ?></url>
<link><?php echo $link ?></link>
<title><?php echo $title ?></title>
</image>
<title><?php echo $title ?></title>
<description><?php echo $title ?></description>
<image>
- <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+ <url><?php echo Horde_Themes::img('folks.png') ?></url>
<link><?php echo $link ?></link>
<title><?php echo $title ?></title>
</image>
echo '<th class="widget leftAlign nowrap">' . "\n";
if ($criteria['sort_by'] == $key) {
echo Horde::link(Horde_Util::addParameter($list_url, 'sort_dir', ($criteria['sort_dir'] == 'DESC') ? 'ASC' : 'DESC'), $val['text'], null, null, null, $val['text']);
- echo Horde::img($sortImg, $sortText, null, $registry->getImageDir('horde')) . '</a> ';
+ echo Horde::img($sortImg, $sortText) . '</a> ';
}
echo Horde::widget(Horde_Util::addParameter(($criteria['sort_by'] == $key) ? $list_url : $list_url, 'sort_by', $key), $val['text'], 'widget');
echo '</th>';
<h1 class="header"><?php echo _("My queries") ?></h1>
<?php
foreach ($queries as $query) {
- $delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+ $delete_img = Horde::img('delete.png', _("Delete"));
echo '<tr><td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
echo '<td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
}
$page = $registry->getInitialPage($app);
echo '<div class="appService">' .
'<a href="' . $page . '">' .
- '<img src="' . $registry->getImageDir($app) . '/'. $app . '.png" /> ' .
+ '<img src="' . Horde_Themes::img($app . '.png', $app). '" /> ' .
$name .
'</a></div>';
} catch (Horde_Exception $e) {}
<?php if ($registry->hasInterface('letter')): ?>
<a href="<?php echo $registry->callByPackage('letter', 'compose', array($user)) ?>" title="<?php echo _("Send private message") ?>">
-<img src="<?php echo $registry->getImageDir('letter') ?>/letter.png"> <?php echo _("Send message") ?></a>
+<img src="<?php echo Horde_Themes::img('letter.png') ?>"> <?php echo _("Send message") ?></a>
<a href="<?php echo $registry->get('webroot', 'letter') ?>/compose.php?title=<?php echo _("Look at this profile") ?>&content=<?php echo Folks::getUrlFor('user', $user, true, -1) ?>" title="<?php echo _("Send this profile to a friend") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png"> <?php echo _("Forward") ?></a>
+<img src="<?php echo Horde_Themes::img('/nav/right.png') ?>"> <?php echo _("Forward") ?></a>
<?php endif; ?>
<a href="javascript: document.getElementById('message_body').focus()" title="<?php echo _("Add a comment") ?>">
-<img src="<?php echo $registry->getImageDir('agora') ?>/agora.png"> <?php echo _("Add a comment") ?></a>
+<img src="<?php echo Horde_Themes::img('agora.png', 'agora') ?>"> <?php echo _("Add a comment") ?></a>
<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
-<img src="<?php echo $registry->getImageDir('horde') ?>/user.png"> <?php echo _("Friend") ?></a>
+<img src="<?php echo Horde_Themes::img('user.png') ?>"> <?php echo _("Friend") ?></a>
<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
-<img src="<?php echo $registry->getImageDir('horde') ?>/locked.png"> <?php echo _("Blacklist") ?></a>
+<img src="<?php echo Horde_Themes::img('locked.png') ?>"> <?php echo _("Blacklist") ?></a>
<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/problem.png"> <?php echo _("Report") ?></a>
+<img src="<?php echo Horde_Themes::img('problem.png') ?>"> <?php echo _("Report") ?></a>
<a href="<?php echo Folks::getUrlFor('list', 'list') ?>" title="<?php echo _("User list") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/group.png"> <?php echo _("Users") ?></a>
+<img src="<?php echo Horde_Themes::img('group.png') ?>"> <?php echo _("Users") ?></a>
</div>
<h1><?php echo $title ?></h1>
<ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to his profile remains visible only to authenticated users."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to his profile remains visible only to authenticated users."), $user) ?></li>
<?php
-echo '<li><img src="' . $registry->getImageDir('horde') . '/alerts/success.png">'
+echo '<li><img src="' . Horde_Themes::img('alerts/success.png') ?>">'
. _("Click here to login.")
. ' <a href="' . Hode::getServiceLink('login', 'folks') . '">' . _("Click here to login.") . '</a>'
. '</li>';
<h1><?php echo $title ?></h1>
<ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s has been disabled."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png')"><?php echo sprintf(_("User %s has been disabled."), $user) ?></li>
</ul>
<h1><?php echo $title ?></h1>
<ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to his profile remains visible only to his friends."), $user) ?></li>
-<?php
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to his profile remains visible only to his friends."), $user) ?></li>
+<?php
if ($registry->hasMethod('letter/compose')) {
- echo '<li><img src="' . $registry->getImageDir('letter') . '/letter.png">'
+ echo '<li><img src="' . Horde_Themes::img('letter.png') . ">'
. sprintf(_("You can still send a private message to user %s."), $user)
. ' <a href="' . $registry->callByPackage('letter', 'compose', array(array('user_to' => $user))) . '">' . _("Click here") . '</a>'
. '</li>';
<h1><?php echo $title ?></h1>
<ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s is inactive."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s is inactive."), $user) ?></li>
</ul>
<h1><?php echo $title ?></h1>
<ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to remain private."), $user) ?></li>
-<?php
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to remain private."), $user) ?></li>
+<?php
if ($registry->hasMethod('letter/compose')) {
- echo '<li><img src="' . $registry->getImageDir('letter') . '/letter.png">'
+ echo '<li><img src="' . Horde_Themes::img('letter.png') . '">'
. sprintf(_("You can still send a private message to user %s."), $user)
. ' <a href="' . $registry->callByPackage('letter', 'compose', array(array('user_to' => $user))) . '">' . _("Click here") . '</a>'
. '</li>';
} else {
- echo '<img src="' . $registry->getImageDir('horde') . '/guest.png" alt="'
+ echo '<img src="' . Horde_Themes::img('guest.png') . '" alt="'
. $user . '" title="' . _("Has no picture"). '" style="border: 2px solid #eeeeee; padding: 100px"/>';
}
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<?php echo _("Friends") ?> (<?php echo count($friends) ?>)
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/ads/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/ads/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/list.php?user_uid=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'classified') ?> (<?php echo $profile['count_classifieds'] ?>)</a>
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/search.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'news') ?> (<?php echo $profile['count_news'] ?>)</a>
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/videos/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/videos/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/search.php?author=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'oscar') ?> (<?php echo $profile['count_videos'] ?>)</a>
</a>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'genie') ?> (<?php echo $profile['count_wishes'] ?>)</a>
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'ansel') ?> (<?php echo $profile['count_galleries'] ?>)</a> |
<a href="<?php echo $path ?>/faces/search/owner.php?owner=<?php echo $user ?>" title="<?php echo _("Faces in user galleries") ?>"><?php echo _("Faces") ?></a>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/edit.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/edit.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/user.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'thomas') ?> (<?php echo $profile['count_blogs'] ?>)</a>
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<a href="<?php echo $path ?>/user.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'schedul') ?> (<?php echo $profile['count_attendances'] ?>)</a>
</td>
<tr>
<td class="header" colspan="2">
<span style="float: right">
-<a href="/uporabniki/edit/activity.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="/uporabniki/friends/index.php" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="/uporabniki/edit/activity.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="/uporabniki/friends/index.php" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
</span>
<?php echo _("Activity") ?>
</td>
'boxClass' => 'hordeACBox kronolithLongField',
'trigger' => $this->_params['triggerId'],
'uri' => (string)$this->_getUrl($config['pretty'], $GLOBALS['registry']->getApp()),
- 'URI_IMG_HORDE' => $GLOBALS['registry']->getImageDir('horde'),
+ 'URI_IMG_HORDE' => Horde_Themes::img(null, 'horde'),
'box' => !empty($this->_params['box']) ? $this->_params['box'] : ''
), $config['params']);
if ($edit) {
$icons .= Horde::link($this->getActionUrl('edit', $row, $col),
_("Edit"))
- . Horde::img('edit.png', _("Edit"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('edit.png', _("Edit"))
. '</a>';
}
if ($this->isRemovable($row, $col)) {
'', '',
'return window.confirm(\''
. addslashes(_("Really delete this block?")) . '\')')
- . Horde::img('delete.png', _("Remove"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('delete.png', _("Remove"))
. '</a>';
}
return $icons;
}
return Horde::link($url, $title) .
- Horde::img('block/' . $img . '.png', $title, '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ Horde::img('block/' . $img . '.png', $title) . '</a>';
}
/**
/**
* Constructs a correctly-pathed link to an image.
*
- * @param string $src The image file.
+ * @param mixed $src The image file (either a string or a
+ * Horde_Themes_Image object).
* @param string $alt Text describing the image.
* @param mixed $attr Any additional attributes for the image tag. Can be
* a pre-built string or an array of key/value pairs
* that will be assembled and html-encoded.
- * @param string $dir The root graphics directory.
*
* @return string The full image tag.
*/
- static public function img($src, $alt = '', $attr = '', $dir = null)
+ static public function img($src, $alt = '', $attr = '')
{
$charset = Horde_Nls::getCharset();
/* If browser does not support images, simply return the ALT text. */
if (!$GLOBALS['browser']->hasFeature('images')) {
- $old_error = error_reporting(0);
- $res = htmlspecialchars($alt, ENT_COMPAT, $charset);
- error_reporting($old_error);
- return $res;
+ return @htmlspecialchars($alt, ENT_COMPAT, $charset);
}
/* If no directory has been specified, get it from the registry. */
- if (is_null($dir)) {
- $dir = $GLOBALS['registry']->getImageDir();
- }
-
- /* If a directory has been provided, prepend it to the image source. */
- if (!empty($dir)) {
- $src = $dir . '/' . $src;
+ if (!($src instanceof Horde_Themes_Image) && ($src[0] != '/')) {
+ $src = Horde_Themes::img($src);
}
/* Build all of the tag attributes. */
/* If browser does not support images, simply return the ALT text. */
if (!$GLOBALS['browser']->hasFeature('images')) {
- $old_error = error_reporting(0);
- $res = htmlspecialchars($alt, ENT_COMPAT, $charset);
- error_reporting($old_error);
- return $res;
+ return @htmlspecialchars($alt, ENT_COMPAT, $charset);
}
/* If no directory has been specified, get it from the registry. */
- $dir = empty($options['dir']) ? $GLOBALS['registry']->getImageDir() : $options['dir'];
+ $dir = empty($options['dir'])
+ ? Horde_Themes::img()
+ : $options['dir'];
/* If we can send as data, no need to get the full path */
$src = self::base64ImgData($dir . '/' . $src);
/**
* Generate RFC 2397-compliant image data strings.
*
- * @param string $file Filename containing image data.
+ * @param mixed $in URI or Horde_Themes_Image object containing
+ * image data.
* @param integer $limit Sets a hard size limit for image data; if
* exceeded, will not string encode.
*
* @return string The string to use in the image 'src' attribute; either
- * the image data if the browser supports, or the filepath
+ * the image data if the browser supports, or the URI
* if not.
*/
- public function base64ImgData($file, $limit = null)
+ public function base64ImgData($in, $limit = null)
{
$dataurl = $GLOBALS['browser']->hasFeature('dataurl');
if (!$dataurl) {
- return $file;
+ return $in;
}
if (!is_null($limit) &&
}
/* Only encode image files if they are below the dataurl limit. */
- $filename = realpath($GLOBALS['registry']->get('fileroot', 'horde')) . preg_replace('/^' . preg_quote($GLOBALS['registry']->get('webroot', 'horde'), '/') . '/', '', $file);
- if (!file_exists($filename)) {
- return $file;
+ if (!($in instanceof Horde_Themes_Image)) {
+ $in = Horde_Themes_Image::fromUri($in);
+ if (!file_exists($in->fs)) {
+ return $in->uri;
+ }
}
/* Delete approx. 50 chars from the limit to account for the various
* data/base64 header text. Multiply by 0.75 to determine the
* base64 encoded size. */
return (($dataurl === true) ||
- (filesize($filename) <= (($dataurl * 0.75) - 50)))
- ? 'data:image/' . substr($file, strrpos($file, '.') + 1) . ';base64,' . base64_encode(file_get_contents($filename))
- : $file;
+ (filesize($in->fs) <= (($dataurl * 0.75) - 50)))
+ ? 'data:image/' . substr($in->uri, strrpos($in->uri, '.') + 1) . ';base64,' . base64_encode(file_get_contents($in->fs))
+ : $in->uri;
}
/**
}
/**
- * Outputs the necessary style tags, honoring configuration choices as
- * to stylesheet caching.
- *
- * @param array $options Additional options:
- * <pre>
- * 'additional' - (array) TODO
- * 'sub' - (string) A subdirectory containing additional CSS files to
- * load as an overlay to the base CSS files.
- * </pre>
- */
- static public function includeStylesheetFiles($options = array())
- {
- global $conf, $prefs, $registry;
-
- $themesfs = $registry->get('themesfs');
- $themesuri = $registry->get('themesuri');
-
- $css = self::getStylesheets($prefs->getValue('theme'), $options);
- $css_out = array();
-
- if (!empty($options['additional'])) {
- $css = array_merge($css, $options['additional']);
- }
-
- $cache_type = empty($conf['cachecss'])
- ? 'none'
- : $conf['cachecssparams']['driver'];
-
- if ($cache_type == 'none') {
- $css_out = $css;
- } else {
- $mtime = array(0);
- $out = '';
-
- foreach ($css as $file) {
- $mtime[] = filemtime($file['f']);
- }
-
- $sig = hash('md5', serialize($css) . max($mtime));
-
- switch ($cache_type) {
- case 'filesystem':
- $css_filename = '/static/' . $sig . '.css';
- $css_path = $registry->get('fileroot', 'horde') . $css_filename;
- $css_url = $registry->get('webroot', 'horde') . $css_filename;
- $exists = file_exists($css_path);
- break;
-
- case 'horde_cache':
- $cache = $GLOBALS['injector']->getInstance('Horde_Cache');
-
- // Do lifetime checking here, not on cache display page.
- $exists = $cache->exists($sig, empty($GLOBALS['conf']['cachecssparams']['lifetime']) ? 0 : $GLOBALS['conf']['cachecssparams']['lifetime']);
- $css_url = self::getCacheUrl('css', array('cid' => $sig));
- break;
- }
-
- if (!$exists) {
- $flags = defined('FILE_IGNORE_NEW_LINES')
- ? (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
- : 0;
-
- foreach ($css as $file) {
- $path = substr($file['u'], 0, strrpos($file['u'], '/') + 1);
-
- // Fix relative URLs, convert graphics URLs to data URLs
- // (if possible), remove multiple whitespaces, and strip
- // comments.
- $tmp = preg_replace(array('/(url\(["\']?)([^\/])/i', '/\s+/', '/\/\*.*?\*\//'), array('$1' . $path . '$2', ' ', ''), implode('', file($file['f'], $flags)));
- if ($GLOBALS['browser']->hasFeature('dataurl')) {
- $tmp = preg_replace_callback('/(background(?:-image)?:[^;}]*(?:url\(["\']?))(.*?)((?:["\']?\)))/i', array('Horde', 'stylesheetCallback'), $tmp);
- }
- $out .= $tmp;
- }
-
- /* Use CSS tidy to clean up file. */
- if ($conf['cachecssparams']['compress'] == 'php') {
- try {
- $out = Horde_Text_Filter::filter($out, 'csstidy');
- } catch (Horde_Exception $e) {}
- }
-
- switch ($cache_type) {
- case 'filesystem':
- if (!file_put_contents($css_path, $out)) {
- throw new Horde_Exception('Could not write cached CSS file to disk.');
- }
- break;
-
- case 'horde_cache':
- $cache->set($sig, $out);
- break;
- }
- }
-
- $css_out = array(array('u' => $css_url));
- }
-
- foreach ($css_out as $file) {
- echo '<link href="' . $file['u'] . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
- }
- }
-
- /**
- * Callback for includeStylesheetFiles() to convert images to base64
- * data strings.
- *
- * @param array $matches The list of matches from preg_replace_callback.
- *
- * @return string The image string.
- */
- public function stylesheetCallback($matches)
- {
- /* Limit data to 16 KB in stylesheets. */
- return $matches[1] . self::base64ImgData($matches[2], 16384) . $matches[3];
- }
-
- /**
- * Return the list of base stylesheets to display.
- * Callback for includeStylesheetFiles() to convert images to base64
- * data strings.
- *
- * @param mixed $theme The theme to use; specify an empty value to
- * retrieve the theme from user preferences, and
- * false for no theme.
- * @param array $options Additional options:
- * <pre>
- * 'app' - (string) The current application.
- * 'sub' - (string) A subdirectory containing additional CSS files to
- * load as an overlay to the base CSS files.
- * </pre>
- *
- * @return array TODO
- */
- public function getStylesheets($theme = '', $options = array())
- {
- if (($theme === '') && isset($GLOBALS['prefs'])) {
- $theme = $GLOBALS['prefs']->getValue('theme');
- }
-
- $css = array();
-
- $css_list = array('screen');
- if (isset($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
- $css_list[] = 'rtl';
- }
-
- /* Collect browser specific stylesheets if needed. */
- switch ($GLOBALS['browser']->getBrowser()) {
- case 'msie':
- $ie_major = $GLOBALS['browser']->getMajor();
- if ($ie_major == 8) {
- $css_list[] = 'ie8';
- } elseif ($ie_major == 7) {
- $css_list[] = 'ie7';
- } elseif ($ie_major < 7) {
- $css_list[] = 'ie6_or_less';
- if ($GLOBALS['browser']->getPlatform() == 'mac') {
- $css_list[] = 'ie5mac';
- }
- }
- break;
-
-
- case 'opera':
- $css_list[] = 'opera';
- break;
-
- case 'mozilla':
- $css_list[] = 'mozilla';
- break;
-
- case 'webkit':
- $css_list[] = 'webkit';
- }
-
- $curr_app = empty($options['app'])
- ? $GLOBALS['registry']->getApp()
- : $options['app'];
- $apps = array_unique(array('horde', $curr_app));
- $sub = empty($options['sub']) ? null : $options['sub'];
-
- foreach ($apps as $app) {
- $themes_fs = $GLOBALS['registry']->get('themesfs', $app) . '/';
- $themes_uri = self::url($GLOBALS['registry']->get('themesuri', $app), false, -1) . '/';
-
- foreach ($css_list as $css_name) {
- $css[$themes_fs . $css_name . '.css'] = $themes_uri . $css_name . '.css';
- if ($sub && ($app == $curr_app)) {
- $css[$themes_fs . $sub . '/' . $css_name . '.css'] = $themes_uri . $sub . '/' . $css_name . '.css';
- }
-
- if (!empty($theme)) {
- $css[$themes_fs . $theme . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $css_name . '.css';
- if ($sub && ($app == $curr_app)) {
- $css[$themes_fs . $theme . '/' . $sub . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $sub . '/' . $css_name . '.css';
- }
- }
- }
- }
-
- /* Add user-defined additional stylesheets. */
- try {
- $css = array_merge($css, self::callHook('cssfiles', array($theme), 'horde'));
- } catch (Horde_Exception_HookNotSet $e) {}
- if ($curr_app != 'horde') {
- try {
- $css = array_merge($css, self::callHook('cssfiles', array($theme), $curr_app));
- } catch (Horde_Exception_HookNotSet $e) {}
- }
-
- $css_out = array();
- foreach ($css as $f => $u) {
- if (file_exists($f)) {
- $css_out[] = array('f' => $f, 'u' => $u);
- }
- }
-
- return $css_out;
- }
-
- /**
* Returns an un-used access key from the label given.
*
* @param string $label The label to choose an access key from.
return parent::__toString();
}
- return Horde::img($img, $label, null, $GLOBALS['registry']->getImageDir('horde')) . $text;
+ return Horde::img($img, $label) . $text;
}
}
$url = Horde::getServiceLink('help', $module)->add('topic', $topic)->setRaw(true);
return Horde::link($url, _("Help"), 'helplink', 'hordehelpwin', Horde::popupJs($url, array('urlencode' => true)) . 'return false;') .
- Horde::img('help.png', _("Help"), 'width="16" height="16"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ Horde::img('help.png', _("Help"), 'width="16" height="16"') . '</a>';
}
{
global $conf, $registry, $prefs;
- $graphics = $registry->getImageDir('horde');
$app = $registry->getApp();
if ($this->_mask !== self::MASK_NONE) {
if (($this->_mask & self::MASK_PREFS) &&
$this->showService('options') &&
($url = Horde::getServiceLink('options', $app))) {
- $this->add($url, _("_Options"), 'prefs.png', $graphics);
+ $this->add($url, _("_Options"), 'prefs.png');
}
/* Add problem link. */
if (($this->_mask & self::MASK_PROBLEM) &&
$this->showService('problem') &&
($problem_link = Horde::getServiceLink('problem', $app))) {
- $this->add($problem_link, _("Problem"), 'problem.png', $graphics);
+ $this->add($problem_link, _("Problem"), 'problem.png');
}
/* Add help link. */
$this->showService('help') &&
($help_link = Horde::getServiceLink('help', $app))) {
Horde::
- $this->add($help_link, _("Help"), 'help_index.png', $graphics, 'help', Horde::popupJs($help_link, array('urlencode' => true)) . 'return false;', 'helplink');
+ $this->add($help_link, _("Help"), 'help_index.png', null, 'help', Horde::popupJs($help_link, array('urlencode' => true)) . 'return false;', 'helplink');
}
/* Login/Logout. */
if (Horde_Auth::getAuth()) {
if ((!$prefs->getValue('show_sidebar') || $this->showService('logout')) &&
($logout_link = Horde::getServiceLink('logout', $app))) {
- $this->add($logout_link, _("_Log out"), 'logout.png', $graphics, $auth_target, null, '__noselection');
+ $this->add($logout_link, _("_Log out"), 'logout.png', null, $auth_target, null, '__noselection');
}
} else {
if ($this->showService('login') &&
($login_link = Horde::getServiceLink('login', $app))) {
- $this->add(Horde_Util::addParameter($login_link, array('url' => Horde::selfUrl(true, true, true))), _("_Log in"), 'login.png', $graphics, $auth_target, null, '__noselection');
+ $this->add(Horde_Util::addParameter($login_link, array('url' => Horde::selfUrl(true, true, true))), _("_Log in"), 'login.png', null, $auth_target, null, '__noselection');
}
}
}
/* Icon. */
$icon = '';
if ($menu_view == 'icon' || $menu_view == 'both') {
- if (!isset($m['icon_path'])) {
+ if (empty($m['icon_path'])) {
$m['icon_path'] = null;
}
$icon = Horde::img($m['icon'], Horde::stripAccessKey($m['text']), '', $m['icon_path']) . '<br />';
protected $_apis = array();
/**
- * Cached values of the image directories.
- *
- * @param array
- */
- protected $_imgDir = array();
-
- /**
* Hash storing information on each registry-aware application.
*
* @var array
$pval = $this->applications[$app][$parameter];
} else {
$pval = ($parameter == 'icon')
- ? $this->getImageDir($app) . '/' . $app . '.png'
+ ? Horde_Themes::img($app . '.png', $app)
: (isset($this->applications['horde'][$parameter]) ? $this->applications['horde'][$parameter] : null);
}
}
/**
- * Function to work out an application's graphics URI, optionally taking
- * into account any themes directories that may be set up.
- *
- * @param string $app The application for which to get the image
- * directory. If blank will default to current
- * application.
- * @param boolean $usetheme Take into account any theme directory?
- *
- * @return string The image directory uri path.
- */
- public function getImageDir($app = null, $usetheme = true)
- {
- if (empty($app)) {
- $app = $this->getApp();
- }
-
- if ($this->get('status', $app) == 'heading') {
- $app = 'horde';
- }
-
- $sig = strval($app . '|' . $usetheme);
-
- if (isset($this->_imgDir[$sig])) {
- return $this->_imgDir[$sig];
- }
-
- /* This is the default location for the graphics. */
- $this->_imgDir[$sig] = $this->get('themesuri', $app) . '/graphics';
-
- /* Figure out if this is going to be overridden by any theme
- * settings. */
- if ($usetheme &&
- isset($GLOBALS['prefs']) &&
- ($theme = $GLOBALS['prefs']->getValue('theme'))) {
- /* Since theme information is so limited, store directly in the
- * session. */
- if (!isset($_SESSION['_registry']['theme'][$theme][$app])) {
- $_SESSION['_registry']['theme'][$theme][$app] = file_exists($this->get('themesfs', $app) . '/' . $theme . '/themed_graphics');
- }
-
- if ($_SESSION['_registry']['theme'][$theme][$app]) {
- $this->_imgDir[$sig] = $this->get('themesuri', $app) . '/' . $theme . '/graphics';
- }
- }
-
- return $this->_imgDir[$sig];
- }
-
- /**
* Query the initial page for an application - the webroot, if there is no
* initial_page set, and the initial_page, if it is set.
*
--- /dev/null
+<?php
+/**
+ * The Horde_Themes:: class provides an interface to handling Horde themes.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes
+{
+ /**
+ * Outputs the necessary style tags, honoring configuration choices as
+ * to stylesheet caching.
+ *
+ * @param array $options Additional options:
+ * <pre>
+ * 'additional' - (array) TODO
+ * 'sub' - (string) A subdirectory containing additional CSS files to
+ * load as an overlay to the base CSS files.
+ * </pre>
+ */
+ static public function includeStylesheetFiles($options = array())
+ {
+ global $conf, $prefs, $registry;
+
+ $themesfs = $registry->get('themesfs');
+ $themesuri = $registry->get('themesuri');
+
+ $css = self::getStylesheets($prefs->getValue('theme'), $options);
+ $css_out = array();
+
+ if (!empty($options['additional'])) {
+ $css = array_merge($css, $options['additional']);
+ }
+
+ $cache_type = empty($conf['cachecss'])
+ ? 'none'
+ : $conf['cachecssparams']['driver'];
+
+ if ($cache_type == 'none') {
+ $css_out = $css;
+ } else {
+ $mtime = array(0);
+ $out = '';
+
+ foreach ($css as $file) {
+ $mtime[] = filemtime($file['f']);
+ }
+
+ $sig = hash('md5', serialize($css) . max($mtime));
+
+ switch ($cache_type) {
+ case 'filesystem':
+ $css_filename = '/static/' . $sig . '.css';
+ $css_path = $registry->get('fileroot', 'horde') . $css_filename;
+ $css_url = $registry->get('webroot', 'horde') . $css_filename;
+ $exists = file_exists($css_path);
+ break;
+
+ case 'horde_cache':
+ $cache = $GLOBALS['injector']->getInstance('Horde_Cache');
+
+ // Do lifetime checking here, not on cache display page.
+ $exists = $cache->exists($sig, empty($GLOBALS['conf']['cachecssparams']['lifetime']) ? 0 : $GLOBALS['conf']['cachecssparams']['lifetime']);
+ $css_url = Horde::getCacheUrl('css', array('cid' => $sig));
+ break;
+ }
+
+ if (!$exists) {
+ $flags = defined('FILE_IGNORE_NEW_LINES')
+ ? (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
+ : 0;
+
+ foreach ($css as $file) {
+ $path = substr($file['u'], 0, strrpos($file['u'], '/') + 1);
+
+ // Fix relative URLs, convert graphics URLs to data URLs
+ // (if possible), remove multiple whitespaces, and strip
+ // comments.
+ $tmp = preg_replace(array('/(url\(["\']?)([^\/])/i', '/\s+/', '/\/\*.*?\*\//'), array('$1' . $path . '$2', ' ', ''), implode('', file($file['f'], $flags)));
+ if ($GLOBALS['browser']->hasFeature('dataurl')) {
+ $tmp = preg_replace_callback('/(background(?:-image)?:[^;}]*(?:url\(["\']?))(.*?)((?:["\']?\)))/i', array(__CLASS__, 'stylesheetCallback'), $tmp);
+ }
+ $out .= $tmp;
+ }
+
+ /* Use CSS tidy to clean up file. */
+ if ($conf['cachecssparams']['compress'] == 'php') {
+ try {
+ $out = Horde_Text_Filter::filter($out, 'csstidy');
+ } catch (Horde_Exception $e) {}
+ }
+
+ switch ($cache_type) {
+ case 'filesystem':
+ if (!file_put_contents($css_path, $out)) {
+ throw new Horde_Exception('Could not write cached CSS file to disk.');
+ }
+ break;
+
+ case 'horde_cache':
+ $cache->set($sig, $out);
+ break;
+ }
+ }
+
+ $css_out = array(array('u' => $css_url));
+ }
+
+ foreach ($css_out as $file) {
+ echo '<link href="' . $file['u'] . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
+ }
+ }
+
+ /**
+ * Callback for includeStylesheetFiles() to convert images to base64
+ * data strings.
+ *
+ * @param array $matches The list of matches from preg_replace_callback.
+ *
+ * @return string The image string.
+ */
+ static public function stylesheetCallback($matches)
+ {
+ /* Limit data to 16 KB in stylesheets. */
+ return $matches[1] . Horde::base64ImgData($matches[2], 16384) . $matches[3];
+ }
+
+ /**
+ * Return the list of base stylesheets to display.
+ * Callback for includeStylesheetFiles() to convert images to base64
+ * data strings.
+ *
+ * @param mixed $theme The theme to use; specify an empty value to
+ * retrieve the theme from user preferences, and
+ * false for no theme.
+ * @param array $options Additional options:
+ * <pre>
+ * 'app' - (string) The current application.
+ * 'sub' - (string) A subdirectory containing additional CSS files to
+ * load as an overlay to the base CSS files.
+ * </pre>
+ *
+ * @return array TODO
+ */
+ static public function getStylesheets($theme = '', $options = array())
+ {
+ if (($theme === '') && isset($GLOBALS['prefs'])) {
+ $theme = $GLOBALS['prefs']->getValue('theme');
+ }
+
+ $css = array();
+
+ $css_list = array('screen');
+ if (isset($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
+ $css_list[] = 'rtl';
+ }
+
+ /* Collect browser specific stylesheets if needed. */
+ switch ($GLOBALS['browser']->getBrowser()) {
+ case 'msie':
+ $ie_major = $GLOBALS['browser']->getMajor();
+ if ($ie_major == 8) {
+ $css_list[] = 'ie8';
+ } elseif ($ie_major == 7) {
+ $css_list[] = 'ie7';
+ } elseif ($ie_major < 7) {
+ $css_list[] = 'ie6_or_less';
+ if ($GLOBALS['browser']->getPlatform() == 'mac') {
+ $css_list[] = 'ie5mac';
+ }
+ }
+ break;
+
+
+ case 'opera':
+ $css_list[] = 'opera';
+ break;
+
+ case 'mozilla':
+ $css_list[] = 'mozilla';
+ break;
+
+ case 'webkit':
+ $css_list[] = 'webkit';
+ }
+
+ $curr_app = empty($options['app'])
+ ? $GLOBALS['registry']->getApp()
+ : $options['app'];
+ $apps = array_unique(array('horde', $curr_app));
+ $sub = empty($options['sub']) ? null : $options['sub'];
+
+ foreach ($apps as $app) {
+ $themes_fs = $GLOBALS['registry']->get('themesfs', $app) . '/';
+ $themes_uri = Horde::url($GLOBALS['registry']->get('themesuri', $app), false, -1) . '/';
+
+ foreach ($css_list as $css_name) {
+ $css[$themes_fs . $css_name . '.css'] = $themes_uri . $css_name . '.css';
+ if ($sub && ($app == $curr_app)) {
+ $css[$themes_fs . $sub . '/' . $css_name . '.css'] = $themes_uri . $sub . '/' . $css_name . '.css';
+ }
+
+ if (!empty($theme)) {
+ $css[$themes_fs . $theme . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $css_name . '.css';
+ if ($sub && ($app == $curr_app)) {
+ $css[$themes_fs . $theme . '/' . $sub . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $sub . '/' . $css_name . '.css';
+ }
+ }
+ }
+ }
+
+ /* Add user-defined additional stylesheets. */
+ try {
+ $css = array_merge($css, Horde::callHook('cssfiles', array($theme), 'horde'));
+ } catch (Horde_Exception_HookNotSet $e) {}
+ if ($curr_app != 'horde') {
+ try {
+ $css = array_merge($css, Horde::callHook('cssfiles', array($theme), $curr_app));
+ } catch (Horde_Exception_HookNotSet $e) {}
+ }
+
+ $css_out = array();
+ foreach ($css as $f => $u) {
+ if (file_exists($f)) {
+ $css_out[] = array('f' => $f, 'u' => $u);
+ }
+ }
+
+ return $css_out;
+ }
+
+ /**
+ * Return the path to an image, using the default image if the image does
+ * not exist in the current theme.
+ *
+ * @param string $name The image name. If null, will return the image
+ * directory.
+ * @param mixed $options Additional options. If a string, is taken to be
+ * the 'app' parameter. If an array, the following
+ * options are available:
+ * <pre>
+ * 'app' - (string) Use this application instead of the current app.
+ * 'nohorde' - (boolean) If true, do not fallback to horde for image.
+ * 'notheme' - (boolean) If true, do not use themed data.
+ * 'theme' - (string) Use this theme instead of the Horde default.
+ * </pre>
+ *
+ * @return Horde_Themes_Image An object which contains the URI
+ * and filesystem location of the image.
+ */
+ static public function img($name = null, $options = array())
+ {
+ return self::_getObject('graphics', $name, $options);
+ }
+
+ /**
+ * Return the path to a sound, using the default sound if the sound does
+ * not exist in the current theme.
+ *
+ * @param string $name The sound name. If null, will return the sound
+ * directory.
+ * @param mixed $options Additional options. If a string, is taken to be
+ * the 'app' parameter. If an array, the following
+ * options are available:
+ * <pre>
+ * 'app' - (string) Use this application instead of the current app.
+ * 'nohorde' - (boolean) If true, do not fallback to horde for sound.
+ * 'notheme' - (boolean) If true, do not use themed data.
+ * 'theme' - (string) Use this theme instead of the Horde default.
+ * </pre>
+ *
+ * @return Horde_Themes_Image An object which contains the URI
+ * and filesystem location of the sound.
+ */
+ static public function sound($name = null, $options = array())
+ {
+ return self::_getObject('sound', $name, $options);
+ }
+
+ /**
+ * Return the path to a themes element, using the default element if the
+ * image does not exist in the current theme.
+ *
+ * @param string $type The element type ('graphics', 'sound').
+ * @param string $name The element name. If null, will return the
+ * element directory.
+ * @param mixed $options Additional options. If a string, is taken to be
+ * the 'app' parameter. If an array, the following
+ * options are available:
+ * <pre>
+ * 'app' - (string) Use this application instead of the current app.
+ * 'nohorde' - (boolean) If true, do not fallback to horde for element.
+ * 'notheme' - (boolean) If true, do not use themed data.
+ * 'theme' - (string) Use this theme instead of the Horde default.
+ * </pre>
+ *
+ * @return Horde_Themes_Element An object which contains the URI and
+ * filesystem location of the element.
+ */
+ static protected function _getObject($type, $name, $options)
+ {
+ if (is_string($options)) {
+ $app = $options;
+ $options = array();
+ } else {
+ $app = empty($options['app'])
+ ? $GLOBALS['registry']->getApp()
+ : $options['app'];
+ }
+ if ($GLOBALS['registry']->get('status', $app) == 'heading') {
+ $app = 'horde';
+ }
+
+ $app_list = array($app);
+ if ($app != 'horde' && empty($options['nohorde'])) {
+ $app_list[] = 'horde';
+ }
+ $path = '/' . $type . (is_null($name) ? '' : '/' . $name);
+
+ $classname = ($type == 'graphics')
+ ? 'Horde_Themes_Image'
+ : 'Horde_Themes_Sound';
+
+ /* Check themes first. */
+ if (empty($options['notheme']) &&
+ isset($GLOBALS['prefs']) &&
+ (($theme = $GLOBALS['prefs']->getValue('theme')) ||
+ (!empty($options['theme']) && ($theme = $options['theme'])))) {
+ $tpath = '/' . $theme . $path;
+ foreach ($app_list as $app) {
+ $filepath = $GLOBALS['registry']->get('themesfs', $app) . $tpath;
+ if (is_null($name) || file_exists($filepath)) {
+ return new $classname($GLOBALS['registry']->get('themesuri', $app) . $tpath, $filepath);
+ }
+ }
+ }
+
+ /* Fall back to app/horde defaults. */
+ foreach ($app_list as $app) {
+ $filepath = $GLOBALS['registry']->get('themesfs', $app) . $path;
+ if (file_exists($filepath)) {
+ return new $classname($GLOBALS['registry']->get('themesuri', $app) . $path, $filepath);
+ }
+ }
+
+ return '';
+ }
+
+ /**
+ * Returns a list of available sounds for a theme.
+ *
+ * @return array An array of Horde_Themes_Sound objects. Keys are the
+ * base filenames.
+ */
+ static public function soundList()
+ {
+ $app = $GLOBALS['registry']->getApp();
+
+ /* Do search in reverse order - app + theme sounds have the highest
+ * priority and will overwrite previous sound definitions. */
+ $locations = array(
+ self::sound(null, array('app' => 'horde', 'notheme' => true)),
+ // Placeholder for app
+ null,
+ self::sound(null, 'horde')
+ );
+
+ if ($app != 'horde') {
+ $locations[1] = self::sound(null, array('app' => $app, 'notheme' => true));
+ $locations[3] = self::sound(null, $app);
+ }
+
+ $sounds = array();
+ foreach ($locations as $val) {
+ if ($val) {
+ foreach (glob($val->fs . '/*.wav') as $file) {
+ $file = basename($file);
+ if (!isset($sounds[$file])) {
+ $sounds[$file] = self::sound($file);
+ }
+ }
+ }
+ }
+
+ ksort($sounds);
+ return $sounds;
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * The Horde_Themes_Element:: class provides an object-oriented interface to
+ * a themes element.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Element
+{
+ /**
+ * The URI.
+ *
+ * @var string
+ */
+ public $uri = '';
+
+ /**
+ * The filesystem path.
+ *
+ * @var string
+ */
+ public $fs = '';
+
+ /**
+ * Constructor.
+ *
+ * @param string $uri The image URI.
+ * @param string $fs The image filesystem path.
+ */
+ public function __construct($uri, $fs)
+ {
+ $this->uri = $uri;
+ $this->fs = $fs;
+ }
+
+ /**
+ * String representation of this object.
+ *
+ * @return string The URI.
+ */
+ public function __toString()
+ {
+ return $this->uri;
+ }
+
+ /**
+ * Convert a URI into a Horde_Themes_Image object.
+ *
+ * @param string $uri The URI to convert.
+ *
+ * @return Horde_Themes_Image An image object.
+ */
+ static public function fromUri($uri)
+ {
+ return new self($uri, realpath($GLOBALS['registry']->get('fileroot', 'horde')) . preg_replace('/^' . preg_quote($GLOBALS['registry']->get('webroot', 'horde'), '/') . '/', '', $uri));
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * The Horde_Themes_Image:: class provides an object-oriented interface to
+ * a themed image.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Image extends Horde_Themes_Element {}
--- /dev/null
+<?php
+/**
+ * The Horde_Themes_Sound:: class provides an object-oriented interface to
+ * a themed sound.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Sound extends Horde_Themes_Element {}
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Add Horde::nocacheUrl().
+ <notes>* Add Horde_Themes:: class.
+ * Add Horde::nocacheUrl().
* Remove dependency on Horde_DOM package.
* Added Horde_Registry_Api:: and Horde_Registry_Application:: classes.
* Moved Horde_Exception to Exception package.
<dir name="Script">
<file name="Files.php" role="php" />
</dir> <!-- /lib/Horde/Script -->
+ <file name="Themes.php" role="php" />
+ <dir name="Themes">
+ <file name="Element.php" role="php" />
+ <file name="Image.php" role="php" />
+ <file name="Sound.php" role="php" />
+ </dir> <!-- /lib/Horde/Themes -->
</dir> <!-- /lib/Horde -->
<file name="Horde.php" role="php" />
</dir> <!-- /lib -->
<install name="lib/Horde/Registry/Application.php" as="Horde/Registry/Application.php" />
<install name="lib/Horde/Registry/Caller.php" as="Horde/Registry/Caller.php" />
<install name="lib/Horde/Script/Files.php" as="Horde/Script/Files.php" />
+ <install name="lib/Horde/Themes.php" as="Horde/Themes.php" />
+ <install name="lib/Horde/Themes/Element.php" as="Horde/Themes/Element.php" />
+ <install name="lib/Horde/Themes/Image.php" as="Horde/Themes/Image.php" />
+ <install name="lib/Horde/Themes/Sound.php" as="Horde/Themes/Sound.php" />
<install name="lib/Horde.php" as="Horde.php" />
</filelist>
</phprelease>
global $registry;
if (isset($registry) && is_a($registry, 'Registry')) {
/* Registry available, so use a pretty image. */
- $this->_requiredMarker = Horde::img('required.png', '*', '', $registry->getImageDir('horde'));
+ $this->_requiredMarker = Horde::img('required.png', '*');
} else {
/* No registry available, use something plain. */
$this->_requiredMarker = '*';
function init()
{
- foreach (glob($GLOBALS['registry']->get('themesfs', 'horde') . '/sounds/*.wav') as $sound) {
- $this->_sounds[] = basename($sound);
- }
+ $this->_sounds = array_keys(Horde_Themes::getSounds());
}
function getSounds()
}
if (!is_null($ret)) {
- $ret['url'] = $GLOBALS['registry']->getImageDir($app) . '/mime/' . $ret['url'];
+ $ret['url'] = Horde_Themes::img('mime/' . $ret['url'], $app);
}
return $ret;
$imgId = $var->getVarName() . 'ehelper';
if ($var->type->hasHelper('emoticons')) {
$html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;')
- . Horde::img('smile.png', _("Emoticons"), 'id="' . $imgId . '" align="middle"', $GLOBALS['registry']->getImageDir('horde') . '/emoticons')
+ . Horde::img('emoticons/smile.png', _("Emoticons"), 'id="' . $imgId . '" align="middle"')
. '</a>'."\n";
}
$html .= '</div><div id="htmlhelper_' . $var->getVarName()
$imgId = $var->getVarName() .'goto';
$html .= '<div id="goto"></div>';
$html .= Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'' . $imgId . '\', \'' . $var->getVarName() . '\'); return false;')
- . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '" ', $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '" ')
. '</a>';
}
Horde::addScriptFile('open_colorpicker.js', 'horde');
$html .= Horde::img('blank.gif', '', array('class' => 'form-colorpicker-preview',
'id' => 'colordemo_' . $var->getVarName(),
- 'style' => 'background:' . $var->getValue($vars)), $GLOBALS['registry']->getImageDir('horde'))
+ 'style' => 'background:' . $var->getValue($vars)))
. Horde::link('#', _("Color Picker"), '', '', 'openColorPicker(\''. $var->getVarName() .'\'); return false;')
- . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'
+ . Horde::img('colorpicker.png', _("Color Picker")) . '</a>'
. '<div id="colorpicker_' . $var->getVarName() . '" class="form-colorpicker-palette"></div>';
}
. ' id="'. $varname . '-list-">'
. $var->type->getOptions($var->getValue($vars)) . ' </select><div class="leftFloat">'
. Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;')
- . Horde::img('nav/up.png', _("Move up"), '', $registry->getImageDir('horde'))
+ . Horde::img('nav/up.png', _("Move up"))
. '</a><br />'
. Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;')
- . Horde::img('nav/down.png', _("Move down"), '', $registry->getImageDir('horde'))
+ . Horde::img('nav/down.png', _("Move down"))
. '</a></div>'
. '<script type="text/javascript">' . "\n"
. sprintf('%1$s = new Horde_Form_Sorter(\'%1$s\', \'%2$s\', \'%3$s\');' . "\n",
. $var->type->getOptions(0, $fname)
. ' </select>'
. '<div><a href="" onclick="Horde_Form_Assign.move(\''. $fname .'\', 0); return false;">'
- . Horde::img('rhand.png', _("Add column"), null, $registry->getImageDir('horde'))
+ . Horde::img('rhand.png', _("Add column"))
. '</a><br /><a href="" onclick="Horde_Form_Assign.move(\''
. $fname . '\', 1); return false;">'
- . Horde::img('lhand.png', _("Remove column"), null, $registry->getImageDir('horde'))
+ . Horde::img('lhand.png', _("Remove column"))
. '</a></div>'
. sprintf(' <select name="%s__right" multiple="multiple" size="%d" style="width:%s"%s>',
$name, $size, $width,
if ($GLOBALS['browser']->hasFeature('javascript')) {
$imgId = $varname .'goto';
$html .= '<div id="goto" class="headerbox" style="position:absolute;visibility:hidden;padding:0"></div>';
- $html .= Horde::link('#', _("Select an object"), '', '', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/') . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), 'id="' . $imgId . '" align="middle"', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+ $html .= Horde::link('#', _("Select an object"), '', '', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/') . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), 'id="' . $imgId . '" align="middle"') . "</a>\n";
}
return $html;
if ($number && $registry->hasMethod('telephony/dial')) {
$url = $registry->call('telephony/dial', array($number));
$label = sprintf(_("Dial %s"), $number);
- $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label) . '</a>';
}
return $html;
$number = $var->getValue($vars);
if ($number && $registry->hasMethod('sms/compose')) {
$url = $registry->link('sms/compose', array('to' => $number));
- $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS"), '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS")) . '</a>';
}
return $html;
$html = nl2br(htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset()));
if (!empty($mapurl)) {
- $html .= ' ' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc) . '</a>';
}
if (!empty($mapurl2)) {
- $html .= ' ' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2) . '</a>';
}
if (!empty($mapurl3)) {
- $html .= ' ' . Horde::link(Horde::externalUrl($mapurl3), $desc3, null, '_blank') . Horde::img($icon3, $desc3, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl($mapurl3), $desc3, null, '_blank') . Horde::img($icon3, $desc3) . '</a>';
}
return $html;
$img = $data['code'] . '.png';
return file_exists($GLOBALS['registry']->get('themesfs', 'horde') . '/graphics/flags/' . $img)
- ? Horde::img($img, $data['name'], array('title' => $data['name']), $GLOBALS['registry']->getImageDir('horde') . '/flags')
+ ? Horde::img('flags/' . $img, $data['name'], array('title' => $data['name']))
: '[' . $data['name'] . ']';
}
/* Get the perms tree. */
$nodes = $this->_perms->getTree();
- $icondir = array('icondir' => $GLOBALS['registry']->getImageDir());
+ $icondir = array('icondir' => Horde_Themes::img());
$perms_node = $icondir + array('icon' => 'perms.png');
$add = Horde::applicationUrl('admin/perms/addchild.php');
$add_img = Horde::img('add_perm.png', _("Add Permission"));
/* Default permissions. */
$perm_val = $permission->getDefaultPermissions();
- $this->_form->setSection('default', _("All Authenticated Users"), Horde::img('perms.png', '', '', $registry->getImageDir('horde')), false);
+ $this->_form->setSection('default', _("All Authenticated Users"), Horde::img('perms.png'), false);
/* We MUST use 'deflt' for the variable name because 'default' is a
* reserved word in JavaScript. */
/* Object creator permissions. */
$perm_val = $permission->getCreatorPermissions();
- $this->_form->setSection('creator', _("Creator Permissions"), Horde::img('user.png', '', '', $registry->getImageDir('horde')), false);
+ $this->_form->setSection('creator', _("Creator Permissions"), Horde::img('user.png'), false);
if ($this->_type == 'matrix') {
/* Define a single matrix row for creator perms. */
/* Users permissions. */
$perm_val = $permission->getUserPermissions();
- $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png', '', '', $registry->getImageDir('horde')), false);
+ $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png'), false);
$auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']);
if ($auth->hasCapability('list')) {
/* The auth driver has list capabilities so set up an array which
/* Groups permissions. */
$perm_val = $permission->getGroupPermissions();
- $this->_form->setSection('groups', _("Groups"), Horde::img('group.png', '', '', $registry->getImageDir('horde')), false);
+ $this->_form->setSection('groups', _("Groups"), Horde::img('group.png'), false);
require_once 'Horde/Group.php';
$groups = Group::singleton();
$group_list = $groups->listGroups();
static public function getImage($icon, $prefix, $postfix)
{
if (!isset(self::$_iconpath)) {
- self::$_iconpath = $GLOBALS['registry']->getImageDir('horde') . '/emoticons';
+ self::$_iconpath = Horde_Themes::img(null, 'horde') . '/emoticons';
}
return $prefix . Horde::img(self::getIcons($icon) . '.png', $icon, array('align' => 'middle', 'title' => $icon), self::$_iconpath) . $postfix;
$_SESSION['horde_tree'][$this->_instance] = array();
}
- $this->_img_dir = $GLOBALS['registry']->getImageDir('horde') . '/tree';
+ $this->_img_dir = Horde_Themes::img(null, array('app' => 'horde', 'notheme' => true)) . '/tree';
if (!empty($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
$rev_imgs = array(
$image = $var->type->getImage($vars, $var);
Horde::addScriptFile('image.js', 'horde');
- $graphics_dir = $GLOBALS['registry']->getImageDir('horde');
+ $graphics_dir = Horde_Themes::img(null, 'horde');
$img_dir = $graphics_dir . '/image';
$html = '';
Horde::addScriptFile('open_html_helper.js', 'horde', array('direct' => false));
$imgId = $this->_genID($var->getVarName(), false) . 'ehelper';
if ($var->type->hasHelper('emoticons')) {
- $html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;') . Horde::img('smile.png', _("Emoticons"), 'id="' . $imgId . '"', $GLOBALS['registry']->getImageDir('horde') . '/emoticons') . '</a>';
+ $html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;') . Horde::img('emoticons/smile.png', _("Emoticons"), 'id="' . $imgId . '"') . '</a>';
}
$html .= '</td></tr><tr><td><div ' . $this->_genID('htmlhelper_' . $var->getVarName()) . ' class="control"></div></td></tr></table>' . "\n";
}
$GLOBALS['browser']->hasFeature('javascript')) {
Horde_Ui_JsCalendar::init();
$imgId = $this->_genID($var->getVarName(), false) . 'goto';
- $html .= Horde::link('#', _("Select a date"), '', '', 'Horde_Calendar.open(\'' . $imgId . '\', null)') . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '"', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+ $html .= Horde::link('#', _("Select a date"), '', '', 'Horde_Calendar.open(\'' . $imgId . '\', null)') . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '"') . "</a>\n";
}
return $html;
$html .= '<td>'
. Horde::link('#', _("Color Picker"), '', '',
'new ColorPicker({ color: \'' . htmlspecialchars($color) . '\', offsetParent: Event.element(event), update: [[\'' . $varname . '\', \'value\'], [\'' . $varname . '\', \'background\']] }); return false;')
- . Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) . '</a></td>';
+ . Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') . '</a></td>';
}
return $html . '</tr></table>';
}
'[list]" onchange="' . $instance . '.deselectHeader();" ' .
$this->_genID($varname . '[list]') . '>' .
$var->type->getOptions($var->getValue($vars)) . '</select><div class="leftFloat">' .
- Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;') . Horde::img('nav/up.png', _("Move up"), '', $registry->getImageDir('horde')) . '</a><br />' .
- Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;') . Horde::img('nav/down.png', _("Move down"), '', $registry->getImageDir('horde')) . '</a></div>' .
+ Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;') . Horde::img('nav/up.png', _("Move up")) . '</a><br />' .
+ Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;') . Horde::img('nav/down.png', _("Move down")) . '</a></div>' .
'<script type="text/javascript">' . "\n" .
sprintf('%1$s = new Horde_Form_Sorter(\'%1$s\', \'%2$s\', \'%3$s\');' . "\n",
$instance, $varname, $var->type->getHeader()) .
$var->type->getOptions(0, $form->getName(), $var->getVarName()) .
'</select></td><td>' .
'<a href="#" onclick="Horde_Form_Assign.move(\'' . $form->getName() . '\', \'' . $var->getVarName() . '\', 0); return false;">' .
- Horde::img('rhand.png', _("Add"), null, $registry->getImageDir('horde')) .
+ Horde::img('rhand.png', _("Add")) .
'</a><br /><a href="#" onclick="Horde_Form_Assign.move(\'' .
$form->getName() . '\', \'' . $var->getVarName() . '\', 1); return false;">' .
- Horde::img('lhand.png', _("Remove"), null, $registry->getImageDir('horde')) .
+ Horde::img('lhand.png', _("Remove")) .
'</a></td><td>' .
sprintf('<select name="%s__right" multiple="multiple" size="%d" style="width:%s"%s>',
$name, $size, $width,
}
if ($GLOBALS['browser']->hasFeature('javascript')) {
- $html .= Horde::link($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', _("Select an object"), '', '_blank', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', array('urlencode' => true)) . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), '', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+ $html .= Horde::link($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', _("Select an object"), '', '_blank', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', array('urlencode' => true)) . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object")) . "</a>\n";
}
return $html;
if ($number && $registry->hasMethod('telephony/dial')) {
$url = $registry->call('telephony/dial', array($number));
$label = sprintf(_("Dial %s"), $number);
- $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label) . '</a>';
}
return $html;
$number = $var->getValue($vars);
if ($number && $registry->hasMethod('sms/compose')) {
$url = $registry->link('sms/compose', array('to' => $number));
- $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS"), '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS")) . '</a>';
}
return $html;
$html = $text ? nl2br(@htmlspecialchars($address, ENT_QUOTES, $this->_charset)) : '';
if (!empty($mapurl)) {
- $html .= ' ' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc) . '</a>';
}
if (!empty($mapurl2)) {
- $html .= ' ' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2, '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2) . '</a>';
}
/* Google generated map. */
if ($address) {
- $html .= ' ' . Horde::link(Horde::externalUrl('http://maps.google.com/maps?q=' . urlencode(preg_replace('/\r?\n/', ',', $address)) . '&hl=en'), _("Google Maps"), null, '_blank') . Horde::img($google_icon, _("Google Maps"), '', $registry->getImageDir('horde')) . '</a>';
+ $html .= ' ' . Horde::link(Horde::externalUrl('http://maps.google.com/maps?q=' . urlencode(preg_replace('/\r?\n/', ',', $address)) . '&hl=en'), _("Google Maps"), null, '_blank') . Horde::img($google_icon, _("Google Maps")) . '</a>';
}
return $html;
// TODO
return;
- $icondir = $GLOBALS['registry']->getImageDir();
+ $icondir = Horde_Themes::img();
$login_url = Horde::applicationUrl('login.php');
foreach ($GLOBALS['gollem_backends'] as $key => $val) {
if (!empty($_SESSION['gollem'])) {
$backend_key = $_SESSION['gollem']['backend_key'];
if (Horde_Auth::isAdmin()) {
- $menu->add(Horde_Util::addParameter(Horde::applicationUrl('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde_Util::addParameter(Horde::applicationUrl('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'));
}
if ($_SESSION['gollem']['backends'][$backend_key]['quota_val'] != -1) {
} else {
$quota_url = Horde_Util::addParameter(Horde::applicationUrl('quota.php'), 'backend', $backend_key);
}
- $menu->add($quota_url, _("Check Quota"), 'info_icon.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add($quota_url, _("Check Quota"), 'info_icon.png', Horde_Themes::img(null, 'horde'));
}
}
$title = $GLOBALS['gollem_be']['label'];
/* Image links. */
-$image_dir = $registry->getImageDir('horde');
+$image_dir = Horde_Themes::img(null, 'horde');
$edit_img = Horde::img('edit.png', _("Edit"), null, $image_dir);
$download_img = Horde::img('download.png', _("Download"), null, $image_dir);
$folder_img = Horde::img('folder.png', _("folder"));
$t->set('formid', htmlspecialchars($formid));
$t->set('navlink', Gollem::directoryNavLink($currdir, Horde_Util::addParameter($self_url, array('cacheid' => $cacheid, 'formid' => $formid))));
if ($GLOBALS['conf']['backend']['backend_list'] == 'shown') {
- $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::applicationUrl('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server"), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>', true);
+ $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::applicationUrl('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server")) . '</a>', true);
} else {
$t->set('changeserver', '', true);
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
<?php Horde::outputInlineScript(); ?>
</head>
$t->set('columns', $prefs->getValue('columns'));
- $imagedir = $registry->getImageDir('horde');
- $t->set('add', Horde::img('rhand.png', _("Add column"), null, $imagedir));
- $t->set('remove', Horde::img('lhand.png', _("Remove column"), null, $imagedir));
- $t->set('left', Horde::img('nav/up.png', _("Move left"), null, $imagedir));
- $t->set('right', Horde::img('nav/down.png', _("Move right"), null, $imagedir));
+ $t->set('add', Horde::img('rhand.png', _("Add column")));
+ $t->set('remove', Horde::img('lhand.png', _("Remove column")));
+ $t->set('left', Horde::img('nav/up.png', _("Move left")));
+ $t->set('right', Horde::img('nav/down.png', _("Move right")));
echo $t->fetch(GOLLEM_TEMPLATES . '/prefs/columnselect.html');
}
/* Set up some node params. */
$spacer = ' ';
-$icondir = array('icondir' => $registry->getImageDir());
+$icondir = array('icondir' => Horde_Themes::img());
$group_node = $icondir + array('icon' => 'group.png');
$add = Horde::applicationUrl('admin/groups.php?actionID=addchild');
$add_img = Horde::img('add_group.png');
echo ' (' . count($session_info) . ')</h1>' .
'<ul class="headerbox linedRow">';
- $plus = Horde::img('tree/plusonly.png', _("Expand"), '', $GLOBALS['registry']->getImageDir('horde'));
- $minus = Horde::img('tree/minusonly.png', _("Collapse"), 'style="display:none"', $GLOBALS['registry']->getImageDir('horde'));
+ $plus = Horde::img('tree/plusonly.png', _("Expand"));
+ $minus = Horde::img('tree/minusonly.png', _("Collapse"), 'style="display:none"');
if (class_exists('Net_DNS')) {
$resolver = new Net_DNS_Resolver();
if (!empty($_SESSION['_config'])) {
$url = Horde::applicationUrl('admin/setup/diff.php');
$action = _("Show differences between currently saved and the newly generated configuration.");
- $actions[] = array('icon' => Horde::img('search.png', '', 'align="middle"', $registry->getImageDir('horde')),
+ $actions[] = array('icon' => Horde::img('search.png', '', 'align="middle"'),
'link' => Horde::link('#', '', '', '', Horde::popupJs($url, array('height' => 480, 'width' => 640, 'urlencode' => true)) . 'return false;') . $action . '</a>');
/* Action to download the configuration upgrade PHP script. */
$url = Horde::applicationUrl('admin/setup/scripts.php')->add(array('setup' => 'conf', 'type' => 'php'));
$action = _("Download generated configuration as PHP script.");
- $actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"', $registry->getImageDir('horde')),
+ $actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"'),
'link' => Horde::link($url) . $action . '</a>');
/* Action to save the configuration upgrade PHP script. */
$action = _("Save generated configuration as a PHP script to your server's temporary directory.");
- $actions[] = array('icon' => Horde::img('save.png', '', 'align="middle"', $registry->getImageDir('horde')),
+ $actions[] = array('icon' => Horde::img('save.png', '', 'align="middle"'),
'link' => Horde::link($url->add('save', 'tmp')) . $action . '</a>');
/* Set up the form for FTP upload of scripts. */
/* Action to remove the configuration upgrade PHP script. */
$url = Horde::applicationUrl('admin/setup/scripts.php')->add('clean', 'tmp');
$action = _("Remove saved script from server's temporary directory.");
- $actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"', $registry->getImageDir('horde')),
+ $actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"'),
'link' => Horde::link($url) . $action . '</a>');
}
$node_params_master = array(
'target' => 'help_main',
'icon' => 'help.png',
- 'icondir' => $registry->getImageDir('horde')
+ 'icondir' => dirname(Horde_Themes::img('help.png'))
);
foreach ($topics as $id => $title) {
foreach ($results as $result) {
echo '<li class="linedRow">' .
- Horde::img($result['app'] . '.png', '', '', $registry->getImageDir($result['app'])) .
+ Horde::img(Horde_Themes::img($result['app'] . '.png', $result['app'])) .
Horde::link($result['view_url'], '', '', '', '', '', '', array('style' => 'margin:4px')) .
$result['title'] .
'</a><span style="font-style:italic;"><div style="margin-left:10px;font-style:italic">' . $result['desc'] . '</div></li>';
// Add the administration menu if the user is an admin.
if (Horde_Auth::isAdmin()) {
$menu['administration'] = array('name' => _("Administration"),
- 'icon' => $registry->getImageDir() . '/administration.png',
+ 'icon' => Horde_Themes::img('administration.png'),
'status' => 'heading');
try {
$list = $registry->callByPackage('horde', 'admin_list');
foreach ($list as $method => $vals) {
$name = Horde::stripAccessKey($vals['name']);
- $icon = isset($vals['icon']) ? $registry->getImageDir() . '/' . $vals['icon'] : $registry->get('icon');
+ $icon = isset($vals['icon'])
+ ? Horde_Themes::img($vals['icon'])
+ : $registry->get('icon');
$menu['administration_' . $method] = array(
'name' => $name,
$conf['prefs']['driver'] != '' && $conf['prefs']['driver'] != 'none') {
$menu['options'] = array('name' => _("Options"),
'status' => 'active',
- 'icon' => $registry->getImageDir() . '/prefs.png');
+ 'icon' => Horde_Themes::img('prefs.png'));
/* Get a list of configurable applications. */
$prefs_apps = array();
if (Horde_Auth::getAuth()) {
$menu['logout'] = array('name' => _("Log out"),
'status' => 'active',
- 'icon' => $registry->getImageDir() . '/logout.png',
+ 'icon' => Horde_Themes::img('logout.png'),
'url' => Horde::getServiceLink('logout', 'horde'),
'target' => '_parent');
} else {
$menu['login'] = array('name' => _("Log in"),
'status' => 'active',
- 'icon' => $registry->getImageDir() . '/login.png',
+ 'icon' => Horde_Themes::img('login.png'),
'url' => Horde::getServiceLink('login', 'horde'));
}
try {
foreach ($registry->callByPackage('horde', 'admin_list') as $val) {
$img = isset($val['icon'])
- ? $registry->getImageDir() . '/' . $val['icon']
+ ? Horde_Themes::img($val['icon'])
: $registry->get('icon');
$menu->add(strval(Horde::url($registry->applicationWebPath($val['link']))), $val['name'], $img, '');
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
<?php if (!$GLOBALS['browser']->isMobile()): ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php
-echo Horde::includeStylesheetFiles(array('additional' => Horde_Util::nonInputVar('horde_css_stylesheets', array())));
+echo Horde_Themes::includeStylesheetFiles(array('additional' => Horde_Util::nonInputVar('horde_css_stylesheets', array())));
echo Horde::includeScriptFiles();
echo implode("\n", Horde_Util::nonInputVar('linkTags', array()));
Horde::outputInlineScript();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
<html>
<head>
- <link rel="SHORTCUT ICON" href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<title><?php echo htmlspecialchars($GLOBALS['registry']->get('name')) ?></title>
</head>
}
cell.appendChild(link);
img = document.createElement('IMG')
- img.src = '<?php echo $GLOBALS['registry']->getImageDir('horde') . '/emoticons/' . $icon . '.png' ?>';
+ img.src = '<?php echo Horde_Themes::img('emoticons/' . $icon . '.png') ?>';
img.align = 'middle';
img.border = 0;
link.appendChild(img);
$status = $GLOBALS['registry']->get('status', 'horde');
if ($GLOBALS['registry']->getApp() == 'horde' &&
$status != 'notoolbar' && $status != 'hidden' && $status != 'inactive') {
- $menu->add(Horde::applicationUrl('services/portal/'), _("_Home"), 'horde.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('services/portal/'), _("_Home"), 'horde.png', Horde_Themes::img(null, 'horde'));
}
}
echo $menu->render();
<?php elseif ($param['type'] == 'sound'): $current_sound = !empty($alarm_pref[$method][$name]) ? $alarm_pref[$method][$name] : ''; ?>
<ul class="sound-list">
<li><label><input type="radio" name="<?php echo $pref . '_' . $name ?>" value=""<?php if (!$current_sound) echo ' checked="checked"' ?> /> <?php echo _("No Sound") ?></label></li>
-<?php foreach (glob($registry->get('themesfs', 'horde') . '/sounds/*.wav') as $sound): $sound = basename($sound); ?>
+<?php foreach (Horde_Themes::soundList() as $key => $val): ?>
<li>
<label>
- <input type="radio" name="<?php echo $pref . '_' . $name ?>" value="<?php echo htmlspecialchars($sound) ?>"<?php if ($current_sound == $sound) echo ' checked="checked"' ?> />
- <?php echo htmlspecialchars($sound) ?>
+ <input type="radio" name="<?php echo $pref . '_' . $name ?>" value="<?php echo htmlspecialchars($key) ?>"<?php if ($current_sound == $key) echo ' checked="checked"' ?> />
+ <?php echo htmlspecialchars($key) ?>
</label>
- <embed autostart="false" src="<?php echo $registry->get('themesuri', 'horde') . '/sounds/' . htmlspecialchars($sound) ?>" />
+ <embed autostart="false" src="<?php echo htmlspecialchars($val->uri) ?>" />
</li>
<?php endforeach; ?>
</ul>
<?php if (!$prefs->isLocked('category_colors')): ?>
<input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
<a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
- <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
<?php endif; ?>
</td>
</tr>
<?php if (!$prefs->isLocked('category_colors')): ?>
<input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
<a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
- <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
<?php endif; ?>
</td>
</tr>
<?php if (!$prefs->isLocked('category_colors')): ?>
<input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
<a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
- <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+ <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
<?php endif; ?>
<a href="#" onclick="removeCategory(decodeURIComponent('<?php echo rawurlencode(Horde_String::convertCharset($name, Horde_Nls::getCharset(), 'UTF-8')) ?>')); return false;"><?php echo Horde::img('delete.png') ?></a>
</td>
<tr valign="middle">
<td width="100%" colspan="6" class="header">
<span class="rightFloat">
- <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window"), '', $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window")) ?></a>
</span>
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Edit permissions for \"%s\""), htmlspecialchars($share->get('name'))); if (!empty($help)) echo ' ' . Horde_Help::link($app, $help) ?>
+ <?php echo Horde::img('perms.png')) . ' ' . sprintf(_("Edit permissions for \"%s\""), htmlspecialchars($share->get('name'))); if (!empty($help)) echo ' ' . Horde_Help::link($app, $help) ?>
</td>
</tr>
<tr><td> </td></tr>
?>
<tr valign="middle">
<td class="header leftAlign" colspan="6">
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Owner") ?>
+ <?php echo Horde::img('perms.png') . ' ' . _("Owner") ?>
</td>
</tr>
<tr>
<!-- Default Permissions -->
<tr valign="middle">
<td class="header leftAlign" width="55%">
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . _("All Authenticated Users") ?>
+ <?php echo Horde::img('perms.png') . ' ' . _("All Authenticated Users") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- Creator Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Object Creator") ?>
+ <?php echo Horde::img('user.png') . ' ' . _("Object Creator") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- User Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Individual Users") ?>
+ <?php echo Horde::img('user.png') . ' ' . _("Individual Users") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- Group Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('group.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Groups") ?>
+ <?php echo Horde::img('group.png') . ' ' . _("Groups") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
$images = glob($dir . DIRECTORY_SEPARATOR . '*.png');
if ($images && count($images)) {
foreach ($images as $png) {
- echo Horde::img(str_replace($basedir . DIRECTORY_SEPARATOR, '', $png), $png, array('hspace' => 10, 'vspace' => 10), $registry->getImageDir($app));
+ echo Horde::img(Horde_Themes::img(str_replace($basedir . DIRECTORY_SEPARATOR, '', $png) $app), $png, array('hspace' => 10, 'vspace' => 10));
}
} else {
echo _("No icons found.");
$view_img = Horde::img('view.gif', _("View"), 'align="middle"');
$download_url = Horde_Util::addParameter($view_url, 'action', 'download');
-$download_img = Horde::img('download.gif', _("Download"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$download_img = Horde::img('download.gif', _("Download"));
$edit_url = Horde::applicationUrl('edit.php');
$edit_label = ($folder == 'pending') ? _("Edit") : _("Resend");
-$edit_img = Horde::img('edit.gif', $edit_label, 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$edit_img = Horde::img('edit.gif', $edit_label);
$del_url = Horde::applicationUrl('delete.php');
-$del_img = Horde::img('delete-small.gif', _("Delete"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$del_img = Horde::img('delete-small.gif', _("Delete"));
$params = array('folder' => $folder, 'path' => $path);
-$warn_img = Horde::img('alerts/warning.gif', _("Warning"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$warn_img = Horde::img('alerts/warning.gif', _("Warning"));
$send_url = Horde::applicationUrl('send.php');
$print_url = Horde::applicationUrl('print.php');
-$print_img = Horde::img('print.gif', _("Print"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$print_img = Horde::img('print.gif', _("Print"));
/* Loop through list and set up items. */
$i = 0;
$menu->addArray(array('url' => Horde::applicationUrl('summary.php'),
'text' => _("Summary"),
'icon' => 'fax.png',
- 'icon_path' => $registry->getImageDir()));
+ 'icon_path' => Horde_Themes::img()));
$menu->addArray(array('url' => Horde::applicationUrl('folder.php'),
'text' => _("Folders"),
'icon' => 'folder.png',
- 'icon_path' => $registry->getImageDir()));
+ 'icon_path' => Horde_Themes::img()));
$menu->addArray(array('url' => Horde::applicationUrl('compose.php'),
'text' => _("Compose"),
'icon' => 'compose.png',
- 'icon_path' => $registry->getImageDir()));
+ 'icon_path' => Horde_Themes::img()));
if ($returnType == 'object') {
return $menu;
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
// preg_match("!^user/[^/]+/Calendar!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'kronolith.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('kronolith')
+// 'icondir' => Horde_Themes::img(null, 'kronolith')
// 'alt' => _("Calendar")
// );
// } elseif ((stripos($box, "INBOX/Tasks") !== false) ||
// preg_match("!^user/[^/]+/Tasks!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'nag.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('nag')
+// 'icondir' => Horde_Themes::img(null, 'nag')
// 'alt' => _("Tasks")
// );
// } elseif ((stripos($box, "INBOX/Notes") !== false) ||
// preg_match("!^user/[^/]+/Notes!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'mnemo.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('mnemo')
+// 'icondir' => Horde_Themes::img(null, 'mnemo')
// 'alt' => _("Notes")
// );
// } elseif ((stripos($box, "INBOX/Contacts") !== false) ||
// preg_match("!^user/[^/]+/Contacts!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'turba.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('turba')
+// 'icondir' => Horde_Themes::img(null, 'turba')
// 'alt' => _("Contacts")
// );
// }
// case 'event':
// $icons[$name] = array(
// 'icon' => 'kronolith.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
+// 'icondir' => Horde_Themes::img(null, 'kronolith')
// 'alt' => _("Calendar")
// );
// break;
// case 'task':
// $icons[$name] = array(
// 'icon' => 'nag.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('nag'),
+// 'icondir' => Horde_Themes::img(null, 'nag')
// 'alt' => _("Tasks")
// );
// break;
// case 'note':
// $icons[$name] = array(
// 'icon' => 'mnemo.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
+// 'icondir' => Horde_Themes::img(null, 'mnemo')
// 'alt' => _("Notes")
// );
// break;
// case 'contact':
// $icons[$name] = array(
// 'icon' => 'turba.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('turba'),
+// 'icondir' => Horde_Themes::img(null, 'turba')
// 'alt' => _("Contacts")
// );
// break;
// case 'prefs':
// $icons[$name] = array(
// 'icon' => 'prefs.png',
-// 'icondir' => $GLOBALS['registry']->getImageDir('horde'),
+// 'icondir' => Horde_Themes::img(null, 'horde')
// 'alt' => _("Preferences")
// );
// break;
if ($elt['user_icon']) {
$ob->cl = 'customimg';
$dir = empty($elt['icondir'])
- ? $GLOBALS['registry']->getImageDir()
+ ? Horde_Themes::img()
: $elt['icondir'];
$ob->i = empty($dir)
? $elt['icon']
}
/* Cache some additional values. */
- $image_dir = $GLOBALS['registry']->getImageDir();
+ $image_dir = Horde_Themes::img();
$tree->addNode($parent . 'compose', $parent, _("New Message"),
$indent, false,
'name' => '',
'status' => array(
array(
- 'icon' => Horde::img('alerts/warning.png', _("Warning"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/warning.png', _("Warning")),
'text' => $status
)
),
}
if ($sound = $GLOBALS['prefs']->getValue('nav_audio')) {
- $GLOBALS['notification']->push($GLOBALS['registry']->getImageDir() . '/audio/' . $sound, 'audio');
+ $GLOBALS['notification']->push(Horde_Themes::img('audio/' . $sound), 'audio');
}
}
{
if (!isset($this->_eltCache)) {
$this->_eltCache = $this->getSpecialMailboxes();
- $this->_eltCache['image_dir'] = $GLOBALS['registry']->getImageDir();
+ $this->_eltCache['image_dir'] = Horde_Themes::img();
}
}
$data = preg_replace_callback($this->_img_regex, array($this, '_blockImages'), $data);
$status[] = array(
- 'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('mime/image.png'),
'text' => array(
_("Images have been blocked to protect your privacy."),
Horde::link('#', '', 'unblockImageLink') . _("Show Images?") . '</a>'
protected function _blockImages($matches)
{
if (is_null($this->_blockimg)) {
- $this->_blockimg = Horde::url($GLOBALS['registry']->getImageDir('imp', false) . '/spacer_red.png', true, -1);
+ $this->_blockimg = Horde::url(Horde_Themes::img('spacer_red.png'), true, -1);
}
return empty($matches[2])
'data' => '',
'status' => array(
array(
- 'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('mime/image.png'),
'text' => $status
)
),
$handled = true;
$url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
$msgs[] = array('success', _("The event was updated in your calendar.") .
- ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
+ ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event")) . '</a>');
} catch (Horde_Exception $e) {
// Could be a missing permission.
$msgs[] = array('warning', _("There was an error updating the event:") . ' ' . $e->getMessage() . '. ' . _("Trying to import the event instead."));
$guid = $registry->call('calendar/import', array('content' => $components[$key], 'contentType' => $this->_mimepart->getType()));
$url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
$msgs[] = array('success', _("The event was added to your calendar.") .
- ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
+ ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event")) . '</a>');
} catch (Horde_Exception $e) {
$msgs[] = array('error', _("There was an error importing the event:") . ' ' . $e->getMessage());
}
$guid = $registry->call('tasks/import', array($components[$key], $this->_mimepart->getType()));
$url = Horde::url($registry->link('tasks/show', array('uid' => $guid)));
$msgs[] = array('success', _("The task has been added to your tasklist.") .
- ' ' . Horde::link($url, _("View task"), null, '_blank') . Horde::img('mime/icalendar.png', _("View task"), null, $registry->getImageDir('horde')) . '</a>');
+ ' ' . Horde::link($url, _("View task"), null, '_blank') . Horde::img('mime/icalendar.png', _("View task")) . '</a>');
} catch (Horde_Exception $e) {
$msgs[] = array('error', _("There was an error importing the task:") . ' ' . $e->getMessage());
}
$html .= '<h1 class="header">' . sprintf($desc, $sender) . '</h1>';
foreach ($msgs as $msg) {
- $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+ $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
}
$start = $vfb->getAttribute('DTSTART');
$html .= '<h2 class="header">' . $desc . '</h2>';
foreach ($msgs as $msg) {
- $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+ $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
}
$start = $vevent->getAttribute('DTSTART');
$html .= '<h2 class="header">' . $desc . '</h2>';
foreach ($msgs as $msg) {
- $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+ $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
}
$priority = $vtodo->getAttribute('PRIORITY');
$status = array(
array(
- 'icon' => Horde::img('info_icon.png', _("Info"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('info_icon.png', _("Info")),
'text' => array(_("A message you have sent has resulted in a return notification from the recipient."))
)
);
* status message. */
if (count($indices) != $total) {
self::$_statuscache[$this->_mimepart->getMimeId()] = array(
- 'icon' => Horde::img('alerts/error.png', _("Error"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/error.png', _("Error")),
'text' => array(
sprintf(_("Cannot display message - found only %s of %s parts of this message in the current mailbox."), count($indices), $total)
)
'data' => '',
'status' => array(
array(
- 'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('mime/image.png'),
'text' => $status
)
),
if ($GLOBALS['prefs']->getValue('pgp_verify') ||
Horde_Util::getFormData('pgp_verify_msg')) {
- $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
$sig_part = $this->_params['contents']->getMIMEPart($sig_id);
try {
? $this->_imppgp->verifySignature($sig_part->getContents(array('canonical' => true)), $this->_address)
: $this->_imppgp->verifySignature($sig_part->replaceEOL($this->_params['contents']->getBodyPart($signed_id, array('mimeheaders' => true)), Horde_Mime_Part::RFC_EOL), $this->_address, $sig_part->getContents());
- $icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+ $icon = Horde::img('alerts/success.png', _("Success"));
$sig_text = $sig_result->message;
$success = true;
} catch (Horde_Exception $e) {
- $icon = Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
+ $icon = Horde::img('alerts/error.png', _("Error"));
$sig_text = $e->getMessage();
$success = false;
}
{
$data = $this->_impRender(false);
$item = reset($data);
- $item['data'] = '<html><head>' . Horde::includeStylesheetFiles() . '</head><body><tt>' . $item['data'] . '</tt></body></html>';
+ $item['data'] = '<html><head>' . Horde_Themes::includeStylesheetFiles() . '</head><body><tt>' . $item['data'] . '</tt></body></html>';
return $data;
}
$partlist = array_keys($this->_mimepart->contentTypeMap());
$base_id = reset($partlist);
$sig_id = Horde_Mime::mimeIdArithmetic(next($partlist), 'next');
- $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
/* Initialize inline data. */
self::$_cache[$base_id] = array(
Horde_Util::getFormData('smime_verify_msg')) {
try {
$sig_result = $this->_impsmime->verifySignature($raw_text);
- self::$_cache[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+ self::$_cache[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"));
self::$_cache[$base_id]['wrap'] = 'mimePartWrapValid';
if (empty($sig_result->result) ||
}
} catch (Horde_Exception $e) {
self::$_cache[$base_id]['status'][0]['icon'] = ($e->getCode() == 'horde.warning')
- ? Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir)
- : Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
+ ? Horde::img('alerts/warning.png', _("Warning"))
+ : Horde::img('alerts/error.png', _("Error"));
self::$_cache[$base_id]['wrap'] = 'mimePartWrapInvalid';
$status[] = $e->getMessage();
}
case 'delayed':
$status = array(
array(
- 'icon' => Horde::img('alerts/error.png', _("Error"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/error.png', _("Error")),
'text' => array(
_("ERROR: Your message could not be delivered."),
sprintf(_("Additional error message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
case 'relayed':
$status = array(
array(
- 'icon' => Horde::img('alerts/success.png', _("Success"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/success.png', _("Success")),
'text' => array(
_("Your message was successfully delivered."),
sprintf(_("Additional message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
return parent::__toString();
}
- return Horde::img($img, $label, null, $GLOBALS['registry']->getImageDir('imp')) . parent::__toString();
+ return Horde::img(Horde_Themes::img($img, 'imp'), $label) . parent::__toString();
}
}
/* Determine sorting preferences. */
$sortpref = IMP::getSort($imp_mbox['mailbox']);
-/* Cache this value since we use it alot on this page. */
-$graphicsdir = $registry->getImageDir('horde');
-
/* Determine if we are going to show the Hide/Purge Deleted Message links. */
if (!$prefs->getValue('use_trash') &&
!$GLOBALS['imp_search']->isVINBOXFolder()) {
if ($pageOb['pagecount']) {
$rtl = !empty(Horde_Nls::$config['rtl'][$language]);
if ($pageOb['page'] == 1) {
- $pages_first = Horde::img($rtl ? 'nav/last-grey.png' : 'nav/first-grey.png', null, null, $graphicsdir);
- $pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', null, null, $graphicsdir);
+ $pages_first = Horde::img($rtl ? 'nav/last-grey.png' : 'nav/first-grey.png');
+ $pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png');
} else {
$first_url = $mailbox_imp_url->copy()->add('page', 1);
- $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<', null, $graphicsdir) . '</a>';
+ $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<') . '</a>';
$prev_url = $mailbox_imp_url->copy()->add('page', $pageOb['page'] - 1);
- $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', null, $graphicsdir) . '</a>';
+ $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<') . '</a>';
}
if ($pageOb['page'] == $pageOb['pagecount']) {
- $pages_last = Horde::img($rtl ? 'nav/first-grey.png' : 'nav/last-grey.png', null, null, $graphicsdir);
- $pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', null, null, $graphicsdir);
+ $pages_last = Horde::img($rtl ? 'nav/first-grey.png' : 'nav/last-grey.png');
+ $pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png');
} else {
$next_url = $mailbox_imp_url->copy()->add('page', $pageOb['page'] + 1);
- $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', null, $graphicsdir) . '</a>';
+ $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>') . '</a>';
$last_url = $mailbox_imp_url->copy()->add('page', $pageOb['pagecount']);
- $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>', null, $graphicsdir) . '</a>';
+ $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>') . '</a>';
}
}
} else {
if ($imp_search->isEditableVFolder()) {
$edit_search = sprintf(_("Edit Virtual Folder Definition for %s"), htmlspecialchars($rawtitle));
- $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteUrl(), sprintf(_("Delete Virtual Folder Definition for %s"), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this Virtual Folder Definition?")) . "')) { return true; } else { return false; }") . Horde::img('delete.png', sprintf(_("Delete Virtual Folder Definition for %s"), $rawtitle), '', $graphicsdir) . '</a>');
+ $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteUrl(), sprintf(_("Delete Virtual Folder Definition for %s"), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this Virtual Folder Definition?")) . "')) { return true; } else { return false; }") . Horde::img('delete.png', sprintf(_("Delete Virtual Folder Definition for %s"), $rawtitle)) . '</a>');
} elseif ($search_mbox && !isset($query_text)) {
/* Mini search results. */
$search_mailbox = reset($imp_search->getSearchFolders());
}
if (isset($edit_search)) {
- $hdr_template->set('search', Horde::link($imp_search->editUrl(), $edit_search) . Horde::img('edit.png', $edit_search, '', $graphicsdir) . '</a>');
+ $hdr_template->set('search', Horde::link($imp_search->editUrl(), $edit_search) . Horde::img('edit.png', $edit_search) . '</a>');
}
}
}
$ptr = &$headers[$key];
$ptr['class'] = ($sortpref['by'] == $key) ? 'selected' : 'item';
if ($sortpref['by'] == $key) {
- $ptr['change_sort_link'] = Horde::link($sort_url->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $graphicsdir) . '</a>';
+ $ptr['change_sort_link'] = Horde::link($sort_url->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText) . '</a>';
} else {
$ptr['change_sort_link'] = null;
}
$rtl = !empty(Horde_Nls::$config['rtl'][$language]);
if (Horde_Util::nonInputVar('prev_url')) {
$n_template->set('prev', Horde::link($prev_url, _("Previous Message")));
- $n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', '', $registry->getImageDir('horde')));
+ $n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<'));
} else {
- $n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', '', '', $registry->getImageDir('horde')));
+ $n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png'));
}
if (Horde_Util::nonInputVar('next_url')) {
$n_template->set('next', Horde::link($next_url, _("Next Message")));
- $n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', '', $registry->getImageDir('horde')));
+ $n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>'));
} else {
- $n_template->set('next_img', Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', '', '', $registry->getImageDir('horde')));
+ $n_template->set('next_img', Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png'));
}
/* Prepare the navbar actions template. */
$t->set('action', Horde::applicationUrl('saveimage.php'));
$t->set('id', htmlspecialchars($id));
$t->set('uid', htmlspecialchars($uid));
-$t->set('image_img', Horde::img('mime/image.png', _("Image"), null, $registry->getImageDir('horde')));
+$t->set('image_img', Horde::img('mime/image.png', _("Image")));
/* Build the list of galleries. */
$t->set('gallerylist', $registry->call('images/selectGalleries', array(null, Horde_Perms::EDIT)));
switch ($imp_view) {
case 'dimp':
- Horde::includeStylesheetFiles(array('sub' => 'dimp'));
+ Horde_Themes::includeStylesheetFiles(array('sub' => 'dimp'));
break;
case 'mimp':
break;
default:
- Horde::includeStylesheetFiles();
+ Horde_Themes::includeStylesheetFiles();
Horde::includeScriptFiles();
break;
}
</head>
<body>
<?php elseif ($imp_view == 'dimp'): ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
</head>
<?php else: ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php if ($mailbox_url = Horde_Util::nonInputVar('mailbox_url')): ?>
<link href="<?php echo $mailbox_url ?>" rel="Up" />
<?php elseif (!Horde_Util::nonInputVar('login_page')): ?>
<?php endforeach; ?>
<?php if ($show_quota): ?>
<li id="quota">
- <span class="used"><?php echo Horde::img('quotauncover.gif', '', '', $registry->get('webroot', 'imp') . '/themes/graphics') ?></span>
+ <span class="used"><?php echo Horde::img('quotauncover.gif') ?></span>
</li>
<?php endif; ?>
</ul>
</div>
<?php elseif ($show_quota): ?>
<div id="quota">
- <span class="used"><?php echo Horde::img('quotauncover.gif', '', '', $registry->get('webroot', 'imp') . '/themes/graphics') ?></span>
+ <span class="used"><?php echo Horde::img('quotauncover.gif') ?></span>
</div>
<?php endif; ?>
</div>
$flaglist = $GLOBALS['injector']->getInstance('IMP_Imap_Flags')->getList(array('div' => true, 'fgcolor' => true));
/* Get the graphics. */
-$picker_img = Horde::img('colorpicker.png', _("Color Picker"), '', $registry->getImageDir('horde'));
+$picker_img = Horde::img('colorpicker.png', _("Color Picker"));
?>
<input type="hidden" name="flag_action" id="flag_action" />
<?php echo _("No Sound") ?>
</label>
</li>
-<?php foreach (glob($registry->get('themesfs') . '/graphics/audio/*.wav') as $sound): $sound = basename($sound); ?>
+<?php foreach (Horde_Themes::soundList() as $key => $val): ?>
<li>
<label>
- <input type="radio" name="nav_audio" value="<?php echo htmlspecialchars($sound) ?>"<?php if ($nav_audio == $sound) echo ' checked="checked"' ?> />
- <?php echo htmlspecialchars($sound) ?>
+ <input type="radio" name="nav_audio" value="<?php echo htmlspecialchars($key) ?>"<?php if ($nav_audio == $key) echo ' checked="checked"' ?> />
+ <?php echo htmlspecialchars($key) ?>
</label>
- <embed autostart="false" src="<?php echo $registry->getImageDir() . '/audio/' . htmlspecialchars($sound) ?>" />
+ <embed autostart="false" src="<?php echo htmlspecialchars($val->uri) ?>" />
</li>
<?php endforeach; ?>
</ul>
-<?php
- $cache = IMP_Application::$prefsCache['sourceselect'];
- $imagedir = $registry->getImageDir('horde');
-?>
+<?php $cache = IMP_Application::$prefsCache['sourceselect']; ?>
<?php if (!empty($cache['readSelect']) || !empty($cache['prefSelect'])): ?>
<div>
<input type="hidden" name="search_sources" id="search_sources" value="<?php echo implode("\t", $cache['search']['sources']) ?>" />
</select>
</td>
<td>
- <a href="#" id="addsource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $imagedir) ?></a>
+ <a href="#" id="addsource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
<br />
- <a href="#" id="removesource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $imagedir) ?></a>
+ <a href="#" id="removesource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
</td>
<td>
<label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
</select>
</td>
<td>
- <a href="#" id="moveup"><?php echo Horde::img('nav/up.png', _("Move up"), null, $imagedir) ?></a>
+ <a href="#" id="moveup"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
<br />
- <a href="#" id="movedown"><?php echo Horde::img('nav/down.png', _("Move down"), null, $imagedir) ?></a>
+ <a href="#" id="movedown"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
</td>
</tr>
</table>
foreach ($thread as $val) {
$delete_link->add(array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox'], 'start' => $imp_mailbox->getArrayIndex($val)));
}
- $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread"), null, $registry->getImageDir('horde')) . '</a>');
+ $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread")) . '</a>');
}
$template->set('thread', $mode == 'thread');
$template->set('messages', $msgs);
$t->set('headers', $headers);
if (!$browser->isBrowser('mozilla')) {
- $t->set('css', Horde_Util::bufferOutput(array('Horde', 'includeStylesheetFiles')));
+ $t->set('css', Horde_Util::bufferOutput(array('Horde_Themes', 'includeStylesheetFiles')));
echo $t->fetch(IMP_TEMPLATES . '/print/headers.html');
break;
}
$rule_count = array_sum(array_map(create_function('$a', "return (in_array(\$a['action'], \$_SESSION['ingo']['script_categories'])) ? 1 : 0;"), $filter_list));
/* Common graphics. */
- $down_img = Horde::img('nav/down.png', _("Move Rule Down"), '', $registry->getImageDir('horde'));
- $up_img = Horde::img('nav/up.png', _("Move Rule Up"), '', $registry->getImageDir('horde'));
+ $down_img = Horde::img('nav/down.png', _("Move Rule Down"));
+ $up_img = Horde::img('nav/up.png', _("Move Rule Up"));
foreach ($filter_list as $rule_number => $filter) {
/* Skip non-display categories. */
/* Create delete link. */
if (!is_null($delurl)) {
$entry['dellink'] = Horde::link($delurl, sprintf(_("Delete %s"), $name), null, null, "return window.confirm('" . addslashes(_("Are you sure you want to delete this rule?")) . "');");
- $entry['delimg'] = Horde::img('delete.png', sprintf(_("Delete %s"), $name), '', $registry->getImageDir('horde'));
+ $entry['delimg'] = Horde::img('delete.png', sprintf(_("Delete %s"), $name));
} else {
$entry['dellink'] = false;
}
$menu->add(Horde::applicationUrl('script.php'), _("_Script"), 'script.png');
}
if (!empty($GLOBALS['ingo_shares']) && empty($GLOBALS['conf']['share']['no_sharing'])) {
- $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth()), 'urlencode' => true)) . 'return false;');
+ $menu->add('#', _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth()), 'urlencode' => true)) . 'return false;');
}
return $menu;
<?php if (!empty($refresh_time) && !empty($refresh_url)): ?>
<meta http-equiv="refresh" content="<?php echo $refresh_time ?>;url=<?php echo $refresh_url ?>">
<?php endif; ?>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
<?php Horde::includeScriptFiles(); ?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<?php Horde::outputInlineScript(); ?>
</head>
</td>
<?php endif; ?>
<?php if (!$lastfield): ?>
- <td><?php echo Horde::link('javascript:IngoRule.delete_condition(' . (int)$cond_num . ');', _("Delete Condition")) . Horde::img('delete.png', _("Delete Condition"), null, $registry->getImageDir('horde')) ?></a></td>
+ <td><?php echo Horde::link('javascript:IngoRule.delete_condition(' . (int)$cond_num . ');', _("Delete Condition")) . Horde::img('delete.png', _("Delete Condition")) ?></a></td>
<?php elseif ($cond_num != 0): ?>
<td> </td>
<?php endif; ?>
<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
<head>
<title><?php echo htmlspecialchars($registry->get('name')) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
- * @author Andre Pawlowski aka sqall <sqall@h4des.org>
+ * @author Andre Pawlowski aka sqall <sqall@h4des.org>
* @package Tree_Menu
*/
$indent + 1,
false,
array('icon' => 'menu/upload.png',
- 'icondir' => $registry->getImageDir('kastalia'),
+ 'icondir' => Horde_Themes::img(null, 'kastalia'),
'url' => Horde::applicationUrl('upload_menu.php')));
}
$menu = new Horde_Menu(HORDE_MENU_MASK_ALL);
- $menu->add(Horde::applicationUrl('upload_menu.php'), _("Upload"), 'menu/upload.png', $registry->getImageDir('kastalia'));
+ $menu->add(Horde::applicationUrl('upload_menu.php'), _("Upload"), 'menu/upload.png', Horde_Themes::img());
return $menu;
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
*/
public function getMenu()
{
- global $registry;
-
$menu = new Horde_Menu();
if ($this->koward->hasAccess('object/listall')) {
$menu->add($this->urlFor(array('controller' => 'object', 'action' => 'listall')),
- _("_Objects"), 'user.png', $registry->getImageDir('horde'));
+ _("_Objects"), 'user.png', Horde_Themes::img(null, 'horde'));
}
if ($this->koward->hasAccess('object/add', Koward::PERM_EDIT)) {
$menu->add($this->urlFor(array('controller' => 'object', 'action' => 'add')),
- _("_Add"), 'plus.png', $registry->getImageDir('horde'));
+ _("_Add"), 'plus.png', Horde_Themes::img(null, 'horde'));
}
if ($this->koward->hasAccess('object/search')) {
$menu->add($this->urlFor(array('controller' => 'object', 'action' => 'search')),
- _("_Search"), 'search.png', $registry->getImageDir('horde'));
+ _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
}
if (!empty($this->koward->conf['koward']['menu']['queries'])) {
- $menu->add(Horde::applicationUrl('Queries'), _("_Queries"), 'query.png', $registry->getImageDir('koward'));
+ $menu->add(Horde::applicationUrl('Queries'), _("_Queries"), 'query.png', Horde_Themes::img());
}
if (!empty($this->koward->conf['koward']['menu']['test'])) {
$menu->add($this->urlFor(array('controller' => 'check', 'action' => 'show')),
- _("_Test"), 'problem.png', $registry->getImageDir('horde'));
+ _("_Test"), 'problem.png', Horde_Themes::img(null, 'horde'));
}
if (Horde_Auth::getAuth()) {
$menu->add($this->urlFor(array('controller' => 'index', 'action' => 'logout')),
- _("_Logout"), 'logout.png', $registry->getImageDir('horde'));
+ _("_Logout"), 'logout.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
}
$this->urlFor(array('controller' => 'object',
'action' => 'edit',
'id' => $uid)),
- _("Edit")) . Horde::img('edit.png', _("Edit"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ _("Edit")) . Horde::img('edit.png', _("Edit"))
. '</a>';
$this->objectlist[$uid]['delete_url'] = Horde::link(
$this->urlFor(array('controller' => 'object',
'action' => 'delete',
'id' => $uid)),
- _("Delete")) . Horde::img('delete.png', _("Delete"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ _("Delete")) . Horde::img('delete.png', _("Delete"))
. '</a>';
if ($this->koward->hasAccess('object/view/' . $this->object_type, Koward::PERM_READ)) {
$this->objectlist[$uid]['view_url'] = Horde::link(
$this->urlFor(array('controller' => 'object',
'action' => 'edit',
'id' => $this->params->id)),
- _("Edit")) . Horde::img('edit.png', _("Edit"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ _("Edit")) . Horde::img('edit.png', _("Edit"))
. '</a>';
$this->urlFor(array('controller' => 'object',
'action' => 'edit',
'id' => $uid)),
- _("Edit")) . Horde::img('edit.png', _("Edit"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ _("Edit")) . Horde::img('edit.png', _("Edit"))
. '</a>';
$this->objectlist[$uid]['delete_url'] = Horde::link(
$this->urlFor(array('controller' => 'object',
'action' => 'delete',
'id' => $uid)),
- _("Delete")) . Horde::img('delete.png', _("Delete"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ _("Delete")) . Horde::img('delete.png', _("Delete"))
. '</a>';
$this->objectlist[$uid]['view_url'] = Horde::link(
$this->urlFor(array('controller' => 'object',
<thead>
<tr>
<?php if ($this->allowEdit): ?>
- <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
<?php endif; ?>
<?php if ($this->allowDelete): ?>
- <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete")) ?></th>
<?php endif; ?>
<?php foreach ($this->attributes as $attribute => $info): ?>
<th class="item leftAlign" width="<?php echo $info['width'] ?>%" nowrap="nowrap"><?= $info['title'] ?></th>
<?php if ($this->allowEdit): ?>
<td>
<?= $info['edit_url'] ?>
- </td>
+ </td>
<?php endif; ?>
<?php if ($this->allowDelete): ?>
<td>
<?= $info['delete_url'] ?>
- </td>
+ </td>
<?php endif; ?>
<?php foreach ($this->attributes as $attribute => $ainfo): ?>
<td>
<?php else: ?>
<?= $this->escape($info[$attribute]) ?>
<?php endif; ?>
- </td>
+ </td>
<?php endforeach; ?>
- </tr>
+ </tr>
<?php endforeach; ?>
</tbody>
</table>
<thead>
<tr>
<?php if ($this->allowEdit): ?>
- <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
<?php endif; ?>
<?php if ($this->allowDelete): ?>
- <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"),) ?></th>
<?php endif; ?>
<?php foreach ($this->attributes as $attribute => $info): ?>
<th class="item leftAlign" width="<?php echo $info['width'] ?>%" nowrap="nowrap"><?= $info['title'] ?></th>
<?php if ($this->allowEdit): ?>
<td>
<?= $info['edit_url'] ?>
- </td>
+ </td>
<?php endif; ?>
<?php if ($this->allowDelete): ?>
<td>
<?= $info['delete_url'] ?>
- </td>
+ </td>
<?php endif; ?>
<?php foreach ($this->attributes as $attribute => $ainfo): ?>
<td>
<?php else: ?>
<?= $this->escape($value) ?>
<?php endif; ?>
- </td>
+ </td>
<?php endforeach; ?>
- </tr>
+ </tr>
<?php endforeach; ?>
</tbody>
</table>
Horde::includeScriptFiles();
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-
-<?php Horde::includeStylesheetFiles() ?>
-
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
$view = Horde_Util::getFormData('view', 'Day');
// Pre-format our delete image/link.
-$delimg = Horde::img('delete.png', _("Remove Attendee"), null,
- $registry->getImageDir('horde'));
+$delimg = Horde::img('delete.png', _("Remove Attendee"));
$ident = Horde_Prefs_Identity::singleton();
$identities = $ident->getAll('id');
}
asort($sorted_calendars);
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
+$perms_img = Horde::img('perms.png', _("Change Permissions"));
+$delete_img = Horde::img('delete.png', _("Delete"));
Horde::addScriptFile('tables.js', 'horde');
$title = _("Manage Calendars");
$template->set('kronolith_name', 'Kronolith');
$template->set('kronolith_version', $registry->getVersion());
$template->set('kronolith_uri', 'http://www.horde.org/kronolith/');
-$template->set('kronolith_icon', Horde::url($registry->getImageDir() . '/kronolith.png', true, -1));
+$template->set('kronolith_icon', Horde::url(Horde_Themes::img('kronolith.png'), true, -1));
$template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl');
$template->set('calendar_name', @htmlspecialchars($share->get('name'), ENT_COMPAT, Horde_Nls::getCharset()));
$template->set('calendar_desc', @htmlspecialchars($share->get('desc'), ENT_COMPAT, Horde_Nls::getCharset()), true);
case 'sound':
$alarm_params .= '<ul class="sound-list"><li><input type="radio" ' . $att
. ' value="" checked="checked" /> ' . _("No Sound") . '</li>';
- foreach (glob($registry->get('themesfs', 'horde') . '/sounds/*.wav') as $sound) {
- $sound = htmlspecialchars(basename($sound));
+ foreach (Horde_Themes::soundList() as $key => $val) {
+ $sound = htmlspecialchars($key);
$alarm_params .= '<li><input type="radio" id="kronolithEventAlarmParam'
. $name . str_replace('.wav', '', $sound) . '" ' . $name_att
. ' value="' . $sound
. '" /> <embed autostart="false" src="'
- . $registry->get('themesuri', 'horde') . '/sounds/'
- . $sound . '" /> ' . $sound . '</li>';
+ . htmlspecialchars($val->uri)
+ . '" /> ' . $sound . '</li>';
}
$alarm_params .= '</ul>';
break;
}
foreach ($tags as $tag_id => $tag) {
- $html .= '<li class="panel-tags">' . htmlspecialchars($tag) . ($hasEdit ? '<a href="#" onclick="removeTag(\'' . $id . '\', \'' . $type . '\', ' . $tag_id . ',\'' . $this->_getUrl('TagActions', 'kronolith') . '\'); Event.stop(event);" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' : '') . '</li>';
+ $html .= '<li class="panel-tags">' . htmlspecialchars($tag) . ($hasEdit ? '<a href="#" onclick="removeTag(\'' . $id . '\', \'' . $type . '\', ' . $tag_id . ',\'' . $this->_getUrl('TagActions', 'kronolith') . '\'); Event.stop(event);" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
}
return $html;
$results[$path]['name'] = $owner;
}
if (in_array('icon', $properties)) {
- $results[$path]['icon'] =
- $registry->getImageDir('horde') . '/user.png';
+ $results[$path]['icon'] = Horde_Themes::img('user.png');
}
if (in_array('browseable', $properties)) {
$results[$path]['browseable'] = true;
$results[$retpath . '.ics']['displayname'] = rawurlencode($calendar->get('name')) . '.ics';
}
if (in_array('icon', $properties)) {
- $results[$retpath]['icon'] = $registry->getImageDir() . '/kronolith.png';
- $results[$retpath . '.ics']['icon'] = $registry->getImageDir() . '/mime/icalendar.png';
+ $results[$retpath]['icon'] = Horde_Themes::img('kronolith.png');
+ $results[$retpath . '.ics']['icon'] = Horde_Themes::img('mime/icalendar.png');
}
if (in_array('browseable', $properties)) {
$results[$retpath]['browseable'] = $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ);
// directory.
$kronolith_driver = Kronolith::getDriver(null, $parts[1]);
$events = $kronolith_driver->listEvents();
- $icon = $registry->getImageDir('horde') . '/mime/icalendar.png';
+ $icon = Horde_Themes::img('mime/icalendar.png');
$results = array();
foreach ($events as $dayevents) {
foreach ($dayevents as $event) {
$indent + 1,
false,
array('icon' => 'alarm.png',
- 'icondir' => $GLOBALS['registry']->getImageDir(),
+ 'icondir' => Horde_Themes::img(),
'title' => $event->getTooltip(),
'url' => $event->getViewUrl()));
}
array('week', _("Week"), 'weekview.png', Horde::applicationUrl('week.php')),
array('month', _("Month"), 'monthview.png', Horde::applicationUrl('month.php')),
array('year', _("Year"), 'yearview.png', Horde::applicationUrl('year.php')),
- array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), $registry->getImageDir('horde')),
+ array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), Horde_Themes::img(null, 'horde')),
);
foreach ($menus as $menu) {
$indent + 1,
false,
array('icon' => $menu[2],
- 'icondir' => isset($menu[4]) ? $menu[4] : $registry->getImageDir(),
+ 'icondir' => isset($menu[4]) ? $menu[4] : Horde_Themes::img(),
'url' => $menu[3]));
}
}
if (!empty($methods['notify']['sound'])) {
if ($methods['notify']['sound'] == 'on') {
// Handle boolean sound preferences.
- $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri') . '/sounds/theetone.wav';
+ $methods['notify']['sound'] = Horde_Themes::sound('theetone.wav');
} else {
// Else we know we have a sound name that can be
// served from Horde.
- $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri', 'horde') . '/sounds/' . $methods['notify']['sound'];
+ $methods['notify']['sound'] = Horde_Themes::sound($methods['notify']['sound']);
}
}
if ($this->isAllDay()) {
'del_exception' => $date,
'url' => Horde_Util::getFormData('url')))
->link(array('title' => sprintf(_("Delete exception on %s"), $formatted)))
- . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('delete-small.png', _("Delete"))
. '</a>';
}
$next = new Horde_Date($this->_start);
$next->mday++;
return Horde::url('#')->link(array('title' => _("Previous Day"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
- . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/left.png', '<')
. '</a>'
. $this->_start->strftime($prefs->getValue('date_format'))
. Horde::url('#')->link(array('title' => _("Next Day"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
- . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/right.png', '>')
. '</a>';
}
function _title()
{
- global $registry, $prefs;
-
$end = new Horde_Date($this->_start);
$end->mday += $this->_days - 1;
$prev = new Horde_Date($this->_start);
$next = new Horde_Date($this->_start);
$next->month++;
return Horde::url('#')->link(array('title' => _("Previous Month"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
- . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/left.png', '<')
. '</a>'
. $this->_start->strftime('%B %Y')
. Horde::url('#')->link(array('title' => _("Next Month"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
- . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/right.png', '>')
. '</a>';
}
function _title()
{
- global $registry, $prefs;
+ global $prefs;
$prev = new Horde_Date($this->_start);
$prev->mday -= 7;
$end = new Horde_Date($this->_start);
$end->mday += $this->_days - 1;
return Horde::url('#')->link(array('title' => _("Previous Week"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
- . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/left.png', '<')
. '</a>'
. $this->_start->strftime($prefs->getValue('date_format')) . ' - '
. $end->strftime($prefs->getValue('date_format'))
. Horde::url('#')->link(array('title' => _("Next Week"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
- . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+ . Horde::img('nav/right.png', '>')
. '</a>';
}
(!empty($GLOBALS['language']) ? '<html lang="' . strtr($GLOBALS['language'], '_', '-') . '"' : '<html') . ">\n".
"<head>\n" .
'<title>' . htmlspecialchars($GLOBALS['registry']->get('name')) . "</title>\n" .
- '<link href="' . $GLOBALS['registry']->getImageDir() . "/favicon.ico\" rel=\"SHORTCUT ICON\" />\n".
+ '<link href="' . Horde_Themes::img('favicon.ico', array('nohorde' => true)) . "\" rel=\"SHORTCUT ICON\" />\n".
Horde::wrapInlineScript(self::includeJSVars());
- Horde::includeStylesheetFiles();
+ Horde_Themes::includeStylesheetFiles();
echo "</head>\n";
$language = 'en-US';
}
$params['conf'] = array(
- 'URI_IMG_HORDE' => $GLOBALS['registry']->getImageDir('horde') . '/',
+ 'URI_IMG_HORDE' => Horde_Themes::img(null, 'horde') . '/',
'useMarkerLayer' => true,
'language' => $language);
/* Variables used in core javascript files. */
$code['conf'] = array(
'URI_AJAX' => (string)Horde::getServiceLink('ajax', 'kronolith'),
- 'URI_IMG' => $registry->getImageDir() . '/',
+ 'URI_IMG' => Horde_Themes::img() . '/',
'URI_SNOOZE' => (string)Horde::url($registry->get('webroot', 'horde') . '/services/snooze.php', true, -1),
'URI_CALENDAR_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'all_events' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportCal' => '')),
'URI_EVENT_EXPORT' => str_replace(array('%23', '%7B', '%7D'), array('#', '{', '}'), Horde::url('event.php', true)->add(array('view' => 'ExportEvent', 'eventID' => '#{id}', 'calendar' => '#{calendar}', 'type' => '#{type}'))),
Horde::addScriptFile('goto.js', 'kronolith', array('direct' => false));
$menu->add('#', _("_Goto"), 'goto.png', null, '', 'openKGoto(kronolithDate, event); return false;');
}
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
exit;
}
$edit_url_base = Horde::applicationUrl('resources/groups/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
$resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::EDIT, array('type' => Kronolith_Resource::TYPE_GROUP));
//$display_url_base = Horde::applicationUrl('month.php', true, -1);
$delete_url_base = Horde::applicationUrl('resources/groups/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
?>
<script type="text/javascript">
function performAction(action, rid)
exit;
}
$edit_url_base = Horde::applicationUrl('resources/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
$resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
$display_url_base = Horde::applicationUrl('month.php', true, -1);
$delete_url_base = Horde::applicationUrl('resources/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
?>
<script type="text/javascript">
function performAction(action, rid)
<tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
<?php else: foreach ($_SESSION['kronolith']['attendees'] as $email => $status): ?>
<tr>
- <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $name), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) . '</a> ' . Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $name), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('edit.png', '', null, $registry->getImageDir('horde')) . '</a>' ?></td>
+ <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $name), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('delete.png') . '</a> ' . Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $name), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('edit.png') . '</a>' ?></td>
<td><?php echo htmlspecialchars(empty($status['name']) ? $email : Horde_Mime_Address::trimAddress($status['name'] . (strpos($email, '@') === false ? '' : ' <' . $email . '>'))) ?></td>
<td>
<label for="<?php echo "attendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
<tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
<?php else: foreach ($resources as $id => $resource): ?>
<tr>
- <td class="nowrap"><?php echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', " . $id . "); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) ?></a></td>
+ <td class="nowrap"><?php echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', " . $id . "); return false;")) . Horde::img('delete.png') ?></a></td>
<td><?php echo htmlspecialchars($resource['name']) ?></td>
<td>
<label for="<?php echo "resourceattendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
<div>
<label><?php echo _("Color") ?>:
<input type="text" name="color" id="kronolithCalendarinternalColor" size="7" />
- <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+ <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
</label>
</div>
</thead>
<tbody>
<tr>
- <td>
- <?php if ($auth->hasCapability('list') && ($GLOBALS['conf']['auth']['list_users'] == 'list' || $GLOBALS['conf']['auth']['list_users'] == 'both')): ?>
- <select name="owner_select">
- <option value=""><?php echo _("Select a new owner:") ?></option>
- <?php foreach ($auth->listUsers() as $user): ?>
- <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == Horde_Auth::getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
- <?php endforeach; ?>
- </select>
- <?php else: ?>
- <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars(Horde_Auth::getAuth()) ?>" />
- <?php endif; ?>
+ <td>
+<?php if ($auth->hasCapability('list') && ($GLOBALS['conf']['auth']['list_users'] == 'list' || $GLOBALS['conf']['auth']['list_users'] == 'both')): ?>
+ <select name="owner_select">
+ <option value=""><?php echo _("Select a new owner:") ?></option>
+<?php foreach ($auth->listUsers() as $user): ?>
+ <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == Horde_Auth::getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
+<?php endforeach; ?>
+ </select>
+<?php else: ?>
+ <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars(Horde_Auth::getAuth()) ?>" />
+<?php endif; ?>
</td>
</tr>
</tbody>
<div>
<label><?php echo _("Color") ?>:<br />
<input type="text" name="color" id="kronolithCalendartasklistsColor" size="7" />
- <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+ <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
</label>
</div>
<div>
<label><?php echo _("Color") ?>:<br />
<input type="text" name="color" id="kronolithCalendarremoteColor" size="7" />
- <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'onclick' => 'new ColorPicker({ color: $F(\'kronolithCalendarremoteColor\'), offsetParent: Event.element(event), update: [[\'kronolithCalendarremoteColor\', \'value\'], [\'kronolithCalendarremoteColor\', \'background\']] }); return false;')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+ <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'onclick' => 'new ColorPicker({ color: $F(\'kronolithCalendarremoteColor\'), offsetParent: Event.element(event), update: [[\'kronolithCalendarremoteColor\', \'value\'], [\'kronolithCalendarremoteColor\', \'background\']] }); return false;')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
</label>
</div>
var kronolithDate = new Date(<?php printf('%d, %d, %d', $currentDate->year, $currentDate->month - 1, $currentDate->mday) ?>);
//]]></script>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
<?php foreach ($GLOBALS['display_calendars'] as $calendar): ?>
<link href="<?php echo Kronolith::feedUrl($calendar) ?>" rel="alternate" type="application/atom+xml" />
<?php endforeach; ?>
<?php
$tomorrow = $this->getTomorrow();
$yesterday = $this->getYesterday();
-echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
echo '<span id="view_title">' . htmlspecialchars($this->getTime($prefs->getValue('date_format'))) . '</span>';
-echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
?>
</h1>
<table cellspacing="0" width="100%" class="striped">
?>
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('alarm')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_alarm'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('alarm', _("_Alarm")) ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_alarm')) . ' <strong>' . Horde::label('alarm', _("_Alarm")) ?></strong>
<span class="extra" id="extra_alarm"><?php if ($alarm_set) printf(_("%d %s before the event starts"), $alarm_value, $alarm_unit_title); ?></span>
</td>
</tr>
<!-- description -->
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('description')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_description'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('description', _("Descri_ption")) ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_description')) . ' <strong>' . Horde::label('description', _("Descri_ption")) ?></strong>
<span class="extra" id="extra_description"><?php echo htmlspecialchars(substr(str_replace(array("\r", "\n"), ' ', $event->description), 0, 80)) ?></span>
</td>
</tr>
<!-- url -->
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('url')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_url'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('url', _("URL")) ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_url')) . ' <strong>' . Horde::label('url', _("URL")) ?></strong>
<span class="extra" id="extra_url"><?php echo htmlspecialchars($event->url) ?></span>
</td>
</tr>
<!-- attendees/resources -->
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('attendees')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_attendees'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Attendees and Resources") ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_attendees')) . ' <strong>' . _("Attendees and Resources") ?></strong>
<span class="extra"><?php echo htmlspecialchars(Kronolith::attendeeList()) ?></span>
</td>
</tr>
<!-- recurrence -->
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('recurrence')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_recurrence'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Recurrence") ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_recurrence')) . ' <strong>' . _("Recurrence") ?></strong>
<span class="extra" id="extra_recurrence"><?php echo $event->getRecurName(); if ($event->recurs()) echo $event->recurrence->hasRecurEnd() ? sprintf(_(" until %s"), $event->recurrence->recurEnd->strftime($GLOBALS['prefs']->getValue('date_format')) . ($this->event->recurrence->recurEnd->hour == 23 && $this->event->recurrence->recurEnd->min == 59 ? '' : ' ' . $this->event->recurrence->recurEnd->format($GLOBALS['prefs']->getValue('twentyFour') ? 'G:i' : 'g:ia'))) : ($event->recurrence->getRecurCount() ? sprintf(_(", %d times"), $event->recurrence->getRecurCount()) : _(" without end")) ?></span>
</td>
</tr>
<td>
<?php
Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
-echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"') . '</a>';
endif;
?>
</td>
<!-- tags -->
<tr>
<td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('tags')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_tags'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Tags") ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_tags')) . ' <strong>' . _("Tags") ?></strong>
<span class="extra" id="extra_tags"><?php echo (!empty($tags) ? htmlspecialchars($tags) : '');?></span>
</td>
</tr>
<td>
<?php Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false)); ?>
<div id="goto" style="display:none"></div>
- <?php echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;')) . Horde::img('calendar.png', _("Set start date"), 'id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; endif; ?>
+ <?php echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;')) . Horde::img('calendar.png', _("Set start date"), 'id="startimg"') . '</a>'; endif; ?>
</td>
</tr>
<td rowspan="2" valign="top">
<?php
Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
-echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set end date"), 'id="endimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set end date"), array('id' => 'endimg')) . '</a>';
endif;
?>
</td>
KronolithEventForm.toggleSection = function(section)
{
- var dir = '<?php echo $GLOBALS['registry']->getImageDir() ?>';
+ var dir = '<?php echo Horde_Themes::img() ?>';
if (!$('section_' + section)) {
return;
}
<form id="kronolithSearchForm" action="">
<input type="text" id="kronolithSearchTerm" value="<?php echo _("Search") ?>" default="<?php echo _("Search") ?>" />
- <input id="kronolithSearchButton" type="image" src="<?php echo $GLOBALS['registry']->getImageDir() ?>/search.png" />
+ <input id="kronolithSearchButton" type="image" src="<?php echo Horde_Themes::img('search.png') ?>" />
</form>
<div id="kronolithMenuCalendars">
<div id="kronolithBody">
<div id="kronolithLoading" style="display:none"></div>
<?php
-$img_blank = Horde::img('blank.gif', '', 'height="8" width="8"', $registry->getImageDir('horde'));
+$img_blank = Horde::img('blank.gif', '', array('height' => 8, 'width' => 8));
require dirname(__FILE__) . '/month.inc';
require dirname(__FILE__) . '/week.inc';
require dirname(__FILE__) . '/day.inc';
<?php
$prev = $this->getMonth(-1);
$next = $this->getMonth(1);
-echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
echo '<span id="view_title">' . htmlspecialchars($this->date->strftime('%B %Y')) . '</span>';
-echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
?>
</h1>
<?php
$prev = $this->getMonth(-1);
$next = $this->getMonth(1);
-echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
echo htmlspecialchars($this->date->strftime('%B %Y'));
-echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
?>
</h1>
Horde::addScriptFile('redbox.js', 'horde');
Horde::addScriptFile('calendar-panel.js', 'kronolith');
-$info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info'), $registry->getImageDir('horde'));
+$info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info'));
$current_user = Horde_Auth::getAuth();
$my_calendars = array();
echo htmlspecialchars($tag);
if ($cal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
echo '<a href="#" id="remove' . md5($id . $tag_id) . '">'
- . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde'))
+ . Horde::img('delete-small.png', _("Remove Tag"))
. '</a>';
}
$ta = Horde_Ajax_Imple::factory(array('kronolith', 'TagActions'),
<tr valign="middle">
<td width="100%" colspan="7" class="header">
<span class="rightFloat">
- <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window"), '', $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window")) ?></a>
</span>
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Edit permissions for %s"), htmlspecialchars($share->get('name'))) . ' ' . Horde_Help::link('kronolith', 'shares') ?>
+ <?php echo Horde::img('perms.png') . ' ' . sprintf(_("Edit permissions for %s"), htmlspecialchars($share->get('name'))) . ' ' . Horde_Help::link('kronolith', 'shares') ?>
</td>
</tr>
<tr><td colspan="7"> </td></tr>
<!-- Ownership -->
<tr valign="middle">
<td class="header leftAlign" colspan="7">
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Owner") ?>
+ <?php echo Horde::img('perms.png') . ' ' . _("Owner") ?>
</td>
</tr>
<tr>
<!-- Default Permissions -->
<tr valign="middle">
<td class="header leftAlign" width="55%">
- <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . ' ' . _("All Authenticated Users") ?>
+ <?php echo Horde::img('perms.png') . ' ' . _("All Authenticated Users") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- Creator Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Object Creator") ?>
+ <?php echo Horde::img('user.png') . ' ' . _("Object Creator") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- User Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Individual Users") ?>
+ <?php echo Horde::img('user.png') . ' ' . _("Individual Users") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
<!-- Group Permissions -->
<tr valign="middle">
<td class="header leftAlign">
- <?php echo Horde::img('group.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Groups") ?>
+ <?php echo Horde::img('group.png') . ' ' . _("Groups") ?>
</td>
<td class="header" align="center"><?php echo _("Show") ?></td>
<td class="header" align="center"><?php echo _("Read") ?></td>
</select>
</td>
<td>
- <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
<br />
- <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
</td>
<td>
<label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
</select>
</td>
<td>
- <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
<br />
- <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
</td>
</tr>
</table>
$currentView = $this instanceof Kronolith_View_WorkWeek ? 'WorkWeek' : 'Week';
$prev = $this->getWeek(-1);
$next = $this->getWeek(1);
-echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
echo '<span id="view_title">' . htmlspecialchars($this->days[$this->startDay]->getTime($prefs->getValue('date_format')) . ' - ' . $this->days[$this->endDay]->getTime($prefs->getValue('date_format'))) . '</span>';
-echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
?>
</h1>
<h1 class="header" style="text-align:center">
<?php
-echo $this->link(-1)->link(array('title' => _("Last Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');')) . Horde::img('nav/left.png', '<') . '</a>';
echo '<span id="view_title">' . htmlspecialchars($this->year) . '</span>';
-echo $this->link(1)->link(array('title' => _("Next Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');')) . Horde::img('nav/right.png', '>') . '</a>';
?>
</h1>
$results['nag/' . $owner]['name'] = $owner;
}
if (in_array('icon', $properties)) {
- $results['nag/' . $owner]['icon'] =
- $registry->getImageDir('horde') . '/user.png';
+ $results['nag/' . $owner]['icon'] = Horde_Themes::img('user.png');
}
if (in_array('browseable', $properties)) {
$results['nag/' . $owner]['browseable'] = true;
$results[$retpath . '.ics']['name'] = $tasklist->get('name');
}
if (in_array('icon', $properties)) {
- $results[$retpath]['icon'] = $registry->getImageDir() . '/nag.png';
- $results[$retpath . '.ics']['icon'] = $registry->getImageDir() . '/mime/icalendar.png';
+ $results[$retpath]['icon'] = Horde_Themes::img('nag.png');
+ $results[$retpath . '.ics']['icon'] = Horde_Themes::img('mime/icalendar.png');
}
if (in_array('browseable', $properties)) {
$results[$retpath]['browseable'] = $tasklist->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ);
return $result;
}
- $icon = $registry->getImageDir() . '/nag.png';
+ $icon = Horde_Themes::img('nag.png');
$results = array();
$storage->tasks->reset();
while ($task = $storage->tasks->each()) {
$label = sprintf(_("Edit \"%s\""), $task->name);
$html .= '<td width="1%">'
. Horde::link(htmlspecialchars(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task'), true)), $label)
- . Horde::img('edit.png', $label, null,
- $registry->getImageDir('horde'))
+ . Horde::img('edit.png', $label)
. '</a></td>';
if ($task->completed) {
$html .= '<td width="1%">'
$indent + 1,
false,
array('icon' => 'alarm.png',
- 'icondir' => $GLOBALS['registry']->getImageDir(),
+ 'icondir' => Horde_Themes::img(),
'title' => $title,
'url' => $url));
}
{
global $registry;
- $add = Horde::applicationUrl('task.php?actionID=add_task');
- $icondir = $registry->getImageDir();
+ $add = Horde::applicationUrl('task.php')->add('actionID', 'add_task');
+ $icondir = Horde_Themes::img();
$tree->addNode($parent . '__new',
$parent,
$indent + 1,
false,
array('icon' => 'search.png',
- 'icondir' => $registry->getImageDir('horde'),
+ 'icondir' => Horde_Themes::img(null, 'horde'),
'url' => Horde::applicationUrl('search.php')));
}
}
/* Search. */
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
*/
function treeIcons()
{
- $treedir = $GLOBALS['registry']->getImageDir('horde');
+ $treedir = Horde_Themes::img(null, 'horde');
$html = '';
$parent = $this->parent;
if (!empty($methods['notify']['sound'])) {
if ($methods['notify']['sound'] == 'on') {
// Handle boolean sound preferences;
- $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri') . '/sounds/theetone.wav';
+ $methods['notify']['sound'] = Horde_Themes::sound('theetone.wav');
} else {
// Else we know we have a sound name that can be
// served from Horde.
- $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri', 'horde') . '/sounds/' . $methods['notify']['sound'];
+ $methods['notify']['sound'] = Horde_Themes::sound($methods['notify']['sound']);
}
}
}
<?php if ($GLOBALS['browser']->hasFeature('javascript')) {
Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
echo '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>';
-echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'start\', \'document.' . $form->getName() . '.start_date[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'start\', \'document.' . $form->getName() . '.start_date[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="startimg"') . '</a>';
} ?>
<?php
}
<?php echo $this->buildDayWidget('due[day]', $due_date['mday'], $javascript_due) . ' ' . $this->buildMonthWidget('due[month]', $due_date['mon'], $javascript_due) . ' ' . $this->buildYearWidget('due[year]', 3, $due_date['year'], $javascript_due) ?>
<?php if ($GLOBALS['browser']->hasFeature('javascript')) {
echo '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>';
-echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'dueimg\', \'due\', \'document.' . $form->getName() . '.due_type[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="dueimg"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'dueimg\', \'due\', \'document.' . $form->getName() . '.due_type[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="dueimg"') . '</a>';
} ?>
<br />
}
asort($sorted_tasklists);
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
+$perms_img = Horde::img('perms.png', _("Change Permissions"));
+$delete_img = Horde::img('delete.png', _("Delete"));
Horde::addScriptFile('tables.js', 'horde');
$title = _("Manage Task Lists");
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/core/core.js" type="text/javascript"></script>
<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.js" type="text/javascript"></script>
<div class="header leftAlign">
<?php echo htmlspecialchars($title) . ' (' . $tasks->count() . ')' ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="tasks-body" empty="tasks_empty" />
<small>
</th>
<?php endif; ?>
<th width="2%" class="nosort">
- <?php echo Horde::img('edit.png', _("Edit Task"), null, $registry->getImageDir('horde')) ?>
+ <?php echo Horde::img('edit.png', _("Edit Task")) ?>
</th>
<th id="s<?php echo Nag::SORT_NAME ?>"<?php if ($sortby == Nag::SORT_NAME) echo ' class="' . $sortdirclass . '"' ?>>
<?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Na_me")) ?>
(!$GLOBALS['prefs']->isLocked('categories') ||
!$GLOBALS['prefs']->isLocked('category_colors'))) {
$categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
- echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'Horde.popup({url:this.href}); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'Horde.popup({url:this.href}); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors")) . '</a>';
}
?>
</th>
$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT) &&
(!$task->private || $task->owner == Horde_Auth::getAuth())) {
$label = sprintf(_("Edit \"%s\""), $task->name);
- echo Horde::link($task->edit_link, $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+ echo Horde::link($task->edit_link, $label) . Horde::img('edit.png', $label) . '</a>';
}
?>
</td>
Horde::addScriptFile('redbox.js', 'horde');
-$info_img = Horde::img('info_icon.png', _("Task List Information"), array('class' => 'tasklist-info'), $registry->getImageDir('horde'));
+$info_img = Horde::img('info_icon.png', _("Task List Information"), array('class' => 'tasklist-info'));
$current_user = Horde_Auth::getAuth();
$my_tasklists = array();
/* Set up the template fields. */
$title = _("Category Administration");
$edit_url = Horde::applicationUrl('admin/categories/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
$delete_url = Horde::applicationUrl('admin/categories/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
foreach ($categories as $category_id => $category) {
$categories[$category_id]['actions'][] = Horde::link(Horde_Util::addParameter($delete_url, 'category_id', $category_id), _("Delete")) .
}
$edit_url = Horde::applicationUrl('admin/sources/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
$delete_url = Horde::applicationUrl('admin/sources/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
$view_url = Horde::applicationUrl('browse.php');
-$view_img = Horde::img('category.png', _("View items"), '', $registry->getImageDir('horde'));
+$view_img = Horde::img('category.png', _("View items"));
foreach ($sources as $source_id => $source) {
$sources[$source_id]['actions'][] = Horde::link(Horde_Util::addParameter($view_url, 'source_id', $source_id), _("View articles")) .
$version_data = unserialize($version_data);
-Horde::includeStylesheetFiles();
+Horde_Themes::includeStylesheetFiles();
while (list($k, $v) = each($current_data)) {
echo '<hr><strong>' . $nls['languages'][$k] . '</strong><hr>' . "\n";
require_once NEWS_TEMPLATES . '/menu.inc';
require_once NEWS_TEMPLATES . '/edit/header.inc';
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img(null, 'horde');
foreach ($rows as $row) {
require NEWS_TEMPLATES . '/edit/row.php';
if ($row['id'] == $id ) {
{
$cats = $this->getCategories(false);
- $params = array('icondir' => $GLOBALS['registry']->getImageDir(),
+ $params = array('icondir' => Horde_Themes::img(),
'icon' => 'folder_open.png');
// Set up the tree
static public function getFlag($lang)
{
$flag = 'flags/' . strtolower(substr($lang, -2)) . '.png';
- return Horde::img($flag, $lang, 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+ return Horde::img($flag, $lang);
}
/**
}
if (Horde_Auth::isAdmin('news:admin')) {
- $delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
+ $delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"');
$delete_url = Horde::applicationUrl('delete_file.php');
}
- $dowload_img = Horde::img('save.png', _("Dowload"), ' style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
- $dowload_zip = Horde::img('mime/compressed.png', _("Dowload Zip Compressed"), 'style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
+ $dowload_img = Horde::img('save.png', _("Dowload"), ' style="width: 16px height: 16px"');
+ $dowload_zip = Horde::img('mime/compressed.png', _("Dowload Zip Compressed"), 'style="width: 16px height: 16px"');
$view_url = Horde::applicationUrl('files.php');
$html = '<table><tr valign="top"><td>';
static public function getMenu()
{
$menu = new Horde_Menu();
- $img_dir = $GLOBALS['registry']->getImageDir('horde');
+ $img_dir = Horde_Themes::img(null, 'horde');
if ($GLOBALS['prefs']->getValue('news_layout') != '') {
$menu->add(Horde::applicationUrl('content.php'), _("Overview"), 'layout.png', $img_dir);
Horde::addScriptFile('tables.js', 'horde');
Horde::includeScriptFiles();
-Horde::includeStylesheetFiles();
+Horde_Themes::includeStylesheetFiles();
// require_once NEWS_TEMPLATES . '/common-header.inc';
require_once NEWS_TEMPLATES . '/reads/header.inc';
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<link rel="alternate" title="<?php echo _("Last news") ?>" href="<?php echo Horde::applicationUrl('rss/news.php', true, -1) ?>" type="application/rss+xml" />
<link rel="alternate" title="<?php echo _("Last comments") ?>" href="<?php echo Horde::applicationUrl('rss/comments.php', true, -1) ?>" type="application/rss+xml" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
<form id="mail_send" name="mail_send" method="post" action="<?php echo Horde::applicationUrl('mail.php') ?>">
<input type="text" name="email" id="email" size="15" />
<input type="hidden" name="id" id="id" value="<?php echo $id ?>" />
-<input type="image" src="<?php echo $registry->getImageDir('horde') ?>/mail.png"></a>
+<input type="image" src="<?php echo Horde_Themes::img('mail.png') ?>"></a>
</form>
<?php
echo '<br /><div class="header">' . _("On this day") . '</div>';
-$img = Horde::img('news.png', '', '', $registry->getImageDir('news'));
+$img = Horde::img('news.png');
echo $img . ' ' . Horde::link(Horde_Util::addParameter($browse_url, 'date', $row['publish'])) . _("News of this day.") . '</a><br />';
if ($registry->hasInterface('schedul')) {
- $img = Horde::img('schedul.png', '', '', $registry->getImageDir('schedul'));
+ $img = Horde::img('schedul.png');
$url = $registry->get('webroot', 'schedul') . '/browse.php';
$url = Horde_Util::addParameter($url, array('actionID' => 'date', 'date' => $row['publish']));
echo $img . ' ' . Horde::link($url) . _("Events on this day.") . '</a><br />';
echo '<br /><div class="header">' . _("Tools") . '</div>';
-$img = Horde::img('print.png', '', '', $registry->getImageDir('horde'));
+$img = Horde::img('print.png');
echo $img . ' ' . Horde::link('javascript:window.print()') . _("Printer firendly") . '</a><br />';
-$img = Horde::img('mime/pdf.png', '', '', $registry->getImageDir('horde'));
+$img = Horde::img('mime/pdf.png');
echo $img . ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
/* Bookmark link */
'url' => News::getUrlFor('news', $id, true),
'title' => $row['title']);
$url = $registry->call('bookmarks/getAddUrl', array($api_params));
- $img = Horde::img('trean.png', '', '', $registry->getImageDir('trean'));
+ $img = Horde::img(Horde_Themes::img('trean.png', 'trean'));
echo $img . ' ' . Horde::link($url) . _("Add to bookmarks.") . '</a><br />';
}
if ($registry->hasInterface('notes')) {
- $img = Horde::img('mnemo.png', '', '', $registry->getImageDir('mnemo'));
+ $img = Horde::img(Horde_Themes::img('mnemo.png', 'mnemo'));
$url = Horde_Util::addParameter(Horde::applicationUrl('note.php', true), 'id', $id);
echo $img . ' ' . Horde::link($url) . _("Add to notes.") . '</a><br />';
}
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
$menu->add(Horde::applicationUrl('viewgraph.php'), _("_View Graphs"), 'graphs.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Export */
if ($GLOBALS['conf']['menu']['export']) {
- $menu->add(Horde::applicationUrl('export.php'), _("_Export"), 'data.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('export.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
if ($returnType == 'object') {
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON">
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
<?php
if (isset($language)) {
- header('Content-type: text/html; charset=' . Horde_NLS::getCharset());
- header('Vary: Accept-Language');
+ header('Content-type: text/html; charset=' . Horde_NLS::getCharset());
+ header('Vary: Accept-Language');
}
- ?>
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<!-- Shout: Copyright 2005-2006, Ben Klang. -->
<!-- Horde Project: http://horde.org/ | Shout: http://projects.alkaloid.net/ -->
<!-- Horde Licenses: http://www.horde.org/licenses/ -->
-<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') .
- '">' : '<html>' ?>
- <head>
- <?php
-
- $page_title = $GLOBALS['registry']->get('name');
- if (!empty($title)) $page_title .= ' :: ' . $title;
- if (!empty($refresh_time) && !empty($refresh_url)) {
- echo "<meta http-equiv=\"refresh\"
- content=\"$refresh_time;url=$refresh_url\">\n";
- }
+<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
+<head>
+<?php
+ $page_title = $GLOBALS['registry']->get('name');
+ if (!empty($title)) $page_title .= ' :: ' . $title;
+ if (!empty($refresh_time) && !empty($refresh_url)) {
+ echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\">\n";
+ }
- Horde::includeScriptFiles();
+ Horde::includeScriptFiles();
- ?>
- <title><?php echo $page_title ?></title>
- <?php echo Horde::includeStylesheetFiles() ?>
+?>
+ <title><?php echo $page_title ?></title>
+ <?php echo Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
{
if ($('selectActionForm') == null) {
curDigit = digit;
- $('digitGraphic').src = '<?php echo $registry->getImageDir('shout'); ?>/digit-'+digit+'.png';
+ $('digitGraphic').src = '<?php echo Horde_Themes::img() ?>/digit-'+digit+'.png';
// Draw the selectActionForm
$('editActionOverlay').show();
text = document.createTextNode(meta.soundfile);
col.appendChild(text);
img = document.createElement('img');
- img.src = '<?php echo $registry->getImageDir('shout') . '/edit.png'; ?>';
+ img.src = '<?php echo Horde_Themes::img('edit.png') ?>';
img.alt = '<?php echo _("Change Soundfile"); ?>';
img.setAttribute('onclick', 'changeSoundfile()');
col.appendChild(img);
img = document.createElement('img');
- img.src = '<?php echo $registry->getImageDir('shout') . '/recordings.png'; ?>';
+ img.src = '<?php echo Horde_Themes::img('recordings.png') ?>';
img.alt = '<?php echo _("Play Soundfile"); ?>';
img.setAttribute('onclick', 'playSoundfile()');
img.setAttribute("style", img.getAttribute("style") + "; float:right; ");
col.appendChild(img);
row.appendChild(col);
$('menuInfo').appendChild(row);
-
}
function getMetaRow(name, value)
}
});
// -->
-</script>
\ No newline at end of file
+</script>
<?php
$attrs = array('onClick' => 'destinfo("' . $extension . '");',
'id' => 'destX' . $extension . 'toggle');
- echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs,
- $registry->getImageDir('horde'));
+ echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs);
?>
<span id="destX<?php echo $extension; ?>summary"></span>
<div class="extensionDestinations" id="destX<?php echo $extension; ?>info">
dest.devices.each(function (s) {
// Fill in detail block
var img = document.createElement('img');
- img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
+ img.src = "<?php echo Horde_Themes::img('shout.png') ?>";
var span = document.createElement('span');
span.className = 'device';
var del = document.createElement('img');
del.id = "dest" + s + "X" + exten + "del";
- del.src = "<?php echo $registry->getImageDir('horde') . '/delete-small.png'; ?>"
+ del.src = "<?php echo Horde_Themes::img('delete-small.png') ?>"
del.style.cursor = 'pointer';
del.setAttribute('onClick', 'delDest("' + exten + '", "device", "' + s + '")');
// Create summary icons
img = document.createElement('img');
- img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
+ img.src = "<?php echo Horde_Themes::img('shout.png') ?>";
$('destX' + exten + 'summary').appendChild(img);
-
});
dest.numbers.each(function (s) {
// Fill in detail block
var img = document.createElement('img');
- img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
+ img.src = "<?php echo Horde_Themes::img('telephone-pole.png') ?>";
var span = document.createElement('span');
span.className = 'device';
var del = document.createElement('img');
del.id = "dest" + s + "X" + exten + "del";
- del.src = "<?php echo $registry->getImageDir('horde') . '/delete-small.png'; ?>";
+ del.src = "<?php echo Horde_Themes::img('delete-small.png') ?>";
del.style.cursor = 'pointer';
del.setAttribute('onclick', 'delDest("' + exten + '", "number", "' + s + '")');
// Create summary icons
img = document.createElement('img');
- img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
+ img.src = "<?php echo Horde_Themes::img('telephone-pole.png') ?>";
$('destX' + exten + 'summary').appendChild(img);
});
{
$('destX' + exten + 'summary').hide();
$('destX' + exten + 'info').show();
- $('destX' + exten + 'toggle').src = '<?php echo $registry->getImageDir('horde') . '/tree/minusonly.png'; ?>';
+ $('destX' + exten + 'toggle').src = '<?php echo Horde_Themes::img('tree/minusonly.png') ?>';
}
function contract(exten)
{
$('destX' + exten + 'summary').show();
$('destX' + exten + 'info').hide();
- $('destX' + exten + 'toggle').src = '<?php echo $registry->getImageDir('horde') . '/tree/plusonly.png'; ?>';
+ $('destX' + exten + 'toggle').src = '<?php echo Horde_Themes::img('tree/plusonly.png') ?>';
}
function processForm(event)
var exten = form.getInputs('hidden', 'extension').first().value;
var spinner = document.createElement('img');
- spinner.src = "<?php echo $registry->getImageDir('horde') . '/loading.gif'; ?>"
+ spinner.src = "<?php echo Horde_Themes::img('loading.gif') ?>"
$('destX' + exten + 'submit').hide();
form.insertBefore(spinner, $('destX' + exten + 'submit'))
'destination': dest
});
-
+
var deleteIcon = $("dest" + dest + "X" + exten + "del")
// If null we came from an edit so the spinner is already going
if (deleteIcon !== null) {
// Hide the delete button and replace it with a spinner
deleteIcon.hide();
var spinner = document.createElement('img');
- spinner.src = "<?php echo $registry->getImageDir('horde') . '/loading.gif'; ?>"
+ spinner.src = "<?php echo Horde_Themes::img('loading.gif') ?>"
var parent = deleteIcon.parentNode;
parent.insertBefore(spinner, deleteIcon);
}
static public function getMenu()
{
$menu = new Horde_Menu(Horde_Menu::MASK_ALL);
- $menu->add(Horde::applicationUrl('list.php'), _("List"), 'user.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('list.php'), _("List"), 'user.png', Horde_Themes::img(null, 'horde'));
return $menu;
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php echo Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php echo Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
}
asort($sorted_classes);
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
+$perms_img = Horde::img('perms.png', _("Change Permissions"));
+$delete_img = Horde::img('delete.png', _("Delete"));
Horde::addScriptFile('tables.js', 'horde');
$title = _("Manage Classes");
function _buildTree(&$tree, $indent = 0, $parent = null)
{
- global $registry;
-
require_once dirname(__FILE__) . '/../base.php';
$add = Horde::applicationUrl('add.php');
- $icondir = $registry->getImageDir();
+ $icondir = Horde_Themes::img();
$classes = Skoli::listClasses(false, Horde_Perms::EDIT);
if (count($classes) > 0) {
$indent + 1,
false,
array('icon' => 'search.png',
- 'icondir' => $registry->getImageDir('horde'),
+ 'icondir' => Horde_Themes::img(null, 'horde'),
'url' => Horde::applicationUrl('search.php')));
}
}
/* Search. */
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
/* Import/Export. */
if ($conf['menu']['export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Export"), 'data.png', $registry->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('data.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
// @TODO Implement an easy form to create timetables in e.g. Kronolith
require SKOLI_TEMPLATES . '/list/classes.inc';
if ($show_students) {
- $treedir = $registry->getImageDir('horde');
+ $treedir = Horde_Themes::img(null, 'horde');
$counter = 0;
foreach ($class['_students'] as $student) {
if (++$counter < count($class['_students'])) {
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
</head>
<?php
if ($class['_edit']) {
$label = _("New Entry");
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label) . '</a>';
}
?>
</td>
<?php
if ($class['_edit']) {
$label = sprintf(_("Edit \"%s\""), $class['name']);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label) . '</a>';
}
?>
</td>
<div class="header leftAlign">
<?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="classes-body" empty="classes_empty" />
<small>
<thead>
<tr class="item leftAlign">
<th width="2%" class="nosort">
- <?php echo Horde::img('add.png', _("New Entry"), null, $registry->getImageDir('skoli')) ?>
+ <?php echo Horde::img('add.png', _("New Entry")) ?>
</th>
<th width="2%" class="nosort">
- <?php echo Horde::img('edit.png', _("Edit Class"), null, $registry->getImageDir('horde')) ?>
+ <?php echo Horde::img('edit.png', _("Edit Class")) ?>
</th>
<?php if (in_array('semesterstart', $class_columns)): ?>
<th id="s<?php echo SKOLI_SORT_SEMESTERSTART ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTERSTART) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
if (Horde_Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
!$GLOBALS['prefs']->isLocked('category_colors'))) {
$categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
- echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', Horde::popupJs($categoryUrl, array('urlencode' => true)) . 'return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', Horde::popupJs($categoryUrl, array('urlencode' => true)) . 'return false;') . Horde::img('colorpicker.png', _("Edit categories and colors")) . '</a>';
}
?>
</th>
<?php
if ($class['_edit']) {
$label = _("New Entry");
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label) . '</a>';
}
?>
</td>
$label = sprintf(_("Show \"%s\""), $student[$conf['addresses']['name_field']]);
$url = $registry->link('contacts/show', array('source' => $class['address_book'],
'key' => $student['__key']));
- echo Horde::link($url, $label) . Horde::img('user.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+ echo Horde::link($url, $label) . Horde::img('user.png', $label) . '</a>';
}
?>
</td>
'view' => 'EditEntry',
'entry' => $entry['_id']
);
- echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+ echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label) . '</a>';
}
?>
</td>
<td><?php echo htmlspecialchars($entry['class']) ?> </td>
<td>
- <?php
+ <?php
$params = array(
'view' => 'Entry',
'entry' => $entry['_id']
<br />
<div class="header leftAlign">
<?php echo htmlspecialchars(_("Search Result")) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="entries-body" empty="entries_empty" />
<small>
<thead>
<tr class="item leftAlign">
<th width="2%" class="nosort">
- <?php echo Horde::img('edit.png', _("Edit Class"), null, $registry->getImageDir('horde')) ?>
+ <?php echo Horde::img('edit.png', _("Edit Class")) ?>
</th>
<th id="s<?php echo SKOLI_SORT_CLASS ?>"<?php if ($sortby == SKOLI_SORT_CLASS) echo ' class="' . $sortdir_class . '"' ?> width="2%">
<?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>
'recurrence' => Horde_Date_Recurrence::RECUR_NONE,
'params' => array(),
'link' => new Horde_Url('#'),
- 'icon' => (string)Horde::url($GLOBALS['registry']->getImageDir('horde') . '/block/weatherdotcom/23x23/' . ($data['day']['conditionIcon'] == '-' ? 'na' : $data['day']['conditionIcon']) . '.png', true, false));
+ 'icon' => (string)Horde::url(Horde_Themes::img('block/weatherdotcom/23x23/' . ($data['day']['conditionIcon'] == '-' ? 'na' : $data['day']['conditionIcon']) . '.png'), true, false));
$day->mday++;
}
}
asort($sorted_addressbooks);
-$browse_img = Horde::img('turba.png', _("Browse"), null, $registry->getImageDir('turba'));
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$browse_img = Horde::img('turba.png', _("Browse"));
+$edit_img = Horde::img('edit.png', _("Edit"));
+$perms_img = Horde::img('perms.png', _("Change Permissions"));
+$delete_img = Horde::img('delete.png', _("Delete"));
Horde::addScriptFile('tables.js', 'horde');
$title = _("Manage Address Books");
@list($own_source, $own_id) = explode(';', $prefs->getValue('own_contact'));
if ($own_source == $source && $own_id == $contact->getValue('__key')) {
$own_icon = ' ' . Horde::img('user.png', _("Your own contact"),
- array('title' => _("Your own contact")),
- $registry->getImageDir('horde'));
+ array('title' => _("Your own contact")));
$own_link = '';
} else {
$own_icon = '';
$results['turba/' . $owner]['name'] = $owner;
}
if (in_array('icon', $properties)) {
- $results['turba/' . $owner]['icon'] = $registry->getImageDir() . '/turba.png';
+ $results['turba/' . $owner]['icon'] = Horde_Themes::img('turba.png');
}
if (in_array('browseable', $properties)) {
$results['turba/' . $owner]['browseable'] = true;
$results[$curpath . $addressbook]['name'] = $name;
}
if (in_array('icon', $properties)) {
- $results[$curpath . $addressbook]['icon'] = $registry->getImageDir() . '/turba.png';
+ $results[$curpath . $addressbook]['icon'] = Horde_Themes::img('turba.png');
}
if (in_array('browseable', $properties)) {
$results[$curpath . $addressbook]['browseable'] = true;
$results[$key]['name'] = Turba::formatName($contact);
}
if (in_array('icon', $properties)) {
- $results[$key]['icon'] = $registry->getImageDir('horde') . '/mime/vcard.png';
+ $results[$key]['icon'] = Horde_Themes::img('mime/vcard.png');
}
if (in_array('browseable', $properties)) {
$results[$key]['browseable'] = false;
$browse = Horde::applicationUrl('browse.php');
$add = Horde::applicationUrl('add.php');
- $icondir = $registry->getImageDir() . '/menu';
+ $icondir = Horde_Themes::img() . '/menu';
if ($GLOBALS['addSources']) {
$tree->addNode($parent . '__new',
$indent + 1,
false,
array('icon' => 'search.png',
- 'icondir' => $registry->getImageDir('horde'),
+ 'icondir' => Horde_Themes::img(null, 'horde'),
'url' => Horde::applicationUrl('search.php')));
}
}
$sortdir = $this->getColumnSortDirection($i);
if ($this->isPrimarySortColumn($i)) {
- return Horde::img($sortdir ? 'za.png' : 'az.png', $title, null, $GLOBALS['registry']->getImageDir('horde'));
+ return Horde::img($sortdir ? 'za.png' : 'az.png', $title);
} else {
return Horde::img($sortdir ? 'za_secondary.png' : 'az_secondary.png', _("Sort Direction"));
}
'type' => $file['type'],
'source' => $this->driver->name,
'key' => $this->getValue('__key'));
- $dl = Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download"), '', $registry->getImageDir('horde')) . '</a>';
+ $dl = Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download")) . '</a>';
// Let's see if we can view this one, too.
if ($viewer && !is_a($viewer, 'Horde_Mime_Viewer_default')) {
'<input type="hidden" name="file" value="' . htmlspecialchars($file['name']) . '" />' .
'<input type="hidden" name="source" value="' . htmlspecialchars($this->driver->name) . '" />' .
'<input type="hidden" name="key" value="' . htmlspecialchars($this->getValue('__key')) . '" />' .
- '<input type="image" class="img" src="' . $GLOBALS['registry']->getImageDir('horde') . '/delete.png" />' .
+ '<input type="image" class="img" src="' . Horde_Themes::img('delete.png') . '" />' .
'</form>';
return $this->vfsDisplayUrl($file) . ' ' . $delform;
if (count($GLOBALS['addSources'])) {
$menu->add(Horde::applicationUrl('add.php'), _("_New Contact"), 'menu/new.png');
}
- $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $GLOBALS['registry']->getImageDir('horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
+ $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
/* Import/Export */
if ($GLOBALS['conf']['menu']['import_export']) {
- $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
}
return $menu;
<input name="search" id="search" size="35" />
<input type="submit" class="button" value="<?php echo _("Search") ?>" />
<input type="submit" class="button" style="display:none" value="<?php echo _("Close") ?>" id="turba_minisearch_close" onclick="hide_mini_search(); return false;" />
-<span id="turba_minisearch_searching" style="display:none"><?php echo Horde::img('loading.gif', '', '', $GLOBALS['registry']->getImageDir('horde'))?></span>
+<span id="turba_minisearch_searching" style="display:none"><?php echo Horde::img('loading.gif') ?></span>
</form>
<div><iframe id="turba_minisearch_iframe" name="turba_minisearch_iframe" style="width:100%;border:none;display:none" frameborder="0" src="about:blank"></iframe></div>
<th class="item leftAlign" width="1%" style="cursor:pointer" onclick="document.contacts.checkAll.checked = !document.contacts.checkAll.checked; SelectAll();" nowrap="nowrap"><label for="checkAll" class="hidden"><?php echo _("Check All/None") ?></label><input type="checkbox" id="checkAll" name="checkAll" onclick="document.contacts.checkAll.checked = !document.contacts.checkAll.checked; SelectAll();" <?php echo Horde::getAccessKeyAndTitle(_("Check _All/None")) ?> /></th>
<?php endif; ?>
<?php if ($this->showEdit): $col_count++; ?>
- <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
<?php endif; ?>
<?php if ($this->showVcard): $col_count++; ?>
- <th class="item" width="1%"><?php echo Horde::img('mime/vcard.png', _("vCard"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th class="item" width="1%"><?php echo Horde::img('mime/vcard.png', _("vCard")) ?></th>
<?php endif; ?>
<?php if ($this->showGroup): $col_count++; ?>
<th class="item" width="1%"><?php echo Horde::img('group.png', _("List")) ?></th>
<div class="header">
<?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
<div id="quicksearch" style="display:none">
<input type="text" name="quicksearchT" id="quicksearchT" for="QuickFinderContacts" empty="QuickFinderEmpty" />
<small>
if ($own_source == $ob->getSource() && $own_id == $ob->getValue('__key')) {
$own_icon = Horde::img('user.png', _("Your own contact"),
- array('title' => _("Your own contact")),
- $GLOBALS['registry']->getImageDir('horde'));
+ array('title' => _("Your own contact")));
} else {
$own_icon = ' ';
}
'key' => $ob->getValue('__key')));
$vcard_url = Horde::link(Horde::applicationUrl($vcard_url),
_("Download vCard"))
- . Horde::img('mime/vcard.png', _("Download vCard"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('mime/vcard.png', _("Download vCard"))
. '</a>';
$cell = Horde::link($ob->url()) . $link_text . '</a>';
'key' => $ob->getValue('__key'),
'url' => Horde::selfUrl(true, false, true)));
$edit_url = Horde::link(Horde::applicationUrl($edit_url), _("Edit"))
- . Horde::img('edit.png', _("Edit"), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('edit.png', _("Edit"))
. '</a>';
}
} else {
Horde::includeScriptFiles();
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?>>
</select>
</td>
<td>
- <a href="#" onclick="addAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add address book"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="addAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add address book")) ?></a>
<br />
- <a href="#" onclick="removeAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove address book"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="removeAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove address book")) ?></a>
</td>
<td>
<label for="selected_addressbooks" class="hidden"><?php echo _("These address books will display in this order:") ?></label>
</select>
</td>
<td>
- <a href="#" onclick="moveAddressBookUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move left"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveAddressBookUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move left")) ?></a>
<br />
- <a href="#" onclick="moveAddressBookDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move right"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveAddressBookDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move right")) ?></a>
</td>
</tr>
</table>
$template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
/* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete Domain"), '', $registry->getImageDir('horde')),
- 'edit' => Horde::img('edit.png', _("Edit Domain"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete Domain")),
+ 'edit' => Horde::img('edit.png', _("Edit Domain")));
$template->set('images', $images);
/* Render the page. */
if ($user['user_enabled'] !== 'active') {
$no_error = false;
$err_msg = _("User disabled.");
- $status[] = Horde::img('alerts/error.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . ' ' . $err_msg;
+ $status[] = Horde::img('alerts/error.png', $err_msg) . ' ' . $err_msg;
}
/* Check if mailbox exists. */
if (is_a($mailboxes, 'PEAR_Error')) {
$no_error = false;
$err_msg = $mailboxes->getMessage();
- $status[] = Horde::img('alerts/warning.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . ' ' . $err_msg;
+ $status[] = Horde::img('alerts/warning.png', $err_msg) . ' ' . $err_msg;
}
$result = $mailboxes->checkMailbox($user_name, $domain_name);
if (is_a($result, 'PEAR_Error')) {
$no_error = false;
$err_msg = $result->getMessage();
- $status[] = Horde::img('alerts/warning.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . ' ' . $err_msg;
+ $status[] = Horde::img('alerts/warning.png', $err_msg) . ' ' . $err_msg;
}
/* TODO: Quota checking would be nice too. */
* user's status. */
if ($no_error) {
$msg = _("User ready.");
- $status = array(Horde::img('alerts/success.png', $msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . ' ' . $msg);
+ $status = array(Horde::img('alerts/success.png', $msg) . ' ' . $msg);
}
return $status;
}
/* Saves or creates alias records for a given user.
- *
+ *
* @param array info The info used to store the information.
* Required fields are:
* 'address' => The destination address (used for LDAP ID lookup)
if (is_a($result, 'PEAR_Error')) {
return $result;
}
-
+
return true;
}
-
+
/* Deletes alias records for a given user.
- *
+ *
* @param array info The info used to store the information.
* Required fields are:
* 'address' => The destination address (used for LDAP ID lookup)
if (is_a($result, 'PEAR_Error')) {
return $result;
}
-
+
return true;
}
-
+
/* Saves or creates forward records for a given user.
- *
+ *
* @param array info The info used to store the information.
* Required fields are:
* 'address' => The destination address (used for LDAP ID lookup)
if (is_a($result, 'PEAR_Error')) {
return $result;
}
-
+
return true;
}
-
+
/* Deletes forward records for a given user.
- *
+ *
* @param array info The info used to store the information.
* Required fields are:
* 'address' => The destination address (used for LDAP ID lookup)
if (is_a($result, 'PEAR_Error')) {
return $result;
}
-
+
return true;
}
-
+
function saveUser(&$info)
{
$create = false;
$url = Horde::applicationUrl('users/index.php');
$tmp = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
$menu->add(Horde::applicationUrl($tmp), _($domain['domain_name']), 'domain.png');
- $menu->add(Horde::applicationUrl('users/edit.php'), _("New _Address"), 'user.png', $GLOBALS['registry']->getImageDir('horde'));
+ $menu->add(Horde::applicationUrl('users/edit.php'), _("New _Address"), 'user.png', Horde_Themes::img(null, 'horde'));
} else {
$menu->add(Horde::applicationUrl('domains/edit.php'), _("_New Domain"), 'domain.png');
}
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
$template->set('pager', $pager->render());
/* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete User"), '', $registry->getImageDir('horde')),
- 'edit' => Horde::img('edit.png', _("Edit User"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete User")),
+ 'edit' => Horde::img('edit.png', _("Edit User")));
$template->set('images', $images);
/* Render the page. */
$template->set('actions', $actions);
/* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete User"), '', $registry->getImageDir('horde')),
- 'edit' => Horde::img('edit.png', _("Edit User"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete User")),
+ 'edit' => Horde::img('edit.png', _("Edit User")));
$template->set('images', $images);
$template->set('menu', Vilma::getMenu('string'));
$results = array(
'whups/queue' => array(
'name' => _("Queues"),
- 'icon' => $registry->getImageDir() . '/whups.png',
+ 'icon' => Horde_Themes::img('whups.png'),
'browseable' => count(
Whups::permissionsFilter($whups_driver->getQueues(),
'queue', Horde_Perms::READ))));
$indent + 1,
false,
array('icon' => 'create.png',
- 'icondir' => $registry->getImageDir(),
+ 'icondir' => Horde_Themes::img(),
'url' => Horde::applicationUrl('ticket/create.php')));
$tree->addNode($parent . '__search',
$indent + 1,
false,
array('icon' => 'search.png',
- 'icondir' => $registry->getImageDir('horde'),
+ 'icondir' => Horde_Themes::img(),
'url' => Horde::applicationUrl('search.php')));
}
@htmlspecialchars($var->getValue($vars)),
$this->_getActionScripts($form, $var))
. '<span id="' . $name . '_loading_img" style="display:none;">'
- . Horde::img('loading.gif', _("Loading..."), '',
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('loading.gif', _("Loading..."))
. '</span>';
}
$comment_count++;
if ($private) {
- $comment_label = Horde::img('locked.png', '', null, $registry->getImageDir('horde'))
+ $comment_label = Horde::img('locked.png')
. sprintf(_("Comment #%d (Private)"), $comment_count);
} else {
$comment_label = sprintf(_("Comment #%d"), $comment_count);
// little nicer.
$fimgattrs = 'height="20" width="0" style="vertical-align: middle;"';
$imgattrs = 'height="20" width="20" style="vertical-align: middle;"';
- $imgdir = $registry->getImageDir('horde');
+ $imgdir = Horde_Themes::img(null, 'horde');
$space = '';
$count = count($more);
$name = Horde::img('group.png',
!empty($details['name'])
? $details['name']
- : $details['user'],
- '',
- $GLOBALS['registry']->getImageDir('horde'))
+ : $details['user'])
. $name;
}
}
$url_params = array('actionID' => 'download_file',
'file' => $file['name'],
'ticket' => $ticket);
- $link .= ' ' . Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download"), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ $link .= ' ' . Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download")) . '</a>';
// Admins can delete attachments.
if (Whups::hasPermission($queue, 'queue', Horde_Perms::DELETE)) {
'id' => $ticket,
'url' => Horde::selfUrl(true, false, true)));
$link .= ' ' . Horde::link($url, sprintf(_("Delete %s"), $file['name']), '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Permanently delete %s?"), $file['name'])) . '\');') .
- Horde::img('delete.png', sprintf(_("Delete %s"), $file['name']), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ Horde::img('delete.png', sprintf(_("Delete %s"), $file['name'])) . '</a>';
}
return $link;
: array('slug' => $whups_query->slug);
$subscription = Horde::link(Whups::urlFor('query_rss', $params, true, -1),
_("Subscribe to this query"))
- . Horde::img('feed.png', _("Subscribe to this query"), null,
- $GLOBALS['registry']->getImageDir('horde'))
+ . Horde::img('feed.png', _("Subscribe to this query"))
. '</a>';
}
$results = Whups_View::factory(
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
</select>
</td>
<td>
- <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
<br />
- <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
</td>
<td>
<label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
</select>
</td>
<td>
- <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
<br />
- <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down"), null, $registry->getImageDir('horde')) ?></a>
+ <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
</td>
</tr>
</table>
$template->setOption('gettext', true);
$template->set('pageName', $this->pageName());
$template->set('formAction', Wicked::url('AttachedFiles'));
- $template->set('deleteButton', $registry->getImageDir('horde')
- . '/delete.png');
+ $template->set('deleteButton', Horde_Themes::img('delete.png'));
$template->set('referrerLink', Wicked::url($this->referrer()));
$refreshIcon = Horde::link($this->pageUrl())
. Horde::img('reload.png',
- sprintf(_("Reload \"%s\""), $this->pageTitle()),
- '', $registry->getImageDir('horde'))
+ sprintf(_("Reload \"%s\""), $this->pageTitle()))
. '</a>';
$template->set('refreshIcon', $refreshIcon);
$template->set('attachments', $attachments, true);
$template->set('requireChangelog', false, true);
}
- $requiredMarker = Horde::img('required.png', '*', '',
- $registry->getImageDir('horde'));
+ $requiredMarker = Horde::img('required.png', '*');
$template->set('requiredMarker', $requiredMarker);
$template->set('referrer', $this->referrer());
$template->set('formInput', Horde_Util::formInput());
$template->set('referrerLink', Wicked::url($referrer));
- $requiredMarker = Horde::img('required.png', '*', '',
- $registry->getImageDir('horde'));
+ $requiredMarker = Horde::img('required.png', '*');
$template->set('requiredMarker', $requiredMarker);
$references = $wicked->getBackLinks($referrer);
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
<link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
</head>
<body>
echo htmlspecialchars($this->pageName()) . $referrerLink . ($this->isOld() ? ' (' . htmlspecialchars($v) . ')' : '') . ' ' .
Horde::link($this->pageUrl(), _("Reload Page")) .
- Horde::img('reload.png', _("Reload Page"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+ Horde::img('reload.png', _("Reload Page")) ?></a>
<?php if ($this->isLocked()) echo Horde::img('locked.png', _("Locked")) ?>
</div>
<input type="submit" value="<?php echo _("Save") ?>" class="button" />
<input type="button" value="<?php echo _("Preview") ?>" class="button" onclick="preview()" />
<a class="button" href="<?php echo $page->pageUrl()->add('actionID', 'unlock') ?>"><?php echo _("Cancel") ?></a>
- <?php if (!empty($GLOBALS['conf']['wicked']['require_change_log'])) echo Horde::img('required.png', _("Changelog is required"), '', $GLOBALS['registry']->getImageDir('horde')) ?>
+ <?php if (!empty($GLOBALS['conf']['wicked']['require_change_log'])) echo Horde::img('required.png', _("Changelog is required")) ?>
<strong><?php echo _("Change log") . ': ' ?></strong><input type="text" name="changelog" size="50" />
<input type="checkbox" name="minor" id="minor" checked="checked" /><label for="minor"> <?php echo _("Minor Change") ?></label>
</div>
<h1 class="header">
<?php printf(_("History: %s"), Horde::link($this->pageUrl()) . htmlspecialchars($this->pageName()) . '</a>');
- echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+ echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History")) ?></a>
</h1>
<table width="100%" cellspacing="0" class="linedRow">
<th align="left" width="1%"><?php echo _("Version") ?></th>
<?php if ($this->allows(WICKED_MODE_REMOVE)): ?>
- <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('delete.png', _("Delete Version"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('delete.png', _("Delete Version")) ?></th>
<?php endif; if ($this->allows(WICKED_MODE_EDIT)): ?>
- <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('edit.png', _("Edit Version"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+ <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('edit.png', _("Edit Version")) ?></th>
<th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('restore.png', _("Restore Version")) ?></th>
<?php endif; ?>
$text = sprintf(_("Delete Version %s"), $page->version());
$url = Horde_Util::addParameter(Wicked::url('DeletePage'), array('referrer' => $page->pageName(),
'version' => $page->version()));
-echo Horde::link($url, $text) . Horde::img('delete.png', $text, '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+echo Horde::link($url, $text) . Horde::img('delete.png', $text) . '</a>';
?>
</td>
<?php endif; if ($this->allows(WICKED_MODE_EDIT)): ?>
if ($show_edit) {
$text = sprintf(_("Edit Version %s"), $page->version());
$url = Horde_Util::addParameter(Wicked::url('EditPage'), array('referrer' => $page->pageName()));
- echo Horde::link($url, $text) . Horde::img('edit.png', $text, '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+ echo Horde::link($url, $text) . Horde::img('edit.png', $text) . '</a>';
}
?>
</td>