PlaySMS and integrating users from an AD, adding contacts through .csv and group management

how do you add contact ? through add button ? through import ?

anton

My account -> phonebook -> import

Example data:
Aase Lund, number, ,OS-SKOLE-5A,name of parent <- tags
Christan Lund, number, , OS-SKOLE-6B,name of parent
Johannes Lund,number,OS-SKOLE-3A,name of parent

Will result in:
Aase Lund, , OS-SKOLE-3A + OS-SKOLE-5A + OS-SKOLE-6B (+ OS-SKOLE-1B <- no idea why this shows, none of the 3contacts in the test csv file has that group code in itā€¦), name of parent

change this line to FALSE:

if (FALSE) {

anton

Problem persists. Added to that, the group codes seems random now, with only one group being correct:

Aase Lund, , BERG-SKOLE-1A + BERG-SKOLE-4A + OS-SKOLE-5A (only one thats correct), name of parent

I tried deleting the contact and re-added and it resulted in a simular result, only OS-SKOLE-5A was correct with two other groups than the two above. So they do seem to be selected randomly of the groups in the database.

EDIT: double-checked the values of the confirmation screen before importing, and that information is correct, so there shouldnt be a problem with the data at all.

EDIT2: the random groups probably wonā€™t be a problem if we manage to get the entries to be seperate though, as each contact will only get one group then, instead of one getting accidentally more than one.

I suppose all these changes canā€™t get things right, so I suggest you get some help to completely modify playSMS phonebook

current playSMS:

  • tag wasnā€™t for parentā€™s name, it must not have spaces, a dot or whatever non-latin chars
  • group code also the same, just like tags
  • contact must be unique

sanitizing tags making it not working properly, sanitizing group code making it not searchable, and I have no idea what happens when you made contact not unique

I guess all those changes must be dealt properly, cannot be done through this topic, I can only suggest changes, but wonā€™t be able to test them

other thing you can do is to post those changes on github issues, so that someone, or maybe me, can do it properly next time

anton

but hey I think I did it, I meant I have tested and it looks like this is what you want:

just grab all php files in plugin/feature/phonebook in github and replace yours

anton

Ok, cool, will test it now. Iā€™ll give you a reply within a few minutes!

oh 1 thing you need to know when you import, the first line was for title

hereā€™s my example:

skole.csv (172 Bytes)

anton

Hm, even tried with your test-file so our data is exactly the same. Still doesnt work, Iā€™ll double check that the files has changed properly. Cause when you add the contacts in that group you get 3 seperate entries in the phonebook itself right?

not here, I tested, looks good on my server.

I had to clear up the db tables to make sure.

anton

Iā€™ve deleted all contacts except for 7 as those are phone numbers not part of the files, its the numbers of the people working at the IT-department. Hm.

Which version are you running on? Iā€™m running on 1.0

the latest, the master version from github

should also work with playSMS 1.0 (with updated phonebook php files)

anton

I copied the entire phonebook folder, not sure why it wouldnt work then. Iā€™ll manually check the files to make sure theyre updated

the import:

the end result:

ā€œJuly Lundā€ was an entry that I added manually through add contact button

Good to see it work on your end. Checked the files, they all are edited accordingly to github.

Do you think it could be the database? What did you mean by ā€œclear up the db tablesā€ earlier? To what degree did you clear them?

I empty featurePhonebook, featurePhonebook_group, featurePhonebook_group_contacts

anton

I deleted all rows in all 3 databases, added the 3 groups. Imported CSV-file and only the first row shows still. That contact only has one group though, not 3. No changes in the latest version should make the difference right?

Iā€™ll be away for like 30mins now, as it is lunch time :smile:

If you want I can probably give you access to the through the use of teamviewer if theres any interest in doing that. If so Iā€™ll send you an id to connect to as a PM.

try empty it again, use my csv file, and then get screenshots like I did

just drag the screenshot image file to the posting area to share image

anton

Back from lunch there you go:

Edit: tried adding a contact manually, nothing got added.