a problem with my custom menu item

Forums » General Opera topics » Customizing Opera

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

27. April 2010, 15:01:47

mfs9

Posts: 15

a problem with my custom menu item

what I want to do is add an option to the right click menu to upload an image on imgur.

what I did was duplicate the standard menu and edit it. added the following piece of text under image link popup menu and image popup menu:

Item, upload image on imgur=Copy image address & Go to page, "http://imgur.com/api/upload/?url=%c", , , imgur


after that I took a backup of the standard skin and added the imgur icon under icons-folder and the following piece of text under images in skin.ini:

imgur icons/imgur.ico


now, the menu item works like it should but I see no icon what so ever. tried various things myself but can't get it to show up. what am I doing wrong?

thanks in advance!

(I'm running 10.52 on windows 7 x64)

27. April 2010, 15:06:10

Pesala

Reclining Buddha

Posts: 27328

AFAIK icons need to be in PNG format.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

27. April 2010, 15:07:41

mfs9

Posts: 15

oh, I will try that out and see if it works. thank you.

27. April 2010, 15:18:47

mfs9

Posts: 15

changed the image and path to .png and it's still not showing up.

27. April 2010, 15:39:58

Pesala

Reclining Buddha

Posts: 27328

The icon also needs to be on the first command.
Item, upload image on imgur=Copy image address, , , , imgur & Go to page, "http://imgur.com/api/upload/?url=%c"
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

27. April 2010, 16:02:42

mfs9

Posts: 15

tried what you suggested and now it's showing the icon it shows in bookmarks when the site doesn't have any favicon assigned (the star on a red background). this and now imgur gives and error "invalid url".

27. April 2010, 17:15:13

Pesala

Reclining Buddha

Posts: 27328

If you're getting an invalid URL message then you probably made a syntax error.

I wasn't able to get a custom icon yet — only the default icon for go to web address, but the menu item does take me to the site.

I think I was wrong about putting the icon on the first command — maybe that applies only to buttons.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

27. April 2010, 17:24:30

Nailz

Posts: 754

Originally posted by Pesala:

If you're getting an invalid URL message then you probably made a syntax error.

I wasn't able to get a custom icon yet — only the default icon for go to web address, but the menu item does take me to the site.

I think I was wrong about putting the icon on the first command — maybe that applies only to buttons.



In your skin.ini below [Images] put
imgur = icons/imgur.png

Put imgur.png in \icons\ inside the skins zip.



In your menu.ini under [Image Popup Menu] add

Item, upload image on imgur = Copy image address ,-2,"urlinfo",, imgur & Go to page, "http://imgur.com/api/upload/?url=%c"

27. April 2010, 17:24:51

mfs9

Posts: 15

according to tamil the icon name should be the last in line (but he states the same for buttons and I have no idea if it has changed since the blog entry was updated). if I do that, like I did in my first post, the menu item works but the icon doesn't show.

27. April 2010, 17:34:03

mfs9

Posts: 15

thank you, nailz! that worked.

27. April 2010, 17:39:19

Nailz

Posts: 754

Originally posted by mfs9:

thank you, nailz! that worked.



http://operawiki.info/AllActions

A general syntax for a single command: Action, property1, property2, label, icon

When you make multiple action commands, you may wish to add an icon or title. The icon must then be appended to the first command

27. April 2010, 18:13:24

Pesala

Reclining Buddha

Posts: 27328

Originally posted by Nailz:

Item, upload image on imgur = Copy image address ,-2,"urlinfo",, imgur & Go to page, "http://imgur.com/api/upload/?url=%c"


This works for me. The custom icon is displayed and the image is uploaded. yes
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

28. April 2010, 20:39:14

mfs9

Posts: 15

ok, what to change to make it open in a new background tab instead of the same one?

29. April 2010, 05:17:31

Pesala

Reclining Buddha

Posts: 27328

There is no command to go to background page, so add "switch to previous page" to the end of the command string.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

Forums » General Opera topics » Customizing Opera