Support Forum
I'm using a plugin called wpallimport which pulls XML data and maps it onto posts, pages and users.
It can map onto other plugins fields if those plugins have meta-data or a custom field that's available globally. It looks like S:P doesn't have anything that wpallimport can use.
I have dozens of users I am trying to import into S:P, and their avatars are all external and all take the form of http://somedomain/username.jpg
wpallimport creates their userid, name, password etc on the WP site, all fed from the XML data. The only thing it can't do, is create the external avatar link in S:P
I hope I made that clear enough to have a crack at solving this,
Thanks
not entirely sure what you are trying to accomplish... wp in general does not support remote avatars... it does support gravatars and other fixed avatars but not like the url you have specified... however if if this plugin of yours uses the wp api for avatars (there is a wp function for getting users avatar), we can support it too... there is an option on forum - profiles - avatars in the avatar priority to use the wp avatar vice a simple press avatar...
if you are not using the wp avatar api, then you would have to get the remote avatar information stored into the sfmembers table of the db (and enable remote avatars) and simple press can use it... but there is no UI per se to accomplish the importing of this remote urls...
Visit Cruise Talk Central and Mr Papa's World
It's not the other plugin that's using the wp api for avatars - sp is the plugin that allows the remote avatar information to be added by the user.
In the admin screen for sp you can specify this to be allowed, and for it to be the highest priority of avatar to be used by sp. The option is in PROFILES >> AVATARS >> ENABLE REMOTE AVATARS and I have made sure that the 'remote avatar' priority is the highest on the right hand side of that screen.
Now, my question is - how do I, as an admin, populate that field for all users with the (without quotes) text: "http://image.somesite.com/blah/username.jpg" where username is the wp username in each case?
I could ask all the users to go to their sp front page, click "Profile", click "Edit Avatar", and then enter the exact correct URL in the sp field labelled "Enter the URL for the remote avatar." and then click Save Remote Avatar .... but to get ALL of the users to do that immediately (so other users can see their pic), AND get them to enter it without error ... I'd rather herd cats 🙂
you will have to do it programatically... that is bit of php code and mysql query... this is because the user avatar info is stored as part of a serialized array so the exact value is dependent on url length...
you will need to execute some code like:
foreach ($users as $user) { $avatar = sp_get_member_item($user->ID, 'avatar'); $avatar['remote'] = $avatar_url; sp_update_member_item($user->ID, 'avatar', $avatar); }
where $users is assumed to be an array of wp user objects... the real goal is for every user in your wp db, to loop through the 3 lines of code to save their avatar url.... the $avatar_url variable is the remote url to their avatar...
does that help?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)