Problem kring: Car Profile Mod
Postat: 2006-01-22 15:12
Hej!
Jag har installerat Car Profile Mod.
Men jag får inte bilderna att synas som denna Mod ska hämta från användarens personliga galleri.
Jag misstänker att det är i denna fil som problemet är: usercp_carprofile.php
Här är hela Modden: http://www.bikersite.se/Car_Profile.rar
Här är en bild på hur det ser ut när inte bilderna visas, bilderna ska gå att klicka på, men då blir det bara sidan kan ej visas.

Och här är filen som jag tror det är något fel i:
usercp_carprofile.php
Är det någon som kan hjälpa mig med detta?
Jag har installerat Car Profile Mod.
Men jag får inte bilderna att synas som denna Mod ska hämta från användarens personliga galleri.
Jag misstänker att det är i denna fil som problemet är: usercp_carprofile.php
Här är hela Modden: http://www.bikersite.se/Car_Profile.rar
Här är en bild på hur det ser ut när inte bilderna visas, bilderna ska gå att klicka på, men då blir det bara sidan kan ej visas.

Och här är filen som jag tror det är något fel i:
usercp_carprofile.php
Kod: Markera allt
<?php
/***************************************************************************
* usercp_viewprofile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_viewprofile.php,v 1.5.2.1 2003/02/25 23:28:30 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'album_mod/album_constants.' . $phpEx);
//
// Get general album information
//
include($album_root_path . 'album_common.'.$phpEx);
if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
// ------------------------------------
// Check the request
// ------------------------------------
if( isset($HTTP_POST_VARS['user_id']) )
{
$user_id = intval($HTTP_POST_VARS['user_id']);
}
else if( isset($HTTP_GET_VARS['user_id']) )
{
$user_id = intval($HTTP_GET_VARS['user_id']);
}
else
{
$user_id = $profiledata['user_id'];
}
//
// END check request
//
// ------------------------------------
// Get the username of this gallery's owner
// ------------------------------------
$sql = "SELECT username
FROM ". USERS_TABLE ."
WHERE user_id = $user_id";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get the username of this category owner', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$username = $row['username'];
if( empty($username) )
{
message_die(GENERAL_ERROR, 'Sorry, this user does not exist');
}
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
//
// Output page header and profile_view template
//
$template->set_filenames(array(
'body' => 'profile_car_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;
// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0 )
{
$total_posts = get_db_stat('postcount');
$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
$percentage = 0;
}
$avatar_img = '';
if ( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
{
switch( $profiledata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
$poster_rank = '';
$rank_image = '';
if ( $profiledata['user_rank'] )
{
for($i = 0; $i < count($ranksrow); $i++)
{
if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
else
{
for($i = 0; $i < count($ranksrow); $i++)
{
if ( $profiledata['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
if ( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $profiledata['user_id']) : 'mailto:' . $profiledata['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = ' ';
$email = ' ';
}
$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ' ';
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : ' ';
if ( !empty($profiledata['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = ' ';
$icq_img = ' ';
$icq = ' ';
}
$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ' ';
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ' ';
$msn_img = ( $profiledata['user_msnm'] ) ? $profiledata['user_msnm'] : ' ';
$msn = $msn_img;
$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
//
// Generate page
//
$page_title = $lang['Viewing_carprofile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTS_PER_DAY' => $posts_per_day,
'POSTS' => $profiledata['user_posts'],
'PERCENTAGE' => $percentage . '%',
'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : ' ',
'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : ' ',
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
'CAR_MARK' => ( $profiledata['user_car_mark'] ) ? $profiledata['user_car_mark'] : ' ',
'CAR_MODEL' => ( $profiledata['user_car_model'] ) ? $profiledata['user_car_model'] : ' ',
'CAR_ENGINE_CHOICE' => ( $profiledata['user_car_engine_choice'] ) ? $profiledata['user_car_engine_choice'] : ' ',
'CAR_MARK_CHOICE' => ( $profiledata['user_car_mark_choice'] ) ? $profiledata['user_car_mark_choice'] : ' ',
'CAR_MODEL_CHOICE' => ( $profiledata['user_car_model_choice'] ) ? $profiledata['user_car_model_choice'] : ' ',
'CAR_YEAR_CHOICE' => ( $profiledata['user_car_year_choice'] ) ? $profiledata['user_car_year_choice'] : ' ',
'CAR_YEAR' => ( $profiledata['user_car_year'] ) ? $profiledata['user_car_year'] : ' ',
'CAR_ENGINE' => ( $profiledata['user_car_engine'] ) ? $profiledata['user_car_engine'] : ' ',
'CAR_WHEEL' => ( $profiledata['user_car_wheel'] ) ? $profiledata['user_car_wheel'] : ' ',
'CAR_TRANS' => ( $profiledata['user_car_trans'] ) ? $profiledata['user_car_trans'] : ' ',
'CAR_COLOR' => ( $profiledata['user_car_color'] ) ? $profiledata['user_car_color'] : ' ',
'L_CAR_MARK' => $lang['Car_Mark'],
'L_CAR_MODEL' => $lang['Car_Model'],
'L_CAR_ENGINE_CHOICE' => $lang['Car_Engine_Choice'],
'L_CAR_MARK_CHOICE' => $lang['Car_Mark_Choice'],
'L_CAR_MODEL_CHOICE' => $lang['Car_Model_Choice'],
'L_CAR_YEAR_CHOICE' => $lang['Car_Year_Choice'],
'L_CAR_YEAR' => $lang['Car_Year'],
'L_CAR_ENGINE' => $lang['Car_Engine'],
'L_CAR_WHEEL' => $lang['Car_Wheel'],
'L_CAR_TRANS' => $lang['Car_Trans'],
'L_CAR_COLOR' => $lang['Car_Color'],
'AVATAR_IMG' => $avatar_img,
'CAR_RT' => ( $profiledata['user_car_rt'] ) ? $profiledata['user_car_rt'] : ' ',
'CAR_SIXTY' => ( $profiledata['user_car_sixty'] ) ? $profiledata['user_car_sixty'] : ' ',
'CAR_THREE' => ( $profiledata['user_car_three'] ) ? $profiledata['user_car_three'] : ' ',
'CAR_EIGTH' => ( $profiledata['user_car_eigth'] ) ? $profiledata['user_car_eigth'] : ' ',
'CAR_EIGTHM' => ( $profiledata['user_car_eigthm'] ) ? $profiledata['user_car_eigthm'] : ' ',
'CAR_THOU' => ( $profiledata['user_car_thou'] ) ? $profiledata['user_car_thou'] : ' ',
'CAR_QUART' => ( $profiledata['user_car_quart'] ) ? $profiledata['user_car_quart'] : ' ',
'CAR_QUARTM' => ( $profiledata['user_car_quartm'] ) ? $profiledata['user_car_quartm'] : ' ',
'L_CAR' => $lang['Car'],
'L_CAR_RT' => $lang['Car_Rt'],
'L_CAR_SIXTY' => $lang['Car_Sixty'],
'L_CAR_THREE' => $lang['Car_Three'],
'L_CAR_EIGTH' => $lang['Car_Eigth'],
'L_CAR_EIGTHM' => $lang['Car_Eigthm'],
'L_CAR_THOU' => $lang['Car_Thou'],
'L_CAR_QUART' => $lang['Car_Quart'],
'L_CAR_QUARTM' => $lang['Car_Quartm'],
'MOD_ENGINE' => ( !empty($profiledata['user_mod_engine']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_engine']) : ' ',
'MOD_EXTERIOR' => ( !empty($profiledata['user_mod_exterior']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_exterior']) : ' ',
'MOD_INTERIOR' => ( !empty($profiledata['user_mod_interior']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_interior']) : ' ',
'MOD_RIMS' => ( !empty($profiledata['user_mod_rims']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_rims']) : ' ',
'MOD_AUDIO' => ( !empty($profiledata['user_mod_audio']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_audio']) : ' ',
'MOD_FUTURE' => ( !empty($profiledata['user_mod_future']) ) ? str_replace("\n", "\n<br />\n", $profiledata['user_mod_future']) : ' ',
'L_MOD_ENGINE' => $lang['Car_Engine'],
'L_MOD_EXTERIOR' => $lang['Car_Exterior'],
'L_MOD_INTERIOR' => $lang['Car_Interior'],
'L_MOD_RIMS' => $lang['Car_Rims'],
'L_MOD_AUDIO' => $lang['Car_Audio'],
'L_MOD_FUTURE' => $lang['Car_Future'],
'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']),
'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']),
'L_AVATAR' => $lang['Avatar'],
'L_POSTER_RANK' => $lang['Poster_rank'],
'L_JOINED' => $lang['Joined'],
'L_TOTAL_POSTS' => $lang['Total_posts'],
'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']),
'L_CONTACT' => $lang['Contact'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_EMAIL' => $lang['Email'],
'L_PM' => $lang['Private_Message'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_YAHOO' => $lang['YIM'],
'L_AIM' => $lang['AIM'],
'L_MESSENGER' => $lang['MSNM'],
'L_WEBSITE' => $lang['Website'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_INTERESTS' => $lang['Interests'],
'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),
'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);
// ------------------------------------
// Check Permissions
// ------------------------------------
$personal_gallery_access = personal_gallery_access(1,1);
if( $personal_gallery_access['view'] == 0 )
{
if (!$userdata['session_logged_in'])
{
redirect(append_sid("login.$phpEx?redirect=album_personal.$phpEx&user_id=$user_id"));
}
else
{
message_die(GENERAL_ERROR, $lang['Not_Authorised']);
}
}
//
// END check permissions
//
/// ------------------------------------
// Build the thumbnail page
// ------------------------------------
if( isset($HTTP_GET_VARS['start']) )
{
$start = intval($HTTP_GET_VARS['start']);
}
else if( isset($HTTP_POST_VARS['start']) )
{
$start = intval($HTTP_POST_VARS['start']);
}
else
{
$start = 0;
}
if( isset($HTTP_GET_VARS['sort_method']) )
{
switch ($HTTP_GET_VARS['sort_method'])
{
case 'pic_title':
$sort_method = 'pic_title';
break;
case 'pic_view_count':
$sort_method = 'pic_view_count';
break;
case 'rating':
$sort_method = 'rating';
break;
case 'comments':
$sort_method = 'comments';
break;
case 'new_comment':
$sort_method = 'new_comment';
break;
default:
$sort_method = $album_config['sort_method'];
}
}
else if( isset($HTTP_POST_VARS['sort_method']) )
{
switch ($HTTP_POST_VARS['sort_method'])
{
case 'pic_title':
$sort_method = 'pic_title';
break;
case 'pic_view_count':
$sort_method = 'pic_view_count';
break;
case 'rating':
$sort_method = 'rating';
break;
case 'comments':
$sort_method = 'comments';
break;
case 'new_comment':
$sort_method = 'new_comment';
break;
default:
$sort_method = $album_config['sort_method'];
}
}
else
{
$sort_method = $album_config['sort_method'];
}
if( isset($HTTP_GET_VARS['sort_order']) )
{
switch ($HTTP_GET_VARS['sort_order'])
{
case 'ASC':
$sort_order = 'ASC';
break;
case 'DESC':
$sort_order = 'DESC';
break;
default:
$sort_order = $album_config['sort_order'];
}
}
else if( isset($HTTP_POST_VARS['sort_order']) )
{
switch ($HTTP_POST_VARS['sort_order'])
{
case 'ASC':
$sort_order = 'ASC';
break;
case 'DESC':
$sort_order = 'DESC';
break;
default:
$sort_order = $album_config['sort_order'];
}
}
else
{
$sort_order = $album_config['sort_order'];
}
$pics_per_page = $album_config['rows_per_page'] * $album_config['cols_per_page'];
// ------------------------------------
// Count Pics
// ------------------------------------
$sql = "SELECT COUNT(pic_id) AS count
FROM ". ALBUM_TABLE ."
WHERE pic_cat_id = ". PERSONAL_GALLERY ."
AND pic_user_id = $user_id";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not count pics', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$total_pics = $row['count'];
// ------------------------------------
// Build up
// ------------------------------------
if ($total_pics > 0)
{
$limit_sql = ($start == 0) ? $pics_per_page : $start .','. $pics_per_page;
$sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_time, p.pic_view_count, p.pic_lock, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
WHERE p.pic_cat_id = ". PERSONAL_GALLERY ."
AND p.pic_user_id = $user_id
GROUP BY p.pic_id
ORDER BY $sort_method $sort_order
LIMIT $limit_sql";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query pics information', '', __LINE__, __FILE__, $sql);
}
$picrow = array();
while( $row = $db->sql_fetchrow($result) )
{
$picrow[] = $row;
}
// --------------------------------
// Thumbnails table
// --------------------------------
for ($i = 0; $i < count($picrow); $i += $album_config['cols_per_page'])
{
$template->assign_block_vars('picrow', array());
for ($j = $i; $j < ($i + $album_config['cols_per_page']); $j++)
{
if( $j >= count($picrow) )
{
break;
}
if(!$picrow[$j]['rating'])
{
$picrow[$j]['rating'] = $lang['Not_rated'];
}
else
{
$picrow[$j]['rating'] = round($picrow[$j]['rating'], 2);
}
$template->assign_block_vars('picrow.piccol', array(
'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $picrow[$j]['pic_id']) : append_sid("album_page.$phpEx?pic_id=". $picrow[$j]['pic_id']),
'U_PICURL' => ($album_config['fullpic_popup']) ? append_sid("album_page.$phpEx?pic_id=". $picrow[$j]['pic_id']) : append_sid("album_page.$phpEx?pic_id=". $picrow[$j]['pic_id']),
'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $picrow[$j]['pic_id']),
'DESC' => $picrow[$j]['pic_desc']
)
);
$template->assign_block_vars('picrow.pic_detail', array(
'TITLE' => $picrow[$j]['pic_title'],
'EDIT' => ( ($userdata['user_level'] == ADMIN) or ($userdata['user_id'] == $picrow[$j]['pic_user_id']) ) ? '<a href="'. append_sid("album_edit.$phpEx?pic_id=". $picrow[$j]['pic_id']) . '">' . $lang['Edit_pic'] . '</a>' : '',
'DELETE' => ( ($userdata['user_level'] == ADMIN) or ($userdata['user_id'] == $picrow[$j]['pic_user_id']) ) ? '<a href="'. append_sid("album_delete.$phpEx?pic_id=". $picrow[$j]['pic_id']) . '">' . $lang['Delete_pic'] . '</a>' : '',
'LOCK' => ($userdata['user_level'] == ADMIN) ? '<a href="'. append_sid("album_modcp.$phpEx?mode=". (($picrow[$j]['pic_lock'] == 0) ? 'lock' : 'unlock') ."&pic_id=". $picrow[$j]['pic_id']) .'">'. (($picrow[$j]['pic_lock'] == 0) ? $lang['Lock'] : $lang['Unlock']) .'</a>' : ''
)
);
}
}
// --------------------------------
// Pagination
// --------------------------------
$template->assign_vars(array(
'PAGINATION' => generate_pagination("car.$phpEx?mode=viewprofile&u=$user_id", $total_pics, $pics_per_page, $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $pics_per_page ) + 1 ), ceil( $total_pics / $pics_per_page ))
)
);
}
else
{
$template->assign_block_vars('no_pics', array());
}
/*
+----------------------------------------------------------
| Main page...
+----------------------------------------------------------
*/
$template->set_filenames(array(
'body' => 'profile_car_body.tpl')
);
if( $user_id == $userdata['user_id'] )
{
$template->assign_block_vars('your_personal_gallery', array());
}
$template->assign_vars(array(
'L_PERSONAL_GALLERY_NOT_CREATED' => sprintf($lang['Personal_gallery_not_created'], $username),
'L_PERSONAL_GALLERY_OF_USER' => sprintf($lang['Personal_Gallery_Of_User'], $username),
'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
'S_COLS' => $album_config['cols_per_page'],
'S_COL_WIDTH' => (100/$album_config['cols_per_page']) . '%',
'L_VIEW' => $lang['View'],
'L_POSTED' => $lang['Posted'],
'L_PIC_TITLE' => $lang['Pic_Title'],
'U_PERSONAL_GALLERY' => append_sid("album_personal.$phpEx?user_id=$user_id"))
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Är det någon som kan hjälpa mig med detta?