Topic: Support/Comments for AjaxSearch  (Read 154735 times)

Pages: 1 ... 8 9 [10] 11 12 ... 30   Go Down

#181: 26-Apr-2007, 07:58 PM

redstormj
Posts: 117

Hi all, I did a search on modx forums and could not find any relevant answer.

I would like to have a snippet call that extract either the latest searches made to the database or the most popular searches, or something similar.  Is this doable?

Thanks,
Jose R. Lopez

#182: 26-Apr-2007, 08:18 PM

Foundation

rthrash
Posts: 11,351

WWW
Not in it's current form. You'd need to log all searches in order to do that.
MODx is a content managmeent framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Please help us help you when asking for assistance and read the wiki. Searching the forums from the top level helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.

#183: 26-Apr-2007, 10:10 PM

Testers

ZAP
Posts: 1,619

Although I guess it wouldn't be that hard to add this. Just create a new table for the log (with query and timestamp fields) and add a line to insert that info whenever a search is made. Once the data is saved to a table, it's just a matter of deciding how you want to display it later.
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#184: 26-Apr-2007, 10:43 PM

redstormj
Posts: 117

Thanks for the tip.  I will play with that this weekend.

Thanks.

Jose R. Lopez

#185: 27-Apr-2007, 12:27 AM

Testers

ZAP
Posts: 1,619

Another issue I had was that if someone make a search with an apostrophe character (') it generates an error. I corrected this adding the following line just after line 46 always of AjaxSearch.php file:
Code:
$searchString = str_replace("'", "\\'", $searchString);

I had this problem with version 1.0 also, and I hacked AjaxSearch.inc.php to work around it by using double quotes for the query and removing them from the search string (which allowed me to search for words with apostrophes).
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#186: 28-Apr-2007, 06:05 AM

Robsta
Posts: 120

WWW
Hi all.

I am using modx for product documentation. There will be two products, split from the top level parent. Is there a way to customised this snippet to only return results of one document branch or the other? Perhaps identifiable from the branch ultimate parent currently browsing.

I am using different templates for both branches, so I am happy to run different snippets if this is the easiest way to progress.

The other option is to include a breadcrumb path in the returned global search results.

Either way, I'm looking for the best method of the search being directed to one branch or the other, or the results being more intutive as to which branch it relates to.

I love this search snippet for the highlighting feature, so I'd like to use it if I can.

Any suggestions welcome. Thanks.
Visit CubeCartForums.org to talk serious ecommerce!
Spot the biggest mistake in business... "Backups? I'm far too busy to take backups!"
www.inspired-solutions.net

#187: 28-Apr-2007, 11:14 AM

Coding Team

kylej
Posts: 765

WWW
OK, I have updated the package for AjaxSearch to a complete 1.6 get it in the repository:

http://www.modxcms.com/AjaxSearch-490.html

#188: 28-Apr-2007, 11:37 AM

Robsta
Posts: 120

WWW
OK, I have updated the package for AjaxSearch to a complete 1.6 get it in the repository:

http://www.modxcms.com/AjaxSearch-490.html
Hi Kyle, thanks for updating the package. Is it missing 'index-ajax.php' for the root? I just get the 'loading' image running.
Visit CubeCartForums.org to talk serious ecommerce!
Spot the biggest mistake in business... "Backups? I'm far too busy to take backups!"
www.inspired-solutions.net

#189: 28-Apr-2007, 12:29 PM

Coding Team

kylej
Posts: 765

WWW
If you are using modx ver > 0.9.5 it is included with modx

#190: 28-Apr-2007, 12:38 PM

Robsta
Posts: 120

WWW
Ah right. So the 1.6 update does not need a newer version of the file? I've upgraded to 1.6 from the shipped version for modx 0.9.5 (following instructions of course), and it doesn't seem to want to work. I'll PM you the URL if I may as I don't want to add it to the post.
Visit CubeCartForums.org to talk serious ecommerce!
Spot the biggest mistake in business... "Backups? I'm far too busy to take backups!"
www.inspired-solutions.net

#191: 2-May-2007, 05:36 AM

Robsta
Posts: 120

WWW
I've reverted back to v1. Is there a way of making it be selective in which document branch to search?
Visit CubeCartForums.org to talk serious ecommerce!
Spot the biggest mistake in business... "Backups? I'm far too busy to take backups!"
www.inspired-solutions.net

#192: 2-May-2007, 07:22 PM

Coding Team

kylej
Posts: 765

WWW
No, the only way to restrict the search is by setting the documents you don't want searched to unsearchable.

#193: 2-May-2007, 10:43 PM

zee
Posts: 27

Hi, i love this snippet, thanks so much.
But there are some issues i've faced.
- In ie7 with default settings #ajaxSearch_output  isn't visible.
- AjaxSearch code isn't valid strict xhtml (i've <p> tags to form then validated.)

ps: sorry for my english.

#194: 9-May-2007, 06:39 PM

betoranaldi
Posts: 228

So here is my issue, i want to be able to search a specific container which this snippet doesnt do. but I also need to search TVs which this is the only search snippet that does do it.

Is there anyway to modify this so that it willl only search a specific parent?>

Thanks
Brian

#195: 11-May-2007, 09:20 AM

sheik
Posts: 64

I've been trying for ages to fix a problem I'm having with AjaxSearch 1.6 (the version shipped with 0.9.6-RC3).
The problem is similar to some on this thread, in that I have one call to AjaxSearch in my template, like this:
Code:
[!AjaxSearch? &AS_landing=`8` &ajaxSearch=`0` &AS_showResults=`0`!]

and my (uncached) landing page has a single call:

Code:
[!AjaxSearch? &AS_showForm=`0` &AS_showResults=`1` &extract=`1`!]

However, no search results are ever displayed.
If I turn on &ajaxSearch=`1` then results are displayed as a live popup, but this breaks the template and also is not suitable for what is supposed to be a very simple site.
You can try my live site here: http://www.maxwellmcknight.org.uk

I've checked the snippet code, and it is definitely the updated version with only one "include_once" call.

Any ideas greatly appreciated,

/\dam

#196: 11-May-2007, 08:47 PM

TrinitySEM
Posts: 22

I was going through my 0.9.5 installation's headers and I noticed a 404 on the following:

GET /assets/snippets/AjaxSearch/search.gif HTTP/1.1

I searched the code and the html and js and I'm not finding a call to search.gif

I'm wondering if anyone knows what might be causing this?

Thanks for the help!

#197: 12-May-2007, 06:23 AM

Robsta
Posts: 120

WWW
I've just noticed that the search does not take into account permissions on documents restricted to specific webusers document groups.

Ie, I have some documents that are not available without a user logging in... however the search will happily list them without the need to log in. The page is not accessible, however it's existance can be shown which is not ideal.

Using snippet version v1.0, as shipped with v0.9.5.
Visit CubeCartForums.org to talk serious ecommerce!
Spot the biggest mistake in business... "Backups? I'm far too busy to take backups!"
www.inspired-solutions.net

#198: 13-May-2007, 01:06 PM

nosebleed
Posts: 6

Call in the template:
Code:
[!AjaxSearch? &AS_showForm=`1` &language=`slovenian` &AS_landing=`30` &addJscript=`1` &extract=`1` &AS_showResults=`0` &ajaxSearch=`0` &depth=`11` !

And my result page (id=30) call looks like this:
Code:
[[AjaxSearch? &AS_showForm=`0` &AS_showResults=`1` &language=`slovenian` &ajaxSearch=`0` ]]

I hope it helps.
Thanks, it helps for me : ))
shit happens

#199: 13-May-2007, 07:06 PM


sinbad
Posts: 809

Great snippet,

however I have couple questions;
what's the css class for the "* results found for"? I think i tried all the css from the snippet page but nothing seems to help me move it.

also, any option to have different styling for the snippet call? for example one style for side bar search and one for "search.html" page?

#200: 14-May-2007, 02:10 PM


sinbad
Posts: 809

better yet,
anyone have *maybe* a simple layout where the GO button is attached to the search input and the infotext/error message is below?


Pages: 1 ... 8 9 [10] 11 12 ... 30   Go Up
0 Members and 1 Guest are viewing this topic.