Author Topic: Search Category Names, Not File Names  (Read 36950 times)

0 Members and 1 Guest are viewing this topic.

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Search Category Names, Not File Names
« Reply #15 on: August 22, 2006, 06:53:02 PM »
Hi V@no & Jasmine,

i trust you guys are well... Sorry i did not get back to you but i was caught up with work :-(

Anyway, Jasmine;
Quote
WeZ: Did you wrap your template output tags with if ... endif conditionals?

From my limited knowledge, i think i did... here is my code for your review:
Code: [Select]
  {if content}
                  <table width="450" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head1">{content}</td>
                    </tr>
{if cat_wordsearch}
  <h4>category title results:</h4>
  <div style="font-size: 90%;height: 100px; border: 1px dashed #47697e; overflow: auto; background-color: #D7DED1">
<p class="text">One or more of your search criteria resulted in a match the following category names.</p>
<ul>{cat_wordsearch}</ul>
   </div>
{endif cat_wordsearch}
{if catlist}
   <!-- Start Result category list-->
  <h4>Image Category Results:</h4>
  <div style="height: 100px; border: 1px dashed #47697e; overflow: auto;">
  <p class="text">Category list of images found on this page.</p>
<ul>{catlist}</ul>
  </div>
  <h4>Pictures within these Categories:</h4>
  <!-- End Result category list-->
{endif catlist}
                  <br />
                  </table>
                  {endif content}

And one last thing, If i use your block updated of code i get an error on the line
Code: [Select]
$site_template->register_vars( 'cat_wordsearch', (empty($search_cat_result) ? "" join("\n\n<li>", $search_cat_result)) );      // add result to template
but if i use V@no's
Code: [Select]
$site_template->register_vars( 'cat_wordsearch', join("\n\n<li>", $search_cat_result) );      // add result to template
it looks fine when you search something. if you click on 'advanced search' it still gives "Warning: join() [function.join]: Bad arguments." error on the line mentioned above.

Thank-You for all your help so far guys.

Kind Regards,
WeZ

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Search Category Names, Not File Names
« Reply #16 on: August 23, 2006, 06:00:09 AM »
ops, my bad, I missed  :  just before word "join"...I've updated my reply on previous page.

P.S. next time if you see any error messages, please quote them, they can help determin where exactly is the misstake ;)
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 WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Search Category Names, Not File Names
« Reply #17 on: August 23, 2006, 12:56:04 PM »
Hi V@no,

Thanks, your line works now :-)

Jasmine, I Still need help with my search.html please  :roll:

V@no, Can you see if i am correct in my testing of the searech algorithym? i search for *vide* i get a folder "video" which is correct. But if i search for *vid* i will also get a folder "victoria". But if i test it with *vid, i do not get the "victoria" folder. i have tested it with other words and my results are that the search seems to be omitting the last character before the trailing * when one is used. I.E. a search for *vid* is actaully returning results that *vi* would return.

Where can i echo the sql statement executed to verify weather my results are true or not?

Kind Regards,
Wesley.


Offline SAD

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Туристические ФотоАльбомы
Re: Search Category Names, Not File Names
« Reply #18 on: October 03, 2006, 11:33:39 PM »
Jasmine

Code: [Select]
   }
  $site_template->register_vars( 'cat_wordsearch', (empty($search_cat_result) ? "" join("\n\n<li>", $search_cat_result)) );      // add result to template
// END MOD: Search category names for keywords

Replace

Code: [Select]
   }
$site_template->register_vars( 'cat_wordsearch', (empty($search_cat_result) ? "" : join("\n\n<li>", $search_cat_result)) );      // add result to template
// END MOD: Search category names for keywords

The sign was lost  : :)
Sergey


Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Search Category Names, Not File Names
« Reply #19 on: October 25, 2006, 09:24:29 AM »
V@no, Can you see if i am correct in my testing of the searech algorithym? i search for *vide* i get a folder "video" which is correct. But if i search for *vid* i will also get a folder "victoria". But if i test it with *vid, i do not get the "victoria" folder. i have tested it with other words and my results are that the search seems to be omitting the last character before the trailing * when one is used. I.E. a search for *vid* is actaully returning results that *vi* would return.

Hi V@no,

Please can you help me with this? the resultset is definately omitting the last characted behind the trailing *

Kind Regards,
WZ

Offline artmedia

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Fotos de chicas
Re: Search Category Names, Not File Names
« Reply #20 on: July 17, 2008, 03:17:09 AM »
Hi, this mod supports 4images 1.7.4? i have added the code for search.php after

//-----------------------------------------------------
//--- Show Search Results -----------------------------
//-----------------------------------------------------

but I just got a blank page, some idea?

My code is (i just have added your code):
« Last Edit: September 16, 2009, 03:14:21 AM by V@no »

Offline stormdesign

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Search Category Names, Not File Names
« Reply #21 on: September 16, 2009, 01:42:42 AM »
any help???

I'm using now 1. 7. 7

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Search Category Names, Not File Names
« Reply #22 on: September 16, 2009, 03:16:33 AM »
replace
  $site_template->register_vars'cat_wordsearch', (empty($search_cat_result) ? "" join("\n\n<li>"$search_cat_result)) );      // add result to template

with:
  $site_template->register_vars'cat_wordsearch', (empty($search_cat_result) ? "" join("\n\n<li>"$search_cat_result)) );      // add result to template


P.S. next time please format your post with bbcodes and if you are planning on showing code from the entire file, consider attach it to your post as an attachment (this time I did it for you), this way it won't clog up the database with unnecessary data.
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 Hagen-Roderich

  • Full Member
  • ***
  • Posts: 127
    • View Profile
    • Hof Jokers
Re: Search Category Names, Not File Names
« Reply #23 on: October 06, 2009, 09:37:18 AM »
any help???

I'm using now 1. 7. 7

I am useing v. 1.7.7 also, and it works.
Thank you all.

Offline henary

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Search Category Names, Not File Names
« Reply #24 on: December 01, 2010, 03:05:00 PM »
Hello,

i've just use this in my 1.7.9, but dosn't work  :cry: even i used fresh copy of search.php, i'll get no results in the frame.

Did anyone use this on 1.7.9?

Thanks,
Henry

EDIT:
Now I'm using this MOD http://www.4homepages.de/forum/index.php?topic=28587

Regadrs,
Henry
« Last Edit: December 12, 2010, 02:01:11 PM by henary »