FYI:
- Code: Select all
################################################################# ## MOD Title]http://www.web-lapin.levillage.org/forum/#[/url]# ## MOD Description: Gives you the possibility to show one avatar if the member is a male ## and another avatar if the member is a female. If the member have not ## choosen gender, a default avatar is use. ## it works only on users who have not choosen an avatar in their profile. ## Default avatar will be displayed in avatar panel , public panel and topics .## ## Requirement: Profile Control Panel 2.0.0## ## Installation Level: Easy ## Installation Time: 5 minutes #### Files To Edit: 2 ## profilcp/def/def_userfuncs_std.php## templates/subSilver/subSilver.cfg ## ## Included Files: 4 ## guest_avatar.gif ## no_avatar.gif ## no_avatar_male.gif ## no_avatar_female.gif ## ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################# # #-----[ COPY ]------------------------------------------ # copy templates/subSilver/images/lang_english/guest_avatar.gif to templates/subSilver/images/lang_english/guest_avatar.gifcopy templates/subSilver/images/lang_english/no_avatar.gif to templates/subSilver/images/lang_english/no_avatar.gifcopy templates/subSilver/images/lang_english/no_avatar_male.gif to templates/subSilver/images/lang_english/no_avatar_male.gifcopy templates/subSilver/images/lang_english/no_avatar_female.gif to templates/subSilver/images/lang_english/no_avatar_female.gif # #-----[ OPEN ]------------------------------------------ #profilcp/def/def_userfuncs_std.php # #-----[ FIND ]------------------------------------------ # return $res;} //-----------------------------------//// user_sig output function # #-----[ BEFORE, ADD ]------------------------------------------ # // Guest and default male/female avatar for PCP 2.0.0 else if ( empty($view_userdata[$field_name]) && $userdata['user_viewavatar'] && $view_userdata['user_allowavatar'] && ($view_userdata['user_id'] != ANONYMOUS) ) { if ( $view_userdata['user_gender'] == '1') { $img = '<img>'; } else if ( $view_userdata['user_gender'] == '2') { $img = '<img>'; } else { $img = '<img>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } else if ( $view_userdata['user_id'] = ANONYMOUS) { $img = '<img>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } // Guest and default male/female avatar for PCP 2.0.0 # #-----[ OPEN ]------------------------------------------ # (make sure to edit file .cfg for every theme you use). #templates/subSilver/subSilver.cfg # #-----[ FIND ]------------------------------------------ # ?> # #-----[ BEFORE, ADD ]------------------------------------------ # // Guest and default male/female avatar for PCP 2.0.0$images['default_avatar'] = "$current_template_images/{LANG}/no_avatar.gif"; $images['guest_avatar'] = "$current_template_images/{LANG}/guest_avatar.gif"; $images['default_avatar_male'] = "$current_template_images/{LANG}/no_avatar_male.gif"; $images['default_avatar_female'] = "$current_template_images/{LANG}/no_avatar_female.gif"; // Guest and default male/female avatar for PCP 2.0.0 # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM