Discussion about official Mozilla Firefox builds
I filed Bug 420282 - After bug 385245, need RESULTS_AS_FOLDER_QUERY result type.
Max, as far as I can tell, these are the (currently!) correct queries for the Smart Bookmarks folder:
Most Visited - place:queryType=0&sort=8&maxResults=10
Recently Bookmarked - place:folder=2&folder=5&folder=3&queryType=1&sort=12&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10&excludeQueries=1
Recent Tags (actually recently used tags) - place:type=6&sort=12&maxResults=10
Oh, and to regenerate your Smart Bookmarks folder, rename or delete the old one, go to about:config and set browser.places.createdSmartBookmarks to false, then restart. Easy
Last edited by Oropher on March 11th, 2008, 11:38 am, edited 1 time in total.
Thanks both Brablc and Matthew
As for my problem with smart bookmark folder, I should've stated more clearly that no setting in about:config, nor deleting places, bookmarks or even whole profile regenerates Smart Bookmarks in my latest nightly
Doesn't really matter, as your query info made latest changes obvious.
Oops - thanks for the catch!
Does anyone has an example of a query to find a bookmarks folder by its name anywhere in Places ?
I tried this but it did not work:
var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
var bookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
var placesRoot = bookmarksService.placesRoot;
var options = historyService.getNewQueryOptions();
var query = historyService.getNewQuery();
query.setFolders([placesRoot ], 1);
query.searchTerms = "myFolderName";
var result = historyService.executeQuery(query, options);
Laeb, we've mostly been discussing the 'place:' URIs in this thread. Although I'm starting to take a look at the underlying query system for Bug 420282, I'm not really at the stage to be able to help you. Perhaps someone else can, though?
On second thoughts - if I was building a 'place:' URI to find a bookmark folder, I'd try setting 'excludeItems=1'.
done - https://bugzilla.mozilla.org/show_bug.cgi?id=421953
Would be nice if you drop a message there or even providng a patch.
Seems like it should work, but I haven't played with any of that stuff for awhile. I assume you've looked at the result to see what it was. What exactly is it returning to you?
Does anyone know if the final release will have a user-friendly way to construct complex queries? In Beta 4 the search "rules" are very limited.
I'm also curious why the places query syntax needs to be reverse engineered like this? Don't the programmers who wrote the places code know exactly what the query syntax is?
Yes they know, but places are still under heavy construction and major changes are possible (and happening) so they don't need more nagging users
Plans probably don't include any expansion of functionality at this stage, in fact some bugs call for hiding place: uris altogether
Anyway, just for the record, few other default queries
Last edited by Max Karl Ernst on April 21st, 2008, 9:22 am, edited 3 times in total.
So should we expect a "smart bookmark" extension to come from these efforts then? I hope so!
I accidentally deleted the Smart Bookmarks. I recreated them using some other URL's posted for FF3b2, but as those were static (they were not update at all), I deleted them and I set the entry browser.places.createdSmartBookmarks to false. However, no Smart Bookmarks appears . (I have other bookmarks in my Bookmarks Toolbar folder) Do you know a solution? I run FF3b4.
(I can also wait for the next version if that will solve the problem)
If about:config change and restart don't work for you (it didn't work for me either couple of nightlies ago) just recreate folder manually, and add queries from the post you quoted, those are default Smart Bookmarks.
It is returning a result object with no child but the searched bookmarks folder does exist.
Who is online
Users browsing this forum: No registered users and 1 guest