Enabling the Search Field in Shiira 2.0

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/meyouwe/mark.alittlenoise.com/blog/wp-includes/formatting.php on line 74

A number of users have reported they have found the Toolbar Search field is disabled in recent builds of Shiira 2.0. Due to short post lengths, I could only add a shorter version of this to the official forum, so I wanted to repost it here with more detail for those that may have missed it.

As far as I can tell, Shiira disables the Toolbar Search Field if no Engines are found under the Search Engine section of the Shelf—which effectively disables searching completely [ short of visiting Google’s [ or your favourite search engine’s ] homepage and initiating a search from there ]. My understanding is that this happens when Shiira is unable to import 1.2.x search engine information when first run [ either due to the user not having Shiira 1.2.x installed or having it installed, but not having configured the search engines ] or upgrading from a Nightly build and suffering from a corrupted database.

Adding a Search Engine should, theoretically, remedy this, but unfortunately Shiira doesn’t currently offer an interface to edit the Search Engine section of the Shelf internally, which means our only option is to amend the database manually.

I would recommend, if you are experiencing issues with Bookmarks and the Bookmark Bar as well as missing Search Engines, that you remove Shiira’s new .plist [ ~/Library/Preferences/jp.hmdt.shiira.plist ], delete the Shiira folder found in Application Support [ ~/Library/Application Support/Shiira ] and quit older versions of Shiira, before reverting to the 070503 build. This may correct the issue without the need to perform the following.

The Search Engine information, along with Shiira’s Bookmarks, is stored in a database called ‘Shiira.sql’ located in the Shiira folder of the User Library’s Application Support directory [ ~/Library/Application Support/Shiira/Shiira.sql ] and can be manipulated via the Terminal using the SQlite3 cli built into Mac OS X 10.4.x [ Tiger ].

The information below is provided under the assumption that your version of Shiira does not have any Search Engines listed at all. Using this method to add further Search Engines is not recommended unless you amend the SQL queries appropriately.

1. Quit Shiira 2.0, launch the Terminal and issue the following command;
cd Library/Application\ Support/Shiira/

2. Backup the Shiira.sql file;
cp Shiira.sql Shiira_backup.sql

3. Launch SQlite and load the database;
sqlite3 Shiira.sql

4. Use an ‘INSERT’ command to add a new Search Engine entry to the ‘ZSEARCHENGINE’ table [ in this example—Google ];
INSERT INTO ZSEARCHENGINE(Z_ENT, Z_OPT, ZTEMPLATEURL, ZTITLE, ZISUSING, ZKEYWORD, ZINDEX, ZTYPE, ZENCODING) VALUES("5","1","http://www.google.com/search?ie=utf-8&oe=utf-8&q=%@","Google","1","goo","1","Engine","5");

5. Amend the Search Engine ‘count’;

6. Save changes and exit sqlite3;

7. Launch Shiira and verify change in Shelf. Shiira’s Toolbar Search field should now be active.

Please note, this proceedure will not enable keyword searching via the URL field as featured in previous versions of Shiira [ 1.2.x branch ] even though I am assigning a keyword in the ‘INSERT’ statement above, it will only re-enable and allow searches to be preformed in the Toolbar Search field. The logic here was, that in the event that keyword searches start working before the Shelf allows you to edit the Search Engine details, you won’t have to revisit the SQlite3 database to add this functionality.

About this entry