Willkommen im Forum!
Hi!
1.) suche in der admin/setting.php:
show_setting_row("image_table_cellpadding");
füge darunter ein:
//------------------ Start recommended images ---------------
show_setting_row("recommended_images");
//------------------ End recommended images -----------------
2.) suche in lang/yourLang/admin.php:
$setting['image_table_cellpadding'] = "Cellpadding der Bilder Tabelle";
füge darunter ein:
//--------------------------------- Start recommended images ---------------------------------
$setting['recommended_images'] = "Welche Bilder sollen auf der Home Seite angezeigt werden:<br /><span class=\"smalltext\">Image_ID Nummern mit , trennen.</span>";
//--------------------------------- End recommended images ---------------------------------
3.) suche in der index.php:
unset($new_images);
füge darunter ein:
//------------------ Start recommended images ---------------
$image_in = ($config['recommended_images']) ? "AND i.image_id IN (".$config['recommended_images'].")":"";
$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").") $image_in
";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$recommended_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$recommended_images .= $lang['no_new_images'];
$recommended_images .= "</td></tr></table>";
}
else {
$recommended_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;
$recommended_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$recommended_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$recommended_images .= $site_template->parse_template("thumbnail_bit");
$recommended_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$recommended_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$recommended_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$recommended_images .= "</tr>\n";
}
}
$recommended_images .= "</table>\n";
} // end else
$site_template->register_vars("recommended_images", $recommended_images);
unset($recommended_images);
//------------------ End recommended images ---------------
4.) suche in der home.html:
{whos_online}
füge darüber ein:
<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">Der Küchenchef empfiehlt heute:</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">{recommended_images}</td>
</tr>
</table>
<br>
Jetzt kannst du im ACP unter "Allgemein/Einstellungen/Bild Einstellungen" die Bild ID Nummern eintragen, die angezeigt werden sollen.
ist etwas unklar, frag.
mfg Andi