I have one project that I have to sell to another clients, so I wanna found a way to unify the code to, when I release some updates, I have to manipulate only one code (and, of course, keeping the specificities from each one)
I found an article HERE which the guy creates a new folder named 'config' and set some variables there to be used in the parent project. I tried this but find out that would be very tough to do because the first app was developed specifically by one client, and with it I would need so much time to make all the aspects dynamic... Another problem is firebase, in first app I used firebase but in the second i won't. How to make it possible?
And in this article they say about 'flavours' that can be used to do something similar.
Someone knows about this approaches or there is another to reach my goal? With flavours I will have less re-factor than with config?
I appreciate any help
A third way to do this with no client specific app configuration is to make an api call to get back your client specific theme, and then set the flutter theme based on this.
If you need web support see below:
First update your assets in index.html that aren't white labeled, leaving stubs in their place that we'll fill in later. i.e.
Next show a nice loading indicator while flutter loads. To do this, just put the html for it in the body element of the index.html file.
Finally update the webpage title and favicon using javascript inside Flutter. I used package
universal_html: 2.0.8
https://pub.dev/packages/universal_html
then you can update the favicon
import 'package:universal_html/html.dart';
var favicon = document.getElementById('favicon');
favicon?.setAttribute('href','insertLinkToYourImage');
Updating the title can be accomplished in various normal ways like just setting the title attribute of a MaterialApp widget.
I'm just trying to find a simple way to show a joomla component as a module, do u guys know how to get this done?
BTW, I am using Joomla 1.5.
Thanks!
The Joomla API defines Components and Modules as two different things. You can't plug a component into a place where a module goes.
You can create a module plug-in that displays information from the component. For example, most calendaring components also ship with a module so you can display a small calender in the side-bar.
There are a bunch of extensions that do this already. Take your pick -
http://extensions.joomla.org/extensions/core-enhancements/embed-a-include
Greetings. I'm a newbie to Joomla and learning the same. I have created few modules to be displayed on the first page of my joomla website. However, I understand that they can be easily configured through the admin backend. However, I want that two of those modules, which occur in the left pane/side bar, be displayed ONLY if the user is currently logged in.
Can anyone please let me know how do I conditionally display my modules?
Ideally, I would like the left panel to be hidden without login and after successful login, the left panel modules should be visible.
Also, I would prefer following the Joomla! standard, so I don't want to change the Joomla core for this.
Kind Regards,
Verisimilitude.
You are in luck, Joomla does this natively. In the module set up in the Details section there is a setting called Access Level. Set that to registered and the module will only show up to registered users.
Assuming that your template is coded properly, the left column will collapse if there are no modules to be displayed.
I want to develop a GWT application. The application contains 8 modules and all the modules run in a single page.
I have links for all the 7 options on the top.
When the page loads I want only the home content to be loaded and displayed.
Only when the user clicks the menu options, the menu content should load.
Can anyone suggest the best way to achieve this.
This has been addressed in GWT 2.0... First you'll remove the separate entry points you have for each module - since they're all on the same page, you only need one entry point per page.
Then you can use the GWT.runAsync() method at each point that you feel can be a split... it automatically cuts up the code into chunks that are downloaded as and when necessary.
Look here for the docs.
AFAIK, lazily loaded (or pluggable) modules can't be done in GWT. Partly this is due to the way the GWT compiler works - it likes to import all the code that it is ever going to see and then optimises and prunes it as viciously as possible (to make the resulting JS files as small and lead as possible). If it doesn't have access to all the source code up front, it might make optimisations that will break the pluggable modules (especially since nothing in the "core" application may reference the classes that the lazily-loaded modules need to work properly - the GWT compiler would prune those "unused" classes in the core module).
This stackoverflow question from May 09 asks the same thing and has the same answer - it can't be done.
I searched high and low about six months ago for an answer to this problem, because I really wanted to do what I believe you're asking for. Never found a solution.
(I haven't used GWT 2.0 - it might have addressed the issue)
Thank you for your answer. You are right that the whole Javascript code gets downloaded.
But there must be a way like say on of module is View Profile. Only when the user clicks the view Profile link, the widgets related to displaying my profile needs to be created. is this not possible.
What is the difference between Joomla components, modules, extensions and plugins?
Plugins
Plugins enable you to execute code in response to certain events, either Joomla core events or custom events that are triggered from your own code. This is a powerful way of extending the basic Joomla functionality.
Components
Components are the main functional units that display in your template, like the content management system, contact forms, Web Links and the like. They are usually displayed in the center of the main content area of a template (depending on the template).
Modules
A more lightweight and flexible extension used for page rendering is a module. Modules are used for small bits of the page that are generally less complex and able to be seen across different components. Sometimes modules are linked to a component such as the core latest news module.
Extensions
Components, languages, modules, plugins and templates collectively known as Extensions.
Quickstart tutorial for free.
Components
A component is a separate application. You can think of a component as something that has its own functionality, its own database and its own presentation.
So, if you install a component, you add an application to your website. Examples of components are
a forum
a newsletter
a community system
a photo gallery
You could think of all of these as being a separate application. Each of these would make perfectly sense as a stand-alone system.
A component will be shown in the main part of your website and only one component will be shown. A menu is then nothing more than a switch between different components. You can compare it a bit with your windows taskbar, where you see a tab for each open application.
Modules
Modules are extensions which present certain pieces of information on your site. It's a way of presenting information that is already present. This can add a new function to an application, which was already part of your website.
Think about
latest article modules
login module
a menu
Typically, you'll have a number of modules on each web page.
The difference between a component and a module is not always very clear. A module doesn't make sense as a standalone application, it will just present information or add a function to an existing application.
Take a newsletter for instance. A newsletter is a component. You can have a website which is used as a newsletter only. That makes perfectly sense. Although a newsletter component probably will have a subscription page integrated, you might want to add a subscription module on a sidebar on every page of your website. You can put this subscribe module anywhere on your site. You'll probably agree with me that a site with just a subscription module and no actual newsletter component would be rather ridiculous.
Plugins
They used to be called mambots in Joomla 1.0.x, but since Joomla 1.5.x they're called plugins. A plugin is a function which is performed on a part of Joomla before this part is shown. This part can be on content, on the editor, on the complete system, etc. This might seem a bit abstract, but you'll understand it with an example.
Let's take one of the plugins of Ulti Joomla as an example: Ulti Reflection. This is a plugin which can make a reflection of the images you use in your content articles. To use this you just have to put something like
inside your content. Before the content is shown to the user, the Ulti Reflection plugin will scan the content to find the {reflection} tag. If it finds the tag, it will replace the tag with the image and its reflection.
Be carefull not to put to many plugins one your website, because some of them can really slow down your site.
If the difference between the three types of extensions is still not completely clear, then I advice you to go to admin pages of your joomla installation and check the components menu, the module manager and the plugin manager. Joomla comes with a number of core components, modules and plugins. By checking what they're doing, the difference between the three types of building blocks should become clear. You can also check out the official Joomla extensions page. Browse through the extension categories and you'll be amazed about the extension possiblities you have for your site.
Modules and components are displayed on a page.
Plugins operate behind the scenes and can do a multitude of things, like replacing content with other content, perform searches, perform login/logout functions, or anything really tricky that you can imagine.
There can only ever be one component on a page. When you choose menu items, you are actually choosing the component that you wish a page to display. The variables for the component are stored once (in the database), so you can't have multiple instances of the component!
On the other hand, modules are added multiple times. You can have many modules on the one page. In fact, you could have 100 instances of the same module on the one page. The variables for a module are stored against each instance. (in the database).
This is why joomla templates have one place holder for a component, and many place holders for modules.
A module can be added to an individual page (menu item) , or seleceted pages, or all pages.
Remember that a menu item is indeed a component choice. Each menu item does store variables in the database, so it is possible to feed the component display details. E.g. what page id the content component is to display.
In the back end, components can have many backend settings and functions, and "do" many more things than a module.
Examples of a component are:
com_content (displays articles...)
a bulletin board
a forum
a sitemap
Examples of a module:
a countdown clock
top 10 most read content
a poll
Unless you understand the difference between a module and a component, you will find it very difficult to administer your Joomla installation.
Modules
Modules are usually small pieces of functionality designed to present information in your site. They can appear a number of times, on a number of pages in various positions. On the contrary components are a full blown application, usually quite complex and are to the main body if a page. Also each module can be viewed in various pages, and the position of each module can be easily changed. You are allowed to select the menu items where a module is displayed. A good example of the usage of this functionality is targeted advertising. If your site has various sections, you can create module for each section. Each module will contain a targeted advert for the section. Now instead of showing all the modules, all the time, you customise the visibility of the module such that each advert is displayed only in the relevant menu links. Typical examples of standard Joomla modules are : Main / User / Top and other menus, Latest News, Popular Articles, Polls, Login Form, Syndication Details etc.
Components
On the other hand, a Joomla component is typically more complex, with extensive functionality and capabilities. A component can only be displayed in the main area of a page, and can only be displayed in a single page (usually). Links to components are usually done by creating menu items. Components usually have a particular page or pages for their configuration.
Extensions
Joomla extensions extend the functionality of Joomla websites. Five types of extensions may be distinguished: components, modules, plugins, templates, and languages. Each of these extensions handles a specific function.
Comdev is a Joomla development services provider, which provides varirties of extensions like: JomOffers, JomDirectory, JomHoliday 3, JomEstate, JomEvents.
Source: http://comdevjoomla.blogspot.com/