Questions tagged [plugin]
A plugin is a kind of Joomla! extension. Plugins provide functions which are associated with trigger events.
48
questions
24
votes
1
answer
8k
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 ...
5
votes
1
answer
494
views
How to make my Editor plugin (type: editors-xtd) survive after updates?
I have a project that I am writing a component, module, and editor plugin for.
I have managed to piece together a rudimentary plugin that works with TinyMCE (at least) which:
Displays a custom ...
7
votes
1
answer
5k
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 ...
5
votes
2
answers
2k
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, &...
6
votes
1
answer
326
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 ...
4
votes
1
answer
226
views
Is there any equivalent event to onContentAfterSave for Modules?
Is there a way we can 'listen' to the module save event so that we can use a plugin to do some additional work. I found this question on stack overflow but I am confused as to where dispatcher will be ...
0
votes
1
answer
224
views
How to remove rel="nofollow" with Joomla Buffer?
I am developing a plugin to get rid of any rel="nofollow" on HTML links using a buffer, but its not working. I am testing it with a nofollow link on a Custom HTML Module.
I thought that "JFactory::...
0
votes
1
answer
855
views
Running content plugin on content prepare trigger for com_content attributes text
I created a custom plugin that allows the user to save custom text from a predefined list through editors buttons, in the attributes (attribs).
The idea was to give the users an easy way to add a few ...
11
votes
2
answers
5k
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 ...
8
votes
1
answer
323
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
2
answers
955
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
2
answers
4k
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
1
answer
2k
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, ...
5
votes
1
answer
2k
views
Set cookie in from joomla plugin
I want to display App download message(an image)to users browsing my site from Android device only. So i have developed a plugin to achieve this . Now i want to display this message only first time so,...
5
votes
3
answers
4k
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
2
answers
7k
views
Available fields in Joomla XML manifest
When developing an extension, what are the form field types I can use in Joomla?
5
votes
1
answer
145
views
How to adjust search keyword sanitization settings as language override?
I am working on some custom search plugins and I have a 2-part question regarding the file administrator/components/com_search/helpers/search.php.
I want to adjust the sanitization settings without ...
5
votes
2
answers
2k
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?
4
votes
2
answers
600
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
1
answer
815
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 ...
4
votes
1
answer
852
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 ...
3
votes
1
answer
95
views
Techjoomla's API Module
I am trying to write a plugin to use Techjoomla's api component on my Joomla 3 site.
Their documentation gives sample code which I am altering to fit my needs. I am trying to make a very basic API ...
3
votes
1
answer
192
views
Alter registration and comment forms
I am deveoping a small plugin that needs to alter the registration and comment forms to add 4 hidden fields that have data inside that I gather from the configuration panel, and when the form is ...
3
votes
1
answer
1k
views
GeSHi shows no syntax colors with Joomla 3.3
I have been using the GeSHi plugin for syntax highlighting on my Joomla 3 installation for few weeks. The highlighting has been working fine. But ever since I upgraded to Joomla 3.3 the highlighting ...
3
votes
2
answers
2k
views
Add custom / extra field to a category
Is there any way you know of to add a custom/extra field to just a single category and not all articles as described here, without using an extension like k2?
3
votes
1
answer
76
views
Is it possible to change system plugin fire order without change order in backend?
I have small issue with one of 3rd party system plugins that fires before my system plugin.
We both use onAfterRoute but if that plugin is ordered before mine, my override is not taking place.
I ...
3
votes
1
answer
1k
views
Joomla4 plugin getBody
In Joomla 3.x versions I use JResponse to get and set the body.
function onAfterRender() {
$content = JResponse::getBody();
...
}
But in Joomla4 it returns Class 'JResponse' ...
3
votes
1
answer
786
views
How to programmatically set the value of a custom field of type checkbox?
In articles, I have created a series of custom fields, including two date fields and a checkboxes field. Now, through a plugin in the onContentBeforeSave event I need to verify that if date 1 is less ...
3
votes
1
answer
2k
views
Using JCache to clear a specific plugin's cached data
Is it possible to use JCache to clear the cached data for a specific plugin or all plugins? I am using a plugin to display an image and text on a page and I have to clear the cache manually for any ...
3
votes
2
answers
613
views
Adding Custom Fields to Article Component [Not in attribs field]
I am trying to save some additional fields into the Article Content and there has been a few questions like this relating to this issue but all of the solutions seem to point to saving the extra field ...
3
votes
1
answer
488
views
JLayout recommended usage
Inside a plugin I need to make a popup window to preview some HTML structure.
Can I use JLayout to achieve it or is there a more proper way to do it?
If JLayout is the way to do it, also would like to ...
2
votes
1
answer
235
views
How can I programmatically install a plugin?
How could you do programmatically what Joomla does when you install a plugin? Let's say, for simplicity's sake, that you have a plugin package file local with your Joomla instance.
A solution might ...
2
votes
2
answers
149
views
How to tweak a plugin so it will load below the author?
I use an override of com_content/views/article/tmpl/default.php to display the author name below the article text:
<div itemprop="articleBody">
<?php echo $this->item->text;?>
<?...
2
votes
1
answer
5k
views
How to add meta tags to a page header based on an url parameter?
Hello Joomla community,
I'm forced to write a minimum Joomla (3.4.1) plugin that injects custom meta tags based on an URL parameter. It will be used to serve localized Facebook Open Graph stories.
...
2
votes
1
answer
135
views
Content Plugin loadfile loads CONDITIONAL form/data, but does not save the data - why not?
I'm completely baffled! I'm trying to load Custom Fields to a Category as I've successfully done in the past, and explained in this question/answer. It works as expected until I try to load a ...
2
votes
1
answer
337
views
Editor-xtd custom button with external Iframe Call
I am developing a custom button to integrate with an external commercial publishing software. My button base works and some how the iframe is called onto my test web site where the external App and ...
2
votes
1
answer
211
views
Override JHtml (HTMLHelper) class methods
I'm developing a custom Joomla template and have unset a lot of the core dependencies, such as jQuery and Bootstrap in the template's index.php.
The problem now is that the core extensions call some ...
2
votes
2
answers
182
views
Filtering content in a single plugin or many?
Due to some requests by a cliente, I had to filter certain "tags" (between curly brackets, like {invisible}content{/invisible}) via a content plugin.
In the last months, the list of tags has grown, ...
2
votes
1
answer
482
views
How plugin can check if meta tag exists?
So, I'm trying to modify a plugin.
This plugin sets some meta tags in the head section using addCustomTag (adding <meta property="og:...>, etc.)
The problem is that they should be added only ...
2
votes
1
answer
603
views
Use of $_SERVER variables in custom plugin
In my Joomla application, I have functionality where I use server variables, like request_uri and query parameters for parsing url string.
This function is used in many modules. So, I wanted to ...
1
vote
1
answer
90
views
Is it possible to remove the "new article" button from all sections in a Joomla website?
A mate and I are doing an internship at university, and the project we are working on is a small Joomla 4.1 website. Our supervisors asked us to override the mechanics of content insertion so that an ...
1
vote
1
answer
333
views
Cannot redeclare class error with System Override plugin
I'm creating a Core override plugin(for overriding the 3r party extension) using Joomla system plugin.
The issue is Cannot redeclare class VirtueMartCart error showing on t3 framework based template.
...
1
vote
2
answers
160
views
Override JHtml core function select.radiolist
I want to override the output of the select radiolist. I can hack the core, but I'm not really fond of doing that in relation to updates.
So i checked out a system plugin to override the JHTMLselect ...
1
vote
3
answers
68
views
Develop a System Plugin with Sample Data for Options
I'm in the process of developing a system plugin. In the options is a subform-field (repetable), which contains several fields. In the "default" of the subform I can specify a record.
a) How can I ...
1
vote
0
answers
381
views
k2 simple image gallery display at module position [closed]
I want to display gallery at module position associated with k2 item. Currently it display at bottom of K2 Item but I want to display it at Module Position "Right" How is it possible?
1
vote
1
answer
185
views
What Joomla events are triggered when a usergroup is changed?
I've been looking at Joomla 3.x plugin events to determine if a particular event gets triggered when a user's usergroup is changed. Update-specifically I've been trying to detect an event that is ...
1
vote
1
answer
241
views
Running content plugins for a custom editor type field in com_content
For our latest Joomla-Projects, I extended the com_content component with custom fields using the following documentation:
https://docs.joomla.org/...
1
vote
1
answer
85
views
search component/plugin in joomla
I am new to joomla! and would like to design a custom search plugin to search through my database. I know that when using the default search, the onContentSearch() function is triggered and "search ...