Wie kann man das Feld auf der Startseite anzeigen lassen?
In der Details.html wird es angezeigt bzw. ausgegeben, aber auf der Startseite leider nicht und in der category_bit auch nicht.
Habe das schon so versucht, aber ich denke es gibt einen einfacheren Weg?
//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
$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_download_url2,i.image_download_url3,i.image_download_url4,i.image_download_url5,i.image_download_url6,i.image_download_url7,i.image_download_url8, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_downloads2, i.image_downloads3, i.image_downloads4, i.image_downloads5, i.image_downloads6, i.image_downloads7,i.image_downloads8, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name, c.cat_icon".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
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_id = $image_id AND i.image_active = 1 AND c.cat_id = i.cat_id";
$image_row = $site_db->query_firstrow($sql);
if (!$categories) {
$categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
$site_template->register_vars(array(
"cat_icon" => format_text($image_row['cat_icon'], 2)
));
unset($categories);