Add Subscriptions block to profile page

I want to add a block that will show my subscriptions. (like page member_subscriptions.php)
The reason is that i wanna show what i follow...(will restyle layout and people will not see the unsubscribe button)

How should i build up the php block with code?

is this the way to do it...

bx_import('BxDolService'); return BxDolService::call('what_to_do_here'', 'and_here');

waiting for some great ideas

subscription-block.jpg · 29.9K · 446 views
Quote · 19 Jun 2014

 

bx_import('BxDolService'); return BxDolService::call('what_to_do_here'', 'and_here');

 
Nope. Not everything has a service call.

You can do this in a php block.

$iMemID = (int)$_COOKIE['memberID'];
if(!$iMemID) return;
$oSubscription = new BxDolSubscription();
$sCode = $oSubscription->getMySubscriptions();
echo $sCode;

https://www.deanbassett.com
Quote · 19 Jun 2014

 

 

bx_import('BxDolService'); return BxDolService::call('what_to_do_here'', 'and_here');

 
Nope. Not everything has a service call.

You can do this in a php block.

$iMemID = (int)$_COOKIE['memberID'];
if(!$iMemID) return;
$oSubscription = new BxDolSubscription();
$sCode = $oSubscription->getMySubscriptions();
echo $sCode;

Thanx for that.
But can I change $iMemID = (int)$_COOKIE['memberID']; to the profile memberID.
The reason is : if members/friends watch a profile i like to show that block that shows the subscriptions that the viewed member is following. (I see a module being created)

Quote · 20 Jun 2014

so - if I am understanding this right - if I am looking at your profile, you want me to be able to see a list of what you are subscribed to? If that is the case, then you can use: $iId  or $profileID (either should work).

caredesign.net
Quote · 20 Jun 2014

Not without some rewrites to the getMySubscriptions function.

Look at the code i provided more closely. The ID i am getting is just to determine if a member is logged in, and if not it will return without processing the block. In other words not shown for guests. That will have to be removed for your use. Even ProfessorSr missed that one.

You will also notice that the getMySubscriptions does not take any parameters. So the function in inc\classes\BxDolSubscription.php will need to be modified to take a profile id as a parameter. As it is written now it always asumes the logged in member. Boonex did not design the function to be used on the profile page.

https://www.deanbassett.com
Quote · 20 Jun 2014

Could i copy the inc\classes\BxDolSubscription.php function and build to take a profile id as a parameter?!

That is why i said: I see a new mod is born Cool
I think that it is interesting on the profile page to look and see what this person is following.
That way i maybe get triggered to follow it also....

So Deano92964 : any free time Laughing

Quote · 20 Jun 2014

Not at the moment, i'll see what i can do.

https://www.deanbassett.com
Quote · 20 Jun 2014

 

Not at the moment, i'll see what i can do.

Thanx and I appreciate your help so far.

 

Quote · 20 Jun 2014

Subscription block on member profile works. Laughing
So when i view a profile i'll see what they follow (are subscribed to).

Thank you and for the startup and getting me in the right direction.

Quote · 23 Jun 2014
 
 
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.