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

3. April 2003, 13:40:42

Opera Software

haavard

Desktop QA

Posts: 16058

Ini file tweaking

This is important for people who want to customize Opera by editing the .ini files. It was posted to the opera.beta newsgroup by a developer.

==================================================

How things are now:

The program directory has a "defaults" folder with the following files:

standard_toolbar.ini
minimal_toolbar.ini
standard_menu.ini
standard_keyboard.ini
standard_mouse.ini

DON'T TOUCH THOSE!

Instead, you put your stuff in your "profile" folder, under
the subfolders named "toolbar", "menu", "mouse" and "keyboard".

Everything except menus are now configurable from inside Opera, and Opera
will automaticly put all that in the those subfolders.

IMPORTANT: Only CHANGES needs to be put in such new files. Opera
will read from standard files the sections that are missing.

This is important so that when upgrading later, you will at least
get our newest setup in those areas where you didn't change things.

(the premade minimal_toolbar.ini is an example of this)

There will soon be possible to upload your changed files to my.opera.com,
for others to download, just the same way as with skins,
and that's why it's very important that those changed setup files
only contains sections that is actually different from "standard.ini"

Note that you can now define custom mouse gestures everywhere, to do
anything!

Happy tweaking.

==================================================
The Opera Ninja recommends a forum search to find answers to your questions ninja

Håvard Kvam Moen @ My Opera / Twitter

31. July 2009, 18:21:09

D1sasterp1ece

Behind the Mirror

Posts: 1162

Try holding down shift while cliking on a menu entry. As for menu coding stuff, I can't help you much more than what you can find on this forum and OperaWiki.
А crappy old PC running XP Pro SP3 and Opera 11.64 (1403) + 12.02 (1578) + 12.15 (1748) (plus a few other builds)
Opera Mobile 14 beta & Opera Mobile 12.1 & Opera Mini 7.5 on Samsung Galaxy Nexus
Opera Mobile 12 & Opera Mini 7 on Nokia E51

12. August 2009, 01:34:16

wakingup

Please say "Hi!" to Georgi

Posts: 132

Originally posted by D1sasterp1ece:

Try holding down shift while cliking on a menu entry. As for menu coding stuff, I can't help you much more than what you can find on this forum and OperaWiki.



Holding down shift would be a lot easier! Things can get very messy and you lose all your friends when you really start getting into customising Opera's menus. It's like digging for gold and you keep finding little nuggets to keep you going.

-------------------------------------------------------------------------------------------------------------------------------------------

Georgi says "Hello!"

17. August 2009, 22:12:31 (edited)

wakingup

Please say "Hi!" to Georgi

Posts: 132

The Standard Menu ini file seems to have undergone some significant changes, there's some strange looking stuff in there.

Also mine is now to be found in the "C:\Program Files\Opera\ui" directory. When you create a duplicate (to edit) this appears in the "C:\Documents and Settings\myname\Application Data\Opera\Opera\menu" directory.

I edited that and left it in that directory - it seems to work there, rather than in the profile directory.

I seem to be getting rather a lot of "Opera Standard (Modified)" entries in my Toolbar Set-up box in Prefs..Advanced..Toolbars. Everytime I re-select "Opera Standard" I get a new one. Is that a bug or a feature? I have a custom menu set-up file selected in the box below it.




-------------------------------------------------------------------------------------------------------------------------------------------

Georgi says "Hello!"

18. August 2009, 15:41:42

Moderator

sgunhouse

Volunteer

Posts: 65170

If you select "Opera Standard" and then make one change, then you get a new "Opera standard (modified)". You close the panels, maybe? Any change to a toolbar or the panels which are visible will do it.

18. August 2009, 16:00:06

wakingup

Please say "Hi!" to Georgi

Posts: 132

Originally posted by sgunhouse:

If you select "Opera Standard" and then make one change, then you get a new "Opera standard (modified)". You close the panels, maybe? Any change to a toolbar or the panels which are visible will do it.



Yes, I think that was it. I wish it would only make one and keep modifying it.

Anyways, for the first time in my long experience of using Opera I've done the right thing and customised my menu without editing the original ini file! party beer

Strange looking menus though - I going back in for another look! sherlock

18. March 2011, 09:41:19

tpr

Posts: 50

Hello,

I was about to create a menu.ini entry on images to get the name of the image only (not the address, as "Copy image address" does). So far so good, but it were great if I could copy it to the clipboard. After searching I found no way to do that - is it really so? No workaround, hidden form or an onkeydown thingy, anything? Or any other way to get the name of the image (with extension)?

Here's my solution btw:
[Image Popup Menu]
Item, "IMAGE NAME"=Copy image address & Go to page, "javascript:fp='%c';arr=fp.split('/');alert(arr[arr.length-1]);"

Using Opera 11.10 beta

20. March 2011, 17:12:18

Moderator

sgunhouse

Volunteer

Posts: 65170

Javascript can't access the clipboard, true.

20. March 2011, 20:23:12

tpr

Posts: 50

That's pity. Anyway, I solved it this way:
Item, "Copy image name to clipboard"=Copy image address & Execute program, "{Resources}..\..\img2clipboard.exe", "%c"

Where img2clipboard.exe is my own small utility which takes image address as input and puts image name on the clipboard.

30. August 2011, 12:35:29

Originally posted by sgunhouse:

Javascript can't access the clipboard, true.


A setting should be there. It's a necessary thing and Google Docs uses it. Mozilla Firefox has it.
Windows 7 SP1 x86 edition and Windows XP Service Pack 3.
If you need any help from me with regards to Opera, please make a comment on any of my blog posts.
Support Opera wishes

8. October 2011, 23:47:46 (edited)

jseeley

Posts: 21

I just installed Opera 11.51 a few weeks ago on my Win XP and for the LIFE OF ME, I cannot change the color of the TabBar/Pagebar. The default color of the default skin is an ugly grey gray. I can change it to white by changing the [Pagebar Skin]/ ClearBackground to Zero in the skin.ini but that color sucks too. I'm looking to change it to a hex color like blue.

Thanks so much,
Any solution will be greatly appreciated.
John

9. October 2011, 12:00:15

Pesala

Reclining Buddha

Posts: 25783

The page bar uses transparent PNG images. The have to modify the images to change the colour, or use a different skin, though changing the colour scheme in Customise, Appearance, Skin also has some effect.

Skin Tutorial
SkinsTipsButtonsBackupSecurityUser ScriptsLanguage ForumsWiki
Browser JSChangelogsOpera NextDragonflyBugsFTPDocument Courier
My WebsiteMy ForumsOpera ReviewMy FontsIrfanViewSearchDownloads
Opera 11.64 on Windows XP Home • AMD64 3500 1GB RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

9. October 2011, 20:03:59 (edited)

jseeley

Posts: 21

Thanks. The only png's I see for the pagebar are: pagebar.png, pagebar-bottom.png, pagebar-left.png, pagebar-right.png. I thought these are the shadows for the pagebar edges.


EDIT: With me using WinXP, I just realized the color of the pagebar is dependent on the color of the 3D Objects in the DisplayProperties / Appearance settings--when
[Pagebar Skin] / ClearBackground = 0
in the skin.ini is set to Zero If I leave the above set to One, then I get the ugly Grey Pagebar.

20. June 2012, 04:52:37 (edited)

the-dsc

Posts:

I have not seen it anywhere yet, so I think it worth sharing. Google "search by image" for opera:

On "[Image Popup Menu]", "[Image Link Popup Menu]", and other eventual image-related sections, add somewhere:

Item, "Google Image Search" = Copy image address, & Go to page, "http://www.google.com/searchbyimage?image_url=%c"



The same address can be used for a custom search, even though the option to generate one is disabled in that search field. Just change "%c" to "%s".


To drag an image from my files and to drop it on google does not seem to work for me though. But may be some linux/linux DE/specific app thing.

20. June 2012, 09:37:01

tpr

Posts: 50

Great tip, thanks!

22. June 2012, 01:35:51

mochikun

Posts: 829

Nice, but has limitations: In most cases redirects me to Google's homepage. It's probably not intended to be used "stand-alone" but rather as a feature for Google's normal image search (search by keyword). Only after performing a Google image search the shortcut works. Maybe depends on cookies, but sometimes keeps working even after deleting cookies, so I don't know what it is that decides success or failure.

To make the shortcut work in any case I'm currently testing a version that adds a "dummy" Google image search and only after that applies the shortcut. A bit clumsy, but so far works rock solid:
Copy image address & Go to page, "http://images.google.com/images?hl=en&q=dummy"  & delay,500 & Back & Go to page, "http://www.google.com/searchbyimage?image_url=%c"

Opera 11.64,Puppy Linux 5.6 "Precise" (run from a bootable 1GB USB stick)

23. June 2012, 21:16:18 (edited)

the-dsc

Posts:

That's funny. It never happened with me so far, and I just tested without a prior image search. I'll try to clear the cookies to see what happens (edit: just did it, and still works fine). I suspect it's either some difference between linux and windows somehow (if you're using windows), or between opera versions (I'm using 11.64, haven't tested on 12 yet), or perhaps where we have placed the option in the context menu, maybe your placement is such that it does not get the image address for some reason, if those functions are "section-sensitive", which I kinda doubt. I think it could also be something like some particular way that the images are displayed in the html to hide their source from right-clicking. But then I think the option wouldn't show as well. That's definitely weird.

Other thing that may influence is that google by default disables this sort of image search for opera. In my "site preferences" for the google image search, Opera identifies as firefox or something. Edit 2: I just set it to identify as opera that and it failed, redirecting to the default google search page. It seems that's the cause then.




Anyway, another menu customization I hadn't seen around yet (copying from my own post in the "feature request" forum), Google translation with automatic language detection:

Item, "Google translate"=Go to page, "http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=%u"


Insert that on the "[Document Popup Menu]" section , perhaps some other sections (I never reember these details with any certainty, or even the whole thing of having a separate text just for the customizations, search/ask somewhere else for how it's better to customize the menu).

You just right click any page and the link to translate will be there, google will detect automatically what's the language. "En" in the url is obviosly the target language, replace that for whatever is the abbreviation of another language, if you want a different target language or more options.


To translate pieces of selected text only, rather than entire pages:

Item, "Google translate"=Go to page , "http://translate.google.com/#auto|en|%t"


I've put it as the first item in the "[translate menu]" section. I don't know if it even still exists, I'm using opera 11.64, but I've been keeping my ini files perhaps from a few more versions ago...

27. June 2012, 04:34:43

the-dsc

Posts:

On "[Edit Widget Popup Menu]":

Item, "Grammar checker"=Select all & Copy & Go to page , "http://twinmarker.net/en/QueryResponseEn?textinput=%c"

7. August 2012, 09:43:56

Guest703

Posts: 181

I would like to modify the standard_menu.ini file in a portable copy of Opera.

In normal (non-portable) Opera you have two versions. One is in Program Files (which isn't supposed to be edited) and the other is in Application Data (this is the one that should be edited)

In the portable install, I've only found one. Do I modify this one, or do I create a new one, and if so, where do I put it?

7. August 2012, 09:59:55

tpr

Posts: 50

Within Opera Settings - Toolbars - Menu setup, click on "Duplicate" and edit that one.
(and remember to activate by highlighting)

7. August 2012, 20:27:51

Moderator

sgunhouse

Volunteer

Posts: 65170

It will be comparably-placed to a normal install - that is to say, it will be in your profile in a subfolder named Menus. Do not edit anything in the Defaults folder, only edit things in your profile.

8. August 2012, 13:29:46

Guest703

Posts: 181

Alright, though that's a bit of a nuisance if you have multiple profiles, you'd have to edit each one.

3. December 2012, 23:40:21

Originally posted by haavard:

IMPORTANT: Only CHANGES needs to be put in such new files. Opera
will read from standard files the sections that are missing.


Not for me, it doesn't. All default entries are lost and the menus only show my custom addition. What do I do? cry

Here are the contents of %AppData%\Opera\Opera\menu\standard_menu (1).ini
Opera Preferences version 2.1
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding

[Version]
File Version=2

[Info]
Description=Opera Standard menu setup
Author=Opera Software ASA
Version=1
NAME=My Menu Setup

[Bookmark Item Popup Menu]
Item, Open in Firefox=Copy & Execute program, "firefox","%c"

[Document Popup Menu]
Item, Open in Firefox=Execute program, "firefox","%u"

[Link Popup Menu]
Item, Open in Firefox=Execute program, "firefox","%l"
Latest 64-bit version on Windows 7

4. December 2012, 01:46:41

mochikun

Posts: 829

Originally posted by haavard:

IMPORTANT: Only CHANGES needs to be put in such new files. Opera
will read from standard files the sections that are missing.


E.g. Opera first will search for the section [Document Popup Menu] in your customized menu file. If it finds the section, it will apply the contents (in your case only 1 item). If it doesn't find the section, Opera will use the section contained in the standard menu file.
Opera 11.64,Puppy Linux 5.6 "Precise" (run from a bootable 1GB USB stick)

4. December 2012, 10:43:03

Originally posted by mochikun:

Opera first will search for the section [Document Popup Menu] in your customized menu file. If it finds the section, it will apply the contents (in your case only 1 item).


Uuuuugh faint If I have to include whole sections, that means the more updates Opera gets, the more likely it is the menu will eventually break because the custom file will be outdated. Actually, I distinctly remember that happening in the past, and why I didn't try menu editing again until recently.

Thank you for the explanation though. I appreciate it cheers
Latest 64-bit version on Windows 7

4. December 2012, 11:09:03

mochikun

Posts: 829

Originally posted by Gingerbread-Man:

If I have to include whole sections, that means the more updates Opera gets, the more likely it is the menu will eventually break because the custom file will be outdated

cheers
Theoretically yes, practically not. Only a few sections are worth customizing, standard menus don't change much, some items may become dysfunctional but nothing breaks, you can - and should - switch occasionally to the standard menu to check on Opera's default menus. In general at least for me the pros outweigh the cons.
Opera 11.64,Puppy Linux 5.6 "Precise" (run from a bootable 1GB USB stick)

4. December 2012, 23:59:52

I'll just try to remember to update my custom menu file every time the major version number goes up worried

Is it possible to change the Open With menu that appears in the context menu of web pages? It's listing Internet Explorer and Opera Internet Browser, which seems weird. I'd also like Firefox in there, and I guess Nightly isn't detected as such because it's a test version.

Also, is it possible to add the Open With menu to the context menu for links on web pages, bookmarks, and history items?
Latest 64-bit version on Windows 7

5. December 2012, 07:49:16

mochikun

Posts: 829

Originally posted by Gingerbread-Man:

I'll just try to remember to update my custom menu file every time the major version number goes up

Again: The menus seldom change, even in case of a major version change. Would confuse users, wouldn't it? And the customized menu is your menu, so why be bothered when they change their menu? Some of my menus have little resemblance with the standard menus and I don't care what the original menus look like. That's the beauty of customization.

Is it possible to change the Open With menu that appears in the context menu of web pages?

Short answer: No. It's an internal menu and can't be customized. But you can roll your own (see here).

Also, is it possible to add the Open With menu to the context menu for links on web pages, bookmarks, and history items?


You can add it to any menu where it makes sense. Use the Include command if you need the same (sub)menu more than once (plenty of examples in the standard menu file).
Opera 11.64,Puppy Linux 5.6 "Precise" (run from a bootable 1GB USB stick)

6. December 2012, 04:22:31

Originally posted by mochikun:

Short answer: No. It's an internal menu and can't be customized. But you can roll your own (see here).


I thought so. And let me guess, that's the only menu that will automatically fetch the icons from the target executables. I extracted standard_skin.zip but I can find no trace of either an Internet Explorer or Firefox icon in there. Judging from other threads, creating a custom skin is the only way to get custom icons in menus. That's way more effort than I'm willing to put into it.

It seems Opera is retrieving the list of browsers from the registry. For whatever reason, Firefox Nightly wasn't registered in that list. It added itself after I set it as my default browser. The menu still stinks, because it's listing Internet Explorer at the top followed by a separator for no apparent reason (it's not my default browser). But at least it's got Firefox in there now, and it still beats replacing it all over the place with my own iconless menu.

I also wanted Reload and Reload All in the context menu for tabs, so that's another 2 sections that had to be fully replaced for the sake of 2 menu items irked

Originally posted by mochikun:

You can add it to any menu where it makes sense.


If only. When I add Open With to panel items like Bookmarks, it's grayed out.

Well, that's probably as far as my patience will carry me. Thanks again for the help.
Latest 64-bit version on Windows 7

16. February 2013, 07:02:48

mochikun

Posts: 829

Originally posted by rilef:

Originally posted by Gingerbread-Man:

Judging from other threads, creating a custom skin is the only way to get custom icons in menus.


Not really.

Not really? I assume that Gingerbread-Man would call this a custom skin, and so do I. Or are "real" custom skins always self-contained, i.e. a complete substitute for standard_skin.zip? I don't care much for skins, so that's a genuine question. I always thought that custom skins would require standard_skin.zip as basis and only contain settings that are different from the default.

But thanks for your post up . Prompted me to separate the only change I ever make in standard_skin.zip to a dedicated, almost real custom skin.

Opera 11.64,Puppy Linux 5.6 "Precise" (run from a bootable 1GB USB stick)

16. February 2013, 07:26:17

Moderator

sgunhouse

Volunteer

Posts: 65170

There used to be self-contained skins, but the constant changes render them incompatible after a little while.

Forums » General Opera topics » Customizing Opera