Hi!
The Idea come from here:
http://www.4homepages.de/forum/index.php?topic=30163.0Demo in details.html below the username
1.) search in details.php:
$in_mode = 0;
$sql = "";
insert below:
//############## Start Show only specific User Images in Details ###################
if($mode == "search_user_image"){
if(!empty($HTTP_GET_VARS[URL_USER_ID]) || !empty($HTTP_POST_VARS[URL_USER_ID])) {
$search_user_image = (!empty($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
$sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND cat_id = $cat_id AND user_id = ".$search_user_image."
ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
$in_mode = 1;
}
else{
$mode="";
$search_user_image ="";
}
}else{
$search_user_image ="";
}
//############## End Show only specific User Images in Details #############
1.1) search:
$next_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$next_image_id.((!empty($mode)) ? "&mode=".$mode : ""));
insert below:
//########################### Start Show only specific User Images in Details####################################
$next_image_url =($search_user_image) ? $next_image_url."&user_id=".$search_user_image : $next_image_url;
//########################### End Show only specific User Images in Details #####################################
1.2) search:
$prev_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&mode=".$mode : ""));
insert below:
//########################### Start Show only specific User Images in Details ##################################
$prev_image_url =($search_user_image)? $prev_image_url."&user_id=".$search_user_image : $prev_image_url;
//########################### End Show only specific User Images in Details ####################################
1.3) search:
$site_template->register_vars(array(
"msg" => $msg,
and replace:
//############## Start Show only specific User Images in Details ###################
$sql = "SELECT COUNT(image_id) AS sum_images
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND cat_id = $cat_id AND user_id = ".$image_row['user_id']."
";
$sum_images = $site_db->query_firstrow($sql);
//############## End Show only specific User Images in Details ###################
$site_template->register_vars(array(
//############## Start Show only specific User Images in Details #################
"search_image_user_id" => $image_row['user_id'],
"check_yes" => ($search_user_image)? "checked":"",
"check_no" => (!$search_user_image)? "checked":"",
"lang_yes" => $lang['yes'],
"lang_no" => $lang['no'],
"lang_user_images"=> $lang['user_images'],
"numbers" => $sum_images['sum_images'],
"lang_only_images_from" => preg_replace("/".$site_template->start."user_name".$site_template->end."/siU", format_text($image_row['user_name'], 2), $lang['only_images_from']),
//############## End Show only specific User Images in Details ###################
"msg" => $msg,
2.) search in lang/yourLang/main.php "?>" and insert above:
(deutsch:)
//############### Show only specific User Images in Details ############
$lang['user_images']="In dieser Kategorie, Gesamt: ";
$lang['only_images_from']="Nur Bilder von \"{user_name}\" anzeigen:";
(english:)
//############### Show only specific User Images in Details ############
$lang['user_images']="In this Category, Total: ";
$lang['only_images_from']="Display only Images from \"{user_name}\":";
3.) search in templates/yourTemplates/details.html:
<td valign="top" class="row2">{user_name_link}{search_user_image}</td>
</tr>
insert below:
<tr>
<td valign="top" class="row2"><b>{lang_user_images}</b></td>
<td valign="top" class="row2">{numbers}</td>
</tr>
<form method="POST" name="user_image" action="{self}&mode=search_user_image">
<tr>
<td class="row1"><b>{lang_only_images_from}</b></td>
<td class="row1">
{lang_yes}
<input type="radio" name="user_id" value="{search_image_user_id}" onClick="submit();" {check_yes} >
{lang_no}
<input type="radio" name="user_id" value="" onClick="submit();" {check_no} >
</td>
</tr>
</form>
mfg Andi