How to disable a plugin in joomla - joomla1.5

I would like to disable a read more plugin ( cutof content) in all pages except my main menu pages in joomla
How do I do this
Thanks in advance

I'm not aware of any method that allows for the actual disabling of a plugin for certain pages. Plugins are either on or off, site-wide. This can be seen from the Extensions | Plugin Manager, as well as the SQL database: jos_plugins. With that said, what would be the purpose in disabling a plugin for certain pages? Most plugins, especially those like a "readmore" are typically setup to be activated by a simple code sequence, such as {readmore}path/file.htm{/readmore} and consequently, you can turn the plugin "off" by simply choosing to not use it. Most plugins of that nature provide very little more than essentially "coded access to a CSS class". If you could be more specific on why you need to actually disable the plugin for certain pages, perhaps we'd be better equipped to answer properly.

Depending on the plugin, you could feasibly remove the event trigger that would set the plugin to run, thought it would not be advisable since it would stop that trigger for all plugins and could cause unintended effects.
I am not sure what you mean by "Read more" plugin. You can turn the read more text on and off as a setting in the menu item parameters or in the article itself. Have you tied that?

Related

Filter entries in the Eclipse Variables View

Is there any built-in way (or plug-in) allowing for searching through the whole variable tree without manually expanding nodes?
I can't understand why isn't it done by default, just as I can't understand, why isn't search bar built into Variables view (browser style) and this unhandy, inconvenient dialog is opened instead. It makes my work, which is mainly debugging complex applications, a nightmare.
The Eclipse version is Luna, if it matters.
The watch expression feature is not what I want because it just doesn't work in this case, tried to fix it but none of the common ways to do that help me.
Such a feature has been requested earlier here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=170396
You may want to reopen this bug to state your interest in this enhancement. And if you have experience in developing Eclipse IDE plug-ins, I am sure the maintainers would be happy to review a patch.
I usually use Alt+Shift+Right/Alt+Shift+Left and Ctrl+Shift+I to select and inspect variables and expressions, but this certainly depends on personal preferences.

How to refresh the Eclipse main menu programmatically on runtime

I am looking for a way to to force Eclipse to refresh/rebuild its own main menu or even the whole view on runtime programmatically.
The reason why i need it this way is, because i have a plugin that iterates through a project and depending on the configuration of the selected project it loads a project specific plugin at runtime with:
FrameworkUtil.getBundle(this.getClass()).getBundleContext().installBundle(String).start()
Now the loaded plugin contributes to the org.eclipse.ui.main.menu extension point and even though the plugin is installed I don't see the new menu entry.
FYI: I am using Eclipse 3.x and E4 Tools
Now my questions are:
Is there acutally a way to refresh/rebuild parts of the Eclipse ui or maybe even the whole ui?
If not, can someone think of another approach? I thought of having a plugin which contributes only the menu and add the menu items programmatically.
But i couldn't believe that there is no way to refresh the view so i am asking this question.
I checked whether MMenu had a refresh method itself so i could get the object and just call the refresh method.
But in the end i didn't find a way to do this.
P.S. I am pretty new to Plugin Development and RCP so please don't blame me if the solution was obvious but i didn't realize it
Refresh/Rebuild UI
Short answer: no
In many places Eclipse extension points are loaded and information is stored in static fields (often in a Singleton). The plugin.xml data is not reloaded during the lifetime of the application, and certainly these bundles do not listen bundle events that would allow them to detect such changes.
Therefore, even if there were some method to call refresh on the whole UI, at least some (most?) of the code handling extension points would not see the effects of the new plugin.xmls.
Another Approach
To answer what you are trying to do, the "normal" thing to do would be to have each menu contribution's visibility be dependent on some expression, e.g. if the current selection adapts to MySpecialProject you could have it visible.
When you do it the normal way, and you leave everything to be lazily loaded, the java code for all those project type plug-ins will not be loaded until the commands are actually invoked for the first time.
To go the next step, you would probably have a main ui plug-in that defined a bunch of commands (e.g. build project, flash leds, format file, etc), but have no command handlers associated in that main plug-in. In each project type plug-in, have command handlers that are enabled when only the correct project type is active.
Assuming you have already worked through a basic tutorial on commands in Eclipse, there is a good advanced one on vogella.com that covers many useful features for being properly dynamic.

eclipse - load plugin "on demand"

I have a lot of plugins installed on Eclipse Luna (including Spring, JBoss, Android, Genymobile, Tomcat, Apache, Axis, ...).
However, as you can argue, I don't use them all at the same time. Also, it seems that they slow down Eclipse in many ways.
So, what I'd like to do is to prevent eclipse to load them at the startup and instead only as needed.
Is there any way to achieve this goal?
Eclipse is lazy start by default. It will read all plugins manifest to determine their dependencies and if they add themselves to the UI and things like that. But they will only be started if they are actually used.
Say a plugin adds a view. It will be selectable in the show view dialog, but no code will have been loaded until you choose to use it. I believe it's the same thing with buttons on the toolbar and menu items, but if they require code to determine their enabled state (as many do) that will most likely require a full load of the plugin.
You can install the Plugin functionality in Eclipse to get the Plugin Registry view. From there you can see which plugins are actually active. The list will probably be smaller than you think.
However, to make it even smaller:
Uninstall plugins you never use
Customize your perspective to remove views you never use
Customize toolbar and menu to remove buttons and functionality you never use
Removing plugins from automatic startup is not a good idea, since they may rely on some functionality having executed at startup.
Some plugins have a tendency to completely take over your Eclipse installation and load themselves regardless of what you would be doing. I used Aptana as an Eclipse plugin some years ago, and it did just that. I had to create a separate installation just for it.
If you are using "heavy weight" plugins that adds a lot of functionality it might be a good idea to keep separate Eclipse installations for them.
In Windows->Preferences->General->Startup and Shutdown dialog box, there will be a list of installed plugins,select the plugins you want to activate on startup.

What tool can be used to create plugin/addon for bookmark requirement

I've to create plugin or add-on for my official community site.
Requirement
There should be a button at browser, which should extend a form, which can add the current url as a bookmark with interaction from user with some more inputs, in turn that should be recorded into excel sheet in local drive. I've VBA code to extract data from the community url to excel sheet. Now, I've to create browser control to enable user direct url to fetch the data.
My control should be activated (i.e. toolbar button) based on url, so what should i create, a plugin or add-on ? i want my control not to affect browser performance or user experience.
Based on reply for 2, what tool should i use to create plugin/add-on which should be compatible across browsers ?
I've gone thro' Fire-breath demo, code capability with Visual studio, which was nice, but still missing some knowledge about visual studio, what to package of visual studio install and what language to use, it would be better if it is Visual basic ?
At last, is it possible to place control (i.e. button) inside the webpage to activate my code, if so, which one is capable of doing it, add-on or plugin ? workflow in nutshell to achieve that...
Thanks a lot
First, a few things to understand:
A browser plugin is something that is instantiated in one of two ways:
Injected into the DOM in an object or embed tag
Instantiated by the browser to open a page with a specific mimetype
Browser plugins don't know anything about the browser, the URL bar, the bookmarks, the context menus, browser dialogs, browser chrome, browser events, etc. Browser plugins only know anything about the current page. Browser plugins cannot change browser settings
Browser plugins are DLLs; they can't easily be written in Visual Basic. While it might be possible, I've never seen one, and you'd have to learn a lot about NPAPI plugins before you could do that. You'd also probably have to write one for IE, one for IE, etc.
In other words, what you need is not a plugin. Firebreath is not going to help you much, if at all. Some extensions (also called add-ons) use a npapi plugin to provide functionality that they cannot do on their own. For more information see http://npapi.com/extensions
With that information, I recommend you think about it and create a new, more specific question for what you need to know next. I don't know extensions, I do plugins. Actually, once you break down what you need to do into some smaller questions you'll probably find others who have ask most of them and you can find the answers with simple searches. Your main problem is that you don't yet understand the technologies you need to use. Hopefully this has helped.

CKEditor Plugins Documentation

I looked on CKEditor's website and I noticed that there's no plugins documentation yet.
But I'm wondering if there is any anywhere else?
I'd like to make a little plugin to add youtube video from CKEditor. Pretty simple plugin but still I'd like to know how to make it.
Documentation is sparse at the moment, but not completely non-existent.
Check out my CKEDitor link survival pack from a previous question.
As a starting point, you may want to copy and use one of the existing plugins (the unpacked ones from the _source directory, of course).
The symbols plugin is extremely simple but shows the basic points of inserting HTML into the editor
The links plugin may be a good starting point for how to add input fields, tabs, and make them interact (If you want to go the road of understanding CKEditor's highly sophisticated dialog layout system, that is. My cup of tea, it wasn't. You may want to just set up an Iframe dialog, and do everything by yourself).
Since this question was first posted, CK has added documentation for creating plugins - http://docs.cksource.com/CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1