Wikipedia talk:Google Custom Search

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

How to do...[edit]

I couldn't understand how I was supposed to activate the custom search, so I looked in the "Edit" section, and saw the instructions, surrounded by HTML that I hadn't seen before. My question is, what should be done about this? --94knux (talk) 03:13, 27 October 2009 (UTC)

Safari/Chrome issues[edit]

document.write is broken on Safari/Chrome. Use the importScript() DOM loaders instead. Also on Safari due to an issues with load order, at times the GSearch won't be available before it is used. —TheDJ (talkcontribs) 13:22, 27 October 2009 (UTC)

Searching in other languages[edit]

I was testing out the contextual search and noticed a usability problem. I went to Google's wiki page and searched for "search". The first page of results all pointed to Google in other languages. Could you restrict contextual search to searching within the same language? At the very least, preference should probably be given to pages in the same language. --Agilemania (talk) 13:50, 27 October 2009 (UTC)

Google Custom search gadget[edit]

A gadget might be a better aproch for easy deployment for users. —Preceding unsigned comment added by Mdale (talkcontribs) 17:40, 27 October 2009 (UTC)

Would you be willing to support or initiate adding this feature to the gadget list of en.wikipedia.org? -- Mathias Schindler (talk) 09:11, 28 October 2009 (UTC)
I would be willing to do that, but I think it needs some work before it can be used. Esp. with regard to skin dependencies. A gadget needs to have a good safety net to prevent errors when people use it in cases where it is not supported. —TheDJ (talkcontribs) 19:15, 29 October 2009 (UTC)
One potential problem about a specific gadget, is that if we add a Google one, before you know it, MS/Yahoo will want their own gadget too of course. I guess we could draw up some sort ruleset about this, but it certainly will require a bit of discussion. —TheDJ (talkcontribs) 23:05, 30 October 2009 (UTC)

Script problems[edit]

Hi. Your scripts have a few problems. First, use importScript() to import scripts from wikipedia. Second, use importScriptURI() to import a external script (instead of document.write('<script...')). Also, I'd recommend adding the skin import to the top of each script, instead of having the user put it in their script page. ≈ MindstormsKid 00:03, 28 October 2009 (UTC)

Yup, I agree with that. The problem with using importScript, is that the loadorder on Safari/Chrome is broken (bug 28328 and friends), so you cannot DOM include a dependency script and assume it will be loaded in order. A very annoying bug. —TheDJ (talkcontribs) 11:08, 28 October 2009 (UTC)
This should be fixed now. it was already annoying the hell out of me. —TheDJ (talkcontribs) 13:05, 28 October 2009 (UTC)
Hmm, still bad. I'm not sure, but it seems that google api cannot be dom loaded because it uses document.write internally (causing the entire page to blank), and it seems that I also run into this issue. It's probably WebKit only. —TheDJ (talkcontribs) 13:54, 28 October 2009 (UTC)

I think I finally found a solution to this problem. This version: User:TheDJ/csewiki.js uses the google api autoload+callback method (avoiding the document.write()'s ). As a bonus, my version works for both monobook and vector, and loads the CSS by itself as well. I propose to merge User:Csewiki/monobook.js and User:Csewiki/vector.js into a single User:Csewiki/csewiki.js. —TheDJ (talkcontribs) 18:39, 29 October 2009 (UTC)

user account[edit]

I notice the announcement on the Google blog. I am not sure this is a proper use of a Wikipedia account. Are you an official representative of Google, or a company role accounts, and are you using us to advertise your product? I'm not saying this is a bad idea; speaking personally, I may very well like it after some testing--I like most of what Google comes up with. I'm just saying that this may not be the way to do it. Please recheck WP:USER DGG ( talk ) 03:47, 28 October 2009 (UTC)

Hi DGG, how about moving the description page (the content at User:Csewiki) to the Wikipedia name space? How about Wikipedia:Google Custom Search Gadget? -- Mathias Schindler (talk) 09:10, 28 October 2009 (UTC)
That seems like a reasonable idea. —TheDJ (talkcontribs) 11:10, 28 October 2009 (UTC)
I agree. With no objections, I'll do that later this morning if DGG doesn't get to it. Doesn't entirely solve the issue of a role account, though. Nathan T 13:17, 28 October 2009 (UTC)
Done. Nathan T 00:15, 29 October 2009 (UTC)

Two comments[edit]

Is this the right place to comment?

  1. It takes a second or two for the google search box to replace the default one. If you type anything in the default box, it then gets lost (and the focus gets lost too), which is pretty annoying. Can anything be done?
  2. It seems that you are always taken to a search results page, rather than jumping to a page that exactly matches your query. I guess this is intentional to behave more like google, and less like wikipedia. But a way to get the old behaviour back would be good. Stevage 05:02, 28 October 2009 (UTC)
Hi Stevage, I'm not sure I understand your proposal for exact matches. For instance, on the DNA article, we don't necessarily want to go to the Wikipedia article on Sequences for a "sequence" query; we might want to look at the contextual on- and off-domain results first (as well as other wikipedia articles related to sequences). If there is exactly one Wikipedia result in the first tab, and none at all in the 2nd and 3rd tabs, then it might make sense to jump. Even then the user might just be checking stuff out, to see what's available, but now we're down to "when in Rome...", and I can't speak for wikipedia users in general. (Is this last case the one for which you would prefer to see different behavior?
I don't yet know anything about wikipedia widgets, but if they are configurable then this could be a configuration option. talk) Komarek (talk) 22:17, 30 October 2009 (UTC)
Hmm, couldn't make much sense of your answer, other than "no, because...context!" But here's an example, I searched for "CX". There's an article CX, yet it didn't even feature on the first page of results. Seriously, if there's a page that matches the query exactly, that should always be the first hit. I don't see what "context" has to do with it. Even if I'm at the DNA article, like you suggest, and I search for "sequence", my search might be completely unrelated to where I am. Not having a guaranteed way of getting to sequence is very frustrating. Stevage 10:16, 6 November 2009 (UTC)

Proposed changes[edit]

I'm proposing the following changes:

  1. Move User:Csewiki/monobook.css to User:Csewiki/csewiki.css. The CSS for monobook and vector is the same, so no need for 2 pages.
    done —TheDJ (talkcontribs) 12:27, 2 November 2009 (UTC)
  2. Make the Javascripts load User:Csewiki/csewiki.css
    done —TheDJ (talkcontribs) 12:27, 2 November 2009 (UTC)
  3. Delete User:Csewiki/monobook.css and User:Csewiki/vector.css (this has no consequence for people that currently load this page.
  4. Deploy my changes User:TheDJ/csewiki.js in User:Csewiki/monobook.js. Makes it work on Safari/Chrome using autoloading and a callback, as well as some smaller style cleanup.
    Done —TheDJ (talkcontribs) 12:27, 2 November 2009 (UTC)
  5. Merge the current User:Csewiki/monobook.js and User:Csewiki/vector.js
  6. Move User:Csewiki/monobook.js to User:Csewiki/csewiki.js or go for a Gadget straightaway (will avoid even more redirects if it does become a gadget)
  7. Make User:Csewiki/monobook.js and User:Csewiki/vector.js importScript() calls for csewiki.js, for backward compatibility.

I'd love to hear some feedback, both from Google and Wiki scripters. —TheDJ (talkcontribs) 19:47, 29 October 2009 (UTC)

Thank you very much for proposing and implementing the changes. -- Mathias Schindler (talk) 12:18, 3 November 2009 (UTC)

WOAH[edit]

This is a neat experiment, but it still has some bugs that are going to be hard to get used to.

1) the old WP searchbar used to default to "I'm feeling lucky" functionality. You type "Dog," hit enter, and you go to the page for Dog. No longer.
2) A search for "user:Csewiki" is ineffectual. A search for "wp:citation needed" is also ineffectual (the first few hits are not wp:citation needed).

If this were an amateur's volunteer project, my praise would be profuse; but I see this is being advertised as a google product (that's how I found it). It's rather bizarre that Google would release a product with such crippling bugs.

I'm going to uninstall this thing for now, but I'll keep this page on my watchlist, and I'll re-install it if these bugs get addressed. Thanks for the great work. Andrew Gradman talk/WP:Hornbook 20:32, 1 November 2009 (UTC)

In other chapter[edit]

Hello, I have imported sucessfully the script in fr:wp as it was detailed in earlier version of the help guide [1]. It worked fine until yesterday, when a change was probably made here that prevents the script to load. Is there a way to reactivate it for wp other than en as I became used to it? Thanks. Moez talk 16:50, 14 November 2009 (UTC)

hmm, it seems to be working again as of now. Disregard this message. Moez talk 17:06, 14 November 2009 (UTC)

Problems with the script[edit]

I tried to live with it, but on the whole I'm finding the disappearance of my 'go' button virtually impossible to handle.

The problem is that there's no longer any way to go to a particular encyclopedia page, usually when I doing a search for it doesn't bring up the right page.

I don't think add-on is working right now, because it breaks this existing (and in an encyclopedia essential) functionality.- Wolfkeeper 18:33, 25 November 2009 (UTC)

Enable this extention in another wiki[edit]

Hello, Could i have the source of this extention?; because i want to activiate it in ar.wikipedia.org. Thanks.--ASammour (talk) 16:31, 25 November 2013 (UTC)