Page 58 of 62

Re: Genders

Posted: Sat Dec 19, 2009 9:54 am
by net83it
TheSnake wrote:I have NOT installed the forced Select Gender on Registration edit, but it does work, if you read the last few pages, the code edits have been supplied, all you need to do is read through & copy the edits to your forum.
so, it is necessary to update the code to get mandatory gender on registration?
thank you

Re: Genders

Posted: Sun Dec 20, 2009 5:49 am
by HCXD
Thank you, It runs well on phpbb 3.0.6 :D

Re: Genders

Posted: Tue Dec 22, 2009 9:39 am
by ritsu
Hello, my problem is this:

The MOD worked well in version 3.0.5, upgrading to version 3.0.6 the mod is no longer displayed in the post, and characters are only shown when editing the profile ...

Image

Image

Someone knows the solution?

I would greatly appreciate your help ^ ^

Re: Genders

Posted: Tue Dec 22, 2009 2:23 pm
by TheSnake
ritsu wrote:Hello, my problem is this:

The MOD worked well in version 3.0.5, upgrading to version 3.0.6 the mod is no longer displayed in the post, and characters are only shown when editing the profile ...

Image

Image

Someone knows the solution?

I would greatly appreciate your help ^ ^
I would suggest that you work through the Instructions again, & make sure all the edits you did previously are still in place & are correct, some MODs have had problems with the new version 3.0.6

Before starting on a fresh install of 3.0.6 on my Test Server, I had 3.0.5 & updated it to 3.0.6 with the auto-update feature, no problems & the MOD worked perfectly. I eventually scraped the upgraded version & started from a clean vanilla 3.0.6 install.

Re: Genders

Posted: Wed Dec 23, 2009 5:09 am
by ritsu
Thanks!

I reinstalled the MOD and worked! ^^

Re: Genders

Posted: Mon Dec 28, 2009 5:23 am
by ikkeook
Hi i did install the MOD end get the following error looking at the memberlist on the main site of the board

Code: Select all

Fatal error: Cannot redeclare get_user_gender() (previously declared in /home/kabauter/domains/kabauter1.nl/public_html/simply/includes/functions_genders.php:26) in /home/kabauter/domains/kabauter1.nl/public_html/simply/includes/functions_genders.php on line 54
This is how the functions_genders.php looks like

Code: Select all

<?php
/**
*
* @package phpBB3
* @copyright (c) 2007, 2008 evil3
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
 * 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';
		break;

		default:
			$gender = 'gender_x';
	}

	if ($use_text)
	{
		$gender = $user->lang[strtoupper($gender)];
	}
	else
	{
		$gender = $user->img('icon_' . $gender, strtoupper($gender));
	}

	return $gender;
}

?>
what should i change?

Re: Genders

Posted: Mon Dec 28, 2009 5:58 pm
by desiii
I don't know if anyone can help me this late in the game, but here goes.

I have this mod installed on 3.0.6 and it all works fine except newly registered members are defaulting to male instead of non-specified. I tried the suggested adjustment to ucp_profile_profile_info.html from page 43:
eviL<3 wrote:In memberlist_view.html you can replace this:

Code: Select all

<label for="gender_x"><input type="radio" name="gender" id="gender_x" value="{GENDER_X}"<!-- IF S_GENDER_X --> checked="checked"<!-- ENDIF --> /> {L_GENDER_X}</label>
With:

Code: Select all

<label for="gender_x"><input type="radio" name="gender" id="gender_x" value="{GENDER_X}"<!-- IF not S_GENDER_M and not S_GENDER_F --> checked="checked"<!-- ENDIF --> /> {L_GENDER_X}</label>
All new registered users should be gender_x by default.
But new registrations are still all defaulting to male. Any ideas???
Thx.

Re: Genders

Posted: Wed Dec 30, 2009 4:52 pm
by TheSnake
net83it wrote:
TheSnake wrote:I have NOT installed the forced Select Gender on Registration edit, but it does work, if you read the last few pages, the code edits have been supplied, all you need to do is read through & copy the edits to your forum.
so, it is necessary to update the code to get mandatory gender on registration?
thank you
Yes, it is.


ritsu wrote:Thanks!

I reinstalled the MOD and worked! ^^
Brilliant, glad you got it fixed.


ikkeook wrote:Hi i did install the MOD end get the following error looking at the memberlist on the main site of the board

Code: Select all

Fatal error: Cannot redeclare get_user_gender() (previously declared in /home/kabauter/domains/kabauter1.nl/public_html/simply/includes/functions_genders.php:26) in /home/kabauter/domains/kabauter1.nl/public_html/simply/includes/functions_genders.php on line 54
This is how the functions_genders.php looks like

Code: Select all

<?php
/**
*
* @package phpBB3
* @copyright (c) 2007, 2008 evil3
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
 * 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';
		break;

		default:
			$gender = 'gender_x';
	}

	if ($use_text)
	{
		$gender = $user->lang[strtoupper($gender)];
	}
	else
	{
		$gender = $user->img('icon_' . $gender, strtoupper($gender));
	}

	return $gender;
}

?>
what should i change?

As I previously suggested to ritsu to fix the problems they had, I would suggest you carefully double-check all your code edits, then also double-check to make sure the SQL Query from the MOD Install instructions has been done & it is correct.


desiii wrote:I don't know if anyone can help me this late in the game, but here goes.

I have this mod installed on 3.0.6 and it all works fine except newly registered members are defaulting to male instead of non-specified. I tried the suggested adjustment to ucp_profile_profile_info.html from page 43:
eviL<3 wrote:In memberlist_view.html you can replace this:

Code: Select all

<label for="gender_x"><input type="radio" name="gender" id="gender_x" value="{GENDER_X}"<!-- IF S_GENDER_X --> checked="checked"<!-- ENDIF --> /> {L_GENDER_X}</label>
With:

Code: Select all

<label for="gender_x"><input type="radio" name="gender" id="gender_x" value="{GENDER_X}"<!-- IF not S_GENDER_M and not S_GENDER_F --> checked="checked"<!-- ENDIF --> /> {L_GENDER_X}</label>
All new registered users should be gender_x by default.
But new registrations are still all defaulting to male. Any ideas???
Thx.
I can almost quarantee that you installed the MOD either by AutoMod or by using the db auto-updater file, they sometimes have an issue in incorrectly setting the SQL.

Completely undo the suggested adjustment to ucp_profile_profile_info.html from page 43 then do the following for MySQL, to fix the problem.

Go to your phpMyAdmin (or whatever your SQL program/interface is), & in the SQL Query Window, enter the following line below, then hit Submit.

ALTER TABLE phpbb_users CHANGE user_gender `user_gender` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0';

Re: Genders

Posted: Fri Jan 01, 2010 9:17 pm
by LP-san
hi it doesn't work

i edited every file even the template but it shows all the ranks -> male, female, and none specified
and in viewtopic gender: (without the image)

also i get this error

Cannot locate File: ./../store/mods////./../store/mods///genders_1.0.1/templates/subsilver2.xml

(with automod)

Re: Genders

Posted: Sat Jan 02, 2010 4:23 pm
by TheSnake
LP-san wrote:hi it doesn't work

i edited every file even the template but it shows all the ranks -> male, female, and none specified
and in viewtopic gender: (without the image)

also i get this error

Cannot locate File: ./../store/mods////./../store/mods///genders_1.0.1/templates/subsilver2.xml

(with automod)
Without the Image, so do you mean it is showing the gender name in viewprofile & viewtopic but not the image? If that is the case, you seem to have installed the edits right, but not uploaded the images into the correct folder on the web server.

I don't use AutoMod, it can have problems with certain styles & mods. Have you manually tried to edit & upload each file?

Re: Genders

Posted: Sat Jan 02, 2010 4:29 pm
by LP-san
Yeah it only showed like for example here under location
gender: (and then nothing)

i have completely uninstalled the mod after so many times of installing/resinstalling because i'm tired of this mod but it is realy usefull so if you could help me that would be great and i did uploaded the images in every template

Re: Genders

Posted: Sat Jan 02, 2010 4:34 pm
by TheSnake
LP-san wrote:Yeah it only showed like for example here under location
gender: (and then nothing)

i have completely uninstalled the mod after so many times of installing/resinstalling because i'm tired of this mod but it is realy usefull so if you could help me that would be great and i did uploaded the images in every template
Did you go into the ACP & purge the Cache, also in the Styles tab, what about resetting the Themes, Templates & Imagesets?

What specific Theme are you using? (Subsilver, Prosilver, etc...)

Did you make a backup copy of your forum before, or during, any of your MOD code edits?

Re: Genders

Posted: Sat Jan 02, 2010 4:42 pm
by TheSnake
Oops, duplicate message/quote.

Re: Genders

Posted: Sat Jan 02, 2010 5:16 pm
by LP-san
I'm using prosilver and yes i did purge the cache its really weird i think i did everything what i had to do :s but it still won't work

Re: Genders

Posted: Sat Jan 02, 2010 6:03 pm
by TheSnake
LP-san wrote:I'm using prosilver and yes i did purge the cache its really weird i think i did everything what i had to do :s but it still won't work
What other MODs do you have installed?

From reading several of the last pages in this thread, it seems that some MODs do infact conflict with it, specificy QR MOD.

But also there is mention to double check all edits as sometimes just the slightest error can throw it all out.

What program are you using to make the code edits to the files?