Main menu

Forum


× Help Forum English

Username in email notification and front-end list/approval

  • cholzsch
  • Autore della discussione
  • New Member
  • New Member
Di più
10 Anni 3 Mesi fa - 10 Anni 2 Mesi fa #8098 da cholzsch
I am using ICagenda 3.3.5 as a simple registration system for an HOA (Home Owners Association) picnic area. Administrators of the HOA website receive the submission via email and click on the link in the email to review/approve the event (reservation). On the front-end event form, they need to be able to see the user that submitted the event before approval. I can see where the phone# field and email field can be displayed in that view, but we need to see username. Has anyone set this up, and if so, how did you accomplish it?
Ultima Modifica 10 Anni 2 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 3 Mesi fa #8124 da Lyr!C
Hello,

It's possible by editing the core code, but not recommended...

In fact, iCagenda is in full re-factory (i'm recoding many files, many migration of functions from component to libraries, and many others improvements).

Submission email notification is not yet re-coded but will later when i will improved it.

Today, you have to edit the file ROOT/components/com_icagenda/models/submit.php

And add $this->data->created_by_alias as a param of the notificationManagerEmail to be able to display it in the body of the mailer (using standard mailer of Joomla).

Of course, this needs a little knowledge in php and Joomla dev.

Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • cholzsch
  • Autore della discussione
  • New Member
  • New Member
Di più
10 Anni 2 Mesi fa #8151 da cholzsch
Thanks, you've headed me in the right direction.

I edited ROOT/components/com_icagenda/models/submit.php and added
$this->data->created_by_alias and this->data->created_by_alias as
a param in notificationManagerEmail function:
	function notificationManagerEmail ($eventid, $title, $menuid, $u_id)
	{

		$created_by_alias = $this->data->created_by_alias;
		$created_by_email = $this->data->created_by_email;
		// Load iCagenda Global Options

then added both to body of admin email:
// Set Body of User Notification Email

			$adminbodycontent = JText::sprintf( 'COM_ICAGENDA_SUBMISSION_ADMIN_EMAIL_HELLO', $username).',<br /><br />';

			if ($type == 'approval') {
				$adminbodycontent.= JText::_( 'COM_ICAGENDA_SUBMISSION_ADMIN_EMAIL_NEW_EVENT' ).'<br /><br />';
				$adminbodycontent.= 'Username: ' . $created_by_alias . '<br /><br />';
				$adminbodycontent.= 'Email: ' . $created_by_email . '<br /><br />';

created_by_email is sent in email, but not created_by_alias? It would also be nice to send Event Title and Event Date-Time.

Thanks for your help.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 2 Mesi fa #8169 da Lyr!C
You're welcome! ;-)

About created_by_alias is not an automatic field! It is an optionnal field of Joomla to able you to display another name as the creator, when editing or creating with an account.

So, if not filled, it's empty, and it's normal! It is an alias, or pseudo if you prefer.

If you want the username, so your can get the "username" data ;-)

If you look at articles in Joomla, you will see it's the same behaviour.

It would also be nice to send Event Title and Event Date-Time.


When i will be at this stage of the development, i will create a similar notification email, with tags, as the one for registration (which one i'm currently improving a little) ;-)

Best Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.088 secondi

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new