Page 1 of 4 12 ... LastLast
Results 1 to 10 of 31

Thread: Display the most recent members and a new icon in their profile

  1. #1

    Join Date
    Sep 2005
    Posts
    139

    Default Display the most recent members and a new icon in their profile

    This mod will display the most recent 8 members as thumbnails in the member's area. It also displays a "new member" icon on their profile as well as in the search result. But, you have to create an icon for this; do not forget to change the file name (newmem.gif) and its path at 8th to do.

    NEXT THINGS TO DO:
    create a search result from the recent members by join dates, such as:
    - show today's new members
    - show yesterday's new members
    - show last week's new members
    - show last month's new members

    9 files to edit. Backup your files before doing anything and see this mod in action at: singlesburg.com

    My version: v4.002 + CLEAN
    My template: ACT
    Accepted profile types: single (no couple)

    To do:
    1) insert this sql statement (last 30 days registred members are considered as new members. If you get a lot of signups, reduce this number from global settings > Other, also I pick 8 members to be shown, you can set this as you want from admin panel: global settings > Other)
    PHP Code:
    INSERT INTO `GlParamsVALUES ('new_member_period''30'3'Time period in days for new members''digit'''''); 
    INSERT INTO `GlParamsVALUES ('num_of_recent_member''8'3'Number of recent members in member`s area''digit'''''); 

    2) tmpl_act_page_7.html
    find this:
    __nick__
    replace with:
    PHP Code:
    __nick__ __new_member_icon__ 
    3) tmpl_act_searchrow.html
    find this:
    __nick__
    replace with:
    PHP Code:
    __nick__ __new_member_icon__ 
    4) tmpl_act_page_6.html
    insert this table anywhere you like. you can modify it for your needs:
    PHP Code:
    <table cellspacing="3" cellpadding="0" border="0" width="100%">
    <
    tr>
    <
    td class="dark" style="border: solid 1px #cccccc">&nbsp;__recent_members_head__</td>
    </
    tr>
    <
    tr>
    <
    td align="center">__recent_members_info__</td>
    </
    tr>
    <
    tr>
    <
    td height="16" background="templates/tmpl_act/images_act/horiz_bar.gif"><img src="templates/tmpl_act/images_act/spacer.gif" height="16"></td>
    </
    tr>
    </
    table
    5) inc/design.inc.php (also, create a new icon)
    after this (last function in my file):
    function get_active_color()
    {
    ...blah...
    }
    inser this:
    PHP Code:
    function NewMemberIcon()
    {
        global 
    $p_arr;

        
    $period GetParam"new_member_period" );
        
    $registration db_res"SELECT LastReg FROM Profiles WHERE ID='{$p_arr['ID']}' AND Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= $period" );
        
    $result mysql_num_rows($registration);
        if (
    $result != "0")
        {
            return 
    "<img src=\"templates/newmem.gif\" align=\"absmiddle\" border=\"0\" alt=\"New Member\">";
        }

    6) profile.php
    after this:
    $_page_cont[$_ni]['more_photos2'] = PrintThumbMorePhotos(1);
    insert this:
    PHP Code:
    $_page_cont[$_ni]['new_member_icon'] = NewMemberIcon(); 
    7) search_result.php
    after this:
    $_page_cont[$_ni]['db_color'] = $search_result_db_color;
    insert this:
    PHP Code:
    $_page_cont[$_ni]['new_member_icon'] = NewMemberIcon(); 
    members.inc.php
    before this:
    $templ = str_replace ( "__row_title__", $p_arr[Headline], $templ );
    insert this:
    PHP Code:
            $period GetParam"new_member_period" );
            
    $registration db_res"SELECT LastReg FROM Profiles WHERE ID='{$p_arr['ID']}' AND Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= $period" );
            
    $result mysql_num_rows($registration);
            if (
    $result != "0")
            {
                
    $new_member_icon "<img src=\"templates/newmem.gif\" align=\"absmiddle\" border=\"0\" alt=\"New Member\">";
            } 
    9) members.inc.php
    after this:
    $templ = str_replace ( "__nick__", $nick, $templ );
    insert this:
    PHP Code:
    $templ str_replace "__new_member_icon__"$new_member_icon$templ ); 
    10) langs/lang-English.php
    after this:
    case "_Post date": return "Post date";
    insert this:
    PHP Code:
    case "_recent members": return "recent members"
    11) member.php
    before this:
    /**
    * contr panel "contacts"
    */
    function contr_panel_contacts ()
    insert this:
    PHP Code:
    ### Display recent members starts
    /**
     * contr panel "just joined info"
     */
    function recent_members_info()
    {
        global 
    $site;
        global 
    $p_arr;
        global 
    $ID_PIC_DIR;
        global 
    $ID_PIC_URL;

        
    $period GetParam"new_member_period" );
        
    $numofrecent GetParam"num_of_recent_member" );
        
    $numofcols 4;

        if (
    $p_arr['LookingFor'] == "couple" || $p_arr['LookingFor'] == "both")
        {
            if (
    $p_arr['Sex'] == "female")
            {
                
    $looking_for "male";
            }
            else
            {
                
    $looking_for "female";
            }
        }
        else
        {
            
    $looking_for $p_arr['LookingFor'];
        }

        if (
    $numofrecent)
        {
            
    // latest joined members
            
    $just_joined db_res"SELECT ID,Pic_0_addon FROM Profiles WHERE Sex='{$looking_for}' AND Status='Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= $period AND Pic_0_addon <> '' AND Pic_0_addon <> '0' ORDER BY LastReg DESC LIMIT $numofrecent" );

            
    $out "<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\">\n";
            
    $out .= "<tr>\n";
            
    $i 1;

            while ( 
    $just_joined_arr mysql_fetch_array $just_joined ) )
            {
                
    $src "$ID_PIC_DIR$just_joined_arr[ID]_0_$just_joined_arr[Pic_0_addon].jpg";
                if ( 
    file_exists($src) )
                {
                    
    $src "$ID_PIC_URL$just_joined_arr[ID]_0_$just_joined_arr[Pic_0_addon].jpg";
                    
    $out .= "<td width=\"138\" height=\"140\" align=\"center\" valign=\"middle\" background=\"templates/thbg.gif\"><a href=\"" $site[url] . "profile.php?ID=" $just_joined_arr[ID] . "\"><img src=\"$src\" border=0></a></td>\n";
                    if (
    $i $numofcols == 0) { $out .= "<tr>\n</tr>\n"
                    
    $i++;
                }
            }

            
    $out .= "<tr>\n";
            
    $out .= "</table>";

            
    ob_start();
            echo 
    $out;
            
    $ret ob_get_contents();
            
    ob_end_clean();
            return 
    $ret;
        }
    }
    ### Display recent members ends 
    12) member.php
    after this:
    $_page_cont[$_ni]['member_info'] = contr_panel_member_info();
    insert this:
    PHP Code:
    $_page_cont[$_ni]['recent_members_head'] = _t("_recent members");
    $_page_cont[$_ni]['recent_members_info'] = recent_members_info(); 
    Attached Images Attached Images
    Last edited by tester00; 10-20-2005 at 06:31 PM.

  2. #2
    ijk
    ijk is offline

    Join Date
    Apr 2005
    Posts
    340

    Default great mod

    where is inc/display.inc.php there is no display.inc.php file is this the profile_disp.inc.php file.
    thanks

  3. #3
    ijk
    ijk is offline

    Join Date
    Apr 2005
    Posts
    340

    Default hi

    getting the following errors when testing on local host.


    Warning: array_rand() [function.array-rand]: First argument has to be an array in C:\dating\dir\member.php on line 251
    getting the following errors any ideas
    Warning: Cannot modify header information - headers already sent by (output started at C:\dating\dir\member.php:251) in C:\dating\dir\inc\design.inc.php on line 1560

    Warning: Cannot modify header information - headers already sent by (output started at C:\dating\dir\member.php:251) in C:\dating\dir\inc\design.inc.php on line 1561

    Warning: Cannot modify header information - headers already sent by (output started at C:\dating\dir\member.php:251) in C:\dating\dir\inc\design.inc.php on line 1562

    Warning: Cannot modify header information - headers already sent by (output started at C:\dating\dir\member.php:251) in C:\dating\dir\inc\design.inc.php on line 1563

  4. #4
    meetadultfriends
    Guest

    Default I am getting the same errors

    I am getting the same errors as well. I have inserted the code exactly the way you have it here and still dosnt work...

    Look forward to a response soon...

    Damien
    admin@meetadultfriends.com

  5. #5
    meetadultfriends
    Guest

    Default No it did not help...

    I have approx. 4700 members on my site and made the changes you mentioned, but now I get more errors, it says line 240 of the member.php file

    Parse error: parse error, unexpected T_VARIABLE in /home/httpd/vhosts/meetadultfriends.com/httpdocs/member.php on line 240

    Any help will be great.

    Thanks

    Damien
    admin@meetadultfriends.com

  6. #6
    meetadultfriends
    Guest

    Default Now I get this error...

    This is the error message I am getting now from member.php,

    Parse error: parse error, unexpected $ in /home/httpd/vhosts/meetadultfriends.com/httpdocs/member.php on line 684

    Its just weird why it wont work...

    Anyway look forward to hearing from you soon.

    Damien
    admin@meetadultfriends.com

  7. #7
    Yair Czitrom
    Guest

    Default

    Tester...

    I have tried it and it is all ok except from the member.php
    There is something wrong there that results with:
    unexpected $ in /home/aedating/member.php on line 684
    Hope you can find it

  8. #8
    Yair Czitrom
    Guest

    Default

    ...just as an extra thing here...
    To see the "new" icon on the home page as well, on the members list, where they are random, online...

    Open tmpl_xxx_searchrow_index.html
    Find:
    __nick__
    Change to:
    __nick__&nbsp;__new_member_icon__

  9. #9
    Yair Czitrom
    Guest

    Default

    Tester

    I have tried that.
    2 problems:
    1.when you switch on the index.php page to "latest members you get only the "new" icons (see pic)
    2. in member.php, nothing is coming(see pic)
    3.any way you can give me the code for the header.html but for adl template?

    Thanks
    Attached Images Attached Images
    Last edited by Yair Czitrom; 11-13-2005 at 07:40 AM. Reason: pics

  10. #10
    Yair Czitrom
    Guest

    Default

    About the "latest member" in index.php problem, this seems to work in members.inc.php:

    // replace template variables
    $period = GetParam( "new_member_period" );
    $registration = db_res( "SELECT LastReg FROM Profiles WHERE ID='{$p_arr['ID']}' AND Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= $period" );
    $result = mysql_num_rows($registration);
    if ($result != "0")
    {
    $new_member_icon = "<img src=\"templates/newmem.gif\" align=\"absmiddle\" border=\"0\" alt=\"New Member\">";
    }

Page 1 of 4 12 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display members with profile pics ONLY on homepage
    By DesertWarrior in forum Dolphin General Discussion v6.00 and above
    Replies: 2
    Last Post: 09-19-2008, 11:35 AM
  2. Profile display problem
    By joboy84 in forum General Troubleshooting
    Replies: 2
    Last Post: 11-10-2007, 09:31 AM
  3. Profile View Display
    By LG in forum General Troubleshooting
    Replies: 2
    Last Post: 08-07-2007, 05:56 AM
  4. Display all active members profiles with pagination
    By neoyinyan in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 03-18-2007, 04:17 PM
  5. Display GOLD Icon MOD - Code and files attached
    By Smoge in forum Free Mod Exchange
    Replies: 4
    Last Post: 12-04-2005, 09:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •