Contacts export

This thread is to end the discussion that I have been having, once and for all. I need time for OAuth code as I have never used it and have academic responsibilities as well. In the meantime, I can add a feature to create a vcard for individual contact. Whenever you open a contact's page, You get an option to download his vcard. Should I add that feature, or wait for the OAuth one. Also, for outlook export, we need to create a csv file. Should I work on that or not? CSV creation is comparatively easy and can be submitted earlier

It is good of you to bring this up. After all, coding for an opensource project should be fun and not become a stressfactor in your life. I like the 2 options you have put forward:

1) download vcard of 1 contact
2) download all contacts in csv

I would be happy to see one of these or both in the core.

Cheers, Reinier (phpfreak)

I could successfully create download link to a vCar in the Contact's card page. Now I'm working on making it download using the PP function download_contents() instead of a string return. Just to make things coded properly insite PP.

Next stage is create the csv exporter.

I'm still learning the PP code, I hope that further development take less time =)

Are you downloading the vcard through php file or are you making a new function for that? I have a php file for that. Same for csv. I have a basic csv creator ready. All I need to do is, make it in the format of google csv as Google and outlook have different ordering of fields in their csv files.

In short words, yes. I'm trying to use the PP method to handle the file distribution once this is how it should be made.

More details:
Take a look on how PP handle file distribution. There ir a pattern. The pattern involves MVC, re-use of code and several other things. An open source project big or small can't survive if each one who touches it's code make it without reading at least some lines of it's code before.

I'm also working in the vCard + cvs "plugin" but instead of doing a hard coded solution I'm using PP's classes, methods and architecture.

You used hard codded querys and object fetch in your script (in http://www.projectpier.org/node/3217). And you don't even close the db connection.

Also, there are several security issues in your code. There is no security check if the requester has permission to see the information you are providing. With some lines in a shell script anyone can retrieve all contacts from your site if he just query the correct url.

PP is fully OO based and your plugin does not use OO.

Remember that when developing a open source the solution must not simple attend your needs, it must also attend the project's requirements, project's standards and project's security.

Yeah, my code is a bit hasty one. I just wanted to give a sample code. So that we would not all work on same thing and end up wasting our time.
It was wrong on my part to not keep security checks and not close the connection. I had tried working with contacts directly through the class, but I was unable to do so. Maybe I overlooked something. I am not so good in php programming and hence, there must have been rookie mistakes by me,