Author Topic: [MOD] Show to user his awaiting validation images  (Read 25331 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
Re: [MOD] Show to user his awaiting validation images
« Reply #15 on: August 05, 2011, 03:28:42 PM »
and when you clicks on the thumbnail, then what happens?

Offline clubbu

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #16 on: August 05, 2011, 03:33:09 PM »
opens without problems..

want to try?

Rembrandt

  • Guest
Re: [MOD] Show to user his awaiting validation images
« Reply #17 on: August 06, 2011, 07:25:41 AM »
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++ % == 0) ? 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&nbsp;\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_id00)) {
      
$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_name2)."\">";
    }
    else {
      
$file_src get_file_path($thumb_file_name"thumb"$cat_id01);
      
$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:
Code: [Select]
{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>&nbsp;
                        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
                      </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>&nbsp;</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:
Code: [Select]
{valid_thumbnail}<br>
<b>{lang_image_name}</b> {image_name} {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new}&nbsp;({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

Offline clubbu

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #18 on: August 06, 2011, 11:39:29 PM »
Gooooddd!!

Work.

Can you fix for other user this problem in the first reply?

Very thanks Rem ;)

Rembrandt

  • Guest
Re: [MOD] Show to user his awaiting validation images
« Reply #19 on: August 07, 2011, 05:42:35 AM »
...Can you fix for other user this problem in the first reply?
...
mean you this?
Quote
... when i click to F5 the category is changed.... is random?

Offline clubbu

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #20 on: August 07, 2011, 10:31:03 AM »
No problems are solved.

I was wondering if you could update the first response to other users.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #21 on: October 13, 2011, 12:02:04 PM »
Gab es nicht mal eine Mod die in der logininfo in rot oder auch blinkend angezeigt hat das hochgeladene Bilder auf Freischaltung warten?

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Show to user his awaiting validation images
« Reply #22 on: October 13, 2011, 05:42:31 PM »
Danke Harald




Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #23 on: October 13, 2011, 09:42:25 PM »
Stimmt Stimmt.... naja kann man dann wohl nichts machen!

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [MOD] Show to user his awaiting validation images
« Reply #24 on: October 13, 2011, 11:09:59 PM »
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
Danke Harald




Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Show to user his awaiting validation images
« Reply #25 on: October 14, 2011, 10:31:52 AM »
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