Results 1 to 3 of 3

Thread: Online Member | Random Member | Latest Member | Top Member

  1. #1
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default Online Member | Random Member | Latest Member | Top Member

    How will I go about removing the Online Members in the choices below? It is in ae4. I think due to the new system it scare people away when there is nobody online when selecting this option.

    Online Members | Random Members | Latest Members | Top Members
    In index.php,

    Find the section which has:
    Code:
    	switch ( $mode )
    	{
    // online members
    		case 'online':
    Here, you will see the different cases for the four options... you need to comment out the online users code in each case.

    See below for an example... you will notice, all the online stuff is commented out.... you should also set your default display for this page in your Admin panel to something other than online - since it will no longer exist on your page.. maybe rand or one of the other two.

    In the admin, global settings, Profiles area, adjust: "Show members on index page (if enabled in the template, by default available in the 'ae4' template), possible values: online, rand, last, top"

    Code:
    	switch ( $mode )
    	{
    // online members
    //		case 'online':
    //			{
    //				$min = GetParam( "member_online_time" );
    //			    $sql .= " FROM Profiles WHERE LastNavTime > SUBDATE(NOW(), INTERVAL $min MINUTE) AND Status = 'Active' $add LIMIT $max_num";
    //				$ret .=                                               _t("_Online Members")          . " | " .
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=rand&sx=$sx\">" . _t("_Random Members") . "</a>" . " | " .
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=last&sx=$sx\">" . _t("_Latest Members") . "</a>" . " | " .
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=top&sx=$sx\">"  . _t("_Top Members")    . "</a>";
    //				break;
    //			}
    // random members
            case 'rand':
                {
                    $sql .= " FROM Profiles WHERE Status = 'Active' $add ORDER BY RAND() LIMIT $max_num";
    				$ret .=
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=online&sx=$sx\">" . _t("_Online Members") . "</a>" . " | " .
    					                                                    _t("_Random Members")          . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=last&sx=$sx\">"   . _t("_Latest Members") . "</a>" . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=top&sx=$sx\">"    . _t("_Top Members")    . "</a>";
                    break;
                }
    // last registered members
            case 'last':
                {
                    $sql .= " FROM Profiles WHERE Status = 'Active' $add ORDER BY LastReg DESC LIMIT $max_num";
    				$ret .=
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=online&sx=$sx\">" . _t("_Online Members") . "</a>" . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=rand&sx=$sx\">"   . _t("_Random Members") . "</a>" . " | " .
    					                                                    _t("_Latest Members")          . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=top&sx=$sx\">"    . _t("_Top Members")    . "</a>";
                    break;
                }
    // top rated members
    		case 'top':
                {
                    $sql .= ", COUNT(*) AS `count`, SUM(Mark)/COUNT(*) AS mark FROM Votes INNER JOIN Profiles ON (ID = Member) WHERE Status = 'Active' $add GROUP BY Member HAVING `count` > 2 ORDER BY Mark DESC LIMIT $max_num";
    				$ret .=
    //					"<a href=\"{$_SERVER['PHP_SELF']}?mode=online&sx=$sx\">" . _t("_Online Members") . "</a>" . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=rand&sx=$sx\">"   . _t("_Random Members") . "</a>" . " | " .
    					"<a href=\"{$_SERVER['PHP_SELF']}?mode=last&sx=$sx\">"   . _t("_Latest Members") . "</a>" . " | " .
    					                                                    _t("_Top Members");
                    break;
    			}
    	}
    Note: I have not tested this much - the database of the aeDating I used to test it only had two users... if you find a problem, post it - and we can look at it together.

    If you want to carry this over to the statistics box, that is also possible, but another topic, so I will not cover it here.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  2. #2

    Join Date
    May 2005
    Posts
    27

    Default Re: Online Member | Random Member | Latest Member | Top Memb

    [quote="Smoge"]
    How will I go about removing the Online Members in the choices below? It is in ae4. I think due to the new system it scare people away when there is nobody online when selecting this option.

    Online Members | Random Members | Latest Members | Top Members
    In index.php,

    --- Cut ---

    Hi Smoge,

    Thanks a million. I have done what you have showed in your reply, but the only thing i did not do before was to comment the other "online" codes in the rand top & last... I have successfully changed it and no more database errors.

    Kind Regards
    Rusty

  3. #3
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    You can do that - but then if someone choose RAND, they will have the option of choosing ONLINE.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Member Menu items moved to member.php
    By Prometheus in forum Free Mod Exchange
    Replies: 6
    Last Post: 06-28-2007, 06:16 PM
  2. Member Panel latest news and member statistics
    By malikperera in forum Dolphin General Discussion v5.3 to v5.6.5
    Replies: 2
    Last Post: 05-23-2007, 12:17 AM
  3. Replies: 0
    Last Post: 03-21-2007, 09:25 PM
  4. 1 Random Member on each page
    By makenoize in forum General Issues, Comments, Questions
    Replies: 1
    Last Post: 09-14-2006, 11:14 PM
  5. Online Member | Random Member | Latest Member | Top Member
    By ijk in forum General Issues, Comments, Questions
    Replies: 2
    Last Post: 12-29-2005, 03:49 AM

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
  •