aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorchrisaga <chrisaga@piwigo.org>2006-12-02 16:46:15 +0000
committerchrisaga <chrisaga@piwigo.org>2006-12-02 16:46:15 +0000
commit782a75bb8f5b36b3a4d462945cd0bdac353ba1f0 (patch)
tree15b1b4ad6099d61683bfd57ea1dc3798e3a53764 /picture.php
parent9ce5c07734b5f3219c0a50b5cba67eb2d3021716 (diff)
improve page header : slightly prettier title and
first implementation of meta tags and rel links (see the wiki specs) some code improvements are still need. git-svn-id: http://piwigo.org/svn/trunk@1627 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/picture.php b/picture.php
index be5971a6a..4faf57f40 100644
--- a/picture.php
+++ b/picture.php
@@ -457,7 +457,6 @@ if ( isset($picture['next']['image_url'])
)
);
}
-include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames(array('picture'=>'picture.tpl'));
//------------------------------------------------------- navigation management
@@ -590,6 +589,7 @@ if ( is_admin() )
}
//--------------------------------------------------------- picture information
+$header_infos = array(); //for html header use
// legend
if (isset($picture['current']['comment'])
and !empty($picture['current']['comment']))
@@ -599,6 +599,7 @@ if (isset($picture['current']['comment'])
array(
'COMMENT_IMG' => nl2br($picture['current']['comment'])
));
+ $header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
}
$infos = array();
@@ -615,6 +616,7 @@ if (!empty($picture['current']['author']))
// '&amp;search=author:'.$picture['current']['author']
// .'">'.$picture['current']['author'].'</a>';
$picture['current']['author'];
+ $header_infos['INFO_AUTHOR'] = $picture['current']['author'];
}
else
{
@@ -702,6 +704,7 @@ $result = pwg_query($query);
if (mysql_num_rows($result) > 0)
{
$tags = array();
+ $tag_names = array();
while ($row = mysql_fetch_array($result))
{
@@ -720,9 +723,11 @@ if (mysql_num_rows($result) > 0)
)
.'">'.$row['name'].'</a>'
);
+ array_push( $tag_names, $row['name'] );
}
$infos['INFO_TAGS'] = implode(', ', $tags);
+ $header_infos['INFO_TAGS'] = implode(', ', $tag_names);
}
else
{
@@ -773,6 +778,7 @@ if ($metadata_showable and isset($_GET['metadata']))
//------------------------------------------------------------ log informations
pwg_log('picture', $page['title'], $picture['current']['file']);
+include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->parse('picture');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>