Hallo,
ich möchte hier einmal erklären, wie man eine zweite thumbnail_bit.html erstellen, damit man diese auch in anderen Unterseiten unterschiedlich darstellen kann.
Hello,
I would like to once explain how to create a second thumbnail_bit.html so that they can be in other sub-pages may vary.
Step 1Open / Öffne: index.php
Search / Suche:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
Add above / Füge darüber das ein:
//-----------------------------------------------------
//--- Show New Images 2 ---------------------------------
//-----------------------------------------------------
$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_images2 = "";
$new_images2 .= $lang['no_new_images'];
$new_images2 .= "";
}
else {
$new_images2 = "";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images2 .= "";
}
$new_images2 .= "";
show_image($image_row);
$new_images2 .= $site_template->parse_template("thumbnail_bit2");
$new_images2 .= "";
$count++;
if ($count == $config['image_cells']) {
$new_images2 .= "";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$new_images2 .= "";
}
$new_images2 .= "";
}
}
$new_images2 .= "";
} // end else
$site_template->register_vars("new_images2", $new_images2);
unset($new_images2);
Search / Suche:
$templates_used = 'home,category_bit,whos_online,thumbnail_bit';
Replace this with / ändere es in:
$templates_used = 'home,category_bit,whos_online,thumbnail_bit,thumbnail_bit2';
Step2Mache eine Kopie deiner thumbnail_bit.html und benenne diese in thumbnail_bit2.html um.
Du kannst nun deine thumbnail_bit2.html nach deinen Wünschen anpassen und abändern.
Make a copy of your thumbnail_bit.html and rename it in order thumbnail_bit2.html.
You can now tag your thumbnail_bit2.html according to your wishes and adapt to change.
Step3Damit du die neue thumbnail_bit2.html auch verwenden kannst, kannst du nun dieses tag verwenden:
{new_images2}Thus the new thumbnail_bit2.html you also can use, you can now use this tag:
{new_images2}Fertig / Finish
Danke / Thanks to: Mawenzi: http://www.4homepages.de/forum/index.php?topic=23512.msg128915#msg1289151. in der index.php eine Kopie des Abschnitts "Show New Images" machen (und deine sql-Optionen anpassen / ändern) ...
2. darin dann alle "new_images" in "new_images_2" umbenennen ...
2.1 und die "thumbnail_bit" in "thumbnail_bit_2" umbenennen ...
3. in der index.php unter "$templates_used" nun noch "thumbnail_bit_2" hinzufügen ...
4. eine Kopie deiner "thumbnail_bit.html" in deinem Teplate-Ordner machen diese "thumbnail_bit_2.html" benennen und editiern ...
5. in der home.html den Tag {new_images_2} verwenden ...
6. fertig
1. index.php in a copy of the section "Show New Images" (and your sql-options / change) ...
2. Then it all "new_images" in new_images_2 rename ...
2.1 and the "thumbnail_bit" in thumbnail_bit_2 rename ...
3. in the index.php under "$ templates_used" now "thumbnail_bit_2 add ...
4. a copy of your "thumbnail_bit.html" in your folder Teplate make this "thumbnail_bit_2.html" rename and edit ...
5. home.html in the day) (new_images_2 use ...
6. ready