The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
Custom Search Button (not engine specific)
Is there a way to create a "Search" button just like the go button though obviously for the search field please?You may need to use a sequence of commands. For example like "Show web search & Delay, 100 & Insert, "stuff" & Go" would use the default search engine to search for "stuff". operawiki has a number of useful articles about creating buttons.
Originally posted by sgunhouse:
Why not just use the Go button? As I recall, it applies to whichever field is to the immediate left of it - not just the address field. Mind you, changing the title in that case would be a good idea ...
Just tried that and it doesn't work, thanks though.
What about "Focus search field & Delay, 100 & Go"?
So is it possible to at least get a normal search button equivalent to the Go button?
Originally posted by spadija:
Does one" target="_blank">http://homepage.hispeed.ch/ttt-o/button/h-bu-browser-adv.html#browsergoclear]one of these work?
Thanks for the suggestion though no and I went through every one I thought might be relevant.
8. November 2011, 19:02:08 (edited)
Here are the two search buttons I was able to get working. Button7 is vertically taller but has the Go button icon. Button8 has the correct search icon but is not as vertically tall as button7. Also every time I try to try to make linkable buttons Opera gives me "external action" text. I did get the paste feature working somehow but I have a lot of notes at the moment that I need to sort out. Can you please help me out with that?
Button7, "Search"=Focus search field, , , "Search", "Forward" & Delay, 10 & Go
Button8, "Search"=Focus search field, , , , "Search" & Delay, 10 & Go
Paste and Go
Button9, "Paste and Search"=Focus search field, , , , "Search" & Delay, 10 & Paste & Go
Try using "Panel Search" for the icon instead of "Search" (link). The regular search icon is 16x16 instead of 22x22. This extension is very useful when you're searching for a specific icon.
Also, I've never been good at writing buttons in INI files and getting them to work. What problems are you having with it?
What I want to do is share the buttons I've created by creating links to the commands that add the buttons to Opera's custom toolbar button menu. The problem is that while I have the buttons in the toolbars and I know what the code is inside of the standard_toolbar.ini file every time I try to create a link like yours it goofs up and gives me some weird text-label name for the button. I want very specific button names however Opera, you, the websites and everything seems to disagree on which parameter (separated by the commas) are what. In other words there is no set rule established for item 1, item 2, item 3, item 4, item 5 (separated by the commas) but I do see that is how the commands are generated. I know that opera:/button/ is put before the command.
So here is my code for the buttons directly from the standard_toolbar.ini file. Without making an actual link using url = could you please quote the text that I would put in to the BBcode url = command? That would help me greatly clarify what is what I think.
"Search" (just a search button)
Button6, "Search"=Focus search field, , , "Search", "Panel Search" & Delay, 10 & Go
"Paste & Search" give focus to the field, paste, executes search
Button7, "Paste & Search"=Focus search field, , , , "Panel Search" & Delay, 10 & Paste & Go
The format for one action is:
Action, Param1, Param2, Title, Icon
Where you can omit any unused parameters from the end and concatenate multiple actions together with & (perform in sequence), | (perform the second if the first cannot be performed), > (cycle through the actions with each click), or + (perform the second action if the button is clicked and held).
Then, url encode the whole thing (that is, change all the spaces to %20 and all the quotes to %22. You don't seem to need to encode other symbols like commas and ampersands.) and stick opera:/button/ at the beginning of it.
The first one would be opera:/button/Focus%20search%20field,,,%22Search%22,%22Panel%20Search%22%20&%20Delay,10%20&%20Go.
The second is opera:/button/Focus%20search%20field,,,%22Paste%20&%20Search%22,%22Panel%20Search%22%20&%20Delay,10%20&%20Paste%20&%20Go
So when I go in to the standard_toolbar.ini file it seems I can generally fix that by manually changing...
Button6, "Focus search field"=Focus search field, , , "Search", "Panel Search" & Delay, 10 & Go
...to...
Button6, "Search"=Focus search field, , , "Search", "Panel Search" & Delay, 10 & Go
I don't want to share broken links with people when I repost it though which is the problem. Try adding those buttons yourself, you should see one of them adding some unnecessary padding.
<div><a href="opera:/button/Focus%20search%20field,,,%22Search%22,%22Panel%20Search%22%20%26%20Delay,10%20%26%20Go">Opera Search Button</a></div> <div><a href="opera:/button/Focus%20search%20field,,,%22Paste%20%26%20Search%22,%22Panel%20Search%22%20%26%20Delay,10%20%26%20Paste%20%26%20Go">Opera Paste and Search Button</a></div>
Originally posted by sgunhouse:
button
Presuming they've fixed it, the forum's "opbut" syntax is a lot easier to use ...
THAT button works but I still can't get any link to work on my site without any problems. That button comes out with the text label "Focus search field" when I want it to be search instead. I have to somehow have ampersands encoded too since my site is served as application/xhtml+xml. I've tried %26 and the HTML entity & without success.
<div><a href="opera:/button/Focus%20search%20field,,,,"Panel%20Search"&Delay,10&Go">Opera Search Button fixed?!</a></div>
Since this code directly in the toolbar ini file works...
Button6, "Search"=Focus search field, , , "Search", "Panel Search" & Delay, 10 & Go
I've tried to trick Opera in to accepting the following and it relabels the button as "external action"...
<div><a href="opera:/button/"Search"=Focus search field, , , "Search", "Panel Search" & Delay, 10 & Go">Opera Search Button fixed?!</a></div>
<a href="opera:/button/Focus%20search%20field,,,%22Go%22,Forward%20&%20Delay,10%20&%20Go" target="_blank">this one</a>
This is the code used by the forum. I doubt the target="_blank" is necessary, but spaces are encoded as %20, quotes as %22, and ampersands as &.
EDIT: Also, to set the text of the button, you use the fourth parameter. (The %22Go%22 in the above link) If you don't set anything, Opera decides on its own what the text should be.