Genders

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
djgalix
Registered User
Posts: 23
Joined: Fri Aug 08, 2008 10:54 pm
Contact:

Re: Genders

Post by djgalix » Fri Oct 16, 2009 4:19 pm

djgalix wrote:Hi all,

how to display in the footer the number of boys and girls ?

Example :

We have 4 boys & 5 girls connected ...
nobody could you help me please ? :|

nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: Genders

Post by nasadows » Sat Oct 17, 2009 4:39 am

Possible simplify this by using CPF?

I think in this mod the creator intends to make it as a hardcoded Profile Field therefore we have to edit files so much more than necessary, why not using Custom Profiles fields?

It displays where we want and also we can create it faster, preserve it longer across PhpBB upgrades. No longer the worry of editing the files all over again when there is a new PhpBB version!

Can we just:
(1)Create a Dropdown box with 3 choices:
- Not specified
- Male
- Female
That is what you see upon registration or in Profile settings
then in Memberlist and Viewtopic it displays the value as an image (it converts the value into images) (2)

Then the only 2 things we need to do is the 2 underlined. Do (1) is fast and will be preserved forever, I dont know how to do (2) but it maybe just a little coding right?

Is it possible?

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Genders

Post by TheSnake » Sat Oct 31, 2009 4:16 am

I haven't finished Installing this MOD yet, but I've come across a problem, there is a file missing from the \templates folder (modx.prosilver.en.xsl ???), from the archive file in the first page. The archive file is listed as:
Modification name: Genders
Author: eviL<3
Modification description: This MOD will allow your members to specify their Gender. They can chose between "Male", "Female" and "None specified".
Modification version: 1.0.1
Tested on phpBB version: See below

Download file: genders_1.0.1.zip
File size: 91941 Bytes
However, the file I have downloaded now over 6 times is no more that 75.4Kb. Every time I try to run the Templates Edit (prosilver.xml or subsilver2.xml), I just get 1/2 a screen of unreadable gibberish. After reading through all the pages before attempting the MOD install, I downloaded all the attachments various members posted, so I was able to copy across a copy of the modx.prosilver.en.xsl file.

User avatar
upsD
Registered User
Posts: 133
Joined: Thu Feb 07, 2008 1:26 am
Location: Freiburg (Black-Forest - Germany)

Re: Genders

Post by upsD » Sat Oct 31, 2009 9:50 am

nasadows wrote: (1)Create a Dropdown box with 3 choices:
- Not specified
- Male
- Female
That is what you see upon registration or in Profile settings?
i want have more choices

upsd
sorry me englisch, i am german, need traduktor ;-)
hallo, ich versteh nur die hälfte auf englisch, bitte langsam schreiben ;-) danke
http://translate.google.de/

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Genders

Post by igorw » Sat Oct 31, 2009 9:52 am

Hmm, this is a change that was made to firefox some time after I released the MOD. Can you try opening it with an other browser? Also make sure to extract the whole folder.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Genders

Post by TheSnake » Sat Oct 31, 2009 1:32 pm

eviL<3 wrote:Hmm, this is a change that was made to firefox some time after I released the MOD. Can you try opening it with an other browser? Also make sure to extract the whole folder.
Yes, I have also tried it in IE, my default Browser is Firefox, it shows as gibberish in both browsers. As soon as I copied the modx.prosilver.en.xsl file from the genders_1.0.1_registration_required.zip file that was posted in this topic a few pages back, it works a treat.

By default, when working with MODs, I always extract the entire folder contents to the Temp folder I have on the root of my D: Drive.

Since my previous message, I've finished installing this MOD, & it works without any problems.

The main reason for the previous message, was just to let you know of a possible issue to other ppl. I suppose it also depends on what browser/versions they are using, as to whether they would get the same problem as me.

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Genders

Post by igorw » Sat Oct 31, 2009 3:42 pm

Copying modx.prosilver.en.xsl to the templates folder and adjusting the path in templates/*.xml would fix this problem. Hopefully I'll get round to creating a new version some time.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Genders

Post by TheSnake » Sat Oct 31, 2009 4:23 pm

---
Edit: Resolved.

John3
Registered User
Posts: 22
Joined: Thu Sep 17, 2009 1:02 pm

Re: Genders

Post by John3 » Thu Nov 19, 2009 6:43 pm

I wonder how I could get this MOD working with the Revolution theme? I also would like to translate it.

pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

Re: Genders

Post by pawelooss » Sun Nov 22, 2009 10:02 pm

This mod doesn't work in phpBB 3.0.6. Installation runs correctly, but images of gender don't display (there isn't in site source too), it's only "Gender" inscription in topic.

What have I to do? :(
phpBB3 fan! ;)

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: Genders

Post by spaceace » Mon Nov 23, 2009 2:23 am

pawelooss wrote:This mod doesn't work in phpBB 3.0.6. Installation runs correctly, but images of gender don't display (there isn't in site source too), it's only "Gender" inscription in topic.

What have I to do? :(
this does work in 3.0.6

i just installed it today on a fresh and also updated board. if all of the install instructions are followed, it does work perfectly ;)

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: Genders

Post by woipi90 » Mon Nov 23, 2009 8:35 am

pawelooss wrote:This mod doesn't work in phpBB 3.0.6. Installation runs correctly, but images of gender don't display (there isn't in site source too), it's only "Gender" inscription in topic.

What have I to do? :(
it's working with 3.0.6.... ;)

you did refresh the style cache (imageset)?


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

Re: Genders

Post by pawelooss » Mon Nov 23, 2009 10:24 pm

woipi90 wrote:you did refresh the style cache (imageset)?
Sorry, I forgot about this. :oops: I though that I need only clear the cache. :P

Yeah, it works. :D
phpBB3 fan! ;)

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Genders

Post by TheSnake » Thu Nov 26, 2009 7:26 pm

djgalix wrote:
djgalix wrote:Hi all,

how to display in the footer the number of boys and girls ?

Example :

We have 4 boys & 5 girls connected ...
nobody could you help me please ? :|
Are you refering to showing how many users are registered on the board, in the Statistics of the Index page, or do you mean showing how many users in the Whois Online are of either genders?

I have saved a copy of the exact code shown earlier in this topic for both, so once you tell me which your refering to, I can post you the working code blocks (I know they work, as I've got them running perfectly on my forum right now).

User avatar
santhosh11421
Registered User
Posts: 47
Joined: Tue Jul 29, 2008 4:42 pm
Location: www.labodibo.co.cc
Contact:

Re: Genders

Post by santhosh11421 » Wed Dec 09, 2009 1:33 am

spaceace wrote:here are the instructions for adding Genders to registration as posted by LDM on ModphpBB3.com. thought i would post them here so they won't get lost again :lol:

Open includes/ucp/ucp_register.php

Find:

Code: Select all

'tz'				=> request_var('tz', (float) $config['board_timezone']),
Add below:

Code: Select all

//-- mod : Genders ------------------------------------------------------------
//-- add
                    'gender'      => request_var('gender', $user->data['user_gender']),
//-- fin mod : Genders --------------------------------------------------------
Find:

Code: Select all

'tz'				=> request_var('tz', (float) $timezone),
Add below:

Code: Select all

//-- mod : Genders ------------------------------------------------------------
//-- add
            'gender'      => request_var('gender', $user->data['user_gender']),
//-- fin mod : Genders --------------------------------------------------------
Find:

Code: Select all

'lang'				=> array('match', false, '#^[a-z_\-]{2,}$#i'),
Add Below:

Code: Select all

//-- mod : Genders ------------------------------------------------------------
//-- add
                'gender'      => array('num', true, 0, 2),
//-- fin mod : Genders --------------------------------------------------------
Find:

Code: Select all

'user_inactive_time'	=> $user_inactive_time,
Add Below:

Code: Select all

//-- mod : Genders ------------------------------------------------------------
//-- add
                    'user_gender'   => $data['gender'],
//-- fin mod : Genders --------------------------------------------------------
Find:

Code: Select all

'S_TZ_OPTIONS'		=> tz_select($data['tz']),
Add Below:

Code: Select all

//-- mod : Genders ------------------------------------------------------------
//-- add
            'GENDER_X'      => GENDER_X,
            'GENDER_M'      => GENDER_M,
            'GENDER_F'      => GENDER_F,

            'S_GENDER_X'   => ($data['gender'] == GENDER_X) ? true : false,
            'S_GENDER_M'   => ($data['gender'] == GENDER_M) ? true : false,
            'S_GENDER_F'   => ($data['gender'] == GENDER_F) ? true : false,
//-- fin mod : Genders --------------------------------------------------------
Now open: styles/subsilver2/template/ucp_register.html (or subsilver based style)

Find:

Code: Select all

<tr>
   <td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td>
   <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
</tr>
Add below:

Code: Select all

<tr>
   <td class="row1" width="35%"><b class="genmed"><label for="gender_x">{L_GENDER}:</label> </b><br /><span class="gensmall">{L_GENDER_EXPLAIN}</span></td>
   <td class="row2">
      <label for="gender_m"><input type="radio" name="gender" id="gender_m" value="{GENDER_M}"<!-- IF S_GENDER_M --> checked="checked"<!-- ENDIF --> /> {L_GENDER_M}</label>
      <label for="gender_f"><input type="radio" name="gender" id="gender_f" value="{GENDER_F}"<!-- IF S_GENDER_F --> checked="checked"<!-- ENDIF --> /> {L_GENDER_F}</label>
      <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>
   </td>
</tr>

Now open: styles/prosilver/template/ucp_register.html (or prosilver based style)


Find:

Code: Select all

<dl>
		<dt><label for="tz">{L_TIMEZONE}:</label></dt>
		<dd><select name="tz" id="tz" class="autowidth">{S_TZ_OPTIONS}</select></dd>
	</dl>
Add below:

Code: Select all

<dl>
      <dt><label for="gender_x">{L_GENDER}:</label><br /><span>{L_GENDER_EXPLAIN}</span></dt>
      <dd>
         <label for="gender_m"><input type="radio" name="gender" id="gender_m" value="{GENDER_M}"<!-- IF S_GENDER_M --> checked="checked"<!-- ENDIF --> /> {L_GENDER_M}</label>
         <label for="gender_f"><input type="radio" name="gender" id="gender_f" value="{GENDER_F}"<!-- IF S_GENDER_F --> checked="checked"<!-- ENDIF --> /> {L_GENDER_F}</label>
         <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>
      </dd>
   </dl>
Upload files, purge cache and refresh template used.
does it work with phpbb3.0.6????
Image

Locked

Return to “[3.0.x] MOD Database Releases”