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:
Add this under:Code:$ADMIN = $logged[admin];
Find around line #171:Code:$show_membership = getParam('show_membership');
Change to: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" );
Find around line #253: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" );
Change to:Code:<td align=right> <? echo sprintf( "%.2f", total_price( $p_arr[MerchantPrice] ) ); ?> </td>
Find Around line #228:Code:<td align=right> <? 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] ) ); } ?> </td>
Replace with:Code:<td align=center>Price, <?=$doll;?></td>
Code:<? if ( $show_membership == "on" ) { echo "<td align=center>Level</td>"; } else { echo "<td align=center>Price, <?=$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


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks