Wckediden - Mobile Tricks and Tweaks Community

Wckediden - Mobile Tricks and Tweaks Community (https://www.wckediden.com/index.php)
-   Palm WebOS Themes (https://www.wckediden.com/forumdisplay.php?f=556)
-   -   A How-to: How to Change Bookmark Icons (https://www.wckediden.com/showthread.php?t=191821)

D/\SH 09-21-2009 01:55 PM

A How-to: How to Change Bookmark Icons
 
The images are in /var/luna/data/browser/icons . For the "built-in" bookmarks, there are 3 files each:

  • bookmark-icon-{name}.png - 32x32 px icon you see in the bookmark list

  • {name}-bookmark-icon.png - 64x64 px icon that doesn't seem to appear anywhere

  • {name}-bookmark-thumbnail.png - 90x120 px thumbnail that appears when you start the browser


I'm not happy with the way the Pre tries to make images for you, so I created some of my own. (I also use a better naming convention for the files).

To add your own images:

1. Copy the default bookmark images from /var/luna/data/browser/images to you PC (use WinSCP or copy them to /media/internal and then use the USB cable). They make good templates for creating new images.

2. Create some new images. Here are mine for m.cnn.com:

http://www.dbgod.com/pics/cnn-icon32.png
(cnn-icon32.png)

http://www.dbgod.com/pics/cnn-icon64.png
(cnn-icon64.png)

http://www.dbgod.com/pics/cnn-thumbnail.png
(cnn-thumbnail.png)

3. Copy the images to your Pre under /var/luna/data/browser/images .

4. Become root and make your filesystem read-write:

Code:

$ sudo -i

# rootfs_open -w

5. Open the bookmark database with the sqlite utility:

Code:

# /usr/bin/sqlite3 /var/palm/data/file_.usr.palm.applications.com.palm.app.browser_0/0000000000000004.db
6. Add a bookmark, save, and exit sqlite:

Code:

sqlite> begin transaction;

sqlite> insert into bookmarks (url,title,defaultEntry,iconFile32,iconFile64,thumbnailFile)
 values ('http://m.cnn.com','CNN',1,'/var/luna/data/browser/icons/cnn-icon32.png','/var/luna/data/browser/icons/cnn-icon64.png','/var/luna/data/browser/icons/cnn-thumbnail.png');

sqlite> commit;

sqlite> .exit

Note: the bookmarks are keyed on title, so if you already have a bookmark titled "CNN", the above code will simply update the existing bookmark.


To view all you bookmarks in the database:

Code:

sqlite> .header on

sqlite> select * from bookmarks;

Columns:

  • id - numeric ID

  • url - URL

  • title - Title

  • date - numeric representing the date-time the bookmark was added

  • parent - ?

  • idx - numeric controlling sort order of the bookmarks (when two or more bookmarks have the same idx value, the browser sorts on title)

  • defaultEntry - numeric: 0 for bookmarks you add through the browser, 1 for "built-in" bookmarks (Pre won't mess with the images)

  • iconFile32 - path to the 32x32 px icon

  • iconFile64 - path to the 64x64 px icon

  • visitCount - number of times you selected the bookmark

  • thumbnameFile - path to the thumnail

  • lastVisited - numeric representing the date-time last time you selected the bookmark

  • startIdx - ?


originally found here:
Code:

http://forums.precentral.net/web-os-development/194160-does-anyone-know-where-browser-images-stored.html


All times are GMT -4. The time now is 07:09 AM.

Powered by vBulletin® Version 3.8.14
Copyright ©2000 - 2026, vBulletin Solutions Inc.
POWERED BY PHILLYFINESTSERVERSTAT FOR WCKEDIDEN|- NEXTELELITE| - PPCTHEME| - IDENINSIDER