Author Topic: Adding a search box?  (Read 5710 times)

0 Members and 1 Guest are viewing this topic.

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Adding a search box?
« on: March 04, 2003, 04:16:37 PM »
Is there a built in search functionality? I owuld like to search all albumn names, sometimes I forget if I already have a category established for a particular series.
Thanks  :P

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Adding a search box?
« Reply #1 on: March 04, 2003, 07:44:29 PM »
If you look at the templates, you'll find the search on most of the pages.  There's also an advanced search page.

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Adding a search box?
« Reply #2 on: March 06, 2003, 06:58:18 AM »
Well, I am using a custom template.. I copy and pasted the search box code and it makes a beauatiful box on my form but it doesn't work.. WHen I type in my search term and click search I get a page can't be displayed error with this in the browser address:

http://www.site.com/4images/%7burl_search%7d

Here is the code I copy and pasted in to my header file.. Can anybody point me in the right direction? I'm sorta' new to all this  :roll:


Code: [Select]
<body>
<table width="238" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="233" border="0" cellspacing="0" cellpadding="0" class="tablehead">
<tr>
<td width="1"><img src="{template_url}/images/header_left.gif" width="1" height="60" alt="" /></td>
<td width="1"></td>
<td width="225" align="right">
<form method="post" action="{url_search}">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td><input type="text" name="search_keywords" size="15" class="searchinput" /></td>
<td><input type="submit" value="{lang_search}" class="button" name="submit" /></td>
</tr>
<tr valign="top">
<td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
</tr>
</table>
</form>
</td>
<td align="right" width="6"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
[/list]

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Adding a search box?
« Reply #3 on: March 06, 2003, 10:17:14 AM »
u probably using Dreamweaver, it did it for me several times too.
go through your templates and look for
Code: [Select]
%7burl_search%7d
replace it with
Code: [Select]
{url_search}
Your first three "must do" before you ask a question:
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)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Adding a search box?
« Reply #4 on: March 06, 2003, 04:13:10 PM »
That seemed to fix it BUT the search is not producing desirable results. Will it search category names? I have 200+ categories and I forget where they are sometimes so I like to search for the name to locate them. I have typed in a dozen categories with no luck  :( Any ideas? Thanks!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Adding a search box?
« Reply #5 on: March 06, 2003, 04:31:28 PM »
Quote from: TedAppleberry
That seemed to fix it BUT the search is not producing desirable results. Will it search category names? I have 200+ categories and I forget where they are sometimes so I like to search for the name to locate them. I have typed in a dozen categories with no luck  :( Any ideas? Thanks!

no, search does not search in categories names, it search in keywords, that been created from image names, when they added.
and there is no a MOD for that either
Your first three "must do" before you ask a question:
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)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Adding a search box?
« Reply #6 on: March 06, 2003, 04:33:38 PM »
OK, easy enough. From now on I'll just add the category as a keyword  :) Thanks!

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Adding a search box?
« Reply #7 on: March 06, 2003, 05:25:23 PM »
Quote from: TedAppleberry
OK, easy enough. From now on I'll just add the category as a keyword  :) Thanks!


Scratch that, keywords't can be associated with categories only images? I have 3000 images in about 125 categories, not an easy task trying to retroactively assign a keyword to each image!

Who wants to write a neat script which will populate the keyword of each image with its category name  8O A big pat on the back to the first volunteer  :D