Joomla 3 on custon component Administrator notify - joomla

If you write one article in front-end like Author, Joomla send one notification to Administrator that advice that one new article was wrote. My component have ACL and work well but I not found where I must put the email sender. I must do a plug-in, I not found this in content component. Thnaks

Thou can create a content plugin which hold into the onContentAfterSave() or onContentBeforeSave() methods.
http://docs.joomla.org/J2.5:Creating_a_content_plugin

Related

How to disable registration email in joomla 2.5 and 3

When registering a new Joomla user, an email is sent to the new users email address containing the username and password. Does anyone know how to disable this functionality, so that new users does not recieve this email?
Note
Important to note that there are two scenarios to consider, each with different answers.
Scenario 1) An unregistered user registers a new user account for me#foo.com by using the frontend, where me#foo.com represents the user's own email address.
Scenario 2) An admin registers a new user account for her#foo.com using the backend, where her#foo.com represents someone else's email address (i.e. the email address of the account you are trying to create).
Based on comments from the OP, this question is targeting situation 2 - i.e. in this situation we do NOT want Joomla! sending emails to her#foo.com after creating an account for her in the backend.
Solution to Scenario 2
Login to the admin backend and then go to Extensions -> Plugin Manager.
From the Plugin Manager, locate the the plugin called User - Joomla! (Plugin type is user and Element aka Plugin file is joomla). Click on the title of the plugin to go into the configuration for this plugin.
Set Notification Mail to User to No.
Click Save.
References
plugins/user/joomla/joomla.xml
administrator/language/en-GB/en-GB.plg_user_joomla.ini
Rant
Finding this setting feels like discovering an easter egg. After you do find it you will see the seemingly straightforward description of the configuration setting, which, after rolling your mouse over the text at a moderate but not-too-fast velocity, triggers a popup balloon to begin a mocking fade in sequence, which, after finished, explains to you in a condescending tone exactly what the setting does. But before you've found this, you've most likely already visited the global configuration and played around with the email disable function there (but why would you want to globally disable emailing??), and you've probably also visited the User Module configuration, which also has a suspiciously named email configuration setting which however NOT apply to this situation (e.g. see http://www.inmotionhosting.com/support/edu/joomla-25/users/prevent-new-user-email-notification). You might have also searched around on the Internet and found some forum posts which suggest to disable this by hacking the Joomla! core (e.g. http://forum.joomla.org/viewtopic.php?t=280282). Seriously, with the recent discovery of the location of this configuration parameter I have to wonder what kind of altered state of mind the Joomla! folks had to have been in in order to come up with some of the weird ways in which things are organized in this strangely convoluted piece of software.
Check this,
In Joomla 3.x and Joomla 2.5 there is option for avoid sending username/password to the new registered users.
You can check this,
Login to admin -> Users Menu - > Options from tool bar -> Send Password (Yes/No).
Customizing core file do not recommended.
Hope its helps..

Where does contacts leads captured in Joomla contacts component

I am having one doubt about the contacts component in Joomla. I have used this component in my website. After that I found that whenever I have submitted the details, Mail will be generated and send it that user who have submitted. So I have two question now.
Where does this information get saved and how can I manage leads.
How can I edit the email which is sending to user after submitting the details.
Hope I make my self clear. If some one have any suggestion about that please help.
Thanks..
With the default Joomla contact component, the only details that get saved to the database are the contact details, which you manually add yourself in the backend. After sending an email, this information doesn't get saved in the database, it send and that's it, therefore you cannot manage any leads.
As your your second question, if I understand you correctly, then this basically gets answered in my first point above.
You might be best off having a look at the Contact Forms and Help Desk categories on the Joomla Extensions Directory.
Hope this helps
In general core Joomla contacts component doesn't store submitted info anywhere. It just gathers data and send it via e-mail to you, and the person who submitted form (if he checks to get a copy of contact).
Also e-mail content cannot be overwritten without editing Joomla core files (which makes it non update proof solution, which means after Joomla update you can loose all changes you've done).
You can edit layout of email sent in components/com_contact/controllers/contact.php file, method name _sendEmail, or if you just wan't to change texts: languages/YOUR_LANGUAGE/LANG_PREFIX_com_contact.ini
If you want more functionality, You might consider using Third Party contact form.

Change redirect after registration error in joomla

I wrote a plugin for joomla that adds custom fields to the user/register component. There are 3 different registration forms for different user groups.
The plugin acts on onUserAfterSave() and works fine, but there is one problem. When there is an error in the original user component, for example: "the username has already been taken" the form is redirected and neither onUserAfterSave() or onUserBeforeSave() is ever called.
I want to change that redirection, but without changing the core, but since neither plugin events are called, im not sure how to. Can you guys help me? Maybe I am missing something!
Is it possible to maybe override the save() function?
THANKS
I had same problem many times, so i can share a solution i use myself. If you don't want to edit Joomla core files, you can do the following:
Create your own template override of registration view.
Duplicate the components/com_users/controllers/registration.php file and lets say name it registration2.php
In your registration form override change hidden input's "task" value from registration.register to registration2.register
Feel free to override registration2.php classes how you like.
It's totally Joomla update proof, so you can update your joomla version witht worrying about errors.
I think you might need to do the checks that joomla is doing in your plugin and redirect in your plugin itself in the case that it wont pass. I see your predicament and I don't know a better way but I would pick a different event to run it on maybe even after page load and then on UI event in javascript.
The only clean way to extend the user registration/profile is to create a profile plugin like this one
https://github.com/joomla/joomla-cms/blob/master/plugins/user/profile/profile.php
You can extend com_users forms in backend and frontend.

Joomla 2.5 - Modify registration form and logic

Hello I'm new to Joomla and I want to change the way an account is created (in Joomla 2.5):
Change the registation form (remove one or two fields)
Change the registration logic: I want to add more stuff in the sent email (and a pdf attachment) and also i want to call some other functions (or make extra requests), analyse the result and then return the response to the client.
What ways are there?
Had an earlier answer for an earlier version that didn't apply, but found this tutorial to get myself up to speed. it lists all the files, etc. that you need to make changes to, but doesn't mention your email requirement. To do that, you'll likely have to look at function register($temp) in components\com_users\models\registration.php
You can change the settings from the component directory of the template in the PHP file.
you can if you install SEBLOD, it's a content constructor that can modify article form, user registration form and much more.
It will help you with almost everything you need, but to call other functions or make other requests you will nedd to digg a little more into Joomla registration.php

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