Places query syntax

Discussion about official Mozilla Firefox builds
Locked
User avatar
Max Karl Ernst
Posts: 107
Joined: February 5th, 2008, 3:43 am

Post by Max Karl Ernst »

I doubt we'll see id syncing, it looks to me the major reason they went from id's to names like BOOKMARK_MENU is to avoid hard-coding id's because of the problems such practice carries. So this is obviously just a temporary hack, we must wait for table splitting for tags, I can't understand the reason to put folders, livemarks, tags, bookmarks etc into one table in the first place to be honest :)
It's a shame we had this one working nicely until group_by_folder was dumped :)
bomfog
Posts: 455
Joined: November 7th, 2002, 3:22 pm
Location: the palouse, SE. WA, USA

Post by bomfog »

In response to the disappearing-query-interfaces trend, the great humanitarian and all-around good person alice0775 put up an extension bringing back query-editing in the Library, and other things.

Thanks much.

In the Sandbox, Patch For Library 1.3, as mentioned in bug 430580 – User defined Saved Search should be editable.
User avatar
Max Karl Ernst
Posts: 107
Joined: February 5th, 2008, 3:43 am

Post by Max Karl Ernst »

Thanks boomfog for info, and thanks alice0775 for quick fix :)

We lost editing capabilities because people complained after seeing "place:" strings in location box. I was more in the favor of new user education instead of disabling functionalities, but hey, we got by another obstacle :)
User avatar
Alice0775
Posts: 2817
Joined: October 26th, 2007, 11:25 pm
Location: OSAKA

Post by Alice0775 »

bomfog wrote:In response to the disappearing-query-interfaces trend, the great humanitarian and all-around good person alice0775 put up an extension bringing back query-editing in the Library, and other things.

Thanks much.

In the Sandbox, Patch For Library 1.3, as mentioned in bug 430580 – User defined Saved Search should be editable.

Patch For Library 1.5 (in sandbox) has been released due to checked in Bug 425851.
This version is for Gecko/2008042806 Minefield/3.0pre and show Tag folder Id in detailed pane.

EDIT(01 May 2008 09:01 am JST):
Patch For Library 1.6 released. ( landed Bug 430659 and 431153 in nightly trunk build ).
Last edited by Alice0775 on April 30th, 2008, 5:05 pm, edited 1 time in total.
User avatar
Max Karl Ernst
Posts: 107
Joined: February 5th, 2008, 3:43 am

Post by Max Karl Ernst »

Alice0775 wrote:This version is for Gecko/2008042806 Minefield/3.0pre and show Tag folder Id in detailed pane.


Lovely :)
mak77
Posts: 264
Joined: April 3rd, 2006, 4:51 pm
Location: Italy

Post by mak77 »

Alice0775 wrote:
Patch For Library 1.5 (in sandbox) has been released due to checked in Bug 425851.


Alice, if you have a proper fix for bug 431153 you can attach that in bugzilla since that bug currently does not have an owner
Oropher
Posts: 346
Joined: September 26th, 2007, 7:12 pm

Post by Oropher »

Phew, that makes life a lot easier! Thanks Alice0775! :D

Max, could you add a link to this extension in the first post? :)

- Matthew
miles_
Posts: 44
Joined: March 7th, 2008, 1:55 am

Post by miles_ »

Does anyone know how the Patch For Library add-on works? I can't download it and I'm not sure but maybe it's an easy fix that I can fix myself if I just know where and what to edit.
david5717
Posts: 301
Joined: July 18th, 2003, 7:39 am
Location: Baton Rouge, LA, USA

Post by david5717 »

miles_ wrote:Does anyone know how the Patch For Library add-on works? I can't download it and I'm not sure but maybe it's an easy fix that I can fix myself if I just know where and what to edit.

What went wrong when you tried to download it? Did you log in?

Once its installed the location block and its place uri will once again show up when a smart folder is selected in the left pane of the library (organize bookmarks) dialog.
miles_
Posts: 44
Joined: March 7th, 2008, 1:55 am

Post by miles_ »

I didn't log in. I shouldn't be required to.
stevenu
Posts: 1
Joined: May 10th, 2008, 6:16 pm

Post by stevenu »

Max Karl Ernst wrote:

Code: Select all

place:folder=4&queryType=1&group=3&terms=top&sort=1&excludeQueries=1&expandQueries=0



seemed like just what I wanted but was giving duplicate for some bookmarks so I looked at the existing smart bookmarks and change to:

Code: Select all

place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&queryType=1&group=3&terms=top&sort=1&excludeQueries=1&expandQueries=0


I guess that excludes bookmarks on the bookmarks toolbar but maybe this would bring back the duplicats issues again
Helico
Posts: 115
Joined: September 11th, 2006, 5:44 pm

Post by Helico »

Can one of these be made that gives a bookmarks count? I.E. shows the number of bookmarks that exist. I am using a bookmarklet to do it, but it requires exporting the bookmarks and opening them in the browser.
Oropher
Posts: 346
Joined: September 26th, 2007, 7:12 pm

Post by Oropher »

Helico wrote:Can one of these be made that gives a bookmarks count? I.E. shows the number of bookmarks that exist. I am using a bookmarklet to do it, but it requires exporting the bookmarks and opening them in the browser.

You could use the Places API to return the bookmark count, but I don't think you could do it through the queries we're talking about here - they will only return a list of bookmarks/history.
Alternatively you could make a query that pulled in all your bookmarks, then go to the library and select multiple items in the right-hand pane. Then the details pane would show the total number of results returned by the query. But that sort of workaround doesn't sound like what you're looking for.
Oropher
Posts: 346
Joined: September 26th, 2007, 7:12 pm

Post by Oropher »

stevenu wrote:
Max Karl Ernst wrote:

Code: Select all

place:folder=4&queryType=1&group=3&terms=top&sort=1&excludeQueries=1&expandQueries=0



seemed like just what I wanted but was giving duplicate for some bookmarks so I looked at the existing smart bookmarks and change to:

Code: Select all

place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&queryType=1&group=3&terms=top&sort=1&excludeQueries=1&expandQueries=0


I guess that excludes bookmarks on the bookmarks toolbar but maybe this would bring back the duplicats issues again

If you're trying to get all bookmarks with a particular tag, the best way is a RESULTS_AS_TAG_CONTENTS query. You'll get results without duplicates and with the correct bookmark titles.

Code: Select all

place:queryType=1&type=7&folder=tag_folder_id

Replace 'tag_folder_id' with the numerical ID of the tag folder you want. Max Karl Ernst and I explained how to get this using SQlite Manager in these two posts, or you can find it by installing the Patch For Library extension and selecting the relevant tag in the Library.
User avatar
Korou
Posts: 82
Joined: January 20th, 2004, 5:31 pm

Post by Korou »

Is the URI query broken? I'm trying to use it and it doesn't seem to be working. For example, I want to display recent topics I've visited from my forum and am using place:queryType=0&sort=4&maxResults=10&domain=forums.normlife.com&uri=place:queryType=0&sort=4&maxResults=10&domain=forums.normlife.com&uri=viewtopic.php. It ends up showing pages that do not have "viewtopic.php" in them. Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008060104 Minefield/3.0pre; Mac OS X 10.5.3
Last edited by Korou on June 2nd, 2008, 8:05 am, edited 1 time in total.
Locked