Hi!
The Desire come from here:
http://www.4homepages.de/forum/index.php?topic=18088.msg157471#msg157471If Keywords field empty by Users, you can set auto generated "Keywords" from "Image Name" and/or "Image Description".
The Settings for this, find under "ACP/General/Settings/Image settings".
Optional: With the Modified "rebuild_searchindex.php" (see Attachment) you can register all the "keywords" at once.
Copy the "rebuild_searchindex.php" (see Attachment) in your "admin/plugin" folder
1.) search admin/settings.php:
show_setting_row("image_table_cellpadding");
insert below:
show_setting_row("image_use_image_name", "radio");
show_setting_row("image_use_description", "radio");
2.) search in lang/yourLang/admin.php:
(deutsch)
$setting['image_table_cellpadding'] = "Cellpadding der Bilder Tabelle";
insert below:
$setting['image_use_image_name'] = "Als Schlüsselwort 'Bild Namen' verwenden?";
$setting['image_use_description'] = "Als Schlüsselwort 'Bild Beschreibung' verwenden?";
(english)
$setting['image_use_image_name'] = "Use 'Image Name' as Keyword?";
$setting['image_use_description'] = "Use 'Image Description' as Keyword?";
3.) search in root/member.php:
include(ROOT_PATH.'includes/page_header.php');insert below:
function clean_description($val) {
$search_array = array("#[-_'`´\^\$\(\)<>\"\|,@\;\?%~\+\.\[\]{}:\/=!§\\\\]+#s");
$replace_array = array(" ");
$val = preg_replace($search_array, $replace_array, $val);
return $val;
}
4.) search in root/member.php
2x:
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
and insert below
2x:
$keywords_name="";
$keywords_description="";
if($config['image_use_image_name'] && empty($image_keywords)){
$keywords_name = $image_name;
}
if($config['image_use_description'] && empty($image_keywords)){
if(!empty($image_description)){
$keywords_description = ",".clean_description($image_description);
}
}
$keywords_name_description = str_replace(" ",",", $keywords_name.$keywords_description);
$image_keywords = $image_keywords.$keywords_name_description;
mfg Andi