Gender MOD

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

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
35
67%
Very Good
7
13%
Good
4
8%
Fair
1
2%
Poor
5
10%
 
Total votes: 52

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

Re: Gender MOD

Post by igorw »

wolflet wrote:
eviL<3 wrote:Did you check viewtopic.php and templates/subSilver/viewtopic_body.php?
i am using another theme so i have edited the viewtopic_body.tpl accordingly.

but my viewtopic.php file has been previously modified by keep_unread_mod which has replaced the entire paragraph starting // Define the little post icon

could that be the reason?
Indeed, that may be causing it. Can i have a link to that mod?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

wolflet
Registered User
Posts: 45
Joined: Thu May 31, 2007 7:38 am

Re: Gender MOD

Post by wolflet »

http://www.phpbb.com/community/viewtopi ... 059&hilit=

thats the mod i was talking about. but the funny thing i noticed. the icon will show in the last post of every topic and not for all posts. is that normal?

attached below is the area which i suspect the problem arises.

Code: Select all

        // Gender MOD
	switch ( $postrow[$i]['user_gender'] )
	{
		case GENDER_M:
			$poster_gender_img =    $images['gender_m'];
			$l_poster_gender =      $lang['gender_m'];
		break;
		
		case GENDER_F:
			$poster_gender_img =    $images['gender_f'];
			$l_poster_gender =      $lang['gender_f'];
		break;
		
		default:
			$poster_gender_img =    $images['gender_x'];
			$l_poster_gender =      $lang['gender_x'];
	}
	
	switch ( $board_config['gender_display'] )
	{
		case GENDER_IMG:
			$poster_gender = '<img src="' . $poster_gender_img . '" border="0" alt="' . $l_poster_gender . '" title="' . $l_poster_gender . '" />';
		break;
		
		case GENDER_TEXT:
			$poster_gender = $l_poster_gender;
		break;
		
		default:
			$poster_gender = '';
	}
	// Gender MOD

	//
	//START MOD Keep_Unread_2 * Define the little post icon
	//
	if ( $postrow[$i]['post_time'] > $topic_last_read )
	{
		$mini_post_img = $images['icon_minipost_new'];
		$mini_post_alt = $lang['New_post'];
	}
	else
	{
		$mini_post_img = $images['icon_minipost'];
		$mini_post_alt = $lang['Post'];
	}
	//END MOD Keep_unread_2

	$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id'];
Last edited by wolflet on Fri Jul 20, 2007 5:35 pm, edited 1 time in total.

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

Re: Gender MOD

Post by igorw »

Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

wolflet
Registered User
Posts: 45
Joined: Thu May 31, 2007 7:38 am

Re: Gender MOD

Post by wolflet »

gotit. the problem lies with quick reply. thanks alot dude

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

Re: Gender MOD

Post by igorw »

No problem! Glad you got it working!
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

anton1o
Registered User
Posts: 131
Joined: Thu Apr 06, 2006 10:30 pm

Re: Gender MOD

Post by anton1o »

Hey Guys,

Ive got the following problems when in Profile and i pick a Gender i get the following error. Also the Gender icon seems to be showing in the Last post of a thread. Which is kind of weird as i am sure i put the lines that were requested in "OPEN templates/subSilver/viewtopic_body.tpl" in the correct destination.

Code: Select all

Could not update users table
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' user_dateformat = 'D M d, Y g:i a', user_lang = 'english', user_style = 3, user' at line 2
UPDATE phpbb_users SET user_email = 'detrax@optusnet.com.au', user_birthday = 4011986, user_icq = '', user_website = '', user_occ = '', user_from = 'Melbourne', user_interests = 'car''s and photography', user_gender = 1, user_custom_title = '[GMHVN6]', user_sig = '[img:e2fee72da7]http://www.userbars.com/galerie/images/files/3/7/buick.gif[/img:e2fee72da7] If you can see me in your rear-view, your not fast enough.', user_sig_bbcode_uid = '0508ce78c9', user_viewemail = 0, user_aim = '', user_yim = '', user_msnm = 'antonio@noobforces.com', user_attachsig = 1, user_allowsmile = 1, user_allowhtml = 0, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 1, user_popup_pm = 1, group_priority = '0', user_timezone = 10, user_gender, user_dateformat = 'D M d, Y g:i a', user_lang = 'english', user_style = 3, user_active = 1, user_actkey = '' WHERE user_id = 62
Line : 633
File : usercp_register.php
[/size]
http://kngracing.com/forum/viewtopic.php?t=420.

Now i went over my code in usercp_register.php, all was fine couldnt spot a fault with it. I have added the SQL code but am still getting that error and cant seem to see where it would be comming from.
Ive gone over all my modified files and they all seem to be correct also.

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

Re: Gender MOD

Post by igorw »

Can you please paste both viewtopic.php and includes/usercp_register.php into the pastebin?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

anton1o
Registered User
Posts: 131
Joined: Thu Apr 06, 2006 10:30 pm

Re: Gender MOD

Post by anton1o »


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

Re: Gender MOD

Post by igorw »

In usercp_register.php, find:

Code: Select all

, user_timezone = $user_timezone, user_gender, user_dateformat
Replace with:

Code: Select all

, user_timezone = $user_timezone, user_gender = $user_gender, user_dateformat
As for the viewtpopic problem look here: http://www.phpbb.com/community/viewtopi ... 2#p2596202
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

anton1o
Registered User
Posts: 131
Joined: Thu Apr 06, 2006 10:30 pm

Re: Gender MOD

Post by anton1o »

I was able to fix the error, and now ive gotten the Image to show up where the avatars are.
Altho everytime somebody posts theres a huge white space being created ontop of the threads.
http://www.kngracing.com/forum/viewtopic.php?t=420 - As you can see here.

Anybody know if i may have left out a line which is creating this extra space per post?

Sakujo
Registered User
Posts: 8
Joined: Wed Jul 04, 2007 8:38 pm

Re: Gender MOD

Post by Sakujo »

I am having a problem, I installed the gender mod correctly and for some unknown reason, Its not letting me save the gender selected to the DB.

The site url is:
ExDee.Org

Can you please have a look at it. :)

Thanks.

ang77
Registered User
Posts: 40
Joined: Mon Sep 10, 2007 4:41 pm

Re: Gender MOD

Post by ang77 »

Hi,

This is my first time installing a mod and i installed the coolest one, not the easiest one... :oops:
However, i managed to put the codes all up, allow the gif image to show up, and it looks good in the admin page, profile, registration (image and text all are there) :D

only at the viewtopic its not showing.. Dang... :(
It shows :
Joined: 10 Sep 2007
Posts: 1
Gender:
the "Gender:" text already appeared in every posts... but with no image...nor text... :(

I believe it is in the viewtopic_body.tpl
so here is the installation instruction:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
	<!-- BEGIN postrow -->
#
#-----[ FIND ]------------------------------------------
#
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<br />{postrow.POSTER_FROM}</span><br /></td>
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
		<!-- BEGIN switch_gender_display -->
		{L_GENDER}{postrow.POSTER_GENDER}<br />
		<!-- END switch_gender_display -->
		{postrow.POSTER_FROM}</span><br /></td>
and here is the one i put up:

Code: Select all

	<!-- BEGIN postrow -->
	<tr> 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />
		<!-- BEGIN switch_gender_display -->
		{L_GENDER}{postrow.POSTER_GENDER}<br />
		<!-- END switch_gender_display -->
		{postrow.POSTER_FROM}</span><br /></td>
dont know what is the error... :?
would you direct me to fix this, please? or maybe i need to check the other file?

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

Re: Gender MOD

Post by igorw »

It actually looks correct, check your edits to viewtopic.php.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

ang77
Registered User
Posts: 40
Joined: Mon Sep 10, 2007 4:41 pm

Re: Gender MOD

Post by ang77 »

I re-do my viewtopic.php, but it still not working... :(
Its a long codes, I dun think its allowed to be post here... or is it allowed? :P
Its kinda weird, cos it works at all other page but the viewtopic one... :? :(

then i tried to do the membership add-on, Evil<3..
got error then i traced it back, here what i found... (i dunno whether this already being discussed or not)

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
		$www = ( $row['user_website'] ) ? '<a href="' 
#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Gender MOD ------------------------------------------------------------
//-- add
        switch ( $row['user_gender'] )
        {
            case GENDER_M:
                $user_gender_img =    $images['gender_m'];
                $l_user_gender =      $lang['gender_m'];
            break;

            case GENDER_F:
                $user_gender_img =    $images['gender_f'];
                $l_user_gender =      $lang['gender_f'];
            break;

            default:
                $user_gender_img =    $images['gender_x'];
                $l_user_gender =      $lang['gender_x'];
        }

        $gender = '<img src="' . $user_gender_img . '" alt="' . $l_user_gender . '" title="' . $l_user_gender . '" border="0" />';
//-- fin mod : Gender MOD --------------------------------------------------------
I put exactly at the spot after: $www = ( $row['user_website'] ) ? '<a href="'
Its not working... with my blind coding knowledge, i just move the GenderMod code at after:

Code: Select all

		$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
It WORKS :D :D

abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: Gender MOD

Post by abs8 »

hey guys

i installed this mod but nothing changed....cant see it in general config in my ACP and no gender icons in profiles, registration and memberlist. there is no error either...

anybody can help?

thanks!

Post Reply

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