User Avatar

Help Desk ›› How to ›› User Avatar
13 July, 2021 07:04:21
shahinparsa1328
Topics: 1
Messages: 11
Hi i am using ultimate membership pro. i want show user avatar.
please guide me.

thanks a lot
13 July, 2021 07:30:51
Oleksandr
Support
Topics: 7
Messages: 2201
Hi,

If you are using default WordPress avatar management - try to use following shortcode to get avatar for current user:

[e2pdf-user id="current" key="user_avatar"]

If it will not work, it can be that it stored by "ultimate membership pro" under custom meta data, you must be able to find it under "Visual Mapper" if E2Pdf Template connected to "WordPress". Screenshot attached.

It's recommended to use "textarea" to see which output you get.

- If you will get Image URL then you will need just to map this meta key to "Image" object inside E2Pdf Template.

- If you will get Image ID instead of Image URL, then it will be need to update shortcode to something like below to get Image URL instead of Image ID:
[e2pdf-user id="current" key="mymeta" attachment_image_url="true" meta="true"]
OR
[e2pdf-user id="current" key="mymeta" attachment_image_url="true" size="full" meta="true"]

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
13 July, 2021 08:17:20
shahinparsa1328
Topics: 1
Messages: 11
now. how is sh pdf on tab membership card showing?
13 July, 2021 09:34:23
Oleksandr
Support
Topics: 7
Messages: 2201
Sorry, what do you mean by "how is sh pdf on tab membership card showing?"

E2Pdf Template must be connected to post type where you plan to place [e2pdf-download id="1"] shortcode (where 1 is the ID of E2Pdf Template). It can be done under options of E2Pdf Template (screenshot 1). So in case with "Ultimate Membership Pro" it must be connected to pages if you you want to show on edit profile page.

One of the way to add PDF download link is to use hook to add custom tab as: https://docs.ultimatemember.com/article/65-extend-ultimate-member-account-page-with-custom-tabs-content

Here is the code adopted to work with E2Pdf: https://codeshare.io/zyymYb. Function must be added to your theme functions.php and 246 must be replaced with the ID of your E2Pdf Template.

It will add custom tab and will render PDF download link as on screenshot 2.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
13 July, 2021 10:45:51
shahinparsa1328
Topics: 1
Messages: 11
Put it in this tab
13 July, 2021 11:02:17
Oleksandr
Support
Topics: 7
Messages: 2201
If this section has possibility to insert shortcodes you must be able to insert shortcode [e2pdf-download id="1" dataset="2"] where 1 is the ID of E2Pdf Template and 2 is the Page ID if E2Pdf Template connected to Pages.

If it doesn't have section where you can put shortcodes you must follow the way to add it with same syntax via "ultimate membership pro" hooks as:

echo do_shortcode('[e2pdf-download id="1" dataset="2"]');

You must be able to find out correct dataset via "E2Pdf" -> "Export" by choosing needed E2Pdf Template and choosing dataset.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
14 July, 2021 07:07:58
shahinparsa1328
Topics: 1
Messages: 11
Hi
thanks a lot for excellent answer you
one other qustion:
how rename download word?
14 July, 2021 07:20:28
Oleksandr
Support
Topics: 7
Messages: 2201
Hi,

You can set it inside E2Pdf Template under "Button Title" setting. Screenshot attached.

Or add "button-title" attribute to shortcode as:

[e2pdf-download id="1" button-title="Custom Button Title"]

We remain at your service.

If you appreciate our support , we would really appreciate your feedback at WordPress.org!
14 July, 2021 23:48:39
shahinparsa1328
Topics: 1
Messages: 11
Hi
I create new field in Membership Pro, now how can i call that field?
thanks a lot
14 July, 2021 23:55:21
Oleksandr
Support
Topics: 7
Messages: 2201
Hi,

You need to click on field with "Right Mouse" -> "Map Field" and find created needed meta key for that field. It must be located under "User Meta Keys" section. It must look something like

[e2pdf-user id="current" key="somekey" meta="true"]

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 00:12:20
shahinparsa1328
Topics: 1
Messages: 11
i used this code, but not work.
[e2pdf-user id="current" key="ihc_avatar" attachment_image_url="true" meta="true"]

please guide me
15 July, 2021 00:18:10
Oleksandr
Support
Topics: 7
Messages: 2201
Create please "textarea" inside E2Pdf Template and map it with:

[e2pdf-user id="current" key="ihc_avatar" meta="true"]

Will it output anything?
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 00:23:32
shahinparsa1328
Topics: 1
Messages: 11
not working
15 July, 2021 00:35:10
Oleksandr
Support
Topics: 7
Messages: 2201
Attach please screenshots:

- E2Pdf Template where "textarea" mapped and visible
- Screenshot of generated PDF.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 02:04:15
shahinparsa1328
Topics: 1
Messages: 11
the problem is solved.
thanks
15 July, 2021 02:18:17
shahinparsa1328
Topics: 1
Messages: 11
in Ulitimate Membeship Pro we can Membership Plans for users. now how show type plans on card?
aslo
how show date start and date end type plans?
15 July, 2021 02:53:43
Oleksandr
Support
Topics: 7
Messages: 2201
Do you need to extract user plans? Or all plans which is available?

Can you please attach "Ulitimate Membeship Pro" plugin to next message as we need to check if it's possible to extract this information as it will require complex shortcode structure to build. You can mark message as "Private" so only we can see and download it.

In general you need to find out how plans stored under user, extract Plan ID and extract Plan information by this ID.

The shortcode will look something likes this:
[e2pdf-wp id="dynamic" key="post_title"][e2pdf-user key="plans" meta="true"][/e2pdf-wp]

* This is new feature and it's not yet documented.

It will extract post_title of the Post ID which will be rendered with [e2pdf-user key="plans" meta="true"], "plans" is not exact meta key, it's just example. However "Ulitimate Membeship Pro" can store plans in "terms" also and it could be need to navigate via arrays via "path" attribute as described on that page: https://e2pdf.com/extensions/wordpress.


If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 04:58:51
Oleksandr
Support
Topics: 7
Messages: 2201
Ok, thank you. We will let you know as soon as we complete review.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 06:52:47
Oleksandr
Support
Topics: 7
Messages: 2201
Unfortunately after reviewing "Ulitimate Membeship Pro" it seems not possible to get this information without coding as plugin using own structure / functions / tables instead of default WordPress functionality.

We see that it has some builtin shortcodes like [ihc-user]. For example [ihc-user field="level_list"] will extract plan names but it doesn't include "dates". You can try to contact to "Ulitimate Membeship Pro" and ask maybe they have some special shortcodes to get full data.

P.S. Keep in mind please that "ihc" shortcodes will work only on frontend and will not work from backend ("E2Pdf" -> "Export") due the "Ulitimate Membeship Pro" structure.

As another possible solutions you can:

1. Use E2Pdf hooks to change output of [e2pdf-user] shortcode:

https://codeshare.io/zyy8YW

If it will be used [e2pdf-user id="current" key="custom_key"] it will output "Content to OUTPUT".

2. Add own custom shortcodes to wordpress which will be able to output needed data and use these shortcodes inside E2Pdf Template.

Any of above points will require PHP coding / WordPress structure knowledge.

We remain at your service.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
15 July, 2021 11:01:11
shahinparsa1328
Topics: 1
Messages: 11
H
plugin e2pdf not support arabic language.

please guide me
15 July, 2021 11:30:39
Oleksandr
Support
Topics: 7
Messages: 2201
You must use font which support "Arabic" characters. You can upload it at "E2Pdf" -> "Settings" -> "Fonts" and set it globally under E2Pdf Template.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!