4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2018, 07:44:08 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support)
| | |-+  Tutorials (Moderators: mawenzi, Rembrandt)
| | | |-+  [Tutorial] Making additional field searchable
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: «« « 1 2 3 4 [5] Print
This topic has not yet been rated!
Author Topic: [Tutorial] Making additional field searchable  (Read 141948 times)
Bob
Jr. Member
**
Offline Offline

Posts: 79

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #60 on: May 28, 2008, 04:31:01 PM »

keiner?

Sad
Logged
Nicky
Administrator
4images Guru
*****
Offline Offline

Posts: 3195

Thank You
-Given: 26
-Receive: 54


View Profile
« Reply #61 on: June 05, 2008, 12:51:21 PM »

hi Bob,

lass mal deine seite sehen..
Logged

cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi
Bob
Jr. Member
**
Offline Offline

Posts: 79

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #62 on: June 05, 2008, 05:10:53 PM »

Seite zeigen geht nich ist vorerst auf Lokalem Linux Rechner muss noch einige Test und Mods einbauen und ne Domain bestellen Wink

Was ich zusätzlich suchbar machen möchte:
Suche nach PLZ
Suche nach Gender
Suche nach Land

ansonsten ist alles was man als suche braucht vorhanden Smile

Villt kannst ja ein Paar Tipps geben Wink
Logged
runway27r
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #63 on: October 15, 2008, 08:11:33 PM »

One Problem occured when I installed this MOD and I can't seem to find the problem.

The Radio button appears for the field I added, but not the title of the field.

Look here:

http://www.phlairline.com/apw/search.php

It's the field under all fields. Any pointers where I may have gone wrong?

Thanks
Logged

Melder
Jr. Member
**
Offline Offline

Posts: 89

Thank You
-Given: 3
-Receive: 1


View Profile
« Reply #64 on: February 05, 2010, 02:09:05 PM »

Hallo,

Ich habe auf meiner Homepage nun einige Felder zur Suche hinzugefügt, funktioniert einwandfrei !!

Nun noch eine Frage: Besteht die Möglichkeit, das Radio-Button-Feld so umzubauen, dass man mehrere Felder anwählen kann?
Hier meine aktuelle Suche: http://www.mrn-blaulichter.de/search.php
Auf meiner Seite dann z.B. "Bildname" und "Kennzeichen bzw. Funkrufname"

Gruß Achim
Logged
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #65 on: February 05, 2010, 02:39:26 PM »

@Melder ...

... dies hier ...
... [MOD] Dropdown options for custom database fields : http://www.4homepages.de/forum/index.php?topic=7112.0 ...
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
Melder
Jr. Member
**
Offline Offline

Posts: 89

Thank You
-Given: 3
-Receive: 1


View Profile
« Reply #66 on: February 05, 2010, 06:29:20 PM »

Hi,

ich glaube, Du hast mich falsch verstanden, oder ich verstehe den verlinkten MOD nicht!  Embarassed
Ich möchte kein Dropdown-Menü, sondern, dass man bei einer Suche ZWEI der "Radio-Buttons" gleichzeitig anwählen kann, sodass die Suche in beiden Feldern durchgeführt wird! z.B. "Fahrgestell" und "Aus-/Aufbauhersteller"!

Vielen Dank für Deine Hilfe
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #67 on: February 05, 2010, 07:47:38 PM »

... dass man bei einer Suche ZWEI der "Radio-Buttons" gleichzeitig anwählen kann, ...
bei radio buttons gibt es keine multiple auswahl, die einzige möglichkeit die du hast ist das du unterschiedliche namen vergibst.
<input type="radio" name="search_fields_kennzeichen" value="kennzeichen" /> Nur Kennzeichen bzw. Funkrufname</td>
<input type="radio" name="search_fields_baujahr" value="baujahr" /> Nur Baujahr</td>
<input type="radio" name="search_fields_aufbau" value="aufbau" /> Nur Auf-/Ausbauhersteller</td>
<input type="radio" name="search_fields_fahrgestell" value="fahrgestell" /> Nur Fahrgestell</td>
<input type="radio" name="search_fields_urheber" value="urheber" /> Nur Urheber</td>

nur ob dann noch die suche geht mußt du ausprobieren, b.z.w. müßtest du in der search.php änderungen vornehmen.

wenn du das ganze mit einen optionsfeld machst, könnest du eine multiple auswahl machen.

Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Melder
Jr. Member
**
Offline Offline

Posts: 89

Thank You
-Given: 3
-Receive: 1


View Profile
« Reply #68 on: February 05, 2010, 08:42:30 PM »

Also erstmal danke für die Hilfe,

mit den verschiedenen Namen funktioniert die Suche leider nicht mehr richtig, mit einem Optionsfeld kenne ich mich nicht aus und so wichtig, dass ich einen von Euch damit beschäftigen will, ist es nicht! Laughing
Da habe ich andere Baustellen offen Cool

Gruß Achim
Logged
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #69 on: January 15, 2011, 06:02:24 AM »

Hallo,

wie man die image_......  und user_..... Tabele durchsucht ist einfach.

ich versuche aber ein anderes FELD durchsuchbar zu machen.

habe alle schritte schon gemacht

tabele erweitert
1
ALTER TABLE 4images_wordmatch ADD headline_match TINYINT(1) DEFAULT '0' NOT NULL;

in search_utillitis.php
eingefügt
1
2
3
4
5
6
7
$search_match_fields = array(
  
"image_name" => "name_match",
  
"image_description" => "desc_match",
 
"image_keywords" => "keys_match",
  
"pin_headline" => "headline_match"
  
);

db_field_definition.php

eingefügt
1
$additional_pin_fields['pin_headline'] = array($lang['pin_headline'], "tinyint"0);

aber bei der search.php da komme ich nicht weiter

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: search.php                                           *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'search';

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/search_utils.php');
error_reporting(E_ALL);
$org_search_keywords $search_keywords;
$org_search_user $search_user;

if (isset(
$HTTP_GET_VARS['search_terms']) || isset($HTTP_POST_VARS['search_terms'])) {
  
$search_terms = isset($HTTP_POST_VARS['search_terms']) ? $HTTP_POST_VARS['search_terms'] : $HTTP_GET_VARS['search_terms'];
  
$search_terms $search_terms == "all" 0;
}
else {
  
$search_terms 0;
}

if (isset(
$HTTP_GET_VARS['search_fields']) || isset($HTTP_POST_VARS['search_fields'])) {
  
$search_fields = isset($HTTP_POST_VARS['search_fields']) ? trim($HTTP_POST_VARS['search_fields']) : trim($HTTP_GET_VARS['search_fields']);
}
else {
  
$search_fields "all";
}

$search_cat $cat_id;

$search_id = array();

if (
$search_user != "" && $show_result == 1) {
  
$search_user str_replace('*''%'trim($search_user));
  
$sql "SELECT ".get_user_table_field("""user_id")."
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_name")." LIKE '$search_user'";
  
$result $site_db->query($sql);
  
$search_id['user_ids'] = "";
  if (
$result) {
    while (
$row $site_db->fetch_array($result)) {
      
$search_id['user_ids'] .= (($search_id['user_ids'] != "") ? ", " "").$row[$user_table_fields['user_id']];
    }
    
$site_db->free_result($result);
  }
}

if (
$search_keywords != "" && $show_result == 1) {
  
$split_words prepare_searchwords($search_keywordstrue);

  
$match_field_sql = ($search_fields != "all" && isset($search_match_fields[$search_fields])) ? "AND m.".$search_match_fields[$search_fields]." = 1" "";
  
$search_word_cache = array();
  for (
$i 0$i sizeof($split_words); $i++) {
    if (
$split_words[$i] == "and" || $split_words[$i] == "und" || $split_words[$i] == "or" || $split_words[$i] == "oder" || $split_words[$i] == "not") {
      
$search_word_cache[$i] = ($search_terms) ? "and" $split_words[$i];
    }
    else {
      
$sql "SELECT m.image_id
              FROM ("
.WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m)
              WHERE w.word_text LIKE '"
.addslashes(str_replace("*""%"$split_words[$i]))."'
              AND m.word_id = w.word_id
              
$match_field_sql";
      
$result $site_db->query($sql);
      
$search_word_cache[$i] = array();
      while (
$row $site_db->fetch_array($result)) {
        
$search_word_cache[$i][$row['image_id']] = 1;
      }
      
$site_db->free_result();
    }
  }

  
$is_first_word 1;
  
$operator "or";
  
$image_id_list = array();
  for (
$i 0$i sizeof($search_word_cache); $i++) {
    if (
$search_word_cache[$i] == "and" || $search_word_cache[$i] == "und" || $search_word_cache[$i] == "or" || $search_word_cache[$i] == "oder" || $search_word_cache[$i] == "not") {
      if (!
$is_first_word) {
        
$operator $search_word_cache[$i];
      }
    }
    elseif (
is_array($search_word_cache[$i])) {
      if (
$search_terms) {
        
$operator "and";
      }
      foreach (
$search_word_cache[$i] as $key => $val) {
        if (
$is_first_word || $operator == "or" || $operator == "oder") {
          
$image_id_list[$key] = 1;
        }
        elseif (
$operator == "not") {
          unset(
$image_id_list[$key]);
        }
      }
      if ((
$operator == "and" || $operator == "und") && !$is_first_word) {
        foreach (
$image_id_list as $key => $val) {
          if (!isset(
$search_word_cache[$i][$key])) {
            unset(
$image_id_list[$key]);
          }
        }
      }
    }
    
$is_first_word 0;
  }

  
$search_id['image_ids'] = "";
  foreach (
$image_id_list as $key => $val) {
    
$search_id['image_ids'] .= (($search_id['image_ids'] != "") ? ", " "").$key;
  }
  unset(
$image_id_list);
}

if (
$search_new_images && $show_result == 1) {
  
$search_id['search_new_images'] = 1;
}

if (
$search_cat && $show_result == 1) {
  
$search_id['search_cat'] = $search_cat;
}

if (!empty(
$search_id)) {
  
$site_sess->set_session_var("search_id"serialize($search_id));
}

include(
ROOT_PATH.'includes/page_header.php');

$num_rows_all 0;
if (
$show_result == 1) {
  if (empty(
$search_id)) {
    if (!empty(
$session_info['search_id'])) {
      
$search_id unserialize($session_info['search_id']);
    } else {
      
$search_id unserialize($site_sess->get_session_var("search_id"));
    }
  }

  
$sql_where_query "";

  if (!empty(
$search_id['image_ids'])) {
    
$sql_where_query .= "AND i.image_id IN (".$search_id['image_ids'].") ";
  }

  if (!empty(
$search_id['user_ids'])) {
    
$sql_where_query .= "AND i.user_id IN (".$search_id['user_ids'].") ";
  }

  if (!empty(
$search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    
$new_cutoff time() - 60 60 24 $config['new_cutoff'];
    
$sql_where_query .= "AND i.image_date >= $new_cutoff ";
  }

  if (!empty(
$search_id['search_cat']) && $search_id['search_cat'] != 0) {
    
$cat_id_sql 0;
    if (
check_permission("auth_viewcat"$search_id['search_cat'])) {
      
$sub_cat_ids get_subcat_ids($search_id['search_cat'], $search_id['search_cat'], $cat_parent_cache);
      
$cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty(
$sub_cat_ids[$search_id['search_cat']])) {
        foreach (
$sub_cat_ids[$search_id['search_cat']] as $val) {
          if (
check_permission("auth_viewcat"$val)) {
            
$cat_id_sql .= ", ".$val;
          }
        }
      }
    }
    
$cat_id_sql $cat_id_sql !== "AND i.cat_id IN ($cat_id_sql)" "";
  }
  else {
    
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");
    
$cat_id_sql $cat_id_sql !== "AND i.cat_id NOT IN (".$cat_id_sql.")" "";
  }

  if (!empty(
$sql_where_query)) {
    
$sql "SELECT COUNT(*) AS num_rows_all
            FROM "
.IMAGES_TABLE." i
            WHERE i.image_active = 1 
$sql_where_query
            
$cat_id_sql";
    
$row $site_db->query_firstrow($sql);
    
$num_rows_all $row['num_rows_all'];
  }
}

if (!
$num_rows_all && $show_result == 1)  {
  
$msg preg_replace("/".$site_template->start."search_keywords".$site_template->end."/"$search_keywords$lang['search_no_results']);
}

//-----------------------------------------------------
//--- Show Search Results -----------------------------
//-----------------------------------------------------
if ($num_rows_all && $show_result == 1)  {
  
$link_arg $site_sess->url(ROOT_PATH."search.php?show_result=1");

  include(
ROOT_PATH.'includes/paging.php');
  
$getpaging = new Paging($page$perpage$num_rows_all$link_arg);
  
$offset $getpaging->get_offset();
  
$site_template->register_vars(array(
    
"paging" => $getpaging->get_paging(),
    
"paging_stats" => $getpaging->get_paging_stats()
  ));

  
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }

  
$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
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
          LIMIT 
$offset$perpage";
  
$result $site_db->query($sql);

  
$thumbnails "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)) {
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
    
show_image($image_row"search");
    
$thumbnails .= $site_template->parse_template("thumbnail_bit");
    
$thumbnails .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$thumbnails .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$i 0$i $leftover$i++) {
        
$thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$thumbnails .= "</tr>\n";
    }
  }
  
$thumbnails .= "</table>\n";
  
$content $thumbnails;
  unset(
$thumbnails);
// end if
else {
  
$site_template->register_vars(array(
    
"search_keywords" => format_text(stripslashes($org_search_keywords), 2),
    
"search_user" => format_text(stripslashes($org_search_user), 2),
    
"lang_search_by_keyword" => $lang['search_by_keyword'],
    
"lang_search_by_username" => $lang['search_by_username'],
    
"lang_new_images_only" => $lang['new_images_only'],
    
"lang_search_terms" => $lang['search_terms'],
    
"lang_or" => $lang['or'],
    
"lang_and" => $lang['and'],
    
"lang_category" => $lang['category'],
    
"lang_search_fields" => $lang['search_fields'],
    
"lang_all_fields" => $lang['all_fields'],
    
"lang_name_only" => $lang['name_only'],
    
"lang_description_only" => $lang['description_only'],
    
"lang_keywords_only" => $lang['keywords_only'],
    
"category_dropdown" => get_category_dropdown($cat_id)
  ));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      if (isset(
$lang[$key.'_only'])) {
        
$additional_field_array['lang_'.$key.'_only'] = $lang[$key.'_only'];
      }
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }
  
$content $site_template->parse_template("search_form");
}

// [MOD] Slideshow with HIGHSLIDE START

if ($num_rows_all && $show_result == 1)  {
 
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name,  i.image_date, i.image_active, i.image_media_file, i.image_thumb_file".$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
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          AND i.cat_id IN ("
.get_auth_cat_sql("auth_viewimage").")
          AND image_media_file like '%JPG' or '%jpg'
          ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."";
  
$result $site_db->query($sql);
  
$num_rows $site_db->get_numrows($result);
  
$highslide_js "";
if (
$num_rows) {

	


$highslide_link "<p style=\"text-align: center;\">

	


<a id=\"thumb1\" class='highslide' href='javascript:;' onclick=\"document.getElementById('gallery').onclick(); return false;\"><b>Slideshow<b></a>

	


</p>"
;
  
$count 0;
  
$bgcounter 0;
  
$slideshow_highslide "<div class=\"highslide-gallery hidden-container\" bgcolor=\black\">\n";
  while (
$image_row $site_db->fetch_array($result)){
       
$slideshow_highslide .= "<a class=\"highslide\" id=\"gallery\" href=\"./".MEDIA_DIR."/".$image_row['cat_id']."/".$image_row['image_media_file']."\" title=\"".$image_row['image_name']."\" onclick=\"return hs.expand(this, miniGalleryOptions1)\"><img src=\"".ROOT_PATH.THUMB_DIR."/".$image_row['cat_id']."/".$image_row['image_media_file']."\"></a>\n";
  }
// end while
  
$slideshow_highslide .= "</div>";
    
$highslide_js .= "\n<script type=\"text/javascript\" src=\"".ROOT_PATH."js/highslide/highslide-full.js\"></script>\n";
    
$highslide_js .= "\n<script type=\"text/javascript\" src=\"".ROOT_PATH."js/highslide/highslide_cfg_slide.js\" charset=\"utf-8\"></script>";
    
$highslide_js .= "\n<link rel=\"stylesheet\" type=\"text/css\" href=\"".ROOT_PATH."js/highslide/highslide.css\" />\n";
//    $highlslide_js .= "";
  
$highslide_js .= "</script>\n";
 }
$site_template->register_vars(array(
  
"highslide_link" => $highslide_link,
  
"highslide_js" => $highslide_js,
  
"slideshow_highslide" => $slideshow_highslide,
  
"highslide" => $highslide_js
));
}
// [MOD] Slideshow with HIGHSLIDE END

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['search']."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"content" => $content,
  
"msg" => $msg,
  
  
"clickstream" => $clickstream,
  
"lang_search" => $lang['search']
));
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>

Die Tabelen Struktur sieht wie auf dem folgendem bild aus

PIN  ----->  pin_headline




an der search.php scheitere ich. Könnte sich das jemand ansehn?

Es wurde auch schon öfters im forum nach Durchsuchbaren Komentar feldern gefragt, man könnte diese erweiterung dann auch dafür verwenden.

gruß



nachtrag

ich habe schon in der search.php

finden

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if ($search_user != "" && $show_result == 1) {
  
$search_user str_replace('*''%'trim($search_user));
  
$sql "SELECT ".get_user_table_field("""user_id")."
          FROM "
.USERS_TABLE."
          WHERE "
.get_user_table_field("""user_name")." LIKE '$search_user'";
  
$result $site_db->query($sql);
  
$search_id['user_ids'] = "";
  if (
$result) {
    while (
$row $site_db->fetch_array($result)) {
      
$search_id['user_ids'] .= (($search_id['user_ids'] != "") ? ", " "").$row[$user_table_fields['user_id']];
    }
    
$site_db->free_result($result);
  }
}

danach einfügen

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if ($search_pin != "" && $show_result == 1) {
  
$search_pin str_replace('*''%'trim($search_pin));
  
$sql "SELECT ".get_pin_table_field("""pin_id")."
          FROM "
.PIN_TABLE."
          WHERE "
.get_pin_table_field("""pin_headline")." LIKE '$search_pin'";
  
$result $site_db->query($sql);
  
$search_id['pin_ids'] = "";
  if (
$result) {
    while (
$row $site_db->fetch_array($result)) {
      
$search_id['pin_ids'] .= (($search_id['pin_ids'] != "") ? ", " "").$row[$user_table_fields['pin_id']];
    }
    
$site_db->free_result($result);
  }
}

und in der global.php
finde
1
2
3
4
5
6
7
8
9
if (isset($HTTP_POST_VARS['search_user']) || isset($HTTP_GET_VARS['search_user'])) {
  
$search_user = (isset($HTTP_POST_VARS['search_user'])) ? trim($HTTP_POST_VARS['search_user']) : trim($HTTP_GET_VARS['search_user']);
  if (
$search_user != "") {
    
$show_result 1;
  }
}
else {
  
$search_user "";
}

danach einfügen

1
2
3
4
5
6
7
8
9
if (isset($HTTP_POST_VARS['search_pin']) || isset($HTTP_GET_VARS['search_pin'])) {
  
$search_pin = (isset($HTTP_POST_VARS['search_pin'])) ? trim($HTTP_POST_VARS['search_pin']) : trim($HTTP_GET_VARS['search_pin']);
  if (
$search_pin != "") {
    
$show_result 1;
  }
}
else {
  
$search_pin "";
}

erweitert
« Last Edit: January 15, 2011, 06:23:51 AM by kubiczek » Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #70 on: January 15, 2011, 06:27:36 AM »

werden die werte der "pin" tabelle in die "wordmatch" tabelle eingetragen, nein oder?

das problem ist das dein array "$additional_pin_fields" nirgends ausgelesen wird und in die "wordmatch" tabelle eingetragen wird.
ich würde an deiner stelle versuchen die felder der "4images_pin" tabelle in die "4images_images" tabelle einzutragen, dazu müßtest du den pin mod dahingehend umändern.
dann wäre es ein leichtest die "wordmatch" tabelle mit den werten der pin felder zu füllen. 
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Pages: «« « 1 2 3 4 [5] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.069 seconds with 21 queries.