4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: midohits on May 08, 2013, 11:34:14 AM

Title: New Images On External Page For 1.7.11
Post by: midohits on May 08, 2013, 11:34:14 AM
Hey There.. I wanna make a new images on external pages for 1.7.11

i use it before and work with me but it's on 1.7.6

but i can't find any modification for 1.7.11

plz i wanna it
Title: Re: New Images On External Page For 1.7.11
Post by: Rembrandt on May 08, 2013, 01:35:30 PM
Hi!
...
i use it before and work with me but it's on 1.7.6
....
what for a mod?

mfg Andi
Title: Re: New Images On External Page For 1.7.11
Post by: midohits on May 08, 2013, 05:29:32 PM
I Mean Mods, The Mods In The Forum Since 2007 and for 4 images 1.7.6

i Want Mods For 1.7.11 , To Show The New images On External Page
Title: Re: New Images On External Page For 1.7.11
Post by: midohits on May 10, 2013, 04:21:47 PM
plz any one help me

i want to do the new images in external page .. plz any one help me

and this mod not work on 1.7.11

http://www.4homepages.de/forum/index.php?topic=21956.0
Title: Re: New Images On External Page For 1.7.11
Post by: midohits on May 13, 2013, 01:56:31 AM
please , i want this mods

the new images in external page for 4 images 1.7.11
Title: Re: New Images On External Page For 1.7.11
Post by: Rembrandt on May 19, 2013, 07:53:54 AM
1.) new_images.php:

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: new_images.php                                            *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.11                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$templates_used = 'new_images,new_images_bit';
$main_template = 'new_images';
define('ROOT_PATH', './');
define('MAIN_SCRIPT', __FILE__);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
include(ROOT_PATH.'includes/page_header.php');

$num_new_images = 12;
$config['image_cells'] = 4;
$config['image_table_width']= "100%";
$config['image_table_cellpadding']= 20;
$config['image_table_cellspacing']=3;

$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;
  }
}

$num_new_images = $config['image_cells'];
$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_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".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 c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $new_images .= $lang['no_new_images'];
  $new_images .= "</td></tr></table>";
}
else  {
  $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;
      $new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row,"",0,1);
    $new_images .= $site_template->parse_template("new_images_bit");
    $new_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $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++) {
        $new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $new_images .= "</tr>\n";
    }
  }
  $new_images .= "</table>\n";
} // end else

$site_template->register_vars("new_images", $new_images);
unset($new_images);

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

$site_template->print_template($site_template->parse_template($main_template));

include(ROOT_PATH.'includes/page_footer.php');
?>


2.) new_images_bit.html:
Code: [Select]
{thumbnail}<br >
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})
<br>
{image_description}
<br>
<a href="{cat_url}">{cat_name}</a><br />
{if allow_comments}{lang_comments} {image_comments}<br>{user_comments}{endif allow_comments}<br>

3.) new_images.html:
Code: [Select]
{header}
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td class="head1">
        <table width="100%" border="0" cellspacing="0" cellpadding="4">
          <tr>
            <td class="head1" valign="top">{lang_new_images}</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td class="head1">{new_images}</td>
    </tr>
  </table>
{footer}

mfg Andi