4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: MrAndrew on August 27, 2010, 10:39:05 PM
-
VERSION 1.01 (Updated 27/03/2011)
Description: This mod will show to user, which of his photos, awaiting validation.
Bug fixes:
1. Correct view and image counter
2. Add paging
Always backup files, which will need to be change!!!
1. File to create is awaiting.php
add:
<?php
$templates_used = 'awaiting,awaiting_images_bit';
$main_template = 'awaiting';
define('GET_CACHES', 1);
define('GET_USER_ONLINE', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');
$logged_in_id = trim($user_info['user_id']);
$sql = "SELECT COUNT(*) AS num_rows_all
FROM ".IMAGES_TEMP_TABLE." i
WHERE i.user_id = $logged_in_id";
$row = $site_db->query_firstrow($sql);
$num_rows_all = $row['num_rows_all'];
include(ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page, $perpage, $num_rows_all, $link_arg);
$offset = $getpaging->get_offset();
$site_template->register_vars(array(
"paging" => $getpaging->get_paging(),
"paging_stats" => $getpaging->get_paging_stats()
));
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
$imgtable_width .= "%";
}
$additional_sql = "";
if (!empty($additional_image_fields)) {
foreach ($additional_image_fields as $key => $val) {
$additional_sql .= ", i.".$key;
}
}
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_media_file, i.image_thumb_file".$additional_sql.get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TEMP_TABLE." i)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.user_id = $logged_in_id
ORDER BY i.image_date DESC
LIMIT $offset, $perpage";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$awaiting_new_images = "";
if (!$num_rows) {
$awaiting_new_images .= "<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD><IMG HEIGHT=\"4\" BORDER=\"0\" SRC=\"trans.gif\"></TD></TR></TABLE>";
$awaiting_new_images .= "<table align=\"center\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#434242\" width=\"100%\"><tr><td align=\"center\" class=\"row1\">";
$awaiting_new_images .= "<b><font size=\"2\">".$lang['awaiting_images_no']."</font></b>";
$awaiting_new_images .= "</td></tr></table>";
}
else {
$awaiting_new_images .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
$count = 0;
$bgcounter = 0;
$prev_image_id = -1;
while ($image_row = $site_db->fetch_array($result)) {
if ($image_row['image_id'] == $prev_image_id) {
continue;
}
$prev_image_id=$image_row['image_id'];
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$awaiting_new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$awaiting_new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image_awaiting($image_row, "awaiting");
$awaiting_new_images .= $site_template->parse_template("awaiting_images_bit");
$awaiting_new_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$awaiting_new_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$awaiting_new_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$awaiting_new_images .= "</tr>\n";
}
}
$awaiting_new_images .= "</table>\n";
} // end else
$site_template->register_vars("awaiting_new_images", $awaiting_new_images);
unset($awaiting_new_images);
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
"lang_userlist_title" => $lang['lang_userlist_title']
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
2. File to change is includes/functions.php
find:
function get_thumbnail_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
global $site_sess, $config;
if (!check_media_type($media_file_name)) {
$thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
}
before add:
// -----------------------------------------------
// --- Start Mod "my awaiting images" ------------
//------------------------------------------------
function show_image_awaiting($image_row, $mode = "", $show_link = 1, $detailed_view = 0) {
global $self_url, $site_template, $site_sess, $user_info, $config, $cat_cache, $lang, $additional_image_fields, $user_table_fields, $url_show_profile;
if (!check_permission("auth_viewimage", $image_row['cat_id']) || !check_permission("auth_viewcat", $image_row['cat_id'])) {
$show_link = 1;
}
if (isset($image_row[$user_table_fields['user_name']]) && $image_row['user_id'] != GUEST) {
$user_name = format_text($image_row[$user_table_fields['user_name']], 2);
$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$image_row['user_id'];
$user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_name."</a>";
}
else {
$user_name = format_text($lang['userlevel_guest'], 2);
$user_name_link = $user_name;
}
$site_template->register_vars(array(
"image_id" => $image_row['image_id'],
"user_id" => $image_row['user_id'],
"image_date" => format_date($config['date_format']." ".$config['time_format'], $image_row['image_date']),
"user_name" => $user_name,
"user_name_link" => $user_name_link,
"image_name" => format_text($image_row['image_name'], 2),
"image_url" => ($show_link) ? $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&mode=".$mode : "")) : "",
"thumb" => get_thumbnail_code_awaiting($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], 0, $image_row['image_name'], $mode, $show_link),
"image_file_name" => $image_row['image_media_file'],
"thumbnail_file_name" => $image_row['image_thumb_file']
));
if (!empty($additional_image_fields)) {
$additional_field_array = array();
foreach ($additional_image_fields as $key => $val) {
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
$additional_field_array['lang_'.$key] = $val[0];
}
if (!empty($additional_field_array)) {
$site_template->register_vars($additional_field_array);
}
}
return true;
}
function get_thumbnail_code_awaiting($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
global $site_sess, $config;
$max = 0.6; // Hier maximale Breite der Thumbnails in Pixel eingeben !
if (!check_media_type($media_file_name)) {
$thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
}
else {
if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
$file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0]*$max;
$thumb_height = $image_info[1]*$max;
$thumb = "<img src=\"data/tmp_thumbnails/".$thumb_file_name."\" style=\"border:0;width:$thumb_width ; height:$thumb_height ;\" alt=\"".format_text($image_name, 2)."\" />";
}
else {
$file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0]*$max;
$thumb_height = $image_info[1]*$max;
$thumb = "<img src=\"data/tmp_thumbnails/".$thumb_file_name."\" style=\"border:0;width:$thumb_width ; height:$thumb_height ;\" alt=\"".$image_name."\" />";
}
}
if ($show_link) {
if ($open_window) {
$thumb = "<a href=\"/data/tmp_media/".$media_file_name."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"/data/tmp_media/".$media_file_name."\" target=\"_blank\">".$thumb."</a>";
}
}
return $thumb;
}
// -----------------------------------------------
// --- End Mod "my awaiting images" --------------
//------------------------------------------------
3. create: awaiting.html
add:
{header}
<table width="640" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="640" border="0" cellspacing="0" cellpadding="0" class="tablehead">
<tr>
<td colspan="4"><img src="{template_url}/images/header_top.gif" width="640" height="6" alt="" /></td>
</tr>
<tr>
<td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" /></td>
<td width="405"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" /></td>
<td width="225" align="right">
<form method="post" action="{url_search}">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
<input type="text" name="search_keywords" size="15" class="searchinput" />
</td>
<td>
<input type="submit" value="{lang_search}" class="button" name="submit" />
</td>
</tr>
<tr valign="top">
<td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
</tr>
</table>
</form>
</td>
<td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="640" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="638" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="23" class="navbar">
<table width="636" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right"> <a href="{url_top_images}"><b>{lang_top_images}</b></a> <a href="{url_new_images}"><b>{lang_new_images}</b></a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="638" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top" class="row2">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">{user_box}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{if random_cat_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1"> <br />
{random_cat_image} <br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_cat_image} </td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
<td width="450" valign="top"><br />
<b class="title">{lang_top100}</b>
<hr size="1" />
<div align="center">{awaiting_new_images}
<p> </p>
</td>
<td width="20" valign="top"><img src="{template_url}/images/spacer.gif" width="19" height="19" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="640" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
<tr>
<td width="6"><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" /></td>
<td width="405"> </td>
<td width="225"> </td>
<td width="6"><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
{footer}
4. Create awaiting_images_bit.html with same code with your thumbnail_bit.html
Find:
{thumbnail}
Replace it:
{thumb}
5. Open lang/english/main.php
before:
?>
add:
$lang['awaiting_images'] = "My Queued Photos";
$lang['awaiting_images_no'] = " You haven`t images in queue at this time.";
6. Open includes/page_header.php
Find:
"lang_control_panel" => $lang['control_panel'],
add after:
"lang_awaiting_images" => $lang['awaiting_images'],
Find:
"Url_login" => (! Empty ($ url_login))? $ Site_sess-> url ($ url_login): $ site_sess-> url (ROOT_PATH. "login.php"),
add before:
"Url_awaiting" => $ site_sess-> url (ROOT_PATH. "awaiting.php"),
7. Open home.html
add this, when you want to see the link:
<a href="{url_awaiting}">{lang_awaiting_images}</a>
Upload:
awaiting.php to the root
functions.php to root/includes
page_header.php to root/includes
main.php to root/lang/english
awaiting.html, home.html and awaiting_images_bit.html to templates
In case you want to show category name of the awaiting photo, perform this step: (http://www.4homepages.de/forum/index.php?topic=27806.0;msg=158563)
-
You don't need any extra functions to get thumbnail, use this instead:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], 0, $image_row['image_name'], $mode, $show_link, $detailed_view),
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], 0, $image_row['image_name'], $mode, $show_link),
"thumbnail_openwindow" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], 0, $image_row['image_name'], $mode, $show_link, 1),
When cat_id = 0, it automatically uses THUMB_TEMP_PATH
P.S.
You don't need define('GET_USER_ONLINE', 1); unless you are planning on displaying {whois_online}
-
Thank You!
But you forgot to designate the destination URL.
includes / page_header.php
Search:
"Url_login" => (! Empty ($ url_login))? $ Site_sess-> url ($ url_login): $ site_sess-> url (ROOT_PATH. "login.php"),
add before:
"Url_awaiting" => $ site_sess-> url (ROOT_PATH. "awaiting.php"),
-
Of course! Thanks!
-
Mit diesem Mod habe ich nun das Problem, das ich die Bilder nicht mehr freigeschaltet bekomme.
Klicke ich auf "Freischalten" lädt das ACP aber es erscheint nicht mehr die Meldung, das die Bilder hinzugefügt wurden.
-
I have a little bug found. Any programmer, please help to fix this.
Code above show only two awaiting user`s pics. Not more. Paging and statistic don`t work :-(
-
For starters you can try this: above
$result = $site_db->query($sql);
insert echo "<pre>".$sql."</pre>";
see what numbers showed.
then you could use same method of troubleshooting and trace how many image rows that sql command actually returned by echo'ing $num_rows
-
Thanks. This log:
SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_media_file, i.image_thumb_file, i.image_military, i.image_city, i.image_aircraft, i.image_aircraftnamealt, i.image_airline, i.image_reg, i.image_serial, i.image_dateday, i.image_datemonth, i.image_dateyear, i.image_md5, c.cat_name, u.user_name
FROM (5images_images_temp i, 5images_categories c)
LEFT JOIN 5images_users u ON (u.user_id = i.user_id)
WHERE i.user_id = 43
ORDER BY i.image_date DESC
LIMIT 0, 10
-
Hello,
I found a BUG.
When i click on h.../awaiting.php the category of the image is wrong... changes each time by pressing F5
It's possible fix this error?
-
Hm.... In this requests we extract information from TEMP folder of the gallery... 4IMAGES_TEMP have only cat_id, but not have cat_name info... I think it`s not possible... But i`ll trying...
In awaiting.php find:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_media_file, i.image_thumb_file".$additional_sql.get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TEMP_TABLE." i)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.user_id = $logged_in_id
ORDER BY i.image_date DESC
LIMIT $offset, $perpage";
And replace this:
$sql = "SELECT i.image_id, i.cat_id, c.cat_id, c.cat_name, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_media_file, i.image_thumb_file".$additional_sql.get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TEMP_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.user_id = $logged_in_id AND c.cat_id = i.cat_id
ORDER BY i.image_date DESC
LIMIT $offset, $perpage";
Try this
-
Not work. :(
The error is called from this line
<a href="{cat_url}">{cat_name}</a><br />
each refresh changes the description of the category
-
MrAndrew you have news?
-
No, i have no ideas, but i`m trying. Are you sure that it must need?
-
in their mod the detail page will be displayed, or only the thumbs?
-
Hello Rem, and thanks for your help.
The details are shown only if I put the tag in awaiting_images_bit.html (in the template).
Look the screen shot, when i click to F5 the category is changed.... is random?
-
and when you clicks on the thumbnail, then what happens?
-
opens without problems..
want to try?
-
so i have another solution..
include "clickstream" and"paging", and below the thumbnails:
Image name,
Category name,
Description,
Keywords,
Date,
1.) awaiting.php:
<?php
$main_template = 'awaiting';
define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
include(ROOT_PATH.'includes/page_header.php');
$sql = "SELECT COUNT(*) AS num_rows_all
FROM ".IMAGES_TEMP_TABLE."
WHERE user_id = ".$user_info['user_id']."";
$row = $site_db->query_firstrow($sql);
$num_rows_all = $row['num_rows_all'];
include(ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page, $perpage, $num_rows_all, $link_arg);
$offset = $getpaging->get_offset();
$site_template->register_vars(array(
"paging" => $getpaging->get_paging(),
"paging_stats" => $getpaging->get_paging_stats()
));
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
$imgtable_width .= "%";
}
$sql = "SELECT c.cat_name, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_name")."
FROM ".IMAGES_TEMP_TABLE." i
LEFT JOIN ".CATEGORIES_TABLE." c ON (c.cat_id = i.cat_id)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.user_id = ".$user_info['user_id']."
ORDER BY i.image_date DESC
LIMIT $offset, $perpage
";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if(!$num_rows){
$awaiting_new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$awaiting_new_images .= "<b>".$lang['awaiting_images_no']."</b>";
$awaiting_new_images .= "</td></tr></table>";
}
else{
$awaiting_new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0){
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$awaiting_new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$awaiting_new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$site_template->register_vars(array(
"lang_date" => $lang['date'],
"lang_image_name" => $lang['image_name'],
"lang_category" => $lang['category'],
"lang_description" => $lang['description'],
"lang_keywords" => $lang['keywords']
));
$awaiting_new_images .= $site_template->parse_template("awaiting_images_bit");
$awaiting_new_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$awaiting_new_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$awaiting_new_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$awaiting_new_images .= "</tr>\n";
}
}
$awaiting_new_images .= "</table>\n";
} // end else
$site_template->register_vars("awaiting_new_images", $awaiting_new_images);
unset($awaiting_new_images);
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['awaiting_images']."</span>";
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream,
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
2.) search in includes/functions.php:
"thumbnail_file_name" => $image_row['image_thumb_file'],
insert below:
"valid_thumbnail" => get_thumbnail_code_awaiting($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], 0, $image_row['image_name'], $mode,1,1),
2.1) search:
function get_thumbnail_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
insert above:
// -----------------------------------------------
// --- Start Mod "my awaiting images" ------------
//------------------------------------------------
function get_thumbnail_code_awaiting($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
global $site_sess, $config;
$max = 1; // Hier maximale Breite der Thumbnails in Pixel eingeben !
if (!check_media_type($media_file_name)) {
$thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
}
else {
if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
$file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0]*$max;
$thumb_height = $image_info[1]*$max;
$thumb = "<img src=\"".MEDIA_TEMP_PATH."/".$thumb_file_name."\" style=\"border:0;width:$thumb_width; height:$thumb_height;\" alt=\"".format_text($image_name, 2)."\">";
}
else {
$file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0]*$max;
$thumb_height = $image_info[1]*$max;
$thumb = "<img src=\"".MEDIA_TEMP_PATH."/".$thumb_file_name."\" style=\"border:0;width:$thumb_width; height:$thumb_height;\" alt=\"".$image_name."\">";
}
}
if ($show_link) {
if ($open_window) {
$thumb = "<a href=\"".MEDIA_TEMP_PATH."/".$media_file_name."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"".MEDIA_TEMP_PATH."/".$media_file_name."\" target=\"_blank\">".$thumb."</a>";
}
}
return $thumb;
}
// -----------------------------------------------
// --- End Mod "my awaiting images" --------------
3.) awaiting.html:
{header}
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablehead">
<tr>
<td width="100%" colspan="4"><table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="6"><img src="{template_url}/images/header_top_left.gif" width="6" height="6" alt="" ></td>
<td width="100%"><img src="{template_url}/images/header_top.gif" width="100%" height="6" alt="" ></td>
<td width="6"><img src="{template_url}/images/header_top_right.gif" width="6" height="6" alt="" ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" ></td>
<td width="100%"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" ></td>
<td width="225" align="right">
<form method="post" action="{url_search}">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
<input type="text" name="search_keywords" size="15" class="searchinput" >
</td>
<td>
<input type="submit" value="{lang_search}" class="button" name="submit" >
</td>
</tr>
<tr valign="top">
<td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
</tr>
</table>
</form>
</td>
<td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="navbar" height="23">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" >{clickstream}</td>
<td align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" >{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
</tr>
<tr>
<td align="center" class="row1">{user_box} </td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
</tr>
</table>
{if random_cat_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" >{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
</tr>
<tr>
<td align="center" class="row1">
<br >
{random_cat_image}
<br >
<br >
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
</tr>
</table>
{endif random_cat_image}
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="18" height="18" ></td>
<td width="100%" valign="top"><br >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<b class="title">{lang_awaiting_images}</b>
<hr size="1" >
<div align="center">{awaiting_new_images}
<br>
{paging}
<br><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{category_dropdown_form}</td>
<td align="right">{setperpage_dropdown_form}</td>
</tr>
</table>
<p> </p>
</td>
<td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" ></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
<tr>
<td width="6" nowrap><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" ></td>
<td width="100%"></td>
<td width="6" nowrap><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" ></td>
</tr>
</table>
</td>
</tr>
</table>
{footer}
4.) awaiting_images_bit.html:
{valid_thumbnail}<br>
<b>{lang_image_name}</b> {image_name} {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})
<br>
<b>{lang_category}</b><a href="{cat_url}"> {cat_name}</a><br>
<b>{lang_description}</b> {image_description}<br>
<b>{lang_keywords}</b> {image_keywords}<br>
<b>{lang_date}</b> {image_date}
and step 5.) 6.) 7.) from the first post
mfg Andi
-
Gooooddd!!
Work.
Can you fix for other user this problem in the first reply?
Very thanks Rem ;)
-
...Can you fix for other user this problem in the first reply?
...
mean you this?
... when i click to F5 the category is changed.... is random?
-
No problems are solved.
I was wondering if you could update the first response to other users.
-
Gab es nicht mal eine Mod die in der logininfo in rot oder auch blinkend angezeigt hat das hochgeladene Bilder auf Freischaltung warten?
-
Mod: Awaiting images
war von Kurt
http://www.4homepages.de/forum/index.php?topic=24120.0
-
Stimmt Stimmt.... naja kann man dann wohl nichts machen!
-
würde ich nicht sagen, da ich es ja eingebaut habe ;)
Bin mir nur nicht sicher ob Kurt was dagegen hat, wenn ich es hier poste
-
Wenn du das hier postest dann schon, aber privat sollte das kein Problem sein. Das PMV3 habe ich mal auf einer Webseite gefunden, es war eine russische Seite und war nicht ganz einfach das wieder zum laufen zu bekommen da alles russisch war