Main menu

Forum


× Help Forum English

Username in email notification and front-end list/approval

  • cholzsch
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 10 ans 3 mois - il y a 10 ans 2 mois #8098 par 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?
Dernière édition: il y a 10 ans 2 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 3 mois #8124 par 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • cholzsch
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 10 ans 2 mois #8151 par 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 2 mois #8169 par 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.072 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new