Skip to Content Skip to Menu

[SOLVED] VCF address book integration?

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
11 years 2 months ago #232726 by fribse2011
Replied by fribse2011 on topic VCF address book integration?
Got a bit further, the vcf delimiter field looks like this now:
Code:
BEGIN:VCARD VERSION:3.0 FN: [name] PHOTO; : [avatar] BDAY: [cb:userdata field="cb_birthday" /] TEL;TYPE=CELL,VOICE: [cb_cell] CATEGORIES: DKDB URL: [cb:url location="profile_view" /] REV: [cb:userdata field="lastupdatedate" /] END:VCARD

I need to reformat the REV date and the BDAY date to comply with the standard.
I tried using the tutorial: www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

I tried doing it like this:
BDAY: [cb:userdata field="cb_birthday" format="Ymd" /]
But that didn't give me anything, except the string above?
I also need to reformat the REV date, to show last updated date and time, like YmdTtime, but that's the next step.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
11 years 2 months ago - 11 years 2 months ago #232737 by krileon
Replied by krileon on topic VCF address book integration?
There is no function to reformat CB dates like that. Whatever processes the delimiter field for vcard data should convert it as needed. If it runs a simple strtotime it shouldn't matter what format it's in. You could use CB Query Field to query the database for your field value though. This will let you use MYSQL data format functions to format it as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 2 months ago by krileon.

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
11 years 2 months ago - 11 years 2 months ago #232739 by fribse2011
Replied by fribse2011 on topic VCF address book integration?
Ok, well it seems that the systems I've tested on so far, all accepts the output date from CB.
So far I've just created a CB list on the website, and of course I show the vcard on a tab on the profile, but it would be neat to somehow have it show as a 'file.vcf' download, instead of just text on the page.
Currently the users have to copy it to a file, save it, and then import it on their cell or in their outlook (or whatever they use for contact handling).
I wonder if I can fake it so the browser thinks the text is a file for download with the text content.

I want to hide the vcard field for the currently logged in user, I'm trying to use conditional plugin, but how do I test for the currently logged in user?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 11 years 2 months ago by fribse2011.

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
11 years 2 months ago #232740 by fribse2011
Replied by fribse2011 on topic VCF address book integration?
After some thought, it's actually for the list I want to hide the person.
And maybe the tab on the profile, not really decided there.

So adding this to the filter for the list:
Loginnavn !=[cb:userdata field="Loginnavn" user="#me" /]

That hid the currently logged in user on the list.

The tab is a bit difficult.
I don't want it to be shown if the cell field is empty, and I don't want it to show on the registration or the edit profile page.
So I've created two conditions:

cb_cell Not Empty
Hide
Registration Enabled
Profile Edit Enabled
Profile View Disabled
One-Way

cb_cell Empty
Hide
Registration Enabled
Profile Edit Enabled
Profile View Enabled

The third one would be

username Equal To
[cb:userdata field="Loginnavn" user="#me" /]
Hide
Registration Enabled
Profile Edit Enabled
Profile View Enabled
One-Way

But that doesn't hide the tab for my own user.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
11 years 2 months ago #232763 by fribse2011
Replied by fribse2011 on topic VCF address book integration?
Can I activate a content plugin for a field? I just had an idea that I could encode the vcard on the users profile in QR code with a joomla plugin.
That would make it easy to get it to the phone on a user by user, I'm not sure it can be expanded to the entire list...

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
11 years 2 months ago #232783 by krileon
Replied by krileon on topic VCF address book integration?

I don't want it to be shown if the cell field is empty, and I don't want it to show on the registration or the edit profile page.

Just set all the fields on the tab to not show on registration. That gets rid of its registration display. Next use CB Privacy to disable the profile edit display of the field to get rid of its profile edit display. Then all that's left is to use a conditional to hide the field or tab from users self using the below.

Field: Custom Value
Value: [user_id]
Operator: Equal To
Value: [cb:userdata field="user_id" user="#me" /]
Mode: Hide

Can I activate a content plugin for a field?

No, but this is a great idea so I'll try implementing it for next CB release.

forge.joomlapolis.com/issues/4183


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum