I have developed a new installable module for Joomla 2.5. But I am stuck on place that is "Client wants that if one specified Component was not already installed then there should be a error message throw while installing our developed module". So is it possible to add such kind of limitation in joomla while installing module.
With most Joomla extension you can create an install script.php file which defines an object class that can have various methods for the Joomla installer to execute.
These include:
install($parent)
uninstall($parent)
update($parent)
preflight($type, $parent)
postflight($type, $parent)
As you can see for your specific need you will want to implement your check in the preflight($type, $parent) method.
You can read more about it on the Joomla Doc's website, the Create a Simple Module tutorial has a section on "Adding an install-uninstall-update script file"
Related
I'm new to phpfox, I'm developing a payment module. Can anyone help me with the payment module? I have a zaakpay payment integration kit and i have all the necessary inputs. How should i need to integrate? Should need to do like paypal and 2checkout(they have written all the source code in library files) or should need to develop a new module ? Thanks in advance
When developing for PhpFox it is best to follow their conventions. When we have a library that needs to be added we add it to the library section:
/include/library/
So for your project it would be something like this:
/include/library/zaakpay
Than you will want to use the admincp to create a product first and then a module for your product.
http://example.com/admincp/product/add/
http://example.com/admincp/module/add/
All your code for your module will live in the module directory, I use payment as an example.
/module/payment
When you are developing your module you will need to refer to the other modules for examples of class names and file structure. It is a very strict convention.
PhpFox module settings are stored in the database, so it is very important to setup the modules correctly using the admincp. This will allow you to export your product, and have all the settings exported as well. You export your product from the admincp.
http://example.com/admincp/product/
The settings for your module will be in an xml file here:
/include/xml
The xml file only exists in the exported package, and it provides you the ability to install your product on another site. For example if you develop the code locally and want to move it to the production site.
I'm using this Joomla template with Joomla 2.5.x and i want to add a Contact Us form in to a RIGHT module in this template.
How can i add a Contact Us form to a module ?
Download a contact form extension that includes a module from the Joomla Extensions Directory, install, configure, then assign the module to the right position.
I want to build my first module for Joomla 2.5 but I have a problem. I want to have multiple templates for my module, and the admin of the site can choose the templates from the config of the module. How can I do this ?
You are planning to create a joomla 2.5 front end module.then you can achieve your requirement as follows
You can use the joomla module override concept.
For each template you are using you can write module inside template folder for overrides.
like as follows
TEMPLATE_NAME/html/mod_login/default.php
for more details take a look at this.
I hope this will solve your issues..
I am trying to override the com_content/views/article/view.html.php file in joomla using the instructions given in this page
It says I have to create a folder named 'code' in base directory and create the same directory structure. I tried it , but its not working. Can someone confirm whether its working.
Where should I create code folder? Is it on root of joomla installations?
PS- The edit is working correctly when applied on core file
You can override (nearly) any class in Joomla, if your class with the same name is loaded first. To ensure that, you need to create a system plugin.
Here is an example for root/components/com_content/views/article/view.html.php:
class plgSystemOverride extends JPlugin
{
public function onAfterRoute()
{
JLoader::register('ContentViewArticle', 'path/to/override.php', true);
}
}
CAVEAT: Overriding a core class can lead to problems with other extensions, if you're not very careful. For views, though, any interferrence with other extensions is less likely.
You can't override component controllers, models and views in core Joomla! without using a 3rd party plugin.
The plugin you need can be found here: http://extensions.joomla.org/extensions/style-a-design/templating/15611
The code folder then goes into your Joomla root unless you're overriding a back-end view in which case it goes into /administrator
Hope this helps :)
You can use the Class Overrider Plugin http://extensions.joomla.org/extensions/tools/development-tools/23994
just adding some simple human reading commands
I'm working for a government school and I'm trying to override the 'Latest News' module in my template. I've created the following structure in my template folder: template_name\html\mod_articles_latest\default.php
Locally it works well, overrides the module, but when I push it to the live site nothing happens. I don't have permission to see the FTP files, I can only work through the joomla admin area, so I can't do much on the joomla installation files to test anything.
My questions is: is there any way to not allow override module in Joomla 2.5? (because it seems that it is what is happening) or Am I doing something wrong, like the module name I'm using or something?
Thanks in advance!