Need guide on Joomla - joomla

Its my first time to work with Joomla and I need to make a plugin that basically stores/updates a name and a City the thing is that I want this functionality only in admin panel not in the front end.
Its a bit confusing to me weather I should create a component or a module or a plugin ?
Does anyone has a good guide on how to create such functionality?
Thanks in advance.

If you don't know when to use a module, a plugin, or a component, then a good starting point would be here.
Typically, a module is essentially used for displaying content on specific pages in a specific location. A plugin usually works in the background (modifies displayed content, computes stuff, alters the database, processes payments, etc...). A component is like the Joomla articles component (com_content), in most cases, a component occupies the biggest part of the page (while a module occupies a smaller part).

Related

How to create a custom component for Joomla 3.3?

I'm new to Joomla and I'm confused, so I need your advice on this. I have to create a plugin which connects to an API and shows base64 PDF on a page. So, I created my PDF viewer, but I don't know how to pack it up in Joomla. It's not just "custom HTML", it has to be a separate package so it can be installed on other Joomla sites. I guess it also has to have a database to store some settings (e.g. API URL). I want users who install this extension to be able to go to Modules > New Module > PDF Viewer, and from there they can set up API URL for that module. Users will be able to create modules of this type on multiple pages and to be able to set different API URL for every page. So, what do I need? An extension, component, module...? I searched for tutorials and read Joomla docs but I'm still confused. Please help me, what to do, some guide, where to put files, where to upload them etc. Thanks
You could actually go about this with a component, plugin or module:
I think a component would be the most complex in this situation. As you are probably already aware, a component is like an application which renders itself in the main click of the website.
If you were to create a plugin, you could generate a short code snippet based on the name of the plugin which could then be added to an article, which would then display the PDF within the article. For example:
{PDFgen=NAME_OF_PDF}
or
{PDF}name_of_file.pdf{/PDF}
Creating a module in my opinion would be the easiest. As once you've added the functionality to render the PDF, the user can either display it as a module (like a sidebar widget), or they can also import it in their article using a built in Joomla feature. Assign a custom position to the module, then add the following anywhere within an article: {loadposition XXX}, where XXX is the name of the custom position you assigned to the module.
Out of all honest, you should develop it in a way you feel most comfortable with. Just make sure when you do it, that you stick to Joomla coding standards.
Hope this helps

Where to add Google Remarketing tag in Magento

I am trying to figure out in which file I need to add the Google remarketing tag. I know it needs to be added before the closing of the body tag. Can anyone point me in the right direction?
Thanks
here is I did in the past:
Depending on what kind of google tracking you are using you have a few different way to use:
1) If only add a custom code and should be in all the Magento page, use the "Miscellaneous Scripts" value going to admin section, System > Configuration > Design > HTML Head - Miscellaneous Scripts. (This will be included before head closing tag in page HTML.)
2) By native Magento already have Google Analytics tracking code and you can find this configuration going to admin section System > Configuration > Google API - Google Analytics.
3) If you are looking something more complex and use the Google adWords I used the extension magento connect link. For a particular Client I did some extra modification to include some extra code if a client subscribe to newsletter or a new client etc.
I hope you can find something helpfully in the post.
Best,
GrinGo.
There are different template file for different pages in magento so at first I think you should decide where to place it.For example if you want to place it in footer than you should place that code snippet in
"app/design/frontend/base/default/page/html/footer.phtml"
Similarly you can check other different template files to place your code.
NB:Best practice is to overide the core file of magento before making changes to it.
Hope this will help.
There's no indication as to which Magento version you're using 1 or 2. At the end of the day it depends how much technical knowledge you have and if you're using a version control system to manage your Magento build.
Miscellaneous Scripts as another answer mentioned earlier, this approach is straight forward and very easy to use to plug and play your code.
Google Module depending which version of Magento you use (CE/EE) there will be a built-in section for you to plugin your account ID in backend Magento configuration and then the platform will generate necessary code for you.
Write custom module by writing your own module you can place it the snippet anywhere on the page by targeting before_body_end node in your layout XML file. This is more technical but gives you more control over what you can do.
Google Tag Manager this also depends on if your Magento version comes pre-built with Google Tag Manager module, then you can create a container and place all your logic in there. This is also more technical and require the output of some values in JS format on the frontend to let GTM read the values.
At the end of the day go with what is easy to setup, portable and easy to manage. I usually go with Google Tag Manager as it takes time to create initial setup of exposing data on the frontend but then I have full control of what I want to do with that data through tag manager. In most cases you'll end up using the same data (ex. totals, shipping method, product IDs, SKUs, cost, etc.) in more than one third party API so this gives you flexibility to do just that.

How to add new component parameters in Joomla on the fly?

usually its done by setting up the config.xml but what to do when my component needs more parameters at run-time ? There is little or zero information about, just 1-2 tutorials about custom parameters which could be used to archive the same thing but only if you're willing to write lots of bloat code for a very simple thing.
In my case my component is rather a little platform in it self, ie: users can add plugins from us. Of course I'd like to expose some options for such plugins in the component's options.
Is there any shortcut because if you look at the built-in component's code, you really don't want to do the same for each plugin...
well, thanks! any thoughts are welcome!
ps: may be there is something more compact like the Redux-Framework for Wordpress. I'd love to know there is library which can server both CMS systems.
update
'component' = Joomla component and by 'plugin' I mean my and non-Joomla plugin, hosted in a Joomla component. Imagine your Joomla component is just a host for external plugins.
You need to create a custom field type, where you'll be able to implement all the logic that's needed.
In case you need to store the values with the component, add a hidden input field, and use javascript to populate the markup on load, and insert the values you want to store on user interaction (you can also store an object encoded in json). Joomla will take care of saving and retrieving it.
the docs

customizing componnet in joomla

i have created a component using this http://www.notwebdesign.com/joomla-component-creator/index.php component creator how can i add a simple registration form in that and also make its backend looks like the other component
The name of that utility is a little misleading since it only creates the structure of a component. If you want to add functionality to the structure created you will need to actually put in the code that does what ever you need it to do. Think of this as the foundation and framework of a house. You actually have to put the walls up and furnish it.
It would probably be helpful to understand the files that have been created for you so you know what needs to be added. I would recommend learning how to build a component from scratch first. Joomla has pretty good documentation on that here - http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
i have develop the Lots of component from this site http://www.notwebdesign.com/joomla-component-creator/index.php .
1) First Create the components and give the name and crrate the require field fo the registration from .and save the components then after the download this components.
2) Install the components in your joomla site.
3) Go to the Fornt-end view components folder. and create a form in the default.php page and save and update operation query is written in the model .
Your Registration page is ready.
This tutorial is the best I have come across so far. It will hopefully guide you to understand the MVC structure that the component generating site delivers to you.
I am actually the developer of the Component Creator you have used. It only creates the MVC files and structures needed to quickly create a component. You still need quite good PHP skills to develop a fully working component.
The component creator helps developers with the tedious tasks of building the framework.

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.
If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).
If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.
Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.
What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.
EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.
The JForm class helps you build forms.
Documentation can be found here:
joomla CMS: http://docs.joomla.org/API16:JForm
joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html
This class provides you with ready to use form elements and form loading and/or processing methods
This class includes validation methods, date picker control, color picker, etc.
Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.
The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new
This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Or you could just create add a html module to any position and then write the form in html i.e.
<form method="post" action="mycreatedpage.php"> <input type="text"/> <input type="submit">
Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.
Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.
I have got good working experience with Joomla RSForm Pro. It has got options for
validation
user email/admin emails on submit
file uploads
and many more
Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html
Good luck!
Create View.
Create Model.
Create Table.
Create Controller ( if Needed ).
Create Form xml file.
Go here for more information:
http://docs.joomla.org/Standard_form_field_types
Take a look at the Chronoforms extension - does more than you want.
You have two options:
Use an already built custom form extension
Create your own custom form extension (or outsource it)
Now if you only want to modify the user registration form, then you can do some PHP customization to accomplish your goal.
Making forms in Joomla can be done in a couple of ways.
If you just wanted a contact us, you can just create a page with a menu item for the User contact form. This gives you a page with a Members address and contact form. So all you would need to do was add the user as the company of the websites home address and email. But the form is very basic, name, title, textarea for message.
Next up from that you could just make a Custom HTML module add add a form to it in plain HTML like +Sean said above this, you would need to code in PHP your own form process script. You would not get error in form data checking unless you also wrote it.
Next you might rather look on the Joomla Extension Directory JED for one of the good extensions for 3 and 2.5 Joomla RSForms!Pro is good, and can do all we have needed. This lets you add fields one by one and move your form around. Then can auto generate or custom the html of the form.
You can easily create your own forms with Fabrik
Chronoforms are now a days a very popular solution for custom forms in joomla. Chornoforms support twitter bootstrap also. In simple 5 steps you can create a contact form with unlimited fields and also embed various function like DB save, Email, Thanks Message, Redirection on any page. There is events and events will have particular events.
Also possibility of extension of Normal joomla registeration. It will not extend the core registration but at the time of registration you can take various information from users.
I would use Chrono Forms, they work really well and are easy to use.
Download here
Here is a full tutorial on the new Chronoforms 5 to help you get started quickly and understand most of the features available.
CLICK HERE
You can use plugin to insert external php form in content. It is easy and you don't need to make plugin etc. Please use this.
I suggest you to use breezingforms: http://crosstec.de/en/extensions/joomla-forms-download.html
It's one of the best solutions for custom form creation in joomla.

Resources