Repeat question: membership level info

I want to put membership info on profile view page? Any help with this? How to?

Quote · 7 Dec 2009

Something like this

Membership

or shall you have more info...

Quote · 9 Dec 2009

Something like this

Membership

or shall you have more info...

Yes, exactly like this.

Quote · 11 Dec 2009

Try this,

1) Admin/Builders/Pages Builder => Profile, Add a new HTML page as bellow:

Caption Lang Key: _Membership Level
Visible for: Guest Member

SAVE


2) Open phpMyAdmin, click on table PageCompose and browse
look at row Caption and find _Membership Level (shall be the last insert id)
Edit ID where Caption = _Membership Level as bellow:

Page: profile
Desc: PHP Block
Caption: _Membership Level
Func: PHP
Content:

global $p_arr;
$Memb = (int)$p_arr['ID'];

$arr = db_arr("SELECT `IDLevel` FROM `ProfileMemLevels` WHERE `IDMember` = '$Memb'");

$IDLev = $arr['IDLevel'];

$arr = db_arr("SELECT `Name` FROM `MemLevels` WHERE `ID` = '$IDLev'");

$Name = $arr['Name'];

if ( $Name == '' ){
$Name = Standard;
}


echo "
<table cellspacing=\"0\" cellpadding=\"0\">
<tr><td width=\"60px\"></td>
<td width=\"50px\"><center><img src=\"/media/images/membership/$Name.png\" width=\"30\" height=\"30\"></center></td>
<td></td><td class=\"profile_info_value\"><b>$Name member</b></td></tr>
</table>
";


SAVE


3) Admin/Settings/Languages Settings, add a new language string

New language key name: _Membership Level
Category: Page titles
String texts for available languages: Membership Level

SAVE


4)
Add a new folder membership below media/images

You can download picture I have used here:

http://demozzz.com/dolphin7b/m/files/view/Non-member
http://demozzz.com/dolphin7b/m/files/view/Promotion
http://demozzz.com/dolphin7b/m/files/view/Standard

Upload pictures to folder: media/images/membership


5)
Go back to Admin/Builders/Pages Builder => Profile and move a block a bit
(unsure whether you need to do this, but for and be on the safe side, you can do it)



6) Done

=========================
If you have other membership name than Non-Member, Promotion and Standard,
you need to add new pictures to this, picture need to have same name and letters as the membership name.
(png picture and size 30x30)

Quote · 11 Dec 2009

Gi! Thank you very much okweb. Fantstic. i cold not download your .png files somehowe from address you provide but i have make in Photoshop new one. Now work perfect. Thank you again.. Cool

Quote · 12 Dec 2009

Hi there,


thx, GREAT advice...at least I know how to put php into these boxes ;-)

BTW for D7 you should modify it like this:

global $p_arr;
$Memb = (int)$p_arr['ID'];

$arr = db_arr("SELECT `IDLevel` FROM `sys_acl_levels_members` WHERE `IDMember` = '$Memb'");

$IDLev = $arr['IDLevel'];

$arr = db_arr("SELECT `Name` FROM `sys_acl_levels` WHERE `ID` = '$IDLev'");

$Name = $arr['Name'];

if ( $Name == '' ){
$Name = Standard;
}


echo "
<table cellspacing=\"0\" cellpadding=\"0\">
<tr><td width=\"60px\"></td>
<td width=\"50px\"><center><img src=\"/media/images/membership/$Name.png\" width=\"30\" height=\"30\"></center></td>
<td></td><td class=\"profile_info_value\"><b>$Name member</b></td></tr>
</table>
";

Quote · 15 Feb 2010

I followed the instructions precisely (I am using D 7.0)

I do have success with the membership levels showing, but cant seem to get the pictures to show up.

Should I recreate a brand new "membership: folder in media/images ?

Or can anyone lend a hand on how to get the images to appear in the box?

I have them named exactly the same.

Thank so much in advance for your help!

Quote · 24 Apr 2010

I followed the instructions precisely (I am using D 7.0)

I do have success with the membership levels showing, but cant seem to get the pictures to show up.

Should I recreate a brand new "membership: folder in media/images ?

Or can anyone lend a hand on how to get the images to appear in the box?

I have them named exactly the same.

Thank so much in advance for your help!

Should I recreate a brand new "membership: folder in media/images?  YES, upload image files to this folder

<td width=\"50px\"><center><img src=\"/media/images/membership/$Name.png\" width=\"30\" height=\"30\"></center></td>

Quote · 27 Apr 2010

Here are more easy way (hope most of you will able to repeat this easy):

function getBlockCode_Membership() {
// INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES (NULL, 'profile', '998px', 'Membership status', '_membership_bcaption_my_status', 1, 1, 'Membership', '', 1, 34, 'non,memb', 0);
$oMembLvl = BxDolModule::getInstance('BxMbpModule');
if ($oMembLvl) {
$aUserLevel = getMemberMembershipInfo($this->oProfileGen->_iProfileID);       
$sCode = $oMembLvl->_oTemplate->displayCurrentLevel($aUserLevel);
return $GLOBALS['oSysTemplate']->parseHtmlByName('default_padding.html', array('content' => $sCode));
}
}

Quote · 9 May 2010

How to remove - the key - only on this block - so that members can not change - Privacy

Bosun / Moderator -- My Products : http://www.boonex.com/market/posts/danielmarseille
Quote · 9 May 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.