diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-05-25 06:55:16 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-05-25 06:55:16 +0200 |
commit | 1c180e28ffe223c8cdff7e9bb7ec237cded48ef4 (patch) | |
tree | ea512f8a5d4cca706cf919ed383459304f0acc4a | |
parent | e01c813101f2811879acfe808c4573b924f7b666 (diff) | |
download | semanticscuttle-1c180e28ffe223c8cdff7e9bb7ec237cded48ef4.tar.gz semanticscuttle-1c180e28ffe223c8cdff7e9bb7ec237cded48ef4.tar.bz2 |
use theme->resource() method to get paths to themable filse
-rw-r--r-- | data/templates/default/bookmarks.tpl.php | 25 | ||||
-rw-r--r-- | data/templates/default/top.inc.php | 4 | ||||
-rw-r--r-- | src/SemanticScuttle/Model/Theme.php | 2 |
3 files changed, 21 insertions, 10 deletions
diff --git a/data/templates/default/bookmarks.tpl.php b/data/templates/default/bookmarks.tpl.php index 93bcf53..91d50bf 100644 --- a/data/templates/default/bookmarks.tpl.php +++ b/data/templates/default/bookmarks.tpl.php @@ -39,7 +39,9 @@ include('search.menu.php'); <?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?> <div style="width:70%;text-align:center;"> -<img src="<?php echo ROOT . 'themes/' . $GLOBALS['theme']; ?>/images/logo_24.gif" width="12px"/> <?php echo T_('Bookmarks on this page are managed by an admin user.'); ?><img src="<?php echo ROOT . 'themes/' . $GLOBALS['theme']; ?>/images/logo_24.gif" width="12px"/> + <img src="<?php $theme->resource('images/logo_24.gif'); ?>" width="12px"/> + <?php echo T_('Bookmarks on this page are managed by an admin user.'); ?> + <img src="<?php $theme->resource('images/logo_24.gif'); ?>" width="12px"/> </div> <?php endif?> @@ -70,7 +72,7 @@ if ($userservice->isLoggedOn()) { ) { echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">'; echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):''; - echo ' <img src="'.ROOT . 'themes/' . $GLOBALS['theme'] . '/images/b_edit.png" /></a>'; + echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>'; } else if (isset($hash)) { echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">'; echo T_('Edit the common description of this bookmark').'</a>)'; @@ -95,7 +97,7 @@ if($userservice->isLoggedOn()) { if($currenttag!= '') { echo ' <a href="'. createURL('tagedit', $currenttag).'" title="'.T_('Edit your personal description of this tag').'" >'; echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):''; - echo ' <img src="' . ROOT . 'themes/' . $GLOBALS['theme'] . '/images/b_edit.png" /></a>'; + echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>'; } } ?></p> @@ -219,9 +221,12 @@ if ($currenttag!= '') { $brss = ''; $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { - $brss = '<a style="background:#FFFFFF" href="'. htmlspecialchars($rsschannels[$i][1]) . '"' + $brss = '<a style="background:#FFFFFF"' + . ' href="'. htmlspecialchars($rsschannels[$i][1]) . '"' . ' title="' . htmlspecialchars($rsschannels[$i][0]) . '">' - . '<img src="' . ROOT . 'themes/' . $GLOBALS['theme'] . '/images/rss.gif" width="16" height="16" alt="' . htmlspecialchars($rsschannels[$i][0]) .'"/>' + . '<img src="' . $theme->resource('images/rss.gif') . '"' + . ' width="16" height="16"' + . ' alt="' . htmlspecialchars($rsschannels[$i][0]) .'"/>' . '</a>'; } @@ -361,9 +366,15 @@ if ($currenttag!= '') { } // Admin specific design - if ($userservice->isAdmin($row['username']) && $GLOBALS['enableAdminColors']) { + if ($userservice->isAdmin($row['username']) + && $GLOBALS['enableAdminColors'] + ) { $adminBgClass = ' class="adminBackground"'; - $adminStar = ' <img src="' . ROOT . 'themes/' . $GLOBALS['theme'] . '/images/logo_24.gif" width="12px" title="'. T_('This bookmark is certified by an admin user.') .'" />'; + $adminStar = ' <img' + . ' src="' . $theme->resource('images/logo_24.gif') . '"' + . ' width="12px"' + . ' title="' . T_('This bookmark is certified by an admin user.') . '"' + . '/>'; } else { $adminBgClass = ''; $adminStar = ''; diff --git a/data/templates/default/top.inc.php b/data/templates/default/top.inc.php index 6ad2df2..9eed6ff 100644 --- a/data/templates/default/top.inc.php +++ b/data/templates/default/top.inc.php @@ -4,8 +4,8 @@ <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' ยป ' . $pagetitle : '')); ?></title> - <link rel="icon" type="image/png" href="<?php echo ROOT ?>themes/<?php echo $GLOBALS['theme']; ?>/icon.png" /> - <link rel="stylesheet" type="text/css" href="<?php echo ROOT ?>themes/<?php echo $GLOBALS['theme']; ?>/scuttle.css" /> + <link rel="icon" type="image/png" href="<?php echo $theme->resource('icon.png');?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo $theme->resource('scuttle.css');?>" /> <link rel="search" type="application/opensearchdescription+xml" href="<?php echo ROOT ?>api/opensearch.php" title="<?php echo htmlspecialchars($GLOBALS['sitename']) ?>"/> <?php if (isset($rsschannels)) { diff --git a/src/SemanticScuttle/Model/Theme.php b/src/SemanticScuttle/Model/Theme.php index a2f4973..65861b8 100644 --- a/src/SemanticScuttle/Model/Theme.php +++ b/src/SemanticScuttle/Model/Theme.php @@ -60,7 +60,7 @@ class SemanticScuttle_Model_Theme * * Must always be used when adding i.e. images to the output. * - * @param string $file File name to find the path for + * @param string $file File name to find the path for, i.e. "scuttle.css". * * @return string Full path */ |