Author Topic: The good old "last Images"  (Read 17713 times)

0 Members and 1 Guest are viewing this topic.

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: The good old "last Images"
« Reply #15 on: November 08, 2007, 09:44:46 PM »
to add my code to your code
was my question
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: The good old "last Images"
« Reply #16 on: November 08, 2007, 09:49:34 PM »
If www.katzen.ag (user) say code is work. Is ok.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: The good old "last Images"
« Reply #17 on: November 08, 2007, 10:07:17 PM »
Hallo Jungs, hey guys,

your made a good Job - I*T*W*O*R*K*S

Danke noch einmal  :lol:
KatzenAG - das grosse Katzenportal im Internet

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: The good old "last Images"
« Reply #18 on: November 10, 2007, 11:04:58 PM »
Hello guys!

I just would like give a feedback. Just have a look... great Job!



http://www.katzen.ag
KatzenAG - das grosse Katzenportal im Internet

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: The good old "last Images"
« Reply #19 on: November 10, 2007, 11:13:59 PM »
Is look good. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: The good old "last Images"
« Reply #20 on: November 12, 2007, 02:26:15 PM »
A little question...how can I put the last images in other php files? e.g. in details.php etc?
I Assume I have to include it, but how? 8O

Best regards,
KatzenAG
KatzenAG - das grosse Katzenportal im Internet

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: The good old "last Images"
« Reply #21 on: November 12, 2007, 02:45:33 PM »
hi,

just use ONLY thunderstrike code in details.php.

add it before
Code: [Select]
?>

+ for template into details.html
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: The good old "last Images"
« Reply #22 on: November 12, 2007, 04:43:23 PM »
Yes, I but it doesn't work.
I had Insert in detail.php:

Quote
//-----------------------------------------------------
//--- Show Last images with thumbnails ----------------
//-----------------------------------------------------
$sql1 = "

SELECT i.image_id, i.image_name, i.image_thumb_file, i.image_media_file, i.cat_id" . get_user_table_field(", u.", "user_name") . "
FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)
LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
ORDER BY i.image_date DESC
LIMIT 3

";

$result = $site_db->query($sql1);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $last_images_with_thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $last_images_with_thumbnails .= $lang['no_new_images'];
  $last_images_with_thumbnails .= "</td></tr></table>";
}
else  {
  $last_images_with_thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($last_images_with_thumbnails_row = $site_db->fetch_array($result)) {
      $user_name = format_text(trim(ucfirst($last_images_with_thumbnails_row[$user_table_fields['user_name']]), 2));
     
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $last_images_with_thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $last_images_with_thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($last_images_with_thumbnails_row);
    $last_images_with_thumbnails .= $site_template->parse_template("thumbnail_bit_last_images");
    $last_images_with_thumbnails .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $last_images_with_thumbnails .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $last_images_with_thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $last_images_with_thumbnails .= "</tr>\n";
    }
  }
  $last_images_with_thumbnails .= "</table>\n";
} // end else


$site_template->register_vars("lang_last_images_with_thumbnails_from_home", preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", $user_name, $lang['last_images_with_thumbnails_from_home']));
$site_template->register_vars("last_images_with_thumbnails", $last_images_with_thumbnails);
unset($last_images_with_thumbnails);

and of course in details.html:

Quote
{last_images_with_thumbnails}

It seems, that is not enough?
Hmmpf, in my next life I will became a php programmer  :)

PS: I know you are german, but Ihink this issue could be intresting for english spoken users too.

KatzenAG
KatzenAG - das grosse Katzenportal im Internet

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: The good old "last Images"
« Reply #23 on: November 12, 2007, 05:47:27 PM »
ok.. i didn't test it before.

instead of
Code: [Select]
?>
add it before

Code: [Select]
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------

than it's works
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline www.katzen.ag

  • Jr. Member
  • **
  • Posts: 75
  • KatzenAG - das grosse Katzenportal im Internet
    • View Profile
    • KatzenAG - das grosse Katzenportal im Internet
Re: The good old "last Images"
« Reply #24 on: November 12, 2007, 06:16:17 PM »
YES!!!

So, this issue has been solved.

Thanks

KatzenAG - das grosse Katzenportal im Internet