Usually what I do to port MODs to PCP is take any viewtopic or usercp_viewprofile code that exists in the install instructions and write functions that I place in profilcp/def/def_userfuncs_custom.php.
Then I add the code to the def_userfields.php and def_usermaps.php. Almost every field in def_userfields.php from a MOD like the one you describe will go under generic informations.
I'm terrible at describing this sort of thing, so please bare with me.
I'll use the field for the Full Album Pack, since I have it right here...
- Code: Select all
'user_album' => array( 'lang_key' => 'Gallery', 'class' => 'generic', 'type' => 'VARCHAR', 'dsp_func' => 'pcp_output_album', ),
The field user_album is calling the display function pcp_output_album, which is the function you would place in profilcp/def/def_userfuncs_custom.php. The lang_key can be a lang key or if there's no lang_key whatever you've put there will be displayed, if text is displayed for this particular field. Type, that's obvious, whatever the db info is your calling.
On to def_usermaps.php
Here it's key to find the right location. Use the parent and child array names as hints to what they might be. Then place your code where you want it.
- Code: Select all
'user_album' => array( 'img' => true, 'style' => '<td><span>%s </span></td>', ),
img being true means there'll be an image involved and that you've defined $img in your function, same with $txt and 'txt' => true. Style's pretty obvious, just keep the %s, as that's your output.
I hope I've helped somehow... there's so much more to this that I can't articulate...