Adding pictures to users automatically

Hi, I am new to wildfire and spark…

We have a test bed of about 30users at the moment, and i want to be able to add an avatar to each user without the user interaction - reasons being, 75% of users dont know what a jpeg is, or even an avatar.

I have read a thread on the spark forum, and i said to convert a jpeg to base64 format and then enter it after image/jpeg in a table…

Thats all cool, i would probally be ok doing that, but what software could i use to edit the table to input the image for each user?

best regards

Johnno

If you know php,

you could create a php script

create a simple upload form

and the processing php should

first check your username

then convert the jpeg to base64 and then store it into the database

(I’'m assuming don’'t ask me why you are using a mysql database or postgre)

unfortunatly, i dont know anything about php - thanks anyway

Hi,

do you want to use “ready-to-use” software which does not exist or write something small using Java or PHP?

As you need to insert it in the Wildfire database in the jivevcard table in a new or an existing vCard it will be really tricky.

LG

According to the vcard-avatar-XEP, the client has to advertise the avatar in every presence packet (its mere existence, plus its sha1 hash), so just adding it to the vcard might not be enough (depending on the client)?

Hi,

I assume that one shuts down Wildfire while doing this. And as the vCard is stored in Wildfires database all clients will get them automatically when they connect.

LG

i can always learn how to write something in java or PHP - just need someone to point me in the right direction.

Hi,

so you may want to write a program which connects to your database and accesses the jiveVCard table. So you should be able to read the vCard - I think the image is base64 encoded so it shouldn’'t be a problem to insert one there.

LG

are you using the default storage ?

or do you use mysql ?

if you use mysql I might be able to help you out with this

unfortunatly, i am using the default storage.

is it easy to write a program to get to the default storage?

What would be great would be to have different sets of pictures for different groups as we have a mazda, suzuki and honda groups set up. Also, set the pictures to change over night(easily done with a batch command)

Hi,

the embedded database is really embedded so you can’'t connect to it using JDBC/SQL. If you want to keep your server up and running also during the night than you need to write a plugin for Wildfire.

If you can shutdown Wildfire during the night you may be able to use a simple Perl/PHP/Java/Basic script to modify the embedded-db/wildfire.script file as it contains plain text vCards.

LG