Gossamer Forum
Quote Reply
Remote Search LINKS SQL
Hi,

Just wondering if someone already came up with an "Span Pages Mod" for the recently published Remote Search for Links SQL. It's really not handy to offer this plugin without that feature, because now all the results are listed on one (long) page.

More information at http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=199494#199494.

Last edited by:

cK: Jun 13, 2002, 3:32 AM
Quote Reply
Re: [cK] Remote Search LINKS SQL In reply to
That's typically how it should work. If you check out meta-search sites like http://dogpile.com, the results are parsed using xml feeds. It only displays the first page of results then has a link that takes you directly to the site to view more results (page 2).

Sean
Quote Reply
Re: [SeanP] Remote Search LINKS SQL In reply to
In Reply To:
That's typically how it should work.
Frown

Yep, but I would like to offer "Span Pages" to my partners. So I was thinking of a little tweak to count the hits, shop them by 10, and display " 1 - 2 - 3 - 4- More >>" under each page. Ideas or suggestions?
Quote Reply
Re: [cK] Remote Search LINKS SQL In reply to
I first thought it would be a minor fix, but after looking at it, it's not.

The XML plugin only does a very simple act of taking the search results, and putting them into a format that can be parsed by the XML script.

In order to do this, you'd have to modify the script on the client machine, pass in few tags, write out a few tags, and _every_ page would result in another full-call to your server.

I don't know enough about XML to know if it can return multiple data blocks. If it can, you can modify the XML plugin to return the data you need, ie: mh, nh, hits, and the content block. If the script knows the offset (page), number of links to display per page, and total number of hits returned, you can build your own span page bar. You might be able to return the span-page bar as a data block, since it will have a URL linked to your site, which will be the same on all sites.

If XML can't return different data blocks, you'd have to modify the output of the plugin to be pre-parser friendly, such that it created the different datablocks in the returned content file:

CUTME
nh = 9
mh = 10
hits = 82
CUTME
(all the returned links)

and you'd first cut the returned page at the CUTME line first, then parse that into a hash (or return it as a hash), and cut again at the CUTME block and put that into the variable that is parsed by the existing code.

Just some thoughts.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Remote Search LINKS SQL In reply to
Thanks for your input.

Indeed, creating a sort of <spaninfo>HTML CODE</spaninfo> tag at the end would be the best.

Then I could set the hit per page on ten, and send the correct spaninfo with this tag to the partnetsite. The script at the partner would them only need to display the link results and add the domain info to the span-html.

Advantage: no excess use of my search-routine (and added a span feature to this script.)
Disadvantage: all partners need to display the standard amouth of links per page (otherwise I can't calculate the correct standard span-information on a simple way.)

Advantage wins the match Cool