Getting last updated time of module in Joomla - joomla

I have written a simple Joomla! 3.x module to provide a notice to users for a site, but as part of the notice I want to display the "last Updated" details - so they can see when the information in the module was last updated. Is this information stored anywhere? or is there a way for me to automatically get/store this when the module is saved so I can retrieve it through the normal params?
I suppose worst-case scenario I could have JS run on click/change of the module config or save button to populate a hidden field with a timestamp - but that seems a bit hacky and I'd prefer not to do this if I don't have to :)
Thanks as always in advance :)

Related

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

Should I build my own PyroCMS module...?

I'm using PyroStreams on my PyroCMS-based site, which is working great, but the front-end search functionality it offers is a bit too limiting for my needs.
My stream consists of over 20 fields. On each page of the site I want a simple keyword search box which will search on 3 of the fields in my stream. Currently I'm using the PyroStreams search form for this and it's working great.
But I also want an advanced search page which will build a form based on all 20 fields, pulling in data from the stream to build it, e.g. in my steam I have a field-type of Country and on my advanced search form I want to include a dropdown list containing all the countries found within that field-type.
What I'm asking is what is the best approach to doing this?
Should I build my own module, separate from the PyroStreams module to perform this, or is that a bit of a sledgehammer to crack a nut?
I'm a bit of a novice in this field so all help & advice is greatly appreciated.
Tony.
Just Grab sample module from here...https://github.com/pyrocms/sample and understand the folder and file structure.. Its quite easy to develop custom module in pyrocms.You just have to provide basic module detail in the detail.php to install the module. then create a new controller with the same name as module in controllers folder and same for the view and model. you can easily understand once you will go through the sample module..
url stucture will be like this
{{ url:site }}controller_name/method_name/paramate of method.
Hopefully this will help you..
This is a late answer, but PyroCMS now has a search module.
You can see the documentation to learn how to use it from a developers point of view here:
PyroCMS 2.2 Search Documentation

Joomla: What's the Object to get value from current content, if Registered only?

I need to know if the content being displayed to the user, is for registered only, not public. I think I can't do this trough JDocument or Mainframe, etc. I'm trying to figure this out. Any help on this subject?
Thanks for your attention,
Have a nice day!
You'll need to load the article from the database. JDocument and the Application Mainframe objects control Joomla as a whole, while the article is managed by a component within Joomla.
If you're ultimately trying to modify the article before it's displayed, you can write a Content plugin, which will automatically have the article loaded. If you're trying to do something elsewhere, you'll need to detect when someone is viewing an article, extract the article id, then load the article from the database.

Resources