mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 03:39:57 +03:00
URL rewriting: capable of fully working with urls without ?
URL rewriting: works with image file instead of image id (change make_picture_url to generate urls with file name instead of image id) URL rewriting: completely works with category/best_rated and picture/best_rated/534 (change 'category.php?' to 'category' in make_index_url and 'picture.php?' to 'picture' in make_picture_url to see it) fix: picture category display in upper bar fix: function rate_picture variables and use of the new user type fix: caddie icon appears now on category page fix: admin element_set sql query was using storage_category_id column (column has moved to #image_categories) fix: replaced some old $_GET[xxx] with $page[xxx] fix: pictures have metadata url (use ? parameter - might change later) git-svn-id: http://piwigo.org/svn/trunk@1092 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
3609c224c7
commit
0971ce48d2
28 changed files with 373 additions and 310 deletions
|
@ -379,7 +379,7 @@ SELECT DISTINCT(category_id) AS id, c.name, uppercats, global_rank
|
|||
WHERE ic.image_id IN ('.implode(',', $page['cat_elements_id']).')
|
||||
AND ic.category_id = c.id
|
||||
AND ic.image_id = i.id
|
||||
AND ic.category_id != i.storage_category_id
|
||||
AND ic.is_storage = \'false\'
|
||||
;';
|
||||
display_select_cat_wrapper($query, array(), $blockname, true);
|
||||
}
|
||||
|
|
|
@ -213,6 +213,7 @@ SELECT *
|
|||
$row = mysql_fetch_array(pwg_query($query));
|
||||
|
||||
$storage_category_id = $row['category_id'];
|
||||
$image_file = $row['file'];
|
||||
|
||||
// Navigation path
|
||||
|
||||
|
@ -354,6 +355,7 @@ if (isset($_GET['cat_id'])
|
|||
$url_img = make_picture_URL(
|
||||
array(
|
||||
'image_id' => $_GET['image_id'],
|
||||
'image_file' => $image_file,
|
||||
'category' => $_GET['cat_id'],
|
||||
)
|
||||
);
|
||||
|
@ -365,6 +367,7 @@ else
|
|||
$url_img = make_picture_URL(
|
||||
array(
|
||||
'image_id' => $_GET['image_id'],
|
||||
'image_file' => $image_file,
|
||||
'category' => $category,
|
||||
)
|
||||
);
|
||||
|
|
|
@ -177,7 +177,7 @@ if (mysql_num_rows($result) > 0)
|
|||
$template->assign_block_vars(
|
||||
'groups.category',
|
||||
array(
|
||||
'NAME' => get_cat_display_name_cache($category['uppercats'], '', false)
|
||||
'NAME' => get_cat_display_name_cache($category['uppercats'], null, false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
26
category.php
26
category.php
|
@ -45,8 +45,7 @@ if ( isset( $_GET['act'] )
|
|||
session_unset();
|
||||
session_destroy();
|
||||
setcookie(session_name(),'',0, cookie_path() );
|
||||
$url = 'category.php';
|
||||
redirect( $url );
|
||||
redirect( make_index_url() );
|
||||
}
|
||||
|
||||
//---------------------------------------------- change of image display order
|
||||
|
@ -113,11 +112,7 @@ $template->set_filenames( array('category'=>'category.tpl') );
|
|||
//-------------------------------------------------------------- category title
|
||||
if (isset($page['category']))
|
||||
{
|
||||
$template_title = get_cat_display_name(
|
||||
$page['cat_name'],
|
||||
'category.php?/category/',
|
||||
false
|
||||
);
|
||||
$template_title = get_cat_display_name( $page['cat_name'], '', false );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -206,7 +201,7 @@ if ('search' == $page['section'])
|
|||
$template->assign_block_vars(
|
||||
'search_rules',
|
||||
array(
|
||||
'URL' => PHPWG_ROOT_PATH.'/search_rules.php?search_id='.$page['search'],
|
||||
'URL' => get_root_url().'search_rules.php?search_id='.$page['search'],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -264,7 +259,7 @@ if ($conf['rate'])
|
|||
$template->assign_block_vars(
|
||||
'special_cat',
|
||||
array(
|
||||
'URL' => PHPWG_ROOT_PATH.'random.php',
|
||||
'URL' => get_root_url().'random.php',
|
||||
'TITLE' => $lang['random_cat_hint'],
|
||||
'NAME' => $lang['random_cat']
|
||||
));
|
||||
|
@ -395,6 +390,17 @@ if (isset($page['category']) and is_admin())
|
|||
);
|
||||
}
|
||||
|
||||
if (is_admin() and !empty($page['items']) )
|
||||
{
|
||||
$template->assign_block_vars(
|
||||
'caddie',
|
||||
array(
|
||||
'URL' =>
|
||||
add_url_param(duplicate_index_url(),'caddie=1')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------ main part : thumbnails
|
||||
if (isset($page['thumbnails_include']))
|
||||
{
|
||||
|
@ -453,7 +459,7 @@ if (isset($page['category']))
|
|||
// upload a picture in the category
|
||||
if ($page['cat_uploadable'])
|
||||
{
|
||||
$url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['category'];
|
||||
$url = get_root_url().'upload.php?cat='.$page['category'];
|
||||
$template->assign_block_vars(
|
||||
'upload',
|
||||
array(
|
||||
|
|
|
@ -66,7 +66,7 @@ $since_options = array(
|
|||
'clause' => '1=1') // stupid but generic
|
||||
);
|
||||
|
||||
$page['since'] = isset($_GET['since']) ? $_GET['since'] : 1;
|
||||
$page['since'] = isset($_GET['since']) ? $_GET['since'] : 3;
|
||||
|
||||
// on which field sorting
|
||||
//
|
||||
|
@ -393,7 +393,7 @@ SELECT id, uppercats
|
|||
{
|
||||
// name of the picture
|
||||
$name = get_cat_display_name_cache(
|
||||
$categories[$comment['category_id']]['uppercats'], '', false);
|
||||
$categories[$comment['category_id']]['uppercats'], null, false);
|
||||
$name.= $conf['level_separator'];
|
||||
if (!empty($elements[$comment['image_id']]['name']))
|
||||
{
|
||||
|
@ -411,9 +411,6 @@ SELECT id, uppercats
|
|||
);
|
||||
|
||||
// link to the full size picture
|
||||
$url = PHPWG_ROOT_PATH.'picture.php?cat='.$comment['category_id'];
|
||||
$url.= '&image_id='.$comment['image_id'];
|
||||
|
||||
$url = make_picture_url(
|
||||
array(
|
||||
'category' => $comment['category_id'],
|
||||
|
|
|
@ -261,8 +261,14 @@ SELECT DISTINCT('.$this->calendar_levels[$level]['sql']
|
|||
}
|
||||
}
|
||||
|
||||
$dates = $page['chronology_date'];
|
||||
while ($level<count($dates))
|
||||
{
|
||||
array_pop($dates);
|
||||
}
|
||||
|
||||
$nav_bar = $this->get_nav_bar_from_items(
|
||||
$page['chronology_date'],
|
||||
$dates,
|
||||
$level_items,
|
||||
null,
|
||||
'calItem',
|
||||
|
|
|
@ -224,7 +224,7 @@ function build_global_calendar()
|
|||
$query.= $this->get_date_where();
|
||||
$query.= '
|
||||
GROUP BY period
|
||||
ORDER BY YEAR('.$this->date_field.') DESC';
|
||||
ORDER BY YEAR('.$this->date_field.') DESC, MONTH('.$this->date_field.')';
|
||||
|
||||
$result = pwg_query($query);
|
||||
$items=array();
|
||||
|
@ -350,7 +350,9 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do
|
|||
|
||||
$row = mysql_fetch_array(pwg_query($query));
|
||||
$items[$day]['tn_path'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
|
||||
$items[$day]['tn_file'] = $row['file'];
|
||||
$items[$day]['file'] = $row['file'];
|
||||
$items[$day]['path'] = $row['path'];
|
||||
$items[$day]['tn_ext'] = @$row['tn_ext'];
|
||||
$items[$day]['width'] = $row['width'];
|
||||
$items[$day]['height'] = $row['height'];
|
||||
$items[$day]['dow'] = $row['dow'];
|
||||
|
@ -445,7 +447,10 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do
|
|||
}
|
||||
else
|
||||
{// item not an image (tn is either mime type or an image)
|
||||
$tn_size = @getimagesize($items[$day]['tn_path']);
|
||||
$thumb = get_thumbnail_src(
|
||||
$items[$day]['path'], @$items[$day]['tn_ext'], false
|
||||
);
|
||||
$tn_size = @getimagesize($thumb);
|
||||
}
|
||||
$tn_width = $tn_size[0];
|
||||
$tn_height = $tn_size[1];
|
||||
|
@ -548,7 +553,7 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do
|
|||
'thumbnails.line.thumbnail',
|
||||
array(
|
||||
'IMAGE'=>$data['tn_path'],
|
||||
'IMAGE_ALT'=>$data['tn_file'],
|
||||
'IMAGE_ALT'=>$data['file'],
|
||||
'IMAGE_TITLE'=>$thumbnail_title,
|
||||
'U_IMG_LINK'=>$url
|
||||
)
|
||||
|
|
|
@ -126,7 +126,7 @@ foreach ($pictures as $row)
|
|||
}
|
||||
case 'search' :
|
||||
{
|
||||
$name = replace_search($name, $_GET['search']);
|
||||
$name = replace_search($name, $page['search']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ while ( $row = mysql_fetch_array( $result ) )
|
|||
$template->assign_block_vars(
|
||||
'thumbnails.line.thumbnail.category_name',
|
||||
array(
|
||||
'NAME' => get_cat_display_name_cache($row['uppercats'], '', false),
|
||||
'NAME' => get_cat_display_name_cache($row['uppercats'], null, false),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ function get_dirs($directory)
|
|||
and $file != '..'
|
||||
and is_dir($directory.'/'.$file)
|
||||
and $file != 'CVS'
|
||||
and $file != '.svn')
|
||||
and $file != '.svn')
|
||||
{
|
||||
array_push($sub_dirs, $file);
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ function pwg_log( $file, $category, $picture = '' )
|
|||
if ($conf['log'])
|
||||
{
|
||||
if ( ($conf['history_admin'] ) or ( (! $conf['history_admin']) and (!is_admin()) ) )
|
||||
{
|
||||
{
|
||||
$login = ($user['id'] == $conf['guest_id'])
|
||||
? 'guest' : addslashes($user['username']);
|
||||
|
||||
|
@ -1141,11 +1141,13 @@ function make_picture_URL($params)
|
|||
|
||||
$url =
|
||||
get_root_url().'picture.php?'
|
||||
.'/'.$params['image_id']
|
||||
.'/'.make_section_in_URL($params)
|
||||
;
|
||||
|
||||
$url = add_well_known_params_in_url($url, $params);
|
||||
$url.= '/'.
|
||||
$params['image_id']//.'-'.
|
||||
//get_filename_wo_extension($params['image_file']).'.htm'
|
||||
;
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ function check_restrictions($category_id)
|
|||
if (in_array($category_id, explode(',', $user['forbidden_categories'])))
|
||||
{
|
||||
$login_url =
|
||||
'./identification.php?redirect='
|
||||
get_root_url().'identification.php?redirect='
|
||||
.urlencode(urlencode($_SERVER['REQUEST_URI']));
|
||||
|
||||
if (!$user['is_the_guest'])
|
||||
|
@ -278,7 +278,7 @@ function display_select_categories($categories,
|
|||
if ($fullname)
|
||||
{
|
||||
$option = get_cat_display_name_cache($category['uppercats'],
|
||||
'',
|
||||
null,
|
||||
false);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -66,6 +66,7 @@ function get_icon($date)
|
|||
$title .= $user['recent_period'];
|
||||
$title .= ' '.$lang['days'];
|
||||
$size = getimagesize( $icon_url );
|
||||
$icon_url = get_root_url().$icon_url;
|
||||
$output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
|
||||
$output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
|
||||
}
|
||||
|
@ -244,7 +245,7 @@ function language_select($default, $select_name = "language")
|
|||
*
|
||||
* categories string returned contains categories as given in the input
|
||||
* array $cat_informations. $cat_informations array must be an association
|
||||
* of {category_id => category_name}. If url input parameter is empty,
|
||||
* of {category_id => category_name}. If url input parameter is null,
|
||||
* returns only the categories name without links.
|
||||
*
|
||||
* @param array cat_informations
|
||||
|
@ -253,7 +254,7 @@ function language_select($default, $select_name = "language")
|
|||
* @return string
|
||||
*/
|
||||
function get_cat_display_name($cat_informations,
|
||||
$url = 'category.php?/category/',
|
||||
$url = '',
|
||||
$replace_space = true)
|
||||
{
|
||||
global $conf;
|
||||
|
@ -271,10 +272,16 @@ function get_cat_display_name($cat_informations,
|
|||
$output.= $conf['level_separator'];
|
||||
}
|
||||
|
||||
if ($url == '')
|
||||
if ( !isset($url) )
|
||||
{
|
||||
$output.= $name;
|
||||
}
|
||||
elseif ($url == '')
|
||||
{
|
||||
$output.= '<a class=""';
|
||||
$output.= ' href="'.make_index_url( array('category'=>$id) ).'">';
|
||||
$output.= $name.'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$output.= '<a class=""';
|
||||
|
@ -306,7 +313,7 @@ function get_cat_display_name($cat_informations,
|
|||
* @return string
|
||||
*/
|
||||
function get_cat_display_name_cache($uppercats,
|
||||
$url = 'category.php?/category/',
|
||||
$url = '',
|
||||
$replace_space = true)
|
||||
{
|
||||
global $cat_names, $conf;
|
||||
|
@ -339,10 +346,16 @@ SELECT id,name
|
|||
$output.= $conf['level_separator'];
|
||||
}
|
||||
|
||||
if ($url == '')
|
||||
if ( !isset($url) )
|
||||
{
|
||||
$output.= $name;
|
||||
}
|
||||
elseif ($url == '')
|
||||
{
|
||||
$output.= '
|
||||
<a class=""
|
||||
href="'.make_index_url( array('category'=>$category_id) ).'">'.$name.'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$output.= '
|
||||
|
@ -474,7 +487,7 @@ function parse_comment_content($content)
|
|||
}
|
||||
|
||||
function get_cat_display_name_from_id($cat_id,
|
||||
$url = 'category.php?/category/',
|
||||
$url = '',
|
||||
$replace_space = true)
|
||||
{
|
||||
$cat_info = get_cat_info($cat_id);
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | last update : $Date: 2006-03-15 03:26:25 +0100 (mer, 15 mar 2006) $
|
||||
// | last modifier : $Author: rvelices $
|
||||
// | revision : $Revision: 1081 $
|
||||
// | revision : $Revision: 1081 $
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This program is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU General Public License as published by |
|
||||
|
@ -29,137 +28,126 @@
|
|||
/**
|
||||
* rate a picture by a user
|
||||
*
|
||||
* @param int user identifier
|
||||
* @param int image identifier
|
||||
* @param int rate
|
||||
* @return void
|
||||
*/
|
||||
function rate_picture($user_id, $image_id, $rate)
|
||||
function rate_picture($image_id, $rate)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $user;
|
||||
|
||||
$query = '
|
||||
SELECT status
|
||||
FROM '.USER_INFOS_TABLE.'
|
||||
WHERE user_id = '.$user_id.'
|
||||
;';
|
||||
list($user_status) = mysql_fetch_array(pwg_query($query));
|
||||
|
||||
if ('guest' == $user_status
|
||||
or 'generic' == $user_status)
|
||||
if (!isset($rate)
|
||||
or !$conf['rate']
|
||||
or !in_array($rate, $conf['rate_items']))
|
||||
{
|
||||
$user_anonymous = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_anonymous = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($rate)
|
||||
and $conf['rate']
|
||||
and (!$user_anonymous or $conf['rate_anonymous'])
|
||||
and in_array($rate, $conf['rate_items']))
|
||||
$user_anonymous = is_autorize_status(ACCESS_CLASSIC) ? false : true;
|
||||
|
||||
if ($user_anonymous and !$conf['rate_anonymous'])
|
||||
{
|
||||
if ($user_anonymous)
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user_anonymous)
|
||||
{
|
||||
$ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);
|
||||
if (count($ip_components) > 3)
|
||||
{
|
||||
$ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);
|
||||
if (count($ip_components) > 3)
|
||||
{
|
||||
array_pop($ip_components);
|
||||
}
|
||||
$anonymous_id = implode ('.', $ip_components);
|
||||
array_pop($ip_components);
|
||||
}
|
||||
$anonymous_id = implode ('.', $ip_components);
|
||||
|
||||
if (isset($_COOKIE['pwg_anonymous_rater']))
|
||||
{
|
||||
if ($anonymous_id != $_COOKIE['pwg_anonymous_rater'])
|
||||
{ // client has changed his IP adress or he's trying to fool us
|
||||
$query = '
|
||||
if (isset($_COOKIE['pwg_anonymous_rater']))
|
||||
{
|
||||
if ($anonymous_id != $_COOKIE['pwg_anonymous_rater'])
|
||||
{ // client has changed his IP adress or he's trying to fool us
|
||||
$query = '
|
||||
SELECT element_id
|
||||
FROM '.RATE_TABLE.'
|
||||
WHERE user_id = '.$user['id'].'
|
||||
AND anonymous_id = \''.$anonymous_id.'\'
|
||||
;';
|
||||
$already_there = array_from_query($query, 'element_id');
|
||||
$already_there = array_from_query($query, 'element_id');
|
||||
|
||||
if (count($already_there) > 0)
|
||||
{
|
||||
$query = '
|
||||
if (count($already_there) > 0)
|
||||
{
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.RATE_TABLE.'
|
||||
WHERE user_id = '.$user['id'].'
|
||||
AND anonymous_id = \''.$_COOKIE['pwg_anonymous_rater'].'\'
|
||||
AND element_id NOT IN ('.implode(',', $already_there).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
$query = '
|
||||
$query = '
|
||||
UPDATE
|
||||
'.RATE_TABLE.'
|
||||
SET anonymous_id = \'' .$anonymous_id.'\'
|
||||
WHERE user_id = '.$user['id'].'
|
||||
AND anonymous_id = \'' . $_COOKIE['pwg_anonymous_rater'].'\'
|
||||
;';
|
||||
pwg_query($query);
|
||||
pwg_query($query);
|
||||
|
||||
setcookie(
|
||||
setcookie(
|
||||
'pwg_anonymous_rater',
|
||||
$anonymous_id,
|
||||
strtotime('+10 years'),
|
||||
cookie_path()
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie(
|
||||
);
|
||||
} // end client changed ip
|
||||
} // end client has cookie
|
||||
else
|
||||
{
|
||||
setcookie(
|
||||
'pwg_anonymous_rater',
|
||||
$anonymous_id,
|
||||
strtotime('+10 years'),
|
||||
cookie_path()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$query = '
|
||||
} // end anonymous user
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.RATE_TABLE.'
|
||||
WHERE element_id = '.$image_id.'
|
||||
AND user_id = '.$user_id.'
|
||||
AND user_id = '.$user['id'].'
|
||||
';
|
||||
if (isset($anonymous_id))
|
||||
{
|
||||
$query.= ' AND anonymous_id = \''.$anonymous_id.'\'';
|
||||
}
|
||||
pwg_query($query);
|
||||
$query = '
|
||||
if (isset($anonymous_id))
|
||||
{
|
||||
$query.= ' AND anonymous_id = \''.$anonymous_id.'\'';
|
||||
}
|
||||
pwg_query($query);
|
||||
$query = '
|
||||
INSERT
|
||||
INTO '.RATE_TABLE.'
|
||||
(user_id,anonymous_id,element_id,rate,date)
|
||||
VALUES
|
||||
('
|
||||
.$user_id.','
|
||||
.(isset($anonymous_id) ? '\''.$anonymous_id.'\'' : "''").','
|
||||
.$image_id.','
|
||||
.$rate
|
||||
.',NOW())
|
||||
.$user['id'].','
|
||||
.(isset($anonymous_id) ? '\''.$anonymous_id.'\'' : "''").','
|
||||
.$image_id.','
|
||||
.$rate
|
||||
.',NOW())
|
||||
;';
|
||||
pwg_query($query);
|
||||
pwg_query($query);
|
||||
|
||||
// update of images.average_rate field
|
||||
$query = '
|
||||
// update of images.average_rate field
|
||||
$query = '
|
||||
SELECT ROUND(AVG(rate),2) AS average_rate
|
||||
FROM '.RATE_TABLE.'
|
||||
WHERE element_id = '.$image_id.'
|
||||
;';
|
||||
$row = mysql_fetch_array(pwg_query($query));
|
||||
$query = '
|
||||
$row = mysql_fetch_array(pwg_query($query));
|
||||
$query = '
|
||||
UPDATE '.IMAGES_TABLE.'
|
||||
SET average_rate = '.$row['average_rate'].'
|
||||
WHERE id = '.$image_id.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
?>
|
|
@ -81,11 +81,26 @@ function cookie_path()
|
|||
if ( isset($_SERVER['REDIRECT_URL']) )
|
||||
{ // mod_rewrite is activated for upper level directories. we must set the
|
||||
// cookie to the path shown in the browser otherwise it will be discarded.
|
||||
$scr = $_SERVER['REDIRECT_URL'];
|
||||
if ( isset($_SERVER['PATH_INFO']) )
|
||||
{
|
||||
$idx = strpos( $_SERVER['REDIRECT_URL'], $_SERVER['PATH_INFO'] );
|
||||
if ($idx !== false)
|
||||
{
|
||||
$scr = substr($_SERVER['REDIRECT_URL'], 0, $idx);
|
||||
}
|
||||
else
|
||||
{//this should never happen
|
||||
$scr='//';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$scr = $_SERVER['REDIRECT_URL'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$scr = $_SERVER['PHP_SELF'];
|
||||
$scr = $_SERVER['SCRIPT_NAME'];
|
||||
}
|
||||
return substr($scr,0,strrpos( $scr,'/'));
|
||||
}
|
||||
|
|
|
@ -30,11 +30,7 @@ $template->assign_vars(
|
|||
array(
|
||||
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
|
||||
|
||||
'L_GEN_TIME' => $lang['generation_time'],
|
||||
'L_SQL_QUERIES_IN' => $lang['sql_queries_in'],
|
||||
'L_SEND_MAIL' => $lang['send_mail'],
|
||||
'L_TITLE_MAIL' => urlencode($lang['title_send_mail']),
|
||||
'L_POWERED_BY'=>$lang['powered_by']
|
||||
));
|
||||
|
||||
//--------------------------------------------------------------------- contact
|
||||
|
@ -50,6 +46,7 @@ if (!$user['is_the_guest'])
|
|||
}
|
||||
|
||||
//------------------------------------------------------------- generation time
|
||||
$debug_vars = array();
|
||||
if ($conf['show_gt'])
|
||||
{
|
||||
$time = get_elapsed_time($t2, get_moment());
|
||||
|
@ -60,19 +57,21 @@ if ($conf['show_gt'])
|
|||
$page['queries_time'] = 0;
|
||||
}
|
||||
|
||||
$template->assign_block_vars(
|
||||
'debug',
|
||||
$debug_vars = array_merge($debug_vars,
|
||||
array('TIME' => $time,
|
||||
'NB_QUERIES' => $page['count_queries'],
|
||||
'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s'));
|
||||
'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s')
|
||||
);
|
||||
}
|
||||
|
||||
if ($conf['show_queries'])
|
||||
{
|
||||
$template->assign_block_vars(
|
||||
'debug',
|
||||
array('QUERIES_LIST' => $debug)
|
||||
);
|
||||
$debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) );
|
||||
}
|
||||
|
||||
if ( !empty($debug_vars) )
|
||||
{
|
||||
$template->assign_block_vars('debug',$debug_vars );
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | last update : $Date: 2006-03-09 00:14:53 +0100 (jeu, 09 mar 2006) $
|
||||
// | last modifier : $Author: rub $
|
||||
// | revision : $Revision: 1070 $
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This program is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU General Public License as published by |
|
||||
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if ($metadata_showable and isset($_GET['show_metadata']))
|
||||
if ($metadata_showable and isset($_GET['metadata']))
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
|
||||
$template->assign_block_vars('metadata', array());
|
||||
|
@ -41,7 +41,7 @@ if ($metadata_showable and isset($_GET['show_metadata']))
|
|||
die('Exif extension not available, admin should disable exif display');
|
||||
}
|
||||
|
||||
if ($exif = @read_exif_data($picture['current']['src']))
|
||||
if ($exif = @read_exif_data($picture['current']['src_file_system']))
|
||||
{
|
||||
$template->assign_block_vars(
|
||||
'metadata.headline',
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | last update : $Date: 2006-03-09 00:14:53 +0100 (jeu, 09 mar 2006) $
|
||||
// | last modifier : $Author: rub $
|
||||
// | revision : $Revision: 1070 $
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This program is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU General Public License as published by |
|
||||
|
@ -54,7 +54,7 @@ SELECT COUNT(rate) AS count
|
|||
);
|
||||
}
|
||||
|
||||
if ($conf['rate_anonymous'] or !$user['is_the_guest'])
|
||||
if ($conf['rate_anonymous'] or is_autorize_status(ACCESS_CLASSIC) )
|
||||
{
|
||||
if ($row['count']>0)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ SELECT COUNT(rate) AS count
|
|||
WHERE element_id = '.$page['image_id'] . '
|
||||
AND user_id = '.$user['id'] ;
|
||||
|
||||
if ($user['is_the_guest'])
|
||||
if ( !is_autorize_status(ACCESS_CLASSIC) )
|
||||
{
|
||||
$ip_components = explode('.', $_SERVER['REMOTE_ADDR']);
|
||||
if ( count($ip_components)>3 )
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | last update : $Date: 2006-01-27 02:11:43 +0100 (ven, 27 jan 2006) $
|
||||
// | last modifier : $Author: rvelices $
|
||||
// | revision : $Revision: 1014 $
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This program is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU General Public License as published by |
|
||||
|
@ -84,17 +84,35 @@ $tokens = explode(
|
|||
|
||||
$next_token = 0;
|
||||
if (basename($_SERVER['SCRIPT_NAME']) == 'picture.php')
|
||||
{
|
||||
|
||||
// the first token must be the numeric identifier of the picture
|
||||
preg_match('/(\d+)/', $tokens[$next_token], $matches);
|
||||
if (!isset($matches[1]))
|
||||
{ // the last token must be the identifier for the picture
|
||||
$token = array_pop($tokens);
|
||||
if ( is_numeric($token) )
|
||||
{
|
||||
die('Fatal: picture identifier is missing');
|
||||
$page['image_id'] = $token;
|
||||
}
|
||||
else
|
||||
{
|
||||
preg_match('/^(\d+-)?((.*)[_\.]html?)?$/', $token, $matches);
|
||||
if ( isset($matches[1]) and is_numeric($matches[1]) )
|
||||
{
|
||||
$page['image_id'] = $matches[1];
|
||||
if ( !empty($matches[3]) )
|
||||
{
|
||||
$page['image_file'] = $matches[3];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !empty($matches[3]) )
|
||||
{
|
||||
$page['image_file'] = $matches[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
die('Fatal: picture identifier is missing');
|
||||
}
|
||||
}
|
||||
}
|
||||
$page['image_id'] = $matches[1];
|
||||
|
||||
$next_token++;
|
||||
}
|
||||
|
||||
if (0 === strpos($tokens[$next_token], 'cat'))
|
||||
|
@ -273,11 +291,11 @@ if ('categories' == $page['section'])
|
|||
'cat_id_uppercat' => $result['id_uppercat'],
|
||||
'uppercats' => $result['uppercats'],
|
||||
|
||||
'title' => get_cat_display_name($result['name'], '', false),
|
||||
'title' => get_cat_display_name($result['name'], null, false),
|
||||
)
|
||||
);
|
||||
|
||||
if (!isset($_GET['calendar']))
|
||||
if (!isset($page['chronology_field']))
|
||||
{
|
||||
$query = '
|
||||
SELECT image_id
|
||||
|
@ -321,7 +339,7 @@ else
|
|||
SELECT DISTINCT(id)
|
||||
FROM '.IMAGES_TABLE.'
|
||||
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
|
||||
WHERE '.get_sql_search_clause($_GET['search']).'
|
||||
WHERE '.get_sql_search_clause($page['search']).'
|
||||
AND '.$forbidden.'
|
||||
'.$conf['order_by'].'
|
||||
;';
|
||||
|
@ -489,4 +507,19 @@ if (isset($page['chronology_field']))
|
|||
initialize_calendar();
|
||||
}
|
||||
|
||||
if (basename($_SERVER['SCRIPT_NAME']) == 'picture.php'
|
||||
and !isset($page['image_id']) )
|
||||
{
|
||||
$query = '
|
||||
SELECT id,file
|
||||
FROM '.IMAGES_TABLE .'
|
||||
WHERE id IN ('.implode(',',$page['items']).')
|
||||
AND file LIKE "' . $page['image_file'] . '.%" ESCAPE "|"'
|
||||
;
|
||||
$result = pwg_query($query);
|
||||
if (mysql_num_rows($result)>0)
|
||||
{
|
||||
list($page['image_id'], $page['image_file']) = mysql_fetch_row($result);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -328,6 +328,7 @@ class Template {
|
|||
*/
|
||||
function compile($code, $do_not_echo = false, $retvar = '')
|
||||
{
|
||||
$code = preg_replace('/\{pwg_root\}/e', "get_root_url()", $code);
|
||||
// PWG specific : communication between template and $lang
|
||||
$code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code);
|
||||
// PWG specific : expand themeconf.inc.php variables
|
||||
|
|
23
picture.php
23
picture.php
|
@ -168,7 +168,7 @@ UPDATE '.CATEGORIES_TABLE.'
|
|||
}
|
||||
case 'rate' :
|
||||
{
|
||||
rate_picture($user['id'], $page['image_id'], $_GET['rate']);
|
||||
rate_picture($page['image_id'], $_GET['rate']);
|
||||
redirect($url_self);
|
||||
}
|
||||
case 'delete_comment' :
|
||||
|
@ -370,14 +370,14 @@ if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) )
|
|||
}
|
||||
|
||||
$title_img = $picture['current']['name'];
|
||||
if ( isset( $page['cat'] ) )
|
||||
if ( isset( $page['category'] ) )
|
||||
{
|
||||
if (is_numeric( $page['cat'] ))
|
||||
if (is_numeric( $page['category'] ))
|
||||
{
|
||||
$title_img = replace_space(get_cat_display_name($page['cat_name']));
|
||||
}
|
||||
else if ( $page['cat'] == 'search' )
|
||||
{
|
||||
{ // ??? TODO -remove or change some remainings from old variables
|
||||
$title_img = replace_search( $title_img, $_GET['search'] );
|
||||
}
|
||||
}
|
||||
|
@ -404,25 +404,20 @@ $picture_size = get_picture_size(
|
|||
);
|
||||
|
||||
// metadata
|
||||
$url_metadata = duplicate_picture_URL();
|
||||
if ($conf['show_exif'] or $conf['show_iptc'])
|
||||
{
|
||||
$metadata_showable = true;
|
||||
if ( !isset($_GET['metadata']) )
|
||||
{
|
||||
$url_metadata = add_url_param( $url_metadata, 'metadata' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$metadata_showable = false;
|
||||
}
|
||||
|
||||
// $url_metadata = PHPWG_ROOT_PATH.'picture.php';
|
||||
// $url_metadata .= get_query_string_diff(array('add_fav', 'slideshow', 'show_metadata'));
|
||||
// if ($metadata_showable and !isset($_GET['show_metadata']))
|
||||
// {
|
||||
// $url_metadata.= '&show_metadata=1';
|
||||
// }
|
||||
|
||||
// TODO: rewrite metadata display to toggle on/off user_infos.show_metadata
|
||||
$url_metadata = duplicate_picture_URL();
|
||||
|
||||
$page['body_id'] = 'thePicturePage';
|
||||
//------------------------------------------------------- navigation management
|
||||
foreach ( array('first','previous','next','last') as $which_image )
|
||||
|
|
|
@ -140,7 +140,7 @@ SELECT id, uppercats, global_rank
|
|||
array(
|
||||
'NAME' => get_cat_display_name_cache(
|
||||
$category['uppercats'],
|
||||
'', // no url on category names
|
||||
null, // no url on category names
|
||||
false // no blank replacement
|
||||
)
|
||||
)
|
||||
|
|
|
@ -91,8 +91,8 @@
|
|||
<input type="submit" name="login" value="{lang:submit}">
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
|
||||
<li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
|
||||
<li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{pwg_root}{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
|
||||
<li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{pwg_root}{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
|
@ -119,25 +119,25 @@
|
|||
<!-- END preferred_image_order -->
|
||||
|
||||
<!-- BEGIN caddie -->
|
||||
<li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
|
||||
<li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
|
||||
<!-- END caddie -->
|
||||
|
||||
<!-- BEGIN edit -->
|
||||
<li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
|
||||
<li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="{pwg_root}{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
|
||||
<!-- END edit -->
|
||||
|
||||
<!-- BEGIN search_rules -->
|
||||
<li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
|
||||
<li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
|
||||
<!-- END search_rules -->
|
||||
|
||||
<!-- BEGIN mode_normal -->
|
||||
<li><a href="{mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>
|
||||
<li><a href="{mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{pwg_root}{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>
|
||||
<!-- END mode_normal -->
|
||||
<!-- BEGIN mode_posted -->
|
||||
<li><a href="{mode_posted.URL}" title="{lang:mode_posted_hint}"><img src="{themeconf:icon_dir}/calendar.png" class="button" alt="{lang:mode_posted_hint}"></a></li>
|
||||
<li><a href="{mode_posted.URL}" title="{lang:mode_posted_hint}"><img src="{pwg_root}{themeconf:icon_dir}/calendar.png" class="button" alt="{lang:mode_posted_hint}"></a></li>
|
||||
<!-- END mode_posted -->
|
||||
<!-- BEGIN mode_created -->
|
||||
<li><a href="{mode_created.URL}" title="{lang:mode_created_hint}"><img src="{themeconf:icon_dir}/calendar_created.png" class="button" alt="{lang:mode_created_hint}"></a></li>
|
||||
<li><a href="{mode_created.URL}" title="{lang:mode_created_hint}"><img src="{pwg_root}{themeconf:icon_dir}/calendar_created.png" class="button" alt="{lang:mode_created_hint}"></a></li>
|
||||
<!-- END mode_created -->
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<div id="copyright">
|
||||
<!-- BEGIN debug -->
|
||||
{L_GEN_TIME} {debug.TIME} ({debug.NB_QUERIES} {L_SQL_QUERIES_IN} {debug.SQL_TIME}) -
|
||||
{lang:generation_time} {debug.TIME} ({debug.NB_QUERIES} {lang:sql_queries_in} {debug.SQL_TIME}) -
|
||||
<!-- END debug -->
|
||||
|
||||
<!-- Please, do not remove this copyright. If you really want to,
|
||||
contact us on http://phpwebgallery.net to find a solution on how
|
||||
to show the origin of the script...-->
|
||||
|
||||
{L_POWERED_BY} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a>
|
||||
{lang:powered_by} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a>
|
||||
{VERSION}
|
||||
<!-- BEGIN contact -->
|
||||
- {L_SEND_MAIL}
|
||||
- {lang:send_mail}
|
||||
<a href="mailto:{contact.MAIL}?subject={L_TITLE_MAIL}">{lang:Webmaster}</a>
|
||||
<!-- END contact -->
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<html lang="{LANG}" dir="{DIR}">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="template-common/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-layout.css">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{pwg_root}template-common/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-layout.css">
|
||||
<!-- the next css is used to fix khtml (Konqueror/Safari) issue
|
||||
the "text/nonsense" prevents gecko based browsers to load it -->
|
||||
<link rel="stylesheet" type="text/nonsense" href="template/{themeconf:template}/fix-khtml.css">
|
||||
<link rel="stylesheet" type="text/css" media="print" href="template/{themeconf:template}/print.css">
|
||||
<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-colors.css">
|
||||
<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
|
||||
<link rel="stylesheet" type="text/nonsense" href="{pwg_root}template/{themeconf:template}/fix-khtml.css">
|
||||
<link rel="stylesheet" type="text/css" media="print" href="{pwg_root}template/{themeconf:template}/print.css">
|
||||
<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-colors.css">
|
||||
<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
|
||||
<!-- BEGIN next -->
|
||||
<link rel="prefetch" href="{next.U_IMG_SRC}">
|
||||
<!-- END next -->
|
||||
|
@ -18,9 +18,9 @@ the "text/nonsense" prevents gecko based browsers to load it -->
|
|||
<meta http-equiv="refresh" content="{REFRESH_TIME};url={U_REFRESH}">
|
||||
<!-- END refresh -->
|
||||
<title>{GALLERY_TITLE}:{PAGE_TITLE}</title>
|
||||
<script type="text/javascript" src="include/scripts.js"></script>
|
||||
<script type="text/javascript" src="{pwg_root}include/scripts.js"></script>
|
||||
<!--[if gte IE 5.5000]>
|
||||
<script type="text/javascript" src="include/pngfix.js"></script>
|
||||
<script type="text/javascript" src="{pwg_root}include/pngfix.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
|
|
|
@ -14,38 +14,38 @@
|
|||
<div id="imageToolBar">
|
||||
|
||||
<div class="randomButtons">
|
||||
<a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}" rel="nofollow"><img src="{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
|
||||
<a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
|
||||
<a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
|
||||
<a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{pwg_root}{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
|
||||
<!-- BEGIN representative -->
|
||||
<a href="{representative.URL}" title="{lang:set as category representative}"><img src="{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"/></a>
|
||||
<a href="{representative.URL}" title="{lang:set as category representative}"><img src="{pwg_root}{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"/></a>
|
||||
<!-- END representative -->
|
||||
<!-- BEGIN favorite -->
|
||||
<a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}"><img src="{favorite.FAVORITE_IMG}" class="button" alt="{favorite.FAVORITE_ALT}"></a>
|
||||
<!-- END favorite -->
|
||||
<!-- BEGIN download -->
|
||||
<a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="{themeconf:icon_dir}/save.png" class="button" alt="{L_DOWNLOAD}"></a>
|
||||
<a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="{pwg_root}{themeconf:icon_dir}/save.png" class="button" alt="{L_DOWNLOAD}"></a>
|
||||
<!-- END download -->
|
||||
<!-- BEGIN admin -->
|
||||
<a href="{U_ADMIN}" title="{L_ADMIN}"><img src="{themeconf:icon_dir}/preferences.png" class="button" alt="{L_ADMIN}"></a>
|
||||
<a href="{U_ADMIN}" title="{L_ADMIN}"><img src="{pwg_root}{themeconf:icon_dir}/preferences.png" class="button" alt="{L_ADMIN}"></a>
|
||||
<!-- END admin -->
|
||||
<!-- BEGIN caddie -->
|
||||
<a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
|
||||
<a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
|
||||
<!-- END caddie -->
|
||||
</div>
|
||||
|
||||
<div class="navButtons">
|
||||
<!-- BEGIN last -->
|
||||
<a class="navButton prev" href="{last.U_IMG}" rel="last"><img src="{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
|
||||
<a class="navButton prev" href="{last.U_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
|
||||
<!-- END last -->
|
||||
<!-- BEGIN next -->
|
||||
<a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{themeconf:icon_dir}/right.png" class="button" alt="next"></a>
|
||||
<a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="next"></a>
|
||||
<!-- END next -->
|
||||
<a class="navButton up" href="{U_UP}" title="{L_UP_HINT}" rel="up"><img src="{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
|
||||
<a class="navButton up" href="{U_UP}" title="{L_UP_HINT}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
|
||||
<!-- BEGIN previous -->
|
||||
<a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{themeconf:icon_dir}/left.png" class="button" alt="previous"></a>
|
||||
<a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="previous"></a>
|
||||
<!-- END previous -->
|
||||
<!-- BEGIN first -->
|
||||
<a class="navButton prev" href="{first.U_IMG}" rel="first"><img src="{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
|
||||
<a class="navButton prev" href="{first.U_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
|
||||
<!-- END first -->
|
||||
</div>
|
||||
|
||||
|
@ -170,7 +170,7 @@
|
|||
<!-- BEGIN delete -->
|
||||
<p class="userCommentDelete">
|
||||
<a href="{comments.comment.delete.U_COMMENT_DELETE}" title="{L_DELETE_COMMENT}">
|
||||
<img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
|
||||
<img src="{pwg_root}{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
|
||||
</a>
|
||||
</p>
|
||||
<!-- END delete -->
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
$themeconf = array(
|
||||
'template' => 'yoga',
|
||||
'theme' => 'clear',
|
||||
'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
|
||||
'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
|
||||
'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/'
|
||||
'icon_dir' => 'template/yoga/icon',
|
||||
'admin_icon_dir' => 'template/yoga/icon/admin',
|
||||
'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
$themeconf = array(
|
||||
'template' => 'yoga',
|
||||
'theme' => 'dark',
|
||||
'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
|
||||
'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
|
||||
'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/'
|
||||
'icon_dir' => 'template/yoga/icon',
|
||||
'admin_icon_dir' => 'template/yoga/icon/admin',
|
||||
'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
|
||||
);
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue