1 (edited by N3twork2 2009-08-04 22:18)

Topic: Gender MOD (And colored in the online list)

Hello,

I not find this MOD here but in FluxBB, i have tested and it work in Punbb 1.3.3

Manifest.xml

<?xml version="1.0" encoding="utf-8"?>

<extension engine="1.0">
        <id>gender</id>
        <title>Gender Profile tag</title>
        <version>1.1.1</version>
        <description>Adds an option in users profile to select their gender.</description>
        <author>Gizzmo</author>
        <minversion>1.3 Beta</minversion>
        <maxtestedon>1.3 Beta</maxtestedon>

        <install><![CDATA[
                $forum_db->add_field('users', 'gender', 'TINYINT(1)', FALSE, '0');
        ]]></install>

        <uninstall><![CDATA[
                $forum_db->drop_field('users', 'gender');
        ]]></uninstall>

        <note type="install">If you wish to use your own gender images, just drop them in the /img directory with the filename 'gender-#'. Replacing # with 1 for male, 2 for female, and 0 for Unspecified. This extension can determin if its gif, png, or jpg image.</note>
        
        <hooks>
                <hook id="pf_start,vt_start"><![CDATA[
                        // Load the extention language file
                        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php'))
                                require $ext_info['path'].'/lang/'.$forum_user['language'].'.php';
                        else
                                require $ext_info['path'].'/lang/English.php';
                ]]></hook>
                <!-- Stored the images in a hook -->
                <hook id="es_essentials"><![CDATA[
                        if (isset($_GET['genderimg']) && in_array($_GET['genderimg'], array(0,1,2)) && substr($_SERVER['PHP_SELF'], -9) == '/misc.php')
                        {
                                $gender = array(
                                        0 => array(
                                                'type' => 'png',
                                                'size' => '3389',
                                                'code' => 'iVBORw0KGgoAAAANSUhEUgAAAAsAAAAQCAYAAADAvYV+AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAP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FoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/
                                                        PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAJYSURBVHjaXJKxSxtRAMa/9+5dvBhJ6hV7Ek7B5sBANdJQinuLS9ssjlK6FPonpEOhQxenSgeXCnEqnQsBQUEQXLTSUgpBY6zJxYqNJXrJS+7u5eWuSwXbb/7BB9/vI0tLS2CMQVVVSCkBAGEYvhwaGnothPC73S5c1yW2bbsM1yKlhBACQoh4NpvVUqmUJoSApmlYXFxUKP6LlBK+7xfW19c/2LYd9no9cM7hOM4F+1ubJYS8opTeZoz5QRAcDw8Pp1VVJc1mE4ZhgHPeYYSQe4ZhfLIsK6nrOjzPQ6vVuh+Px7G5uVnf
                                                        2dk5mJ+ff3h5eXmTxWKxt5OTk8lYLIZqtQoASCaTcBwHGxsb38/Ozl7n8/maEOIX0zTtzujoKCqVCra2tt5IKW/Nzc29MAwDuq6PuK671+l0nkspQROJRG9wcPBqto9CiDXf95FIJBCNRhXTNKHrOqSUYI7j7DmO88g0TViW9TUIAjIxMYFarQbO+W6v18PY2Bi63S6UTCbDgyDImaYZSafTzLIshXOOYrHYsG07HwTBz36/D13XoWQymYN6vf6tWq1Oj4+PG+fn51hZWfl8eHj4lBCySwi5sgoqpRzxPO9xqVQinPN+s9kMj46OblBKHxBC1OvCyMLCwt3Z2dkvuVwOYRiCEIIwDLG8vPy7XC6nIpFI6wpmnud5Jycn/vb2NpmZmVFd1+2XSqWw3W6D0n/fQBljx+Vy+cnq6mqx3W6T09NTpVAovG80Gs9UVe1eh5WpqSlJKf0xMDAQrVQq0/v7+xeEkHeKoqwBCK7DfwYAIUItJx7NfL8AAAAASUVORK5CYII='
                                        ),
                                        1 => array(
                                                'type' => 'png',
                                                'size' => '3216',
                                                'code' => 'iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRB
                                                        yAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9c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vKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAGrSURBVHjaTNC/a1NRGMbx5z335LYliSk2UJqijYaSRSilglB1cBT8A1zF1cnFUSdXcXARHVyU/gWCglkErUUq1lKaIFSFkrT5Qc2999x73nvO6xAFH/hun+mhp60xRARsGQBARBCRe6VpdV98bjPLcM7R8TCKNf4bM0NE4DxVVurlmfrC7AznHoWCwsvX+4H6B0UmMefIrHm+uXv0otuPwY6QpB5plg70X9jQAW4r0FUFGnvnO9XK1EWtFUa/Y8zNlsCWjfa5W54r06vlWnGtUiyAnUec8PUw1Pj09Ve783PQvnRh8UaU
                                                        pFWtlbvbrBXXwlDJ3o8TUgQszpcRJym+tI/eJmn2ZOPNzmeI62vAXTtVCrHdHmDzW/eWy+3CldUzD+u1Cpznhojfm57SD6z10NZyQYhgMksmNQdsrZiMQTqAtVxKU4sgUCAi6CQxH0Yn5nxz6bSkGbcUAY2zVel1h2QS896yAxFBKYLuj5LHW7uH6yvN+XPrq0vwHjjsDaj1cX97HJlnRATQ5F7NLt/a6fRudg56d4hw2TJzFMXvjofRIwK+AwTIBP8ZALAx57XhAY+XAAAAAElFTkSuQmCC'
                                        ),
                                        2 => array(
                                                'type' => 'png',
                                                'size' => '3188',
                                                'code' => 'iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRB
                                                        yAgTYSHaiAFi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Ng1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAGPSURBVHjaBME/b9NAHAbg9+5+5yI7dUOIIjKCIIAqEYkBxBKJERYEQkxIzDCA1I8CldhYGSKGdoEFobCUpagqKuoECtj9X8dJHdt35/PxPGz37TakL2/53eCVt+jdc7WDStTXPMre6DP1g6Qv+0vXWx8al8OeCAisBsxUPxck7qY7p095cDFYaVwKe1xylP/myP9k4OcEGlfDnlyQK0SL3oACQj7OkG6evLBFhebN9rvgRggGNqBa1xKMoS4tzEzv2bmFzQ0YY3DKSdKJ2jCT8slC10d4rbXmtIV/JUQR5dBTvUHz6GyV
                                                        PDEI+xc6zdstOADVqUYyOjhSWbHKq8KM0p/J48OPf7+ruIDeKxG//709200fOeFGnCveQYWX5lAtVXllbGlhEt3hxJ5RLc6zX683+2G/udW+34UzDmAA9zj2h+NqtjVZJmttUezn88nohBrLIcEB2c7UmERzJhk4BMZlnD84XouGJjWimhpxtB4Py4PiITwWEwAFiW9o8+7xp+gOAOJt8QUMn+GA/wMAF6LEeXKjdiMAAAAASUVORK5CYII='
                                        )
                                );

                                header("Content-type: image/".$gender[$_GET['genderimg']]['type']);
                                header("Content-length: ".$gender[$_GET['genderimg']]['size']);
                                die(base64_decode($gender[$_GET['genderimg']]['code']));
                        }
                ]]></hook>
<!--
==============================================
                Viewtopic
==============================================
-->
                <hook id="vt_qr_get_posts"><![CDATA[
                        $query['SELECT'] .= ', u.gender';
                ]]></hook>
                <hook id="vt_row_pre_display"><![CDATA[
                        if ($forum_config['o_show_user_info'] == '1' && $cur_post['poster_id'] > 1 && !isset($user_data_cache[$cur_post['poster_id']]['author_info']))
                        {
                                $filetypes = array('jpg', 'gif', 'png');
                                foreach ($filetypes as $cur_type)
                                {
                                        $path = 'img/gender-'.$cur_post['gender'].'.'.$cur_type;
                                        
                                        if (file_exists(FORUM_ROOT.$path) && $img_size = @getimagesize(FORUM_ROOT.$path))
                                        {
                                                $forum_page['author_info']['gender'] = '<li><span>'.$lang_gender['Gender'].' <img src="'.$base_url.'/'.$path.'" '.$img_size[3].' alt="" /></span></li>';
                                                break;
                                        }
                                }

                                // if we didnt find a img use the stored one
                                if (!isset($forum_page['author_ident']['gender']))
                                        $forum_page['author_info']['gender'] = '<li><span>'.$lang_gender['Gender'].' <img src="'.$base_url.'/misc.php?genderimg='.$cur_post['gender'].'" alt="" /></span></li>';
                        }
                ]]></hook>
<!--
==============================================
                profile
==============================================
                -->
                <hook id="pf_change_details_identity_validation"><![CDATA[
                        $form['gender'] = $_POST['form']['gender'];
                ]]></hook>
                <hook id="pf_change_details_identity_pre_num_posts"><![CDATA[?>
                        <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
                                <div class="sf-box select">
                                        <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_gender['Gender']?></span></label>
                                        <span class="fld-input">
                                                <select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[gender]">
                                                        <option value="0"<?php if ($user['gender'] == 0) echo ' selected="selected"' ?>><?php echo $lang_gender['Unspecified']?></option>
                                                        <option value="1"<?php if ($user['gender'] == 1) echo ' selected="selected"' ?>><?php echo $lang_gender['Male']?></option>
                                                        <option value="2"<?php if ($user['gender'] == 2) echo ' selected="selected"' ?>><?php echo $lang_gender['Female']?></option>
                                                </select>
                                        </span>
                                </div>
                        </div>
                <?php ]]></hook>
                <hook id="pf_view_details_pre_header_load,pf_change_details_about_pre_header_load"><![CDATA[
                        $filetypes = array('jpg', 'gif', 'png');
                        foreach ($filetypes as $cur_type)
                        {
                                $path = 'img/gender-'.$user['gender'].'.'.$cur_type;
                                
                                if (file_exists(FORUM_ROOT.$path) && $img_size = @getimagesize(FORUM_ROOT.$path))
                                {
                                        $forum_page['user_info']['gender'] = '<li><span>'.$lang_gender['Gender'].' <img src="'.$base_url.'/'.$path.'" '.$img_size[3].' alt="" /></span></li>';
                                        break;
                                }
                        }

                        // if we didnt find a img use the stored one
                        if (!isset($forum_page['user_info']['gender']))
                                $forum_page['user_info']['gender'] = '<li><span>'.$lang_gender['Gender'].' <img src="'.$base_url.'/misc.php?genderimg='.$user['gender'].'" alt="" /></span></li>';
                ]]></hook>
        </hooks>
</extension>

And lang/English.php

<?php

// Language definitions used in extensions
$lang_gender = array(

'Unspecified'   =>      'indéterminé',
'Male'                  =>      'Homme',
'Female'                =>      'Femme',
'Gender'                =>      'Sexe :',

);

I have installed : Improved online list and i want colored in the list male and femelle it's possible ?

Thanks

Re: Gender MOD (And colored in the online list)

Nice extension.

Just uploaded it to my demo board for people wanting to see it live.

The link to the site of author is there and also a link for a ported version.

Re: Gender MOD (And colored in the online list)

Hello,

It's possible to add gender MOD when user subscribe ? in register.html

Thx

Re: Gender MOD (And colored in the online list)

Up smile