phpList.org

Vcard inclusion

Great feature this Vcard inclusion! I have been playing with the [CONTACT] placeholder.

In HTMLformat with the option to include Google analytics code, I get a 404. If I remove the code manually in the browser, and it ends with ?p=vcard, I finally download the Vcard.
In text format works fine.

But where is the import data-vCard screen, as seen on the image at the release notes?
And how to fix the 404?

Thanks!

2 Likes

Thanks for the feedback @Ronald2404!

That screen is from Thunderbird emai client – the purpose of it is to illustrate importing the contact card. This varies between different devices and mail clients, because the vcard import is not handled by phpList or the campaign content itself.

Not sure. Maybe @xheni knows

Thanks Sam,
Thanks for explaining.
I was confused because that import screen was on top of the startscreen of PHPList, I thought it was a PHPList import screen, which I could not find.

Concerning the 404. the testmessage in HTML format has a link to the v-card. I tested in several mail-programs, but it always opens a browser with a 404. Only after removing the GA-code, a download starts.

the code is:
<a href=“https://www.mysite.com/lists/?p=vcard target=”_blank" title=“This link will open in a new window”>Add us to your address book

I propose to change the code to:

<a href="https://www.mysite.com/lists/?p=vcard download>Add us to your address book

to bypass the browser and download immediately (I suspect the title is made by the browser)

I am not a programmer, but i hope my contribution makes sense.

@Ronald2404 @samtuke The 404 is probably caused by the replacement of the placeholder, which adds a space character to the end of the URL.See this line in admin/lib.php

    $content = str_replace($contactInstance, '<a href="'.htmlentities(getConfig('vcardurl')).' ">'.$GLOBALS['strContactMessage'].'</a>', $content);

In some scenarios the URL will be trimmed, thus removing the space, but there’s no reason for the space to be there.
When google tracking is enabled, the extra parameters are added after the space

image

1 Like

Thank you, @duncanc,

fixed,that did the trick!

Hello eweryone. My first message here.

Can you tell me where can I find: $GLOBALS[‘strContactMessage’] ?
I try change default text “Add us to your address book” to mine own, in my language. Is it possible and where?

Thanks,
Mariusz

@Maryjan You can add it to the language file in the lists/texts directory. The default English value is

$strContactMessage = 'Add us to your address book';

Thanks for fast answer.
I add Your code to english.inc (it was not there) and to my languagetranslation, polish.inc.
When I edited string text in english.inc, my changes were visible in e-mail in [CONTACT] placeholder area.
vcard

But when i changed the same string in polish.inc changes didn’t visable. There was still english text from english.inc.

For test, is translate file working good I checked other polish translate string and they worked great.

Is this
$strContactMessage = '...';
working only in english.inc?

@Maryjan This hasn’t been designed very well. The string is not related to the admin language but to the default language for public pages. In config.php this needs to be changed to “polish.inc”

$language_module = 'english.inc';

It’s not so important. It does not work well for me, so I will replace the string in englsh.inc to my polish translation.

Thank you for help me.