Jump to content

Search the Community

Showing results for tags 'gender'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • WebFlake
    • Announcements and Updates
    • WebFlake Support
    • Member Introductions
    • Off-topic Lounge
    • Archives
  • Webmasters
    • Webmaster Lounge
    • Marketplace (Hire, Buy, Sell, Trade)
    • Coupons and Deals
    • Hosting
    • Website and Graphics Design
    • Website Showcase
  • Invision Community Suite
    • Invision Community Suite 4.7
    • Invision Support
    • Invision Requests
    • Invision Tutorials
    • Invision Beta
  • XenForo
    • XenForo 2.2
    • XenForo Support
    • XenForo Requests
    • XenForo Tutorials
  • WordPress
    • WordPress Content
    • WordPress Support
    • WordPress Requests
    • WordPress Tutorials
  • Unsupported Software
    • IPB 3.4 Legacy
    • IPS 4.x Legacy

Categories

  • Invision Community Suite 4.7
    • Applications and Plugins
    • Themes
    • Translations
    • Invision Extras
  • Invision Community Suite 4.6
    • Applications and Plugins
    • Themes
    • Translations
    • Invision Extras
  • Invision Community Suite 4.5
    • Applications and Plugins
    • Themes
    • Translations
    • Invision Extras
  • XenForo 2.2
    • Add-ons
    • Styles
    • Translations
    • Miscellaneous
  • XenForo 2.1
    • Add-ons
    • Styles
    • Translations
    • Miscellaneous
  • Wordpress
    • Themes
    • Plugins
  • ThemeForest
    • HTML
    • CMS
    • UI Design
    • JavaScript Code
  • CodeCanyon
    • PHP Scripts
    • JavaScript
    • CSS
    • HTML5
  • Graphics & Design
    • Emoticons & Smileys
    • Ranks & Badges
    • PSD & AI Designs
  • Unsupported Software
    • IPB 3.4
    • Invision Community Suite 4.4
    • Invision Community Suite 4.3
    • IPS Community Suite 4.2
    • IPS Community Suite 4.1
    • XenForo 2.0
    • MyBB 1.8

Product Groups

  • WebFlake Creative Designs
  • WebFlake Donation Bundles

Blogs


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Version

Found 1 result

  1. Using following function you can get a specified user's gender specified variables. For example... echo "Your friend updated " . IPSMember::fetchGenderCall( IPSMember::load( 1 ) ) . " status."; Will output... (if target user is male) Or... (if target user is female) In a shell... [*]This function is to be placed on your ipsMember.php (IPB 3.2.x+) or core.php (older than IPB 3.1.x) [*]This function has two parameters as follows... [*]$memberData - array - Array of data preloaded of the target user [*]$uppercase - boolean - In case if you want to use that on first of a sentence it will uppercase the first letter (e.g. "His topic just got a reply") The code... Open adminsourcesbaseipsMember.php and find fetchSeoName() function. Add this function after that. (You can place this function anywhere, but be sure to put it inside ipsMember class and outside any internal function). /** * Fetches Gender Relative Call * * @access public * @param array Member data * @param boolean Uppercase word's first letter? * @return string Gender */static public function fetchGenderCall( $memberData, $uppercase=false ){ $researchMember = $memberData; if ( ! is_array( $researchMember ) OR ! $researchMember['member_id'] ) { $researchMember = $this->memberData; } if( $researchMember['pp_gender'] == 'm' ) { return ( $uppercase ) ? ucwords( 'his' ) : 'his'; } elseif( $researchMember['pp_gender'] == 'f' ) { return ( $uppercase ) ? ucwords( 'her' ) : 'her'; } // Because mostly men browsing community forums, isn't it? elseif( $researchMember['pp_gender'] == 'u' OR !$researchMember['pp_gender'] ) { return ( $uppercase ) ? ucwords( 'his' ) : 'his'; }} How to call that? A few examples with outputs are below... ("1" indicates the user ID of the targeted user) "Your friend updated " . IPSMember::fetchGenderCall( IPSMember::load( 1 ) ) . " status."; IPSMember::fetchGenderCall( IPSMember::load( 1 ), true ) . " status has been commented."; Thanks for using best forum software ever, Invision Power Board! Keep up the great work!
×
×
  • Create New...