Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-10-11 01:02:35

ax
Plugin Author
From: Germany
Registered: 2009-08-19
Posts: 165

Plugin to search for image category titles needed

Looking for paid development to program a specialised plugin to search for image category titles. The functionality should be similar as in rah_file_search or rah_link_search, including the update of search_result_count. Anybody?

Offline

#2 2014-10-11 08:46:21

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Plugin to search for image category titles needed

ax wrote #284712:

Looking for paid development to program a specialized plugin to search for image category titles.

You want to pay or to be paid? :) I’m pretty sure etc_search can do it, just explain a little better what you need.

Offline

#3 2014-10-11 11:49:44

ax
Plugin Author
From: Germany
Registered: 2009-08-19
Posts: 165

Re: Plugin to search for image category titles needed

etc wrote #284724:

You want to pay or to be paid? :) I’m pretty sure etc_search can do it, just explain a little better what you need.

The application is a non-profit website with several hundred images that are categorised by image categories. Image galleries are constructed using for each category. So, /section/?c=category&context=image will display one image gallery, with annotations (image names and captions) for each image, and with the category name as the page title. Therefore, the image galleries are not associated with articles, but with image categories only.

Now, in order to find an image gallery, I need a search function, that returns the gallery name. So when the user enters “hound”, the search function should return the categories “greyhounds, foxhounds etc.”, so that the user can chose which image gallery to display. But this website is not on dogs.

Offline

#4 2014-10-11 12:33:54

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Plugin to search for image category titles needed

It should suffice (after installing etc_search) to

  • replace <txp:article /> in <txp:if_search /> section with <txp:etc_search_results />;
  • create (admin-side) a custom-type etc_search query (say, id=1):
    • query string SELECT name FROM txp_category WHERE {name,title} AND type='image'
    • content <txp:category type="image" link="1" name="{name}"><txp:category type="image" name="{name}" title="1" /></txp:category>
  • call <txp:etc_search id="1" /> to display the search input field, or <txp:etc_search id="0,1" /> if you want to extend the default search.

If this works, we can fine-tune it further.

Last edited by etc (2014-10-11 12:34:50)

Offline

#5 2014-10-12 07:35:53

ax
Plugin Author
From: Germany
Registered: 2009-08-19
Posts: 165

Re: Plugin to search for image category titles needed

Thanks etc! I can actually search for image categories now, and use the search results to make links with the image categories.

Only, I have to sort out how to restrict etc_search to one specific section, beause I am using regular search and rah_file_search or rah_link_search for other sections. Will work on this later.

Offline

#6 2014-10-12 09:45:46

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Plugin to search for image category titles needed

OK, I will then optimize the code for sections/categories and release it shortly.

Offline

#7 2014-10-13 11:01:48

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Plugin to search for image category titles needed

Done, please resave your search query as category-type.

Offline

Board footer

Powered by FluxBB