Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-05-06 04:21:23

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

[plugin] [ORPHAN] rss_live_search

I really can’t take too much credit for this one. Almost all of the work on this was already done by Markus Kniebes who created the LiveSearch Extension for Textpattern which in turn is based on the BitFlux LiveSearch Solution.

I made some updates for RC3, added a few options to customize your search form/results and wrapped it all up into a plugin with a simple installation/setup process. You can see it running now at wilshire|one.

Download rss_live_search

More Details

Last edited by wilshire (2006-09-26 02:22:26)

Offline

#2 2005-05-06 05:30:26

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [plugin] [ORPHAN] rss_live_search

hi,

great work! but some questions:

1. why do you use the p-tag around the formfields and not the fieldset-tag?
2. whats the intention behind the ins-tags around the results?

greetings.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#3 2005-05-06 11:55:32

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_live_search

To be honest I didn’t pay much attention to the form. I was just happy that the live searching was working.

This is the forum that Markus uses so I went with it. I’ll look at changing it to something more standard.

Offline

#4 2005-05-06 12:00:39

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [plugin] [ORPHAN] rss_live_search

ah, i see. i rewrote the form that time he released it, because it was not xhmlt1.1-conform. the ins is quite logic, because something will be inserted, but the p is at the wrong place, i think. at my page it works with fieldset.

greetings.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#5 2005-05-06 13:24:11

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: [plugin] [ORPHAN] rss_live_search

OK, this is truly awesome, but I have a question. I followed the directions, added the CSS and tags, but the live search only returns an image of my homepage. I do have a custom form for outputting search results called “search_results” but even when I add <code>searchto=“search_results”</code> as an attribute, nothing changes. Any help would be appreciated.


Kevin
(graphicpush)

Offline

#6 2005-05-06 14:02:15

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] rss_live_search

Thanks Rob, nice plugin. The styling is quite tricky however…

Oh, I think it lack a submit button. A lot of people are lost without it.

Kevin, if you have latest RC3, you don’t need the searchto (unless you know what you are doing), bu in your default section you need a a txp:article tag calling the search_results form. Use the conditionnal tags (if search and so on, look at Textbook for details) to not destroy your frontpage.

Last edited by Jeremie (2005-05-06 14:14:56)

Offline

#7 2005-05-06 15:12:10

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_live_search

Kevin – searchto is used when you actually submit the search form, not for the live search itself. What its used for is to direct the search form to post to a subdirectory. For example, my search form posts to wilshireone.com/search rather than the root directory as Textpattern does by default. It sounds like the problem your having is relating to pathing in the javascript. Is this in a subdirectory? Is it at a URL I can take a look at?

Jeremie – I could add an option to display the submit button.

Offline

#8 2005-05-06 15:38:49

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: [plugin] [ORPHAN] rss_live_search

Here is a test page with a live search on the left:

http://www.graphicpush.com/index.php?s=linkage

The actual page has this TXP code: <code><txp:rss_live_search label=“Type To Search:” searchto=“search” /></code> since I use the “search” section for all search queries (which works perfectly for normal search).


Kevin
(graphicpush)

Offline

#9 2005-05-06 15:53:26

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] rss_live_search

Thank you for this plugin, I’ve got it working already! Just one thing: I can’t figure out how to style the search input field and the ul. Can someone give me a clue?

Offline

#10 2005-05-06 16:11:07

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [plugin] [ORPHAN] rss_live_search

great plugin:

I, like Kevin get another copy of the whole page in the popup.

Updated the version, works-a like-a charm! Now for some css.

Oh, and how do you stop firefox from offering previous entries for that form, kinda gets in the way.

Last edited by mrdale (2005-05-06 17:56:38)

Offline

#11 2005-05-07 02:21:00

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [plugin] [ORPHAN] rss_live_search

my css for the livesearch:

<code>/* livesearch */
div#nav form#searchform p, div#nav form#searchform {
display:inline;
vertical-align:text-bottom;
}
div#nav label.livesearch{
padding-top:5px;
}
div#nav input#livesearch{
width:100px;
border-left:1px solid #B40101;
border-bottom:1px solid #B40101;
border-top:1px solid #EEEEEE;
border-right:1px solid #EEEEEE;
padding:0 0 0 2px;
color:#B40101;
background:#FAFAFA;
}
div#nav div#LSResult{
width:300px;
margin:1px 0px 2px 0px;
padding:5px;
border:1px solid #B40101;
color:#000000;
background:#FFFFFF;
position:absolute;
left:50%;
}
div#nav #LSResult ul{
margin-bottom:-5px;
}
div#nav div#LSResult li{
padding:2px 0;
display:block;
line-height:15px;
text-align:left;
}
div#nav #LSResult ul li{
padding:0px 15px 3px 0;
}
/* ende livesearch */</code>


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#12 2005-05-07 06:48:05

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] rss_live_search

Ah thank you, that’s a great help!

Offline

#13 2005-05-10 04:33:14

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_live_search

Updated to version 0.2. I would highly recommend upgrading if you’ve installed version 0.1. Quite a bit of new features and fixes.

Version 0.2

  • Fix to allow navigation of search results using arrow keys and selection of a result using enter. If no result is selected, enter will run a normal textpattern search.
  • Changed HTML structure to use divs rather than unordered list for more flexibility.
  • Added ability to use a Textpattern article form for displaying search results.
  • Added ability to show posted date in addition to title if not using a form.
  • Added ability to add a submit button and specify the button label.
  • Added ability to add a value to the input field and set the size of the input field. You can also turn off autocomplete on the input field.

The latest version is in use on my site.

Download rss_live_search 0.2

Full Documentation

Offline

#14 2005-05-14 15:35:40

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] rss_live_search

When I want to install rss_live_search 0.2, in the preview I see this around line 46:

<code> print ‘<?xml version=
Warning: Unexpected character in input: ‘\’ (ASCII=92) state=1 in /home/httpd/vhosts/doggiez.nl/httpdocs/textpattern/include/txp_plugin.php on line 152
’1.0\’ encoding=\‘utf-8\’ ?>’;
</code><br />
So I haven’t installed it yet, because I don’t know what it means. Can anyone tell me?

Offline

#15 2005-05-17 16:14:31

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_live_search

doggiez – I’ve never seen that. It looks like its just having an problem parsing the file for some reason. If you try installing, it should work. The line just reads <code>print ‘<?xml version=\‘1.0\’ encoding=\‘utf-8\’ ?>’;</code> which seems fine to me.

Also, I’ve updated the download to 0.2.1 to fix a minor problem caused by searching for the “0” (thats the number zero).

Download rss_live_search 0.2.1

Last edited by wilshire (2005-05-17 16:15:07)

Offline

Board footer

Powered by FluxBB