Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plugin]

A plugin is a kind of Joomla! extension. Plugins provide functions which are associated with trigger events.

21
votes
1answer
7k views

How to save Custom Fields in Core components

I'm trying to add a single, simple field to each #__content item, and I've very carefully followed the tutorial at Adding Custom Fields to Core Components, substituting "content" for "contact". I now ...
11
votes
2answers
4k views

Add a custom button to a core backend component

Is it possible to add a custom button (with a custom action, of course) to the JToolbar of a standard Joomla 3 component (com_contents) without modifying the original source code? Background: I need ...
10
votes
1answer
216 views

Last Event Triggered by Plugin

I need to know which event is most probably the last one triggered in normal application flow. The Event should be triggered after all default controller actions have been run, the template is ...
9
votes
1answer
413 views

Trash Joomla Article in frontend

I'm developing a small plugin for Joomla 3.x that adds a "Trash article" button when you're in Joomlas Frontend. See screenshot below. http://imgur.com/NYLGRdY Now I have this AJAX call that ...
9
votes
1answer
237 views

Plugin event only when Email activation

I am just referring the Joomla User plugin events in the URL https://docs.joomla.org/Plugin/Events/User/en onUserLogin onUserAuthenticate onUserBeforeSave Just wondering which one will help me to do ...
7
votes
4answers
1k views

Is it possible to get generator tag removed from Joomla sites without interfering core framework?

Is it possible to get the generator tag removed from Joomla sites without interfering with the core framework. I personally feel this is an irritating aspect of the source code and makes websites ...
7
votes
2answers
495 views

How do I properly raise an error from within a plugin?

I am successfully preventing some content from being saved under certain conditions, but am having trouble handling the error message to the user. The actual text does display, but there is ...
7
votes
2answers
721 views

Automatically publish plugin after installation

I've created a couple of small plugins that I install on most of my websites. But new plugins are (fortunately) disabled by default when installed. I know it's only a couple of clicks to enable the ...
7
votes
1answer
4k views

Override MVC classes in Joomla 3

Is there anyway to override MVC classes in Joomla 3? I have found this thread but it is for Joomla 2.5. How to override core classes? I have done MVC overrides in Joomla 2.5 successfully but now I ...
6
votes
4answers
1k views

Script not running on plugin installation

I am creating a plugin and am attempting to run a script after it is installed. For whatever reason, it appears the script file is loading, but my code is never run. My script.php file contains the ...
6
votes
2answers
2k views

How to call a model method from a system plugin?

I have a component ('com_foo') which has a model called 'foobar'. The class declaration is like this: class FooModelbar extends JModelItem This class has a public method called getFooBar(). I also ...
6
votes
3answers
295 views

Configure Joomla to send an email at login

Can someone let me know how to configure Joomla so that I get an email each time someone logs into my site. At the moment, I get an email only when someone has registered. I'm running Joomla 3.5
6
votes
2answers
8k views

window.addEvent('domready', …) alternative

I use an adapted version of google code prettify on my page which lets me highlight Mathematica code. For the correct injection of the necessary js code, the JPrettify plugin is quite handy. Since ...
6
votes
1answer
231 views

Plugin download from live site

Joomla 3.4 Is it possible to download (already installed) plugins from a live website? My scenario is that I downloaded a free plugin a while back, extracted it somewhere on my local pc and can't ...
6
votes
1answer
93 views

onFinderCategoryChangeState event for com_finder in Joomla never fires

I am implementing a plugin for jdownloads to be used in the component smart search. To implement this plugin I have to use the event onFinderCategoryChangeState to actualize the state to the download ...
5
votes
2answers
6k views

Available fields in Joomla XML manifest

When developing an extension, what are the form field types I can use in Joomla?
5
votes
2answers
2k views

Unable to install a component via the extension manager

I have a J2.5 install that simply refuses to install a component using the extensions manager. The directories are all writable, the Forum Post Assistant reports that session is writable, tmp path is ...
5
votes
2answers
958 views

How to get assigned template name in onAfterInitialise?

This seems like a bug and I tested on both 2.5.x and 3.x but there is no way to get assigned template name in onAfterInitialise by using $app = JFactory::getApplication(); $templatename = $app->...
5
votes
2answers
803 views

How to add any text/script before </body>

Is there any content plugin that let me to put any text/code/script before closing </body> tag? If there is no such plugin, is there any documentation about how to create that kind of plugin?
5
votes
1answer
248 views

Is there an event like “OnAfterCompileHead”?

As per title, is there already an event that can work like a sort of OnAfterCompileHead? Maybe onAfterDispatch, onAfterRender or onBeforeRender? I need to change some meta tags in the <head> ...
5
votes
2answers
752 views

Add a class to all images in article dynamically

I'm trying to build a plugin that adds a class to all images in my articles. So far I have the following code: <?php // no direct access defined('_JEXEC') or die; jimport('joomla.plugin.plugin'); ...
5
votes
1answer
432 views

Article custom fields for one category

With the help of this and this I made a plugin to add a custom fields to the article component. It works fine but I would like to make these custom fields mandatory and only for a specific article ...
5
votes
2answers
985 views

What does $context parameter of content plugin mean?

I've read that $context parameter is: "The context of the content being passed to the plugin - this is the component name and view - or name of module (e.g. com_content.article)" https://docs....
5
votes
1answer
122 views

Is there any event available to call after plugin is installed?

I have to make some alter in database after plugin is installed. Is there any events that is called after plugin is installed?
5
votes
3answers
3k views

Change http to https in source code when using SSL

I recently enabled Force_SSL on one of my Joomla sites (by enabling "Force SSL" in Global Configuration), but I run into problems with blocked content (non-SSL content) from both Google fonts and ...
5
votes
2answers
463 views

Apply the same code on PHP to content of component and each module

I have some code on PHP something like: $oldstring = ...; ... $pattern = ...; $newstring = preg_replace_callback($pattern, ... {...}, $oldstring); echo $newstring; I need to apply this code (maybe ...
5
votes
1answer
59 views

Can components / non-plugins react to events?

Is it possible for components to react to events - i.e. in some way become an observer to plugin events?
5
votes
1answer
454 views

Joomla plugins are not working even when they are enabled

I installed some Joomla plugins but they are not working at all. I checked the plugin states and found that they were enabled. I even added some code to the plugins to check whether they were getting ...
5
votes
1answer
78 views

Need some help optimizing new compression plugin [closed]

I am working on new free compression plugin https://github.com/youjoomla/jcompress https://github.com/youjoomla/jcompress/archive/master.zip and need some help in speeding things up. The process ...
5
votes
1answer
66 views

How to use getContentExtras() in SmartSearch indexing?

I've read google all the very limited documention of SmartSearch/com_finder routines after starting with How to add com_content extra fields to Smart Search Index, and am no further along ...
5
votes
1answer
309 views

How to pass, with a custom button, the selected items to a controller?

As seen in this question (Add a custom button to a core backend component), I've created a simple plugin that adds a custom button on the com_content component. When I click on this button, the site ...
5
votes
2answers
704 views

Custom profile fields, restricted to admin only

I am following this example here Profile plugin to create my own profile plugin. What I can't figure out is how to make a field admin only? In the original customer / profile there are fields like ...
5
votes
1answer
1k views

Triggering onContentPrepare from Category Blog view

I found this page on how to implement a custom field in article: http://docs.joomla.org/Adding_custom_fields_to_the_article_component and it works well, but only in article view. What should I do ...
5
votes
2answers
1k views

Should I use JResponse::setBody or onContentPrepare for strings replacements?

I am developing a shortcodes plugin that searches trough Joomla content and creates html outputs from the matched string. Currently I am using this public function onContentPrepare($context, &...
5
votes
3answers
456 views

Article Table of Content as a sticky navigation

I'm looking for a way (plugin, module?) to achieve the following: auto-generate a Table of Content for certain long Joomla articles based on HTML tags (H1,H2 etc.) or CSS classes of headings show ...
5
votes
1answer
409 views

How to save data from subform fieldtype in joomla 3.7 custom field

I made a subform repeatable fieldtype custom field plugin to integrate with the custom field extension in 3.7x, and it works correctly to display the the fields during article submission. However, the ...
5
votes
1answer
157 views

Prevent User Deletion with Plugin?

Is it possible to prevent Joomla from deleting users with a user plugin? We need the user profile to be disabled, but never deleted. I've been tinkering with onUserBeforeDelete, but the docs refer ...
4
votes
2answers
611 views

Trying to save multiple field in Plugin

I can add a multiple select field to my plugin's xml file, like this for countries but when I save it, it only saves the value "array" in the parameters. I would like to save it as a comma separated ...
4
votes
1answer
698 views

Trigger event for specific plugin only

Is it possible to trigger a event for specific plugin? I can load a specific plugin $loaded = JPluginHelper::importPlugin('my_component', 'my_plugin_1'); But when I trigger an event, all the ...
4
votes
1answer
492 views

How can include the component view in plugins

I have custom component and plugins and listing some details in table after click on the table i'll go to details page. i want show the one of details in article, so i created a custom plugins and got ...
4
votes
2answers
384 views

Joomla Plugin to fire onUserLogin

All, I have a simple plugin which does fire on login. I have the same plugin working in 2.5 but in my joomla 3.5 I cannot get it work get the username. This does work on Joomla 2.5 Here it is. Any ...
4
votes
1answer
70 views

Custom message after plugin installation

After an installation process, the translated manifest description from the sys.ini-file is shown in the Extension Manager. Unfortunately this text is also shown while editing the (published) plugin ...
4
votes
1answer
63 views

onUserAfterLogin popup - Joomla 3.6.4 Plugin

I need to create a plugin that displays a popup when an user makes a log in on my Joomla 3.6.4 website. I know that I need to create a Plugin and trigger the onUserAfterLogin event, but I don't know ...
4
votes
1answer
263 views

Trigger plugin event in fof

I am working in Akeeba subscription it's based on FoF.I wanted to check some condition before user can delete subscription. I have a plugin MyPlugin and class is - class plgAkeebasubsMyPlugin ...
4
votes
1answer
1k views

Get all installed Joomla extensions and their version

I'm not really familiar with Joomla, but I need to write a script that is supposed to list all the installed extensions and their version number, if possible. I've already done this for WordPress, ...
4
votes
2answers
284 views

Core Component Layout Override with Plugin

Within a plugin I need to add and populate (data is available inside my plugin) a column to com_menus&view=menus view in administration. my_plugin.php ... public function onAfterInitialise() { ...
4
votes
1answer
55 views

What types of functions in Joomla are analogous to Drupal hooks?

Drupal has many hooks, such as hook_menu and hook_form. What are some functions in Joomla analogous to these?
4
votes
2answers
52 views

How can I determine which component is creating a new user?

I'm working on a tricky User plugin that needs to do certain things only if being called from a 3rd party component. I could check the option in the url, but I need to consider that the user may be ...
4
votes
1answer
59 views

How joomla plugin registers itself to a subject

Its been about a year, that i started using joomla. i.e building some plugins, module and components. Now i want to extend my level of knowledge in inside working mechanism of joomla system. I know ...
4
votes
1answer
122 views

Joomla does not find my plugin update

I made my first plugin and want to setup an update site as well. My joomla does not find the update (after pressing clean cache of course). The update server is found and it load my xml. My manifest ...