[PART 3] & [PART 4] Gender Mod

Mod that adds a extra field to the users profile, the gender is displayed beside the posts

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Postby draky on Fri 23. Apr, 2004 23:59

Can not download ?
Invalid links... :?
draky
Poster
Poster
 
Posts: 7
Joined: Sat 19. Apr, 2003 12:00
Location: France

Postby Pentium_4 on Sat 24. Apr, 2004 13:51

Updated :wink:

Pentium_4 :wink:
Image
User avatar
Pentium_4
Poster
Poster
 
Posts: 77
Joined: Tue 06. May, 2003 10:32
Location: 127.0.0.1

Postby draky on Fri 14. May, 2004 07:37

Added the ability to SORT memberlist by gender ;)

+

Updated the how-to to make it "subSilver Compliant"

Here is the code :
Code: Select all
##############################################################
## MOD Title: Add-On pour Gender
## MOD Author: Pentium_4 <albanmaire@wanadoo.fr> (Maire Alban) http://www.forum.ffx.com/
## MOD second author : Draky draky@draky.net
## MOD Description: Le fichier Part 3 permet d'afficher le sexe de l'utilisateur dans le memberlist.php
## MOD Version: 1.1.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## File(s) to edit: memberlist.php, lang_main.php et memberlist_body.tpl
## File(s) included: n/a
##
##############################################################
## Notes de l'auteur:    Version Final :: 1.0.0
##
##         WARNING :: you have to install Niels Gender Mod http://mods.db9.dk/
##
##############################################################
## MOD History:
##
##   2004-05-14 - 1.1.0 : Sort by Gender + subSilver Compliant
##   2003-07-17 - Version Final 1.0.0
##
##############################################################
## Avant d'ajouter ce MOD à votre forum, il vous est fortement conseillé
## d'effectuer une sauvegarde des éléments que vous allez modifier
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php

#
#-----[ FIND ]------------------------------------------
#
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');

#
#-----[ REPLACE WITH ]------------------------------------------
#
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Gender'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten', 'gender');

#
#-----[ FIND ]------------------------------------------
#
   'L_POSTS' => $lang['Posts'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Add-on pour Gender --------------------------------------------------------------------
//-- ajouter
   'L_GENDER' => $lang['Gender'],
//-- fin mod : Add-on pour Gender ----------------------------------------------------------------

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar

#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_allowavatar

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_gender

#
#-----[ FIND ]------------------------------------------
#
if ( !empty($row['user_icq']) )
      {
         $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
         $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
         $icq =  '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
      }
      else
      {
         $icq_status_img = '';
         $icq_img = '';
         $icq = '';
      }

#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Add-on pour Gender --------------------------------------------------------------------
//-- ajouter
      if ( !empty($row['user_gender']))
         {
                 switch ($row['user_gender'])
           {
                      case 1 : $gender = $lang['Male'] . " <img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender'].  ":" . $lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />"; break;
                      case 2 : $gender = $lang['Female'] . " <img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":" . $lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break;
                      default: $gender = $lang['No_gender_specify']; 
              }
      } else $gender = $lang['No_gender_specify'];
//-- fin mod : Add-on pour Gender ----------------------------------------------------------------

#
#-----[ FIND ]------------------------------------------
#
         'YIM_IMG' => $yim_img,
         'YIM' => $yim,

#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Add-on pour Gender --------------------------------------------------------------------
//-- ajouter
         'GENDER' => $gender,
//-- fin mod : Add-on pour Gender ----------------------------------------------------------------

#
#-----[ OPEN ]------------------------------------------
#
languages/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Sort_Gender'] = 'Sort by Gender';

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/memberlist_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- mod : Add-on pour Gender -->
<!-- ajouter -->
     <th class="thTop" nowrap="nowrap">{L_GENDER}</th>
<!-- fin mod : Add-on pour Gender -->
#
#-----[ FIND ]------------------------------------------
#
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gen"><a href="{memberrow.U_VIEWPROFILE}" class="gen">{memberrow.USERNAME}</a></span></td>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- mod : Add-on pour Gender -->
<!-- ajouter -->
     <td class="{memberrow.ROW_CLASS}" align="center"><span class="gensmall">{memberrow.GENDER}</span></td>
<!-- fin mod : Add-on pour Gender -->
#
#-----[ FIND ]------------------------------------------
#
<td class="catBottom" colspan="8" height="28">&nbsp;</td>

#
#-----[ REPLACE WITH ]------------------------------------------
# CECI DEPEND DE CE QUE VOUS AVEZ MIS DANS VOTRE LISTE DES MEMBRES
# SI CE N'EST PAS 8 OU 9 RAJOUTER +1 A CHAQUE FOIS
#
<td class="catBottom" colspan="9" height="28">&nbsp;</td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
# EoM


Also changed a piece of code to put the "gender" memberrow at the right place...


[Edited by Kooky: replace french instructions into english]
draky
Poster
Poster
 
Posts: 7
Joined: Sat 19. Apr, 2003 12:00
Location: France

Postby draky on Fri 14. May, 2004 23:50

Trying to make "subSilver Compliant" ;) the Part 4 but found a bug... maybe related to SQL !

All is OK for groups. Gender is well displayed except... for pending members.
IE : an user is awaiting for acceptation and its gender is "not specified" even if it IS specified (male or female) although "normal members" of the group are showing gender... Only the "second part" is not right.
Seems that something is not correctly "read" inside SQL table :?

Any idea ?

Thanks a lot :)
draky
Poster
Poster
 
Posts: 7
Joined: Sat 19. Apr, 2003 12:00
Location: France

Errors

Postby dimaxer on Thu 27. May, 2004 23:56

Both files PART3 and PART4 that I downloaded on 1st page US version are causing errors.


Code: Select all
Critical Error

FIND FAILED: In file [memberlist.php] could not find:

, user_allowavatar




and in PART4


Code: Select all
Critical Error

FIND FAILED: In file [groupcp.php] could not find:

function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim, &$userdata)
dimaxer
Poster
Poster
 
Posts: 1
Joined: Thu 27. May, 2004 19:47

Postby kooky on Fri 28. May, 2004 23:35

try without Easy Mod ;p
that will work
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby Homeskillet on Fri 22. Jul, 2005 04:38

The download links seem to be down. Does anyone know where I can find it? Thank you :D
Homeskillet
Poster
Poster
 
Posts: 6
Joined: Sun 17. Oct, 2004 19:09

Previous

Return to Gender [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron