Brat, I'd be exetremely interested in what you have if you are willing to share it. I am working on the next version of hte bridge which includes new features for the CB plugin, including avatar sync. I'd love to compare notes if you are up for it.
Hello there. I'm not at my home machine, and won't be there until late tonight, but I'd be more than happy to share what I've done thus far; I can upload it then. You're a lot more skilled than I am, so I hope it contains something useful.
That said, I can share with you now the steps I used. Big thanks to the SMF team for pointing me in the right direction.
1) It seems that, for pretty much every file in the Sources directory, there is a corresponding template file. The Source file handles the actual "workhorse" code (i.e., database calls, variable assignments, etc.). The corresponding template file displays this information.
2) Profile.php and Profile.template.php are your friends.
These are the two most important files in terms of extracting data from SMF. Basically, to write the SMF tab, I pulled data in matching pairs from the Profile.php and Profile.template.php files, and put them together properly in my CB plugin. So, in order to pull a member's most recent posts, I got the code that actually accessed and setup the data, then immediately after that dropped in the corresponding display code.3) SMF Avatars are tricky beasts - so I totally avoided the SMF native routines, and instead did a straight database call to access the user's forum avatar. For various (good) reasons, all avatars for SMF must be in the avatar directory (unless of course someone hacks it). So, the "solution" would be to write the CB avatar to the SMF member table (which isn't hard, as this is simply a straightforward database write). Now, the trick is to determine what event will trigger this writeback without having to hack any core system code.
4) Some URL tweaking is needed to access things the right way - again, this is done using code already provided in SMF.
And that's about it.
I've used this approach to pull the member forum avatar, provide a link to the member's SMF profile (because you can't get to this when SMF is synched with CB), member topic subscription lists, and the most recent posts. I've done my best to make sure that any SMF security/privacy checks remain intact (so a private profile won't be displayed).
Right now, I allow the members to simply have two avatars - one for CB and one for SMF, and give them a way to access their native forum profile to make the edits, etc. Until a better solution comes along, of course.
Regards,
Brat.
UPDATE: I've finally worked out a way to sync the avatars in the latest version of my CB-SMF plugin.
Forum 











