Main menu

Forum


× Help Forum English

Username in email notification and front-end list/approval

  • cholzsch
  • Topic Author
  • New Member
  • New Member
More
10 years 3 months ago - 10 years 2 months ago #8098 by 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?
Last edit: 10 years 2 months ago by Lyr!C.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
10 years 3 months ago #8124 by 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 Attachment:

Please Log in or Create an account to join the conversation.

  • cholzsch
  • Topic Author
  • New Member
  • New Member
More
10 years 2 months ago #8151 by 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.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
10 years 2 months ago #8169 by 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 Attachment:

Please Log in or Create an account to join the conversation.

Moderators: Lyr!C
Time to create page: 0.160 seconds

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new