4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Chris on January 30, 2003, 05:11:55 AM
-
Adds a list of all available image keywords to the search_form.html template where the user can select 1 or more and include those words in their search criteria.
See the screen shot at the bottom.
NOTE: There is some confusion circulating around what keywords really are in 4images. Let's see if I can help clear it up.
The default template search_form.html, with the english language pack, uses search_keywords and lang_search_keywords in the form field that actually accepts "words to search for". Search words can be anything from the image description, name, and even keywords. Keywords are words you explicitly assign to an image.
From a dictionary:
key·word also key word -
A word used as a reference point for finding other information.
It's very common for digital asset management software to not only let you categorize files, but to also let you assign keywords. Keywords are descriptive words, not phrases, that you can assign to your cataloged files in order to categorize and classify them. If you had an image of a tropical beach at sunset, you might assign it keywords such as Sand, Beach, Ocean, Sunset, Tropical, Vacation, Recreation, Outdoor, and so on. You might have chosen to place this image in a "Beaches" category. Suppose you also had an image of a city building taken at sunset when the color had changed and you placed it in a "Buildings" category. The keyword "sunset" could be used to group these images as having something in common. ("Tropical Sunset" is actually two keywords.)
Summary Description
The database table 4images_images is read and a sorted, unique list of keywords is generated. This array is then used to add list of all image keywords found to the search_form.html template. This is a standard HTML <select> form control that allows multiple items to be selected. Example is shown below:
Summary of files affected
[change] search.php
[change] includes/functions.php
[change] lang/english/main.php
[change] templates/default/search_form.html
Open search.php, locate this code near the top:
$org_search_keywords = $search_keywords;
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
Change it to the new lines as shown:
$org_search_keywords = $search_keywords;
// [Mod] Add a list of image keywords to the search form BEGIN
if (isset($HTTP_POST_VARS['search_keyword_list'])) {
$search_keyword_list = implode(" ", $HTTP_POST_VARS['search_keyword_list']);
$show_result = 1;
}
else {
$search_keyword_list = "";
}
$org_search_keywords .= trim(" ".$search_keyword_list);
$search_keywords = $org_search_keywords;
// [Mod] Add a list of image keywords to the search form END
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
Locate this code near the bottom:
"category_dropdown" => get_category_dropdown($cat_id)
));
Change it to the new lines as shown:
"category_dropdown" => get_category_dropdown($cat_id),
"lang_image_keyword_list" => $lang['image_keyword_list'], // [Mod] Add a list of image keywords to the search form
"image_keyword_list" => get_keyword_list() // [Mod] Add a list of image keywords to the search form
));
Open includes/functions.php, locate this code at the very bottom:
?>
Change it to the following:
// [Mod] Add a list of image keywords to the search form BEGIN
function get_keyword_list()
{
global $lang, $site_sess, $site_db;
$keyword_dropdown = "";
$keyword_dropdown .= "<select name=\"search_keyword_list[]\" multiple=\"multiple\" size=\"10\" class=\"setperpageselect\">\n";
$sql = "SELECT `image_keywords` FROM ".IMAGES_TABLE." WHERE 1 order by `image_keywords` DESC";
$result = $site_db->query($sql);
$array = array();
while(list($Name) = mysql_fetch_row($result)) {
// Commented out until enforcement of user/category/image permissions is developed
// if (!check_permission("auth_viewimage", $image_row['cat_id']) || !check_permission("auth_viewcat", $image_row['cat_id'])) {
if(!empty($Name)) {
$explode_array = explode(" ",$Name);
for($ctr=0; $ctr < count($explode_array); $ctr++){
$temp = $explode_array[$ctr];
$array[] = $temp;
}
}
}
$site_db->free_result();
$array1 = array_unique($array); // Remove duplicate values from the array
if (!empty($array1)) {
sort($array1,SORT_REGULAR); // Sort the array
foreach($array1 as $val) {
$keyword_dropdown .= "<option value=\"".$val."\">".$val."</option>\n";
}
}
$keyword_dropdown .= "</select>\n";
return $keyword_dropdown;
}
// [Mod] Add a list of image keywords to the search form END
?>
Now let's correct some misleading text in the english language pack and add our new language phrases for this mod.
Open lang/english/main.php and locate:
$lang['search_by_keyword'] = "Search by Keyword:<br /><span class=\"smalltext\">Use terms such as AND, OR and NOT to control your search in more detail. Use asterisks (*) as a wildcard for partial matches.</span>";
$lang['search_terms'] = "Search term:";
Change those lines to:
$lang['search_by_keyword'] = "Search Words:<br /><span class=\"smalltext\">Use terms such as AND, OR and NOT to control your search in more detail.<br />Use asterisks (*) as a wildcard for partial matches.</span>";
$lang['search_terms'] = "Any or All search words?";
After this line
$lang['or'] = "OR";
Add this new line
$lang['image_keyword_list'] = "Select Image Keywords:<br /><span class=\"smalltext\">Use CTRL-click or SHIFT-click to select multiple keywords.<br><br>You can use the '".$lang['keywords_only']."' field above to limit your search.</span>"; // [Mod] Add a list of image keywords to the search form
Open templates/default/search_form.html and locate:
<tr>
<td class="row1"> </td>
<td class="row1"><input type="submit" value="{lang_search}" class="button" /></td>
</tr>
Replace with this:
<tr class="row2">
<td valign="top"><b>{lang_image_keyword_list}</b></td>
<td>{image_keyword_list}</td>
</tr>
<tr>
<td class="row2"> </td>
<td class="row2"><input type="submit" value="{lang_search}" class="button" /></td>
</tr>
Revisions:
- Jan 28, 2005 - Version 2.0 - Major rewrite
Eliminated the need for a new template
Eliminated the single keyword jump menu and keyword links
Introduced a multi-item selectable list of image keywords providing more functionality than version 1.0
Consolidated and reduced code
TODO: Find a way to return only keywords for images the user has permission to view. Currently this mod returns ALL image keywords. - Removed extraneous show_error_page() from new code block for functions.php - Thanks to v@no for spotting it
- Fixed location of {keyword_dropdown_form} in search_form.html
Previous location had it embedded in the search form and caused a javascript error. - Added an example of {keyword_links} in search_form.html to the picture.
-
I cant get this mod to work... :oops:
first off all, I think u post little extra code that gives error message.
Insert the following two new functions immediately above it (and under the get_category_dropdown function)
the bottom part of that insert already exist in 4images code:function show_error_page($error_msg, $clickstream = "") {
global $site_template, $site_sess, $lang, $config;
if (empty($clickstream)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].$lang['error'];
}
$site_template->register_vars(array(
"error_msg" => $error_msg,
"lang_error" => $lang['error'],
"clickstream" => $clickstream,
"random_image" => ""
));
$site_template->print_template($site_template->parse_template("error"));
exit;
}
so, php give error that function show_error_page() already registered.
but when I delete dublicate of this function, neither my search button, nor keyword sellect dont work at all, when I press either of them nothing happend... 8O
maybe I missed something?
-
I'm rather embarassed my original post didn't work. I've got to stop making complex posts so late at night when I'm tired!
The original post has been updated. You will notice a revision list at the bottom. I prefer to edit the original post rather than post again since it keeps the instructions all in one place. This time I tested my own instructions and code against a clean installation of 4images using the default template set. Yes, it now works but be careful to follow ALL of the instructions. I tweaked a couple of things.
Keep the feedback coming. If there are any more problems, I will fix them straight away!
-
yay! now works in 3 min!
just now I realized that I dont even use keywords in the gallery...I have just 3 keywords for the whole collection :?
Thx, vivdviews, nice MOD!
-
Nice mod and I got it working in just a few minutes.
One small problem I would like to share. - The keyword jump menu and Keyword search links now show all keywords for all images in all catagories on the site.
When you click on a search link in the jump menu and it belongs to a private catagory the search engine returns "Your search resulted in no matching records." which can be a litle confusing.
Q. Can this be further modified to show only keywords from the catagories that members are allowed to view?
Hope this is good feedback.
-
Hi Jan, everybody,
I am impressed with the 4images script (if you can still call it a script? :D ), and I have been searching for a way to integrate the function of adding keywords in a logical manner. I reply now and here, because i see the start if implementing such a function has just been started. My wishes are:
- At upload time, select keywords from the currently available ones in the database (from a drop down list or list box like shown in this thread) and add them to the picture being uploaded. This to prevent ambiguity between keywords that users might add at their own insight.
- Maybe it should be best if the admin adds his *fixed* list of keywords being the one to choose from when doing a search.
- In addition to that, the admin should be able to add keywords at any time.
- Important is, that when uploading masses of pictures, a fixed number of chosen keywords can be added to the pictures being uploaded automatically.
Could this all be possible to implement?
Good day to all and greetz from the Netherlands (snow outside!! :lol:)
- Jobro
-
This is a great mod and worked fine on my search page. I was hoping I could add a call to {keyword_dropdown_form} by the {category_dropdown_form} on my home and other similarily formatted pages. However, when I add it, nothing happens. There is no sign of the dropdown box, but I don't get any errors either. Any thoughts on this?
-
It only works from the search form by design. I deliberately avoided making it work like the category drop down where it would get called on every page hit.
Generating the keyword dropdown list is a costly operation since it has to read every image record from the database and parse through the array of keywords attached with each record. If you have thousands of images this has the potential to really slow down a server as the number of concurrent visitors increases. Remember that most people have their web sites on shared hosting solutions which means their box is probably already handling 150-400 other web sites too.
-
Nice mod and I got it working in just a few minutes.
When you click on a search link in the jump menu and it belongs to a private catagory the search engine returns "Your search resulted in no matching records." which can be a litle confusing.
Thanks.
I hear you on the private categories issue. In my configuration of 4images it's not an issue since I don't use private categories. And since I am very pressed for time over the next 4-6 week, I don't know when I will be able to re-examine this mod for an enhancement (fix) :roll:
You are correct and I agree that the keyword list should be limited to keywords for which the user has access.
I'll try to see what I can come up with. In the meantime if anyone else would care to lend their ideas on how it can be done, I'm all ears.
-
I understand what you are saying about it being processor intensive to have on every page. I am not sure this is a concern for me, since I won't have many users accessing my site and won't have that many photos. If this is still a concern, I would be willing to cut-and-paste my list of keywords and hard-code them into the dropdown box. They won't change often, so it wouldn't be hard for me to maintain. Do you have an example of what I would need to change to get that to work?
-
Hello,
is it possible to limit the number of keywords listed in the dropdown?
thank you !
-
Ever thought about categorising the keywords as well? I also thought of other methods of storing the keywords in a logical manner. I am running a modded test setup of 4images with 10 people that batch upload folders with their images at will.
They asked me for a different approach on the keywords which should rule out double entry or misspelled words so everyone searches with the right keywords. I thought of using only drop down menus for the keywords and an enhanced upload page which offers the opportunity to choose your keywords from the list that exists, thus preventing spelling mistakes etc. The admin can add or remove the keywords.
I think the given mod is a good start, but when the list of words gets too large, it doesn't work efficiently anymore. I am working on a modded batch import that does auto-thumbnailing as well as keyword addition, all in one go.
Who will help this poor PHP coder?? :oops:
-
Is there anyway to limit the keywords? maybe to the more popular photos? or more popular keywords? or a admin function to set it?
-
Sorry, there is no way to limit the number of keywords.
Sorry, there is no way to limit the keywords to only "popular" photos.
The purpose of my mod was to allow for easy keyword searches as part of the advanced search function. Therefore, I did not design any limit mechanisms, nor do I have plans to do so since this is meant to be used as part of the advanced search feature.
The only change I am considering is to limit the keyword list to only those images which the user has permission to view. This is a logical extension of the 4images user and group permissions security model and so it seems natural that it should be accomodated. The problem with adding this is that I do not have time right now to take on the added work.
I'll post again if I have made any changes.
-
.
-
Sounds like you deleted it. The screen shot was taken using the default, and therefore unmodified, search template.
-
(http://Chris.com/hotlinks/4images.de/keyword_jump_menu.gif)
What will be the difference between keywords jump menu and keyword search link? How can I remove the Search Link if it is the same as the jump menu?
Do you think it could be sorted alphabetically? that is when you have time to do it of course :D
-
.
-
What will be the difference between keywords jump menu and keyword search link? How can I remove the Search Link if it is the same as the jump menu?
Do you think it could be sorted alphabetically?
1. One is a drop-down jump menu, the other is a list of text links.
2. yes, they are the same. If you don't want the text links, just don't put this line in your template
<td class="row1"><b>{lang_keyword_links}</b><br>{keyword_links}</td>
3. Try the mod. The keywords are being sorted alphabetically. No change is needed.
-
So there must been something changed in that template 4dark which is causing this. If someone can tell me where in the original files it is stored, I could try to copy it into the 4dark template...
Yep. Those templates were originally designed for 4images 1.5. You must go back to the web site where you got that template. There you will find instructions in one of the forums on how to update the templates to work with 1.6 and 1.7.
-
What will be the difference between keywords jump menu and keyword search link? How can I remove the Search Link if it is the same as the jump menu?
Do you think it could be sorted alphabetically?
1. One is a drop-down jump menu, the other is a list of text links.
2. yes, they are the same. If you don't want the text links, just don't put this line in your template
<td class="row1"><b>{lang_keyword_links}</b><br>{keyword_links}</td>
3. Try the mod. The keywords are being sorted alphabetically. No change is needed.
Thanks man. I have installed it already but because I have not up my board thus unable to test. :D
-
Is there any way I can put this DROP DOWN BOX in my main index.php page just beside the ADVANCE SEARCH button?
-
.
-
o.k., here we are:
If you use template 4dark, you have to add the following code in the search_form.html of 4dark at the place you want it to appear:
<tr>
<td valign="top" class="row2"><b>{lang_search_by_username}</b></td>
<td class="row2" valign="top">
<input type="text" name="search_user" size="40" value="{search_user}" class="input" />
</td>
</tr>
Dirk
Sorry is this post meant for me?
-
.
-
Is there any way I can put this DROP DOWN BOX in my main index.php page just beside the ADVANCE SEARCH button?
Please read the rest of this thread. This question has already been asked and I have already answered it.
-
is there a page out to have a look at?
sincerly
vincent
-
No there isn't and I had actually completely rewritten this mod and published version 2.0 before the hacker deleted it. Version 2.0 is way better than the original mod here. It lets you select multiple keywords to search.
I simply haven't had time to restore that lost mod. I will try to do it this weekend.
Here is a sneak peak at what the mod does:
-
simply haven't had time to restore that lost mod. I will try to do it this weekend.
I will wait for it :)
-
FYI:
I have reposted version 2.0 of this mod. - Enjoy !
-
Great, have have installed it and it works fine.....Thanks.
-
up - maybe chris could help!
vincent
-
Is it possible to modify the MOD, so that I can define somewhere (in a new file) the keywords I want have to be shown in the multi-item selectable list?
-
I mean... instead to show all keywords in the database, in the list should be shown keywords, maintained in a new file. The file could be maintainded with an editor tool.
-
or I maintain the keywords direct in the HTML- or PHP-File.
-
Is it possible to modify the MOD, so that I can define somewhere (in a new file) the keywords I want have to be shown in the multi-item selectable list?
I mean... instead to show all keywords in the database, in the list should be shown keywords, maintained in a new file. The file could be maintainded with an editor tool.
or I maintain the keywords direct in the HTML- or PHP-File
That would be a nice feature.
At the moment I have over 400 Words in the keywordsearchlist. That to much :|
Matthias
-
Sorry, there is no way to limit the number of keywords.
The only change I am considering is to limit the keyword list to only those images which the user has permission to view. [..]
Hi Chris - a very nice and useful mod! When will you integrate this little but important limitation feature?
Gruß,
Reiner
-
Hi Buster
would it be ok for you, if you can define somewhere specific keywords. And only this specific keywords would be shown (see posts above). With you, Mmathias70 an me, we would already be three people with this request. What do you mean?
-
Is it not possible to have this mod a bit modifieyed
i would like to have it like this
A B C D E F G H I J K L M N O P .............. X Y Z
-------------------------------------------------------------------
- A -
Asien Armee Acrikultur
Armut arbeit Architektur
arbeitslos arbeiter anatolien
usw usw
-----------------------------------------------------------------------
gruss
vincent
-
Hi Buster
would it be ok for you, if you can define somewhere specific keywords. And only this specific keywords would be shown (see posts above). With you, Mmathias70 an me, we would already be three people with this request. What do you mean?
Hi Timt, just the other way round: All keywords except of those you don't want to be shown :)
Gruß,
Reiner
-
thanks for the mod! :D :D you guys are gooooood!! :D
-
I reask my question! :wink:
Is it not possible to have this mod a bit modifieyed
i would like to have it like this
A B C D E F G H I J K L M N O P .............. X Y Z
-------------------------------------------------------------------
- A -
Asien Armee Acrikultur
Armut arbeit Architektur
arbeitslos arbeiter anatolien
usw usw
-----------------------------------------------------------------------
gruss
vincent
-
Great mod Chris :D
It works perfect :lol:
thanks 8)
-
huh ? in 4images 1.7.2 when I search for
$org_search_keywords = $search_keywords;
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
I turn up blank ? I can locate
$org_search_keywords = $search_keywords;
$org_search_user = $search_user;
if (isset($HTTP_GET_VARS['search_terms']) || isset($HTTP_POST_VARS['search_terms'])) {
Somehow it does not feel the same ? Sounds like a great mod !
-
i need that all keywords would be written in one line. Can some one do that? Please
-
@novw
I use version 1.7.4 and I paste the code before the IF-clause and it works fine, try it. :)
@MOD-Designer Chris ;)
Congratultions for this great MOD.
One fact, i tried to use the original searchfield and your keywords-list together.
one example: search field: "cars 2007" keywords-list: "blue"
The result was: "cars 2007blue"
I was looking for a fix and found this one:
Search in search.php
$org_search_keywords .= trim(" ".$search_keyword_list);
change to
$org_search_keywords .= " " . trim(" ".$search_keyword_list);
Good Luck
BluE
EDIT: Sorry but I find out that my "fix" disable the paging function in search results.
solution 1:
search: "if ($search_keywords != "" && $show_result == 1) {"
change to: "if ($search_keywords != "" && $search_keywords != " " && $show_result == 1) {"
solution 2:
search: " $org_search_keywords .= " " . trim(" ".$search_keyword_list);
$search_keywords = $org_search_keywords;"
move to the IF-clause so that the additional " " only paste in when keywords-list exists.
-
I installed this mod today.
Works like a charmed
Being my bad self I just needed to change a few tings
Based on BlueScorpion post
http://www.4homepages.de/forum/index.php?topic=3850.msg93826#msg93826
look for
$org_search_keywords .= trim(" ".$search_keyword_list);
$search_keywords = $org_search_keywords;
change to (solution 3:)
$org_search_keywords .= " ".$search_keyword_list;
$search_keywords = trim($org_search_keywords);
based on airphoto post
http://www.4homepages.de/forum/index.php?topic=3850.msg15953#msg15953
in functions.php (4images 1.7.4)
look for
$sql = "SELECT `image_keywords` FROM ".IMAGES_TABLE." WHERE 1 order by `image_keywords` DESC";
change in to
$sql = "SELECT `image_keywords` FROM ".IMAGES_TABLE." WHERE 1 AND cat_id IN (".get_auth_cat_sql("auth_viewcat").") order by `image_keywords` DESC";
now the list show only keywords from the catagories that members/guests are allowed to view
-
I tried out the change posted by Buggy Driver to show only authenticated keywords,
in my case there is the word "geschenk" which is only a keyword in a category for registered users only, but after the change guests still get the keyword in the ajax-keyword-list.
where is the problem?
or did i missunderstand the function of this change?
greetings
bluE
-
I tried out the change posted by Buggy Driver to show only authenticated keywords,
in my case there is the word "geschenk" which is only a keyword in a category for registered users only, but after the change guests still get the keyword in the ajax-keyword-list.
where is the problem?
or did i missunderstand the function of this change?
greetings
bluE
if you choose that word do you get an images as a result?
The change just uses the existing get_auth_cat_sql("auth_viewcat") function
The result of that function is a list of all categories that the current visitor has access to
-
no i don't get the images but this works without your change of sql-statement still before.
i thought the guest won't see the keywords of "user-images" only of "guest-images"?! or isn't it?
blue
-
Sorry,
it was my mistake.
I thought this change has a bearing on my ajax-search-input-field too, but it's only for the keywordlist (title of this thread) ;)
Sry for that and thanks for help.
BluE
-
Great mod, but can this be changed so you could have more than one dropdown list say like a dropdown list for colour and one for shape and one for 3d or not. so the search would then do a search for say the colour red+AND+square+AND+3d. this way they could have 3 choices to choose from or use all three.
Would be great if could be done
Many thanks
-
Is it possible to have this mod like this?
Is it not possible to have this mod a bit modifieyed
i would like to have it like this
A B C D E F G H I J K L M N O P .............. X Y Z
-------------------------------------------------------------------
- A -
Asien Armee Acrikultur
Armut arbeit Architektur
arbeitslos arbeiter anatolien
usw usw
-----------------------------------------------------------------------
gruss
vincent
-
Hallo!
Ich habe noch 2 Probleme bei diesem Mod gefunden und behoben betreffend der Sortierung:
Vorher:
Aab
(...)
blablabla
(...)
Zzz
aaa
Äaa
Nachher mit neuem Code:
Aaa
Aab
Aeaa
(...)
blablabla
(...)
Zzz
Suche in includes/functions.php:
$array[] = $temp;
Ersetze durch:
$temp = strtr($temp, array("Ä" => "Ae", "Ö" => "Oe", "Ü" => "Ue","ä" => "ae", "ö" => "oe", "ü" => "ue"));
$array[] = ucfirst($temp);
Behobene Probleme bei der Sortierung:
Umlaute & wenn 1. Buchstabe klein ist.
Gruss Jones
-
I did little modification, based on this mod, that add keyword list to admin panel (textarea, not dropdown form).But first:
1. It will add keyword list only to form "check new images"
2. I'm not a programmer and perhaps it is no correct way to do this, but it work for me.
Open includes/functions.php, locate this code at the very bottom:
?>
Change it to the following:
// --------------- Add a list of keywords to the admin form "check new images" BEGIN -------------------------------
function get_keyword_list_admin() {
global $lang, $site_sess, $site_db;
$keyword_dropdown = "";
$keyword_dropdown .= "<textarea name=\"search_keyword_list[]\" cols=\"30\" rows=\"8\" class=\"setperpageselect\">\n";
$sql = "SELECT `image_keywords` FROM ".IMAGES_TABLE." WHERE 1 order by `image_keywords` DESC";
$result = $site_db->query($sql);
$array = array();
while(list($Name) = mysql_fetch_row($result)) {
// Commented out until enforcement of user/category/image permissions is developed
// if (!check_permission("auth_viewimage", $image_row['cat_id']) || !check_permission("auth_viewcat", $image_row['cat_id'])) {
if(!empty($Name)) {
$explode_array = explode(" ",$Name);
for($ctr=0; $ctr < count($explode_array); $ctr++){
$temp = $explode_array[$ctr];
$array[] = $temp;
}
}
}
$site_db->free_result();
$array1 = array_unique($array); // Remove duplicate values from the array
if (!empty($array1)) {
natcasesort($array1); // Sort the array by A-Z, case insensitive
foreach($array1 as $val) {
$keyword_dropdown .= $val."\n";
}
}
$keyword_dropdown .= "</textarea>\n";
return $keyword_dropdown;
}
//----------------------------- Add a list of keywords to the admin form "check new images" END ---------------------------
?>
Open admin/checkimages.php, locate this code:
$title = $lang['field_keywords_ext'].((isset($file_src)) ? get_iptc_insert_link($file_src, "keyword", "image_keywords_".$ii) : "");
Change it to the following:
$title = $lang['field_keywords_ext'].((isset($file_src)) ? get_iptc_insert_link($file_src, "keyword", "image_keywords_".$ii) : "")."<br />".get_keyword_list_admin();
-
Greetings , Im using 1.76 and in step one it says to find this
$org_search_keywords = $search_keywords;
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
however I have a different code in mine:
$org_search_keywords = $search_keywords;
$org_search_user = $search_user;
if (isset($HTTP_GET_VARS['search_terms']) || isset($HTTP_POST_VARS['search_terms'])) {
I would love to use this mod if someone can make it work for 1.7.6
-
Greetings , Im using 1.76 and in step one it says to find this
$org_search_keywords = $search_keywords;
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
however I have a different code in mine:
$org_search_keywords = $search_keywords;
$org_search_user = $search_user;
if (isset($HTTP_GET_VARS['search_terms']) || isset($HTTP_POST_VARS['search_terms'])) {
I would love to use this mod if someone can make it work for 1.7.6
I'm running this Mod succesfully with v 1.7.7.
Don't mind about the diffenrent code you pointed out. Just place the mod's code after it.
-
This Mod works fine up to 5700 Images and nearly 800 keywords in my database. But when I add some more pictures, the function get_keyword_list() in functions.php exceeds the memory limit of 32 M of my server and the searchform could not be displayed anymore.
Responsible was this line
$array1 = array_unique($array); // Remove duplicate values from the array
This line is essential, of course. So imho this mod is for small galleries only.
-
Hey DP,
Just read your post. Was thinking about adding this MOD. We anticipate our community having upwards of 10,000 - 15,000 images within a couple of years BUT the keywords will be around 70 -90.
Do you think the server memory limits of 32MB would operate properly with these fewer keywords? In other words, my question is what tips the scales, the number of keywords or the total number of images?
Thanks for any advice you can give.
Brian
-
Hey DP,
Just read your post. Was thinking about adding this MOD. We anticipate our community having upwards of 10,000 - 15,000 images within a couple of years BUT the keywords will be around 70 -90.
Do you think the server memory limits of 32MB would operate properly with these fewer keywords? In other words, my question is what tips the scales, the number of keywords or the total number of images?
Thanks for any advice you can give.
Brian
Hi Brian,
sorry for the delay.
My server is running with 32M, so there is no different to your environment. The memory limit exceeds by the function which erases keyword duplicates. This can be caused by both, number of images and number of keywords per image, imho. In your case I would give it a trial, it's not much work at all. If you try, post your experience here, please.
-
i need help
i have a problem after i use 4image 1.7.8
after i use migrate keywords to change the space to , its ok but it make problem with this mod have a look
http://www.arabmobile.mobi/c/cell/search.php
please wait until the page open
-
What mod?
-
thanks v@no
this mod
[Mod] Add a keyword list to the search form v.2
http://www.4homepages.de/forum/index.php?topic=3850
you can see 1.7.8 need , to Separates between keywords and this mod need space to Separates between keywords
see what happen here
http://www.arabmobile.mobi/c/cell/search.htm
-
in search.php replace
$search_keyword_list = implode(" ", $HTTP_POST_VARS['search_keyword_list']);
With this:
$search_keyword_list = implode(",", $HTTP_POST_VARS['search_keyword_list']);
I think this should be enough.
-
thanks thanks V@no
i make it but i have to replace another one in includes/functions.php
$explode_array = explode(" ",$Name);
replace with this
$explode_array = explode(",",$Name);
thank you againe V@no for all your help
-
hi every one
i upgrade to 4image 1.7.10
and this mod is very important for me
I have a mobile site
so it help user when they search for a mobile with some Special specifications
it was work before now
when i Choose 1 keywords ok it work and gave me Results
but when i choose 2 or more keywords using ctrl key it does't work and gave me no Results
for example
when i choose 2011 and camera
it be like this camera,2011 and no results
i thinlk it must me camera and 2011