Add a <link> tag on search engine pages to install the search engine

RESOLVED FIXED in 3.2

Status

addons.mozilla.org Graveyard
Search Plugins
RESOLVED FIXED
11 years ago
3 years ago

People

(Reporter: clouserw, Assigned: clouserw)

Tracking

unspecified

Details

Attachments

(2 attachments)

(Assignee)

Description

11 years ago
This was originally from bug 404373#13 but I think it should be it's own bug:

> Basil Hashem [:baz]   2008-01-18 19:38:37 PST
(In reply to comment #13)
> With the new design on AMO v3.2 search engines are now each getting a dedicated
> page like any other addon. Please consider adding a <link rel> type tag into
> the page header so that users can install those engines via the Firefox Search
> bar. The behavior is that Firefox would highlight in blue if that engine is not
> installed.
> 
> See
> http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#Autodiscovery_of_search_plugins.
> Apparently, you are allowed to publish more than one search engine for
> autodiscovery so we don't necessarily have to take out the current AMO Search
> autodiscovery that's there right now.
>
Target Milestone: --- → 3.2
(Assignee)

Updated

11 years ago
Depends on: 417722
(Assignee)

Comment 1

11 years ago
Created attachment 308953 [details] [diff] [review]
add <link>

Add a check for a search engine.  Pretty sure this is all we need.  We could easily move this logic into the controller if we wanted too.
Attachment #308953 - Flags: review?
(Assignee)

Updated

11 years ago
Attachment #308953 - Flags: review? → review?(fwenzel)

Comment 2

11 years ago
When search engines appear on a list, like as search results or in a category listing, do we need to add the link tags too (one for each of them)?
(Assignee)

Comment 3

11 years ago
I don't see much benefit to that, so I'd vote no.

Comment 4

11 years ago
Okay I like your patch but I think you should add the code to the controller instead because it makes an assumption about the $addon array that may not be true for each and every case where $addon is used as a view variable. So I think it'd be cleaner to have this happen in the controller instead.

I seem to remember fligtar added a variable (or function?) that you can use to add arbitrary tags to the html header from the controller.
(Assignee)

Comment 5

11 years ago
(In reply to comment #4)
> I seem to remember fligtar added a variable (or function?) that you can use to
> add arbitrary tags to the html header from the controller.
> 

I looked for an $extra_headers variable but didn't see one.  /me looks for a function

Comment 6

11 years ago
Created attachment 308977 [details]
Too many search engines give a bad UX

Comment 7

11 years ago
(In reply to comment #5)
> I looked for an $extra_headers variable but didn't see one.  /me looks for a
> function

Okay if you don't find anything, please add this possibility, it can come in handy elsewhere too. Make sure to make it an array, so it's easy to add stuff.

Comment 8

11 years ago
Comment on attachment 308953 [details] [diff] [review]
add <link>

Hm, it smells a little hacky but we looked at different ways of doing it and each of those was worse than this, so let's do it this way then.
Attachment #308953 - Flags: review?(fwenzel) → review+
(Assignee)

Comment 9

11 years ago
r11248
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.