All questions about EDocman extension

Upload email body fields

More
7 years 11 months ago #82880 by chuzo
Upload email body fields was created by chuzo
Hi!

I'm using Upload Notification system to get email notifications when a new document is uploaded to one specific category.

In the documentation, I could see:

Upload email body: Available tags : [USERNAME], [DOCUMENT_TITLE], [USER_IP]

I would use others fields, as DOCUMENT_LINK, CATEGORY_TITLE, that I see in this post: joomdonation.com/forum/edocman/50424-not...ument-is-public.html

Is it possible?

Thanks!

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

More
7 years 11 months ago #82887 by Mr. Dam
Replied by Mr. Dam on topic Upload email body fields
Hi Chuzo,
Yes, you can use tags: DOCUMENT_LINK, CATEGORY_TITLE if you want.
Thanks
Dam

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

More
7 years 11 months ago - 7 years 11 months ago #82889 by chuzo
Replied by chuzo on topic Upload email body fields
Thanks Dam!

I'm using this, but variables don't replace:



This is the email generated. Only DOCUMENT_TITLE is correctly replaced with its value.

Attachments:
Last edit: 7 years 11 months ago by chuzo.

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

More
7 years 11 months ago #82890 by Mr. Dam
Replied by Mr. Dam on topic Upload email body fields
Hi Chuzo,
Please open file:

root > components > com_edocman > helpers > helper.php

Find:
Code:
$sql = 'SELECT parent_id, notification_emails FROM #__edocman_categories WHERE id=' . $categoryId;
and change to:
Code:
$sql = 'SELECT parent_id, notification_emails,title FROM #__edocman_categories WHERE id=' . $categoryId;
Find:
Code:
$body = str_replace('[DOCUMENT_TITLE]', $documentTitle, $body);
and add this below:
Code:
$body = str_replace('[DOCUMENT_LINK]', "[b][i][u]http://youdomain.com[/u][/i][/b]/".EDocmanHelperRoute::getDocumentRoute($row->id);, $body); $body = str_replace('[CATEGORY_TITLE]', $category->title, $body);

On above code, you should change: youdomain.com by your website url.
Thanks
Dam
The following user(s) said Thank You: chuzo

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

More
7 years 11 months ago #82891 by Mr. Dam
Replied by Mr. Dam on topic Upload email body fields
For example:
body = str_replace('[DOCUMENT_LINK]', " joomdonation.com/".EDocmanHelperRoute::getDocumentRoute ($row->id);, $body);

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

More
7 years 11 months ago #82893 by chuzo
Replied by chuzo on topic Upload email body fields
Thanks Dam,

But, you would include this changes in next release of edocman?

If I updated component in the future, I'll lose this changes.

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

More
7 years 11 months ago #82895 by chuzo
Replied by chuzo on topic Upload email body fields
DOCUMENT_LINK is working now, but CATEGORY_NAME is removed in generated email, not replaced by name.

Attachments:

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

More
7 years 11 months ago #82924 by Mr. Dam
Replied by Mr. Dam on topic Upload email body fields
Hi Chuzo,
You can submit ticket and send your site information with super admin account for checking the problem.
Thanks
Dam

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

More
7 years 11 months ago #82930 by chuzo
Replied by chuzo on topic Upload email body fields
Sorry Dam, but my site is not yet publish, it is only accesible in the local network :(

I could see that $category variable is not defined:

function sendUploadNotificationEmail($row, $config, $categoryId)

function sendUploadNotificationEmail has $categoryId parameter, but not $category, so $category->title is not defined, and replace function change [CATEGORY_TITLE] with empty string.

Could you help me to get category name with $categoryId value?

Thanks

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

More
7 years 11 months ago #83178 by chuzo
Replied by chuzo on topic Upload email body fields
Please, could you help me?

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

Moderators: Mr. Dam