Override PHPFox non-core modules/installed apps - phpfox

I would like to override a non-core module of PHPFox,so basically, it is an installed 3rd party application developed by PHPFox themeselves. Here is the file I would like to override.
PF.Site/Apps/core-comments/views/block/comment.html.php
Anyway, I was able to override core modules in my theme following the naming convention from their documentation like the Feeds Module.

Did you mean you'd like to override above file with the file in your module?
In the library, at step render template file, there is a hook. You can use this hook in your module and change above the to the file you want.

Related

Override JE Quick Contact module in Joomla 3x

My client is using the module Je Quick Contact in their site, in Joomla 3.7.3
As default, the sender email is user's one, but in that way sometimes email goes in spams.
We would like to change it to have a generic send contact#domain.fr, seems we can't handle it in Back-office.
So I tried to override the module to change the sender email.
The module was in modules/mod_je_quickcontact and there there is files mod_je_quickcontact.php, index.html, mod_je_quickcontact.xml and folder CSS, JavaScript, PHP, images
In my template I created a folder mod_je_quickcontact and I put there all thoses elements, and I changed the file mod_je_quickcontact.php
But it's not working, it's still default data which are displayed.
I looked at Internet to see how to override, but for all example I found, in default module there is tmpl/default.php file to override. I don't have such folder and file.
Maybe I missed something or I did it wrong... I don't know what to do know, so, if someone has an idea, it would be great!
I think in Joomla there is only a way to override a template or layout of modules. The module you used is not best practice, because there are not using a default template (tmpl/default.php) to display the output of the module.
Like in Joomla docs mentioned:
The directory structure you need is: TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php
(Source: Joomla override documentation)
What I would do: Copy the module, change it in the way you need it. That´s it.
There have to be a difference between paid and free modules :-P

Integrate Payment Gateway in Phpfox

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.

PyroCMS Custom Module Layout

I created a custom module called Drawings. I wanted to give it its own theme layout on the frontend, so I followed the advice I found HERE - I put a layout file titled Drawings.html in my theme.
This had the correct effect on the frontend, but caused other problems and questions that I've been struggling to sort out:
The backend admin section for my module now uses the Drawings.html layout, which breaks its functionality completely. How can I set a specific layout for my module front end, but keep the standard admin backend layout (same backend implementation as in the sample module tutorial)?
I read the following in the Template Library: "When using Public_Controller and Admin_Controller, the layout is already set." Perhaps the solution involves using the set_layout function in these controllers somehow? All my attempts failed so far though.
I feel I am doing something incorrectly because now my module is not modular. For example, after creating the Drawings.html layout file in the theme, a statement like {{ theme:css file="drawings.css"}} in that layout file searches for those resources in my theme. So I have to put those JS and CSS resources in my theme, instead of in my module's CSS and JS folders. How do I keep and access my resources in the module's JS and CSS folders?
I don't know how this is supposed to work.
When you are using front end controller use a layout there using philsturgeon template library like this
function index(){
$this->template->set_layout('drawing')
->build('yourview');
}
This way you can load a custom layout for your application.

Joomla Save Module As Another Copy

I'm using Joomla 2.5.3.
I have this module that incorporates with authentication. For some reasons I want this module to be duplicated, so I save it as another copy.
Now, as its Module Type is same as the original one,say Auth, how do I customize the files of the copied module?
There is no folder for the copied module inside modules. Only the original one is there.
Thanks.
It depends on what you want to modify and how the module was created.
If the module was created using the MVC design pattern you want to modify ONLY the view (layout, html, css, js), then you'll need to check if the module supports multiple views/layouts or override the layout and create a view for each module depending on its Id. http://www.minitek.gr/tutorials/joomla-16-tutorials/item/21-how-to-create-a-new-custom-module-in-joomla-16.html
If the module wasn't created using the MVC design pattern, you could duplicate the module folder with another name and modify the name of the module in the xml, however it also depends on what the module does (does it write anything to the db?).
Maybe the easiest (probably not the best), would be modifying the current module depending on the module id. Check this out: http://docs.joomla.org/JModuleHelper/getModule
Think of a module as being similar to a class. You have one instance of the module created already. When you either clone the current instance or create a new instance there is still only one underlying set of files.
Each instance of the module contains its own individual settings so they should not clash with each other.
I can't think of any reason why you would need to customise the underlying files. If you do find a need then your best bet is to copy all of the files from the original module and use them as a base to build your own - entirely new - module, with a new name, new class names, etc.

How to create a DotNetNuke installation package with custom data, modules, and skins

I have a need to create my own DNN installation package that will include my custom modules and skins along with pages and sample data. Is there a way to do that?
You can setup the site how you want it (with the pages and sample data), and then Export a Portal Template from the Host -> Portals/Sites page.
Then, when you create a new site, add that template to the Portals/_default folder (alongside Default Website.template), and you can select that template when installing the site. Make sure that you also include the packages for your custom modules and skins in the corresponding folder (Module or Skin) in the Install folder.
In terms of sample data, only data in "portable" modules will be included in the template. This includes the HTML module. If you need sample data to come along with your custom modules, your business controller class will need to implement IPortable.

Resources