Results 1 to 6 of 6

Thread: Show membership level on admin profile summary page

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

    Default Show membership level on admin profile summary page

    To show membership level on admin profile summary page, make the following changes:

    Insert this into your database

    Code:
    INSERT INTO `GlParams` ( `Name` , `VALUE` , `kateg` , `desc` , `Type` , `check` , `err_text` )
    VALUES (
    'show_membership', '', '888', 'Show membership level info on admin profile summary screen', 'checkbox', '', ''
    );

    If you get an error when adding this, you don't have the "clean" GlParamsKteg.
    Are you running at least CLEAN v0.04?
    If not, you can add the GlParamsKteg in phpMyadmin.


    In /admin/profiles.php

    Find this, around line #19:

    Code:
    $ADMIN = $logged[admin];
    Add this under:

    Code:
    $show_membership =  getParam('show_membership');
    Find around line #171:
    Code:
    $result = db_res( "SELECT ID, Picture, Sex, ProfileType, LastLoggedIn, NickName, RealName, MerchantPrice, Status FROM Profiles $aff_part_f WHERE 1 $email_part $aff_part_w $prof_part $sex_part $extra_addon_part ORDER BY $sortor $sorttype LIMIT $real_first_p, $p_per_page" );
    Change to:

    Code:
    $result = db_res( "SELECT ID, Picture, Sex, ProfileType, LastLoggedIn, NickName, RealName, MerchantPrice, Status, mem_level, mem_level_days FROM Profiles $aff_part_f WHERE 1 $email_part $aff_part_w $prof_part $sex_part $extra_addon_part ORDER BY $sortor $sorttype LIMIT $real_first_p, $p_per_page" );
    Find around line #253:

    Code:
    <td align=right>&nbsp;<?
    		echo sprintf( "%.2f", total_price( $p_arr[MerchantPrice] ) );
    ?>&nbsp;</td>
    Change to:
    Code:
    <td align=right>&nbsp;<?
    if ( $show_membership == "on" )
    {
    $memlevelinfo = db_arr( "SELECT * from mem_levels WHERE ID = $p_arr[mem_level]" );
    $level_name = $memlevelinfo[name];
    echo $level_name;
    }
    else
    {
    echo sprintf( "%.2f", total_price( $p_arr[MerchantPrice] ) );
    }
    ?>&nbsp;</td>
    Find Around line #228:

    Code:
    <td align=center>Price,&nbsp;<?=$doll;?></td>
    Replace with:

    Code:
    <?
    if ( $show_membership == "on" )
    {
    echo "<td align=center>Level</td>";
    }
    else
    {
    echo "<td align=center>Price,&nbsp;<?=$doll;?></td>";
    }
    ?>

    More needs to be done - to perhaps add the number of original days,
    and days remaining, in the membership display here.

    This code is not optimized - it was done quickly to fix the problem... I'm sure it can be cleaned up.

    Smoge
    Attached Images Attached Images
    Last edited by Smoge; 10-03-2005 at 06:05 AM.
    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
    Kleetus
    Guest

    Default

    Hi, does anybody know if it works with dolphin 5.2 ???
    Looks like a great feature !

  3. #3

    Join Date
    Mar 2006
    Posts
    39

    Default

    Hi,

    I tied this but I get following DB Error!?

    Error in /admin/profiles.php: Unknown column 'mem_level' in 'field list'
    Query: 'SELECT ID, Picture, Sex, ProfileType, LastLoggedIn, NickName, RealName, MerchantPrice, Status, mem_level, mem_level_days FROM Profiles WHERE 1 ORDER BY ID ASC LIMIT 0, 30'



    kruemelg
    _____________________________________
    www.singlemonster.de

    Dolphin v6.003 +++

  4. #4
    Prometheus
    Guest

    Default

    RU looking for something like this?
    see attached.

    TGIF......

    Todd


    Taking no action is an action.
    Attached Files Attached Files

  5. #5
    Kleetus
    Guest

    Default

    Thats it ! And you do have some more information in this feature !
    Pleas tell us more.

  6. #6
    Prometheus
    Guest

    Default

    Here it is.

    This is the same code that is used in your members..member.php that tells them membership status.
    I just took this code from there and put it in my profiles.php as a temp fix
    to display this information and dediced since no one but me sees this and it works why redue it.....LOL....

    Add this code to your admin/profiles.php

    <td width="300"align = left><? echo GetMembershipStatus($p_arr['ID']); ?></td>

    You will have to edit your profiles.php and of course create a title table for this new field.

    I would give you the exact place to put this code but our admin panel is highly modded and it would not work for your site.
    I have included my profiles.php just in case you would like to upload it to your test site and see what it looks like.

    I posted this mod, to use the term loosely, here somewhere but cannot find it right now...

    Peace.

    Todd
    Attached Files Attached Files
    Last edited by Prometheus; 09-23-2006 at 10:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can't change Membership Level in Admin
    By Spexmex in forum Bugs Dolphin 6.01
    Replies: 3
    Last Post: 01-27-2010, 03:50 PM
  2. trying to get membership level status in new page.
    By Zaphieon in forum General Issues, Comments, Questions
    Replies: 3
    Last Post: 08-15-2008, 10:42 AM
  3. How to show 2 blocks in 1 row in profile page ?
    By toncrub in forum Dolphin General Discussion v6.00 and above
    Replies: 0
    Last Post: 02-10-2008, 01:28 AM
  4. Membership expiration letter sent to members whose membership level expires.
    By swingers in forum Dolphin General Discussion v5.3 to v5.6.5
    Replies: 2
    Last Post: 01-28-2008, 01:16 AM
  5. 4.0 patch 1 Profile membership level
    By Drakontas in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 08-13-2005, 01:36 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
  •