Feature Requests item #629205, was opened at 2002-10-26 12:33
Message generated for change (Comment added) made by shawnkhall
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=432069&aid=629205&group_id=42081

Category: Interface Improvements (example)
Group: Next Release (example)
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhanced LocalAliases.

Initial Comment:
Hey There,

Once again, this product is the sh*t... use it constantly.  
However, I think that this feature would be great:

Enable JavaScript function processing of the %s variable 
in localaliases.txt.

I ran into this situation when added google's new 
ANSWER beta (https://answers.google.com) site as an 
alias.  The seach terms have to be escaped (as you 
know) with the JavaScript encode() function.  

I'm aware that you already do this for the std. Google 
search, so maybe you can just expose this functionality 
in the aliases?

If there's a way to do this now, please let me know.

Thanks!

Shanon Levenherz
[EMAIL PROTECTED]

----------------------------------------------------------------------

>Comment By: Shawn K. Hall (shawnkhall)
Date: 2005-01-25 02:57

Message:
Logged In: YES 
user_id=219805

localprefs.js can be used for this functionality, use the jsx 
search to actually run a procedure you create within 
localprefs.js

----------------------------------------------------------------------

Comment By: Glenn Carr (glenncarr)
Date: 2002-12-03 06:16

Message:
Logged In: YES 
user_id=18127

[from Shanon]
Here's some mo' info...

I've been using the %s in localaliases.txt for quite sometime, 
but
sometimes, we need to modify the %s string before 
substitution in the URL.
For example, when entering terms into a search engine, the 
space is replaced
with a '%20' in some cases, and a '+' in others.  I realize that 
you already
escape the %s string automatically, but sometimes we (1) 
don't want to
escape it or (2) want to escape it in a certain way.

here's what i have in localaliases.txt:

answers|https://answers.google.com/answers/main?
cmd=search&qtype=all&q=%s

however, the %s is not escaped so when i type: 'answers 
some query here'

i get this url:

https://answers.google.com/answers/main?
cmd=search&qtype=all&q=some%20query%
20here

which is totally cool.  But, say that i wanted to change 
spaces into pluses
('+') instead of %20 (form-encoded).  If there was a file, say
localjavascript.js, or something, that we could point to in 
localaliases.tx
to generate the url, that would give a lot more power to the 
user ( or
developer in my case).

here's an example localaliases.txt entry:
answers|javascript:someFunction
('https://answers.google.com/answers/main?cmd
=search&qtype=all&q=','%s');

the function, someFunction(url,str), would do something like 
this:

// this is pseudocode...
function someFunction(url,str)
{
    // replace all occurences of space with '+'

    // append str to url.

    // return url.
}

i hope this gives you an idea of what i'm asking for.  this is 
definitely a
low priority enhancement, but i think it would be really cool.  i 
mean, i
use this search bar constantly so anyway to speed my 
shortcuts up is very
beneficial to me.


----------------------------------------------------------------------

Comment By: Glenn Carr (glenncarr)
Date: 2002-12-02 15:04

Message:
Logged In: YES 
user_id=18127

Not sure I understand.  If %s is used in localaliases.txt, it is 
replaced with the search string currently.  Can you elaborate?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=432069&aid=629205&group_id=42081


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to