Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ofuuzo

Pages: [1] 2
1
Mods & Plugins (Requests & Discussions) / Exact search
« on: August 13, 2002, 03:22:37 PM »
Hi,
I added a function whichI call a quick search dropdown list:

<form>
<select name="quick_search">
<option value="">Quick search list</option>
<option value="../search.php?search_keywords=Jan Great ">Jan</option>
<option value="../search.php?search_keywords=Nicky Best"> Nicky</option>
.......

How can I make it to search exactly  for "Jan Great" and the result of the search will be only where "Jan Great" are found and not
occurrence of "Jan Peter", "John the Great", "Jan Great",...

Can you point me in which files I have to look or how I can do that in version 1.6. 1

Thanks.
Ofuuzo

2
Mods & Plugins (Requests & Discussions) / Fixed width for thumnail
« on: August 07, 2002, 01:58:21 PM »
My media image varies in width and length, but is it it possible to make all the thumnails to have a fixed width of 150?  

- Ofuuzo

3
Tutorials / [Tutorial] Making additional field searchable
« on: August 07, 2002, 12:19:16 PM »
That is great great great!!!,

Thank you very very much.

- Ofuuzo

4
Tutorials / [Tutorial] Making additional field searchable
« on: August 06, 2002, 05:21:37 PM »
- first only a englisch version ...
- eine deutsche Version kommt bald ... oder später ... ;) ... zwischenzeitlich nutze diese Deutsche-Google-Übersetzung ...



I have added a field to the database to show not only the keywords, description, date ... . How can I make it searchable just like keywords, and description fields?

Thanks.

- Ofuuzo

5
hi,
In admin,  when I enter the following at the keywords field:
4image is good, testing man, mods and anspasungen

images.php will first remove all the ","  and it will appear in the db as follows:
4image is good  testing man  mods and anspasungen

At details.php,  I will like it to appear as I entered them:
4image is good, testing man, mods and anspasungen

Can you point me in which files I have to look or how I can do that?

Thanks in advance.

Ofuuzo

6
I have added a field to the database to show not only the keywords, description, date ... I called the field "image_date_range". I then imported from an old textfile database to 4image database the following values in "image_date_range" field:

image_Id ... image_date_range
00               ca. 1900 =>meaning approx. 1900
01               1900
02               1900-tallet => meaning 1900 to 1999
03               1950-tallet => meaning 1950 to 1959
04               1725-2001
...

I want to extend search.php (advanced search => Search the following fields) so that when a search parameter is
1800-2000, the result of the search result will be images whose date range are:
ca. 1900
1900
1900-tallet
1950-tallet
1725-2001

When the search parameter is 1900-1949, the result will be
ca. 1900
1900
1900-tallet
1725-2001

When the search parameter is 1950 - 2000, the result will be
1900-tallet
1950-tallet
1725-2001

Can you point me in which files (or functions, arguments) to do that or how I can do that?

Thanks in advance.

- Ofuuzo

7
Hi,

I have a description file for each image:
image00.jpg
image00.txt
....
image009.jpg
image009.txt

Each text file contains the following:

01;Name;'Stein'
02;Decription;testing testing
03;Keywords;stone,bigstone
....

Anyone in the house that have written a related program to import from text files into 4image database?

Thanks in advance
- Ofuuzo

8
Templates & Styles (Requests & Discussions) / Quick seach
« on: June 28, 2002, 12:24:05 PM »
I will like to add a function here I call a quick search dropdown list. For example:
<form>
    <select name="quick_search">
    <option value="">Quick search list</option>
    <option value="../search.php?search_keywords=Jan ">Jan</option>
    <option value="../search.php?search_keywords=Nicky ">Nicky</option>
     .......

Nicky and Jan exist either as image name, description or keywords.

Can you point me in which files I have to look or how I can do that in version 1.6.

Thanks.
Ofuuzo

9
Templates & Styles (Requests & Discussions) / Meta data
« on: June 17, 2002, 12:52:25 PM »
Thanks, it works.

Ofuuzo

10
Templates & Styles (Requests & Discussions) / Meta data
« on: June 17, 2002, 11:15:14 AM »
I tried to insert the follwing after
 show_image($image_row, 0, 1);
and it is not working.

$site_template->register_vars(array(
                  "meta_keywords" => $img_row['image_keywords'],            
                  "meta_description" => $img_row['image_description']
                  ));

11
Templates & Styles (Requests & Discussions) / Meta data
« on: June 16, 2002, 07:00:03 PM »
Hi,
In version 1.0, meta data can be added as follows:

file /templates/default/head.html:
  <head>
   ....
   <meta name="dc.description" content="{meta_description}">
   <meta name="dc.keywords" content="{meta_keywords}">

 ..
 </head>

and in file /details.php below  line code:

   ShowImage($img_result, URL_IMAGE_ID."=".$image_id."&amp;", 0);
 
the following is inserted;

 $site_template->register_vars(array("meta_description" =>
                   $img_result['image_description'],
                  "meta_keywords" => $img_result['image_keywords']
                  ));

Can you point me in which files I have to look or how I can do that in version 1.5.

Thanks in advance.

- Ofuuzo

12
Feedback & Suggestions / Want to make certain fields disappear
« on: May 23, 2002, 01:13:55 PM »
Hi,

If the first field has class="row1". The second field has class="row2" and it is made to disappear.  Then the third field will still be class="row1". How can I make the third field (which is now second field) to change  automatically to class="row2" ?

-Ofuuzo

13
Feedback & Suggestions / Want to make certain fields disappear
« on: May 19, 2002, 05:52:54 PM »
Thanks, it works.

- Ofuuzo

14
Feedback & Suggestions / Want to make certain fields disappear
« on: May 16, 2002, 10:56:15 AM »
Hi,
In files details.php and details.html, I would  like to make for example the field "description" disappear from the browser when an image's description field in the database contains no data. How can I do that?

- Ofuuzo

15
Feedback & Suggestions / Add two fields to the database
« on: April 23, 2002, 02:42:29 PM »
Here is an example of what you can do:
Add field(s) , example "image_test"  to the database

/global.php file
//-----------------------------------------------------
//--- Get Image Caches ------
//-----------------------------------------------------
$result = $site_db->query("SELECT image_id, cat_id, user_id, image_name, image_description, image_keywords, image_test, .............

/admin/images: near line 132 and further:
  $image_test = trim($HTTP_POST_VARS['image_test']);

................
  if (empty($error)) {
    @unlink(MEDIA_PATH."/".$cat_id."/".$old_file_name.".bak");
    ....
    $result = $site_db->query("UPDATE ".IMAGES_TABLE."
                               SET cat_id = '$cat_id', image_name = '".htmlspecialchars($image_name)."', image_description = '$image_description', image_keywords = '".htmlspecialchars($image_keywords)."', image_date = $image_date, image_active = '$image_active', image_media_file = '$new_name', image_thumb_file = '$new_thumb_name', image_allow_comments = '$image_allow_comments', image_downloads = '$image_downloads', image_votes = '$image_votes', image_rating = '$image_rating', image_hits = '$image_hits', image_test = '$image_test'
                               WHERE image_id = '$image_id'");
    if ($result) {
      remove_search_words($image_id);
      add_search_words($image_id, stripslashes($image_name), stripslashes($image_description), stripslashes($image_keywords), stripslashes($image_test) );

..............

 maketextareacode($lang['field_keywords_ext'], "image_keywords", $image['image_keywords'], $textarea_size);
  maketextareacode($lang['field_test_ext'], "image_test", $image['image_test'], $textarea_size);
..........

 makeinputcode($lang['field_keywords_contains'], "image_keywords", "", $textinput_size);
  makeinputcode($lang['field_test_contains'], "image_test", "", $textinput_size);
.....
 $image_keywords = trim($HTTP_POST_VARS['image_keywords']);
  if ($image_keywords !== "") {
    $condition .= " AND INSTR(LCASE(image_keywords),'".strtolower(htmlspecialchars($image_keywords))."')>0";
  }
  $image_test = trim($HTTP_POST_VARS['image_test']);
  if ($image_test !== "") {
    $condition .= " AND INSTR(LCASE(image_test),'".strtolower($image_test)."')>0";
  }
--------------
   makehiddencode("image_description", $image_description, 1);
    makehiddencode("image_keywords", $image_keywords, 1);
    makehiddencode("image_test", $image_test, 1);
...............

//Save to Database
      if (!$uploaderror) {
        $image_name = trim($HTTP_POST_VARS['image_name_'.$i]);
        $image_description = unhtmlspecialchars(trim($HTTP_POST_VARS['image_description_'.$i]));
        $image_test = unhtmlspecialchars(trim($HTTP_POST_VARS['image_test_'.$i]));
...............................

 $result = $site_db->query("INSERT INTO ".IMAGES_TABLE."
                                   (cat_id, user_id, image_name, image_description, image_keywords, image_test, image_date, image_active, image_media_file, image_thumb_file, image_allow_comments)
                                   VALUES ('$cat_id', '".$userinfo['user_id']."', '".htmlspecialchars($image_name)."', '$image_description', '".htmlspecialchars($image_keywords)."','$image_test', '".time()."', '$image_active', '$new_name', '$new_thumb_name', '$image_allow_comments')");
        $image_id = $site_db->get_insert_id();
...............

 for ($i = 1; $i <= $num_newimages; $i++) {
    maketableseparator($lang['image']." ".$i, 2);
    makeuploadcode($lang['image'], "file_".$i, "<br /><span class=smalltext>".$lang['allowed_mediatypes_desc'].str_replace(",",", ",$config['allowed_mediatypes'])."</span>");
    makeuploadcode($lang['thumb'], "thumb_file_".$i, "<br /><span class=smalltext>".$lang['allowed_mediatypes_desc']." jpg, gif, png</span>");
    makeinputcode($lang['field_image_name'], "image_name_".$i, "", $textinput_size);
    maketextareacode($lang['field_description_ext'],"image_description_".$i, "", $textarea_size);
    maketextareacode($lang['field_keywords_ext'], "image_keywords_".$i, "", $textarea_size)
    maketextareacode($lang['field_test_ext'], "image_test_".$i, "", $textarea_size );


/includes/functions.php: line  47
 $test = $img_result['image_test'];
 .........
 $site_template->register_vars(array("image_id" => $img_result['image_id'],
                                      "user_id" => $img_result['user_id'],
                                      "image_name" => stripslashes($img_result['image_name']),
                                      "description" => FormatText($description, 1),
                                                                             ------------
                                      "thumbnail_file_name" => $img_result['image_thumb_file'],
                                      "test" => $img_result['image_test']                          
                                      ));
  $rate_form = $site_template->parse_template("rate_form");
  $site_template->register_vars("rate_form", $rate_form);
  return true;
}

/templetes/default/details.html:
        ---------
             <tr>
                                  <td valign="top" class="row1"><b>{lang_description}</b></td>
                                  <td valign="top" class="row1">{description}</td>
                                </tr>
                                <tr>
                                  <td valign="top" class="row2"><b>{lang_keywords}</b></td>
                                  <td valign="top" class="row2">{keywords}</td>
                                </tr>
                               <tr>
                                  <td valign="top" class="row2"><b>{lang_test}</b></td>
                                  <td valign="top" class="row2">{test}</td>
                                </tr>
---------------------

/lang/english/admin.php
lang['field_test'] = "test";
$lang['field_test_ext'] = "test .......";
$lang['field_test_contains'] = "test contains";
$lang['test'] = "test:";

Hope it helps.
-Ofuuzo

Pages: [1] 2
Post your comments here