Sorry, excuse me luk3Z for posting a macro that I did not test with 74 official but only with naruman's 74+1 where it definitely works.
You will need help from some one that knows more than me.
p.s. Maybe use naruman's version of the official if You need the icon.
Else download the old adblock addon from http://kmext.sourceforge.net/ext1.htm
adblockplus126.96.36.199z contains a macro with an icon. It should still work.
BTW. To use the most recent version of adblock You need to edit the Firfox version number in install.rdf. Or use an addon that suppresses compatibility checking even further.
Sorry guenter, but I tried your long macro in KM1.6, and not even there it is showing a button (with a dummy bmp used)
Now that would be normal without the plugin installed, except that your macro does not put the plugin command in the toolbar, but a MACRO command, which would be shown anyway.
And the macro command it assigns to this button is named "abDisable" - which isn't defined anywhere in that kmm.
Perhaps in a second kmm, but then, this one also tries to sync the button state of the "Popups" button, inside the ABP-Toolbar, which makes no sense at all.
Now my guess is: THIS macro is not what makes your own ABP work, but something else, whatever it is. Would be curious what happens if you disable it? If then your button still shows and works?
Or perhaps it still works and I just don't understand it, who knows.
Anyway, without that unknown working part of ABP I don't know the correct names of its true commands.
But here's a dummy test anyway, just to see if button-creation works, nothing else.
The command names and right-click menu are exchangeable with the correct names, if anyone knows them.
For this dummy test I just used the Pref-calling macro from the lone setmenu line in the short-version macro above, hoping that function really exists:
#----------- save as adblockplus_showbutton.kmm
# adblockplus-PLUGIN must be installed or this doesn't work
# Toolbar name can be a new, independant one, or an existing one to add it there (e.g. "&Main Bar")
$_toolbar= "Adblock Plus TEST" ;
$_command = "adblockplus(Preferences)" ;
$_tooltip= "(test) Adblockplus Prefs";
# SYNTAX: pluginmsg(toolbars, "AddButton", "<ToolbarName>, <ButtonName>, <Command>, <MenuName>, <TooltipText>, <ButtonWidth>, <ButtonHeight>, hot.bmp, cold.bmp, dead.bmp");
# Next line creates a new toolbar, but is simply ignored if name already exists, so no harm:
$_toolbar=""; $_icons=""; $_size=""; $_right_menu=""; $_buttonname=""; $_tooltip=""; $_command="";
###-------------- Create MENU in Tools:
### setmenu(Misc, command, "Ad&block Plus...", "adblockplus(Preferences)");
Yes siria You are right. It is the macro from naruman's version. I allready found that naruman has a load.kmm in the xpi and an alteration in adblock's chrome.manifest. But to add them was not sufficient.
So luk3Z will need help from someone that knows more than me.
# Name load.kmm by naruman resides in adblock's xpi
$abstatusbar=sub("%s",getpref(BOOL,$adblockplus_enabled)?"disabled":"enabled","adblock plus %s");
setmenu("Adblock Plus",macro,"Enable everywhere",abDisable);
setmenu("Adblock Plus",macro,"Filter preferences",adblockplusFilters);
setmenu("Adblock Plus",macro,"Live Block items on this page",adblockplusItems);
setmenu("Options",macro,"Show tabs on Flash and Java",adOptionsFlashJava);
setmenu("Options",macro, "Show placeholders of blocked elements",adOptionsplaceholders);
setmenu("Options",macro,"Count filter hits",adOptionsCount);
Edited 1 time(s). Last edit at 02/15/2015 11:51PM by guenter.