creating a php block and adding the following code produces the result of showing the members profile type.
echo GetMembershipStatus($this->oProfileGen->_iProfileID);
that is fine, however, what i am trying to show, is just the membership level badge
so instead of showing the text of i.e.
Gold Member
(View Allowed Actions)
expires: never
I just need to grab the membership level badge for the php block.
though, just looking at this more, and seeing that some of this is beneficial:
You are a standard member.
(View Allowed Actions. )
Click here to upgrade.
so the click here to upgrade is fine, if this is doable without too much trouble.
Show Membership Level Badge
if upgradeable, show option to upgrade here.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
update @Deano if you read this:
i used the pages blocks tool copied the My Status Block to my custom page, and its just blank on a two column design. the block shows up on the page in the admin panel as a special block, but is not showing up on /page/_pmtResult
so not sure if this is one of those blocks that is not able to be copied or what?
at any rate, thought i would update the post, since this was something i had attempted.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
very well might do it. i am wondering if i can get the block to copy?
i am trying to create return page from 'paypal' that would reflect the badge once the payment gets processed. gonna give this a try and see what it gets me.
thanks M.S.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
update @Deano if you read this:
i used the pages blocks tool copied the My Status Block to my custom page, and its just blank on a two column design. the block shows up on the page in the admin panel as a special block, but is not showing up on /page/_pmtResult
so not sure if this is one of those blocks that is not able to be copied or what?
at any rate, thought i would update the post, since this was something i had attempted.
No. That block shows up as red in color in my tools indicating it is of type special. So it cannot be copied.
https://www.deanbassett.com |
I wipped up some code that can be used in a PHP block.
This example will show the membership badge with the membership name under it.
Unfortunatly there is no built in function in dolphin to get those images. That is built into the membership module.
So this code extracts it from the database.
$iMemID = (int)$_COOKIE['memberID']; $sImagePath = 'media/images/membership/'; $aInfo = getMemberMembershipInfo($iMemID); $iLvlID = $aInfo['ID']; $sLvlName = $aInfo['Name']; $sLvlIcon = db_value("SELECT `Icon` FROM `sys_acl_levels` WHERE `ID`='$iLvlID'"); echo ' <div><img src="' . $sImagePath . $sLvlIcon .'"></div> <div>' . $sLvlName . '</div> '; https://www.deanbassett.com |
php code is working great. Thanks Dean https://dolphin-techs.com - Skype: Dolphin Techs |
@Deano,
thanks for the post-back. well i am color-blind, so had no clue there was something that was 'red'.
thanks to jay for testing as well. will get this implemented momentarily and post my success story. thanks a ton.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
@Deano, this worked beautifully. thank you once again for this snippet.
i suppose we need to get this moved to tips and tricks, because this is a fabulous tweak.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
ok got too excited too soon. i suppose this is something relatively easy to fix. (hopefully)
the code you provided does indeed display "my membershp badge" however, the intent was to have the membership badge display of the member when viewing a profile
/nickname1 should show nickname1's membership badge
/nickname2 should show nickname2's membership badge
that is what the other source was showing as the membership status, but i want it to show as you have partly done here, the membership badge.
echo GetMembershipStatus($this->oProfileGen->_iProfileID);
help if you can, if not, ugh, but i thought this would be neat, to be able to view the other members badges.
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
echo GetMembershipStatus($this->oProfileGen->_iProfileID);
Should be easy. I am guessing this piece of code in your example gets the member id of the profile being viwed.
$this->oProfileGen->_iProfileID
If so, just replace the line in my example ....
$iMemID = (int)$_COOKIE['memberID'];
With
$iMemID = $this->oProfileGen->_iProfileID;
But if the block is on the profile page then this would be the proper way. It's the same way the profile page does it.
$iMemID = getID( $_GET['ID'] );
So to clarify. This code gets the member ID of the logged in member.
$iMemID = (int)$_COOKIE['memberID']; Or this could also be used. $iMemID = getLoggedId();
And this code gets the member id of the profile being viewed. (Only works on profile page)
$iMemID = getID($_GET['ID']);
https://www.deanbassett.com |
I wonder if there is a way to get the membership level into the avatar pictures like the on/offline indicator. Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
If you're looking for a module... this one works http://www.boonex.com/m/premium-membership-badges
I wonder if there is a way to get the membership level into the avatar pictures like the on/offline indicator.
http://pkforum.dolphinhelp.com |
Thanks, thats what i am looking for. I will try to do code it by myself and if its not working i still can use this mod. Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
The code works great!
I didn't put it in a php block because i have already too many blocks on my site. So i added it directly to dolphins base code. Still don't know where the best place is to put this badge but its working already! See photo
Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
hello all i am trying to replace one of my membership badge and can not figure out how to do it, can someone help? Everyday is a new beginning. |
The default badges are found in this folder :
media\images\membership
hello all i am trying to replace one of my membership badge and can not figure out how to do it, can someone help?
Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz |
Can this be done 7,0.9? i want to show the users membership on there profile!
|
I put together a module for 7.0.9 and 7.1.x so the badge and member level can be displayed anywhere in dolphin (no extra block or big code changes needed). I want to publish it for free in the market but still lack some information on how to become a vendor lol. As soon as i have everything together and some time i will upload it. Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
does this badge become part of avatar ? I like if badge & symbol for membership level appear as small watermark symbol straight on user avatar. |
Can i have that mod please dately? as im running 7.0.9 |
- As soon as i have access to the market you can download it from there.
- The badge is not per default on the avatar but i think its possible too with some additional coding. I will provide 3 examples on how to display them in various places
Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
I uploaded the mod now
http://www.boonex.com/m/memberbadge-2013-04-10
It contains three examples for 7.1.x and one for 7.0.9
Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81 |
Hello I know this is a really old thread but I used the codes above and got a result which I liked, I am in the process of creating a verified badge for members who submit the documentation needed to us. We will switch it manually. How ever 2 problems 1 I do not want members to have the option to upgrade to the verified members membership, I strictly want that to be manual on admin end and 2 visiting the page when not logged in does not show the members membership, it shows the visitors which is for some reason non member badge I want the badge to reflect the page owners member ship not the visitors see here https://loudspaces.com/admin Note back the page when logged in shows the verfied membership badge |