Genders 1.0.0

MODs, Hacks, tips and tricks for memberlist, profiles, group members, and team members.
Custom Profile fields Hacks and MODs are also included

Genders 1.0.0

Postby eviL3 » 28 Apr 2007, 07:06

MOD Title: Genders
MOD Description: This MOD will allow your members to specify their Gender. They can chose between "Male", "Female" and "None specified".
MOD Version: 1.0.0
phpBB Version: 3.0.0

MOD Format:
Image

MOD Download: phpBB.com

Demo:
View topic
Image

View profile
Image

Memberlist
Image

Credits: All the creators of those sweet gender images!
Last edited by eviL3 on 21 May 2007, 18:08, edited 3 times in total.
Image
User avatar
eviL3    
MOD Author
MOD Author
 
Posts: 1002
Joined: 05 Nov 2006, 08:14
Location: Cooking in the MODs kitchen
Gender: Male




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [Beta] Genders 0.1.0

Postby geoffreak » 28 Apr 2007, 10:44

About time! ;)
I'll change my thank post mod to support the gender mod! :grin:

There are lots of typos in the install script.
You forgot to change all the subSilver2 based edits to the subSilver2 directory instead of the prosilver ;)
Earthlings, we have been watching you for years, and now we know your primitive language, so listen: All your base are belong to us.
Anime Bite - Your future #1 source for all things anime and manga!My Blog
User avatar
geoffreak    
Supporter
Supporter
 
Posts: 663
Joined: 17 Mar 2007, 21:52
Location: The Internets
Favorite Team: phpBB
Gender: Male
phpBB Knowledge: 9

Re: [Beta] Genders 0.1.0

Postby eviL3 » 28 Apr 2007, 11:10

Hello,

thanks and thanks for pointing that out! I missed to rename 3 prosilvers to subsilver2 :P Fix will be included in the next version together with the phpBB2 Genders mod upgrade script.

In what way will the thanks mod support genders? Just curious :)
Image
User avatar
eviL3    
MOD Author
MOD Author
 
Posts: 1002
Joined: 05 Nov 2006, 08:14
Location: Cooking in the MODs kitchen
Gender: Male

Re: [Beta] Genders 0.1.0

Postby geoffreak » 28 Apr 2007, 11:30

It uses the data from the users table :grin:
I have made it optional for users so that if they don't want gender, they don't have to install it.
And if they do, all they do is install your mod to enable gender based thank messages :)
Earthlings, we have been watching you for years, and now we know your primitive language, so listen: All your base are belong to us.
Anime Bite - Your future #1 source for all things anime and manga!My Blog
User avatar
geoffreak    
Supporter
Supporter
 
Posts: 663
Joined: 17 Mar 2007, 21:52
Location: The Internets
Favorite Team: phpBB
Gender: Male
phpBB Knowledge: 9

Re: [Beta] Genders 0.1.0

Postby eviL3 » 28 Apr 2007, 13:03

Oh, now i understand! That's great! Cool :)
Image
User avatar
eviL3    
MOD Author
MOD Author
 
Posts: 1002
Joined: 05 Nov 2006, 08:14
Location: Cooking in the MODs kitchen
Gender: Male

Re: [Beta] Genders 0.1.0

Postby Highway of Life » 28 Apr 2007, 16:09

Igor, are you using custom profile fields to allow the user to define his gender, or using your own field within the users table?
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [Beta] Genders 0.1.0

Postby eviL3 » 29 Apr 2007, 06:38

Highway of Life wrote:Igor, are you using custom profile fields to allow the user to define his gender, or using your own field within the users table?

It uses it's own field in the users table ;)
Image
User avatar
eviL3    
MOD Author
MOD Author
 
Posts: 1002
Joined: 05 Nov 2006, 08:14
Location: Cooking in the MODs kitchen
Gender: Male

Re: [Beta] Genders 0.1.0

Postby hans » 29 Apr 2007, 07:52

I was waiting for this mod ^^ thks

Well....I was making modifications in it, removing all relative to gender_X(None specified), only gender_m(male) and gender_f(female).
Well everything right until now, in all the pages it appears:

Spoiler:
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1078: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined variable: gender
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1074: Undefined index:
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3718: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3264)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3720: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3264)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3721: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3264)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3722: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3264)


I put the code before ?> like that in functions_display.php:
Spoiler:
Code: Select all
//-- mod : Genders ------------------------------------------------------------
//-- add
/**
* Get user gender
*
* @author eviL3
* @param int $user_gender User's gender
* @param bool $use_text Returns text if true or image if false
* @return string Gender
*/
function get_user_gender($user_gender, $use_text = false)
{
   global $user, $config;
   
   switch ($user_gender)
   {
      case GENDER_M:
         $gender = 'gender_m';
      break;
      
      case GENDER_F:
         $gender = 'gender_f';
   }
   
   if ($use_text)
   {
      $gender = $user->lang[strtoupper($gender)];
   }
   else
   {
      $gender = $user->img('icon_' . $gender, strtoupper($gender));
   }
   
   return $gender;
}
//-- fin mod : Genders --------------------------------------------------------



And a question how i put to display at registration screen for a required field?

Thks and bye :wave:
hans
Cadet I
Cadet I
 
Posts: 15
Joined: 27 Apr 2007, 16:39
Gender: Male

Re: [Beta] Genders 0.1.0

Postby eviL3 » 29 Apr 2007, 08:15

Hello,

that's not so good :P leave them all intact and in functions_display.php find:
Code: Select all
   return $gender;

Before, add:
Code: Select all
   if ($user_gender == GENDER_X)
   {
      $gender = '';
   }
   


See if that helps :)
Image
User avatar
eviL3    
MOD Author
MOD Author
 
Posts: 1002
Joined: 05 Nov 2006, 08:14
Location: Cooking in the MODs kitchen
Gender: Male

Re: [Beta] Genders 0.1.0

Postby hans » 29 Apr 2007, 08:45

Thanks for the help :D
I do what you say, but one error x.x...dont appear the image of gender Image :this: o.O' and i do everything right
hans
Cadet I
Cadet I
 
Posts: 15
Joined: 27 Apr 2007, 16:39
Gender: Male

Next

Return to Memberlist and Profiles

Who is online

Users browsing this forum: Bingbot and 5 guests