Upgrade from non-standard accounts

Hi,  I have three membeship levels so far: "standard", "professional", and "business".   When I start people with standard accounts, they get an upgrade link on the member info box on the accounts page.  When I start them with "professional" accounts, however, no upgrade membership link appears in that box.  Does anyone know why?  I want to give certain classes of members a professional account with more permissions than a standard account, but I also want to encourage them to upgrade to a paying business account - and from what I have seen, they don't even have the option for this.  Can anyone think of a fix?

-

Thanks

-

Rob

Quote · 15 Sep 2008

Hi Rob

Have you do your new membership Business Active,

it's a link left to the Membership name -> [Inactive]  if you click on that link it will change to [ Active ] !!!

 

 

(Maybe you have to edit Pricing to if you don't has do it, days and price!)

Quote · 15 Sep 2008

Hi Ottar, I just checked.  Yes, the business account is active, and it has pricing set.  I might have done something else stupid, but not that.

-

Rob

Quote · 15 Sep 2008

Okey, here is what you can do

 

You will use Dolphin's membership

- Standard and Promotion

and Business - paid membership you made

Everyone who join will be a standard member - and can upgrade on the account page to paid business account.

When you start them from admin(professional account), you start them with Promotion and set 365 days(not use unlimited here)

On the account page for Promotion member will you now see:

 

Promotion
(View Allowed Actions)
expires: in 364 day(s) - extend membership period

 

 

 

if you click on extend membership period you will now go to upgrade page and can upgrade to payng business account.

 

I believe you can edit extend membership period to 'Click here to upgrade' or whatever you will have there...

 

you can also edit Promotion to Professional in your database table MemLevels,

it work fine in admin, account and membership page...(not testet other places on site)

 

(When time for paid membership goes out they will be set to standard membership again,

with Promotion I am not 100% sure about that, but you can easely try this, set promotion to 1 day and see about it will be set to standard when the day are gone..but not so importen since this account are free)

Quote · 15 Sep 2008

Ottar - you are awesome.  I take it everyone's install works this way? - i.e. this is by design and not some anomaly in my system?   Thank you for checking this out.  I am reviewing your approach, but I may have come up with a simple workaround - by just making an html block that says "upgrade account" and linking it to http://caltrade.com/members/membership.php - which is all that upgrade link does anyway.

-

Rob

Quote · 16 Sep 2008

Hello Caltrade, can you keep me posted on your success and how you did it? Could be just what I need!

Regards,

Stuart

Ottar - you are awesome.  I take it everyone's install works this way? - i.e. this is by design and not some anomaly in my system?   Thank you for checking this out.  I am reviewing your approach, but I may have come up with a simple workaround - by just making an html block that says "upgrade account" and linking it to http://caltrade.com/members/membership.php - which is all that upgrade link does anyway.

-

Rob

There are none so blind as those that will not see.
Quote · 16 Sep 2008

Sure Stewart- all I did was make an html block with the following in it, and put it under the member's picture on the account page.  In this case, I also included "Edit Profile", "Upload Pictures", "Invite Associates", in addition to "Upgrade Account".  It is kind of a simple cheat, but I think it made the system easier to use.

-

<p align="center"><b> <span style="font-family: Arial Narrow;">

<a href="/members/pedit.php">Edit Profile</a>&nbsp;&nbsp;&nbsp;

<a href="/members/upload_media.php">Upload Pictures</a>&nbsp;&nbsp;&nbsp;

<a href="/members/tellfriend.php">Invite Associates</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/members/membership.php">Upgrade Account</a></span></b></p>

Quote · 16 Sep 2008

Brilliant idea and so easy! Many thanks Caltrade.

Stuart

Sure Stewart- all I did was make an html block with the following in it, and put it under the member's picture.  In this case, I also included "Edit Profile", "Upload Pictures", "Invite Associates", in addition to "Upgrade Account".  It is kind of a simple cheat, but I think it made the system easier to use.

-

<p align="center"><b> <span style="font-family: Arial Narrow;">

<a href="/members/pedit.php">Edit Profile</a>&nbsp;&nbsp;&nbsp;

<a href="/members/upload_media.php">Upload Pictures</a>&nbsp;&nbsp;&nbsp;

<a href="/members/tellfriend.php">Invite Associates</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/members/membership.php">Upgrade Account</a></span></b></p>

There are none so blind as those that will not see.
Quote · 16 Sep 2008

Well, I have noticed the Dolphin menu is really really user unfriendly.  When you are trying to get to one submenu item, and you drag your mouse over the wrong part - a completely different menu shows up.  I realized that when I was trying to get to my "edit profile" link I couldn't - the wrong menu kept popping up, and I was actually trying to carefully move the mouse cursor around the margins of my screen to come up back under the menu so I could get to it - ridiculous, so I got the idea to put some of the more important links right in the account page (the way Boonex has done, by the way).   Glad you liked that simple solution.

-

Rob

Quote · 16 Sep 2008

Rob is very good at modifying the human interface so that dolphin is more friendly for business users of CalTrade.

I looked at Rob's code and compared it to the links normally created for the main navigation.  Rob's code probably should not work... but it does.  I say it should not work because the memberID isn't being carried with the GET METHOD link that he has created.  What this means is that dolphin is probably carrying cookies that compensate for the absence of the member info in the link.

For example:

Rob's link <a href="/members/pedit.php">Edit Profile</a>

vs.
Link with a memberID <a href="/member/pedit.php?ID={memberID}">Edit Profile</a>

.

The problem is, when I tried embedding this GET METHOD link into the same type of block area created in the 'Pages Builder' under 'Account', the {memberID} does not convert to a VALUE in actual use.  The text is created 'literally' as a GET METHOD link (just as you see it above).

Rob and I agree that it is in everyone's interest to try to improve the navigation aspects of dolphin.  In the interest of trying to make navigation easier from the "My Account" page, could anyone shed some light on how a block could be created in which code could be active.   I am guessing that there is some sort of php case that can be used, but I am unable to locate the right place to play with the code.

What I am look for is something like the way Navigation Menu Builder works.  Once a new block is created in 'Pages Builder', it would be nice to have the same sort of tools available in the "Navigation Menu Builder" area.   That way, the existing links could be dropped into the new block.

Does anyone have any thoughts or ideas?

Arthur

Quote · 9 Nov 2008

Hey, thanks Arthur - even a blind pig finds an acorn now an then :-)

Here is the code I use now, which I put in an HTML block under the user picture on the account page- it  has a few more things.    Please note I never found a way to make a "My Blog" link - if anyone knows how to do that please post it here.

-

Rob

-

p.s.  By the way, one of the problems is that the Dolphin menu can be ridiculously difficult to use - if you drag to over the wrong thing your target item will disappear - most users would just give up.
-

<div align="center">
<table border="0" width="450">
<tbody>
<tr>
<td width="124"><span style="font-weight: 700; font-family: Arial Narrow;"> <a href="/members/pedit.php">Edit
Profile</a> </span></td>
<td width="98"><b> <a href="/members/blogs.php?action=new_post"> <span style="font-family: Arial Narrow;">Post </span> <span style="font-family: Arial Narrow;">Blog</span></a></b></td>
<td width="91"><b><span style="font-family: Arial Narrow;"> <a href="/members/contacts.php">My Contacts</a></span></b></td>
<td width="120"><span style="font-weight: 700; font-family: Arial Narrow;"> <a href="/members/tellfriend.php">Invite
Associates</a> </span></td>
</tr>
<tr>
<td width="124"><span style="font-weight: 700; font-family: Arial Narrow;"> <a href="/members/upload_media.php">Upload
Pictures</a> </span></td>
<td width="98"><b><span style="font-family: Arial Narrow;"> <a href="/members/classifiedsmy.php?PostAd=1"> Post Ad</a></span></b></td>
<td width="91"><b><span style="font-family: Arial Narrow;"> <a href="/members/ads/my">My Ads</a></span></b></td>
<td width="120"><span style="font-weight: 700; font-family: Arial Narrow;"> <a href="/members/membership.php">Upgrade Account</a></span></td>
</tr>
<tr>
<td width="124"><b><span style="font-family: Arial Narrow;"> <a href="/members/uploadShareVideo.php">Upload
Videos</a></span></b></td>
<td width="98"><b><span style="font-family: Arial Narrow;"> <a href="/members/articles.php?action=addarticle"> Post Article</a> </span></b></td>
<td width="91"><b><span style="font-family: Arial Narrow;"> <a href="/members/admin/{SiteUrl}orca/?action=rss_user&amp;user={NickName}">My Posts</a></span></b></td>
<td width="120"><span style="font-weight: 700; font-family: Arial Narrow;"> <a href="/members/contacts.php?show=view&amp;list=me"> Viewed Me</a></span></td>
</tr>
</tbody>
</table>
</div>

Quote · 10 Nov 2008

Hey Rob,

Nice one. I've just updated my new site accordingly.

Stuart

There are none so blind as those that will not see.
Quote · 10 Nov 2008

Hello Rob.   The issue that we all need to get some help with is the one of adding the {memberID} to the link so that the link functions the way it is intended. This means the interpreter needs to change the {memberID} to a value. This does not happen if the link is entered using the block's text editor.

For example:

Rob's link <a href="/members/pedit.php">Edit Profile</a>

vs.
Link with a memberID <a href="/member/pedit.php?ID={memberID}">Edit Profile</a>

Arthur

Quote · 11 Nov 2008

Let us know if you solve this mystery Arthur.  I know that there is a link for "my classifieds" but not for "my articles" or - more importantly "my blog".  I asked about this here and someone from Boonex (I think Andrey but I'm not sure) said I would have to "hire a programmer" to get this - not the answer I was looking for.

Quote · 11 Nov 2008

Does anyone have any suggestions on how to bring the {memberID} into blocks added in Pages Builder?

Arthur

Quote · 12 Nov 2008

You need to use a PHP block to have it to work with $memberID, will not work in a HTML block.

Ottar.

Quote · 12 Nov 2008

Thank you okweb.  That makes sense. Can you advise where I can add the php block so that it can appear on the 'My Account' page?

Arthur

Quote · 12 Nov 2008

Thanks, mydatery.  What you have suggested will put content on the Profile page and the pages used to edit the member Profile. It does not add to the Account (My Account) page.  What I am trying to do,  following Rob's CalTrade suggestion, is to add a block to the 'Account' page that is in 'Pages Builder'.  But, based on what okweb said, the block needs to be a php block, rather than an html block. So you can not add it in Pages Builder as far as I can tell.

It appears to me that the only way to do this is to add a php function to /member.php:

function getBlockCode_AccountManagement() {

$aMem = array('ID'=>$this->iMember);

<--something to build the block with content using $aMem to make the href link-->
return $aRes;
}

Any suggestions on this?

Arthur

Quote · 12 Nov 2008

I am zeroing in on this. The php block above where I want the function getBlockCode_AccountManagement() {} to appear is on the member.php page.  Can anyone please tell me where the "getBlockCode_Topest" function is actually being called to appear in the member.php page.   There is some coding lesson I need to learn about how dolphin calls a php function.

function getBlockCode_Topest($iCol) {
if(  $iCol == 1 )
$iPID = $this->iMember;
else {
if( !$this->aMemberInfo['Couple'] )
return '';

$iPID = $this->aMemberInfo['ID'];
}
$sRet = $this->get_member_primary_photo( $iPID, 'none', $iCol);
return '<div class="page_block_container">' . DesignBoxContent ( _t( '_My Photos' ), $sRet, 1) . '</div>';
//return $sRet;

}

Once I have this, I will post some code for getBlockCode_AccountManagement() {}.

Arthur

Quote · 12 Nov 2008

Arthur - Jtado (not sure if I spelled that right) has the procedure for installing a PHP Block-   I have empty ones ready to go on almost all my pages- I'll try to dig up the link for instructions for creating this.   Okweb has some modifications for putting, webpage links, and instant messeger icons (which I know you don't use) in PHP Blocks at: http://www.boonex.com/unity/forums/#topic/Render-as-HTML.htm - but you can cherry pick and modify the parts you do want.  Good luck on this project - we absolutely need better backend controls for our members.

-

Rob

-

UPDATE:  Ok, I found the link on Jtado's Boonexnerd site.  It is: http://www.boonexnerd.net/dolphin/orca/?action=goto&cat_id=12#action=goto&topic_id=450

Quote · 12 Nov 2008

Jtado's tutorial is terrific. Thanks for passing it along.

Arthur

Quote · 12 Nov 2008

I am not using phpmyadmin.  I added the content to the fields directly.....as presented in Jtado's Boonexnerd site at http://www.boonexnerd.net/dolphin/orca/?action=goto&cat_id=12#action=goto&topic_id=450

*************************** 113. row ***************************
ID: 114
Page: index
PageWidth: 960px
Desc: PHP BLOCK
Caption: PHP BLOCK
Column: 2
Order: 2
Func: PHP
Content: echo "You can now have PHP in a block!";
DesignBox: 1
ColWidth: 50
Visible: non,memb
MinWidth: 0

*************************** end row ***************************

I went to Pages Builder in my Admin.  There is no sign of a "PHP Block".  Still only shows an HTML Block

What else needs to be done?

Arthur

Quote · 13 Nov 2008

I followed jtado's instructions like a cook book, and the php block just popped up in the "inactive blocks" section of the page where I put it.  I can't think of any reason why it wouldn't work if you didn't use phpmyadmin, but maybe someone else here does.  Be sure to check your browser cache- it might be there.

-

Rob

Quote · 13 Nov 2008

For all those interested in the code provided in Jtado's Boonexnerd site at http://www.boonexnerd.net/dolphin/orca/?action=goto&cat_id=12#action=goto&topic_id=450 . It needs to be slightly modified so that it can work in the Account area of the Pages Builder.

Jtado's mysql:

INSERT INTO `PageCompose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', 'index', '960px', 'PHP BLOCK', 'PHP BLOCK', 2, 2, 'PHP', 'echo "You can now have PHP in a block!";', 1, 50, 'non,memb', 0);

.

mysql for use in Pages Builder in the 'Account' section:

INSERT INTO `PageCompose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', 'member', '960px', 'PHP BLOCK', 'PHP BLOCK', 2, 2, 'PHP', 'echo "You can now have PHP in a block!";', 1, 50, 'non,memb', 0);

.

Note the change of one value from 'index' to 'member' for the Page field.

Arthur

Quote · 13 Nov 2008

It worked fine in the accounts page for me - this wasn't an issue at all.  As I said, I used this procedure to put php blocks on all my pages.

Quote · 13 Nov 2008

Here is my solution.  Hope it helps those of you who want to add php blocks to the 'Account' page.

.

Add this to your dolphin table to add a block named 'My Account Manager' to your 'Account' page in Pages Builder.
INSERT INTO `PageCompose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', 'member', '960px', 'PHP BLOCK', 'My Account Management', 1, 1, 'MyAccountManagement', '', 1, 50, 'memb', 0);

.


Note that the Content field is empty. Note also that this Page field is 'member'.   This is the only way I know of to make this work within the member.php (Account) Pages Builder and have it work with member.php.

.


Once you do this, you can open your dolphin Admin, go to Pages Builder, click on 'Account', and you will see the PHP Block in the 1st column in postion #1.  You can move it anywhere you want.

.


Now open the member.php file and edit it to add a function that matches the MyAccountManagement.

.


You will be adding a function "getBlockCode_MyAccountManagement" to this member.php file.  Place it somewhere inside the existing  "class BxDolMember extends BxDolPageView {}" in the member.php file.  For example, place the fucntion after the code for "function getBlockCode_Topest($iCol) {}"

.


Write whatever php you want inside this function and return it.  Here is an example of a link with the members ID.

.


function getBlockCode_MyAccountManagement() {

$sRet = '<a href="/yourdolphindirectory/pedit.php?ID=' . $this->iMember . '">Edit Profile</a>';
return '<div class="page_block_container">' . "$sRet" . '</div>';

}

.

Note that the css class=page_block_container is doing the work of creating the block to fit the format and architecture. Note also that I have isolated the $sRet inside that return code.   If it is displayed within the single quote ticks, it will display the literal, not the value.
.


It should be much easier to edit code within this function area than trying to edit it in the db table's Content field.
.


Special thanks to Praveen for his quick note on this.  Also to Caltrade's for referencing the Jtado's Boonexnerd site for bits and pieces of what finally made this easy to construct and manage.

.

Hope it helps someone.

.


Arthur

Quote · 13 Nov 2008

Rob at Caltrade has asked for help with the link to 'my blog'.  I assume he wants to make it easy to post a blog at the member's blog site.

<a href="/yourdolphindirectory/blogs.php?action=new_post&amp;ID=' . $this->iMember . '">Post a new Blog</a>

Hence, following the instructions above, one would first add this to your dolphin table to add a block named 'My Account Manager' to your 'Account' page in Pages Builder.
INSERT INTO `PageCompose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', 'member', '960px', 'PHP BLOCK', 'My Account Management', 1, 1, 'MyAccountManagement', '', 1, 50, 'memb', 0);

.

To my knowledge, this will not work unless there is specifically a 'Page' field with value "member" and a 'Func' with value "MyAccountManagement" in the PageCompose table.

.

To check this, run this command:

.

SELECT * FROM PageCompose WHERE Func like '%MyAccountManagement%' \G;

.

You should see this result:

ID: #######
Page: member
PageWidth: 960px

Desc: PHP BLOCK

Caption: My Account Management
Column: 1
Order: 0
Func: MyAccountManagement
Content:
DesignBox: 1
ColWidth: 50
Visible: memb
MinWidth: 0

.

Note that the 'Content' field is empty. Note also that this Page field is 'member'.   This is the only way I know of to make this work within the member.php (Account) Pages Builder and have it work with member.php.

.

Then the function block would contain any php you want. Here is the php to add a link that posts directly to the members blog account.

function getBlockCode_MyAccountManagement() {

$sRet = '<a href="/yourdolphindirectory/blogs.php?action=new_post&amp;ID=' . $this->iMember . '">Post a new Blog</a>';
return '<div class="page_block_container">' . "$sRet" . '</div>';

}

.

This does NOT link to the "My Blog" page for the NickName of the member, but rather, directly to the "Post New blog" page for the member.  To go to the My Blog page, the php code would be different. To create a link based on the member's NickName, you would use this approach:

.

<a href="/yourdolphindirectory/blogs/posts/' . $this->aMemberInfo['NickName'] . '">My Blog Page</a>

.

Once again, make sure that you have the correct entry in your mysql for field 'Page' as value 'member'.

.

Hope that helps.

a

Quote · 14 Nov 2008

Thank you Arthur, but as I have communicated several times, I already have an empty php block ready to go on all pages, so I don't need that part, and I don't need the "post blog" function.  That works just fine in the HTML block as I posted above with this link:
-
http://mysite.com/blogs.php?action=new_post
-
The function I want will pull up the same "my blog" page you can see if you go to:

-

http://mysite.com/blogs/posts/nickname

-

On the navigation menu builder, this link is:
-
blogs.php?action=show_member_blog&ownerID={memberID}
-
Assuming I already have a php block (which once again- I do) what code do I need to add to my php block to be able to create a "my blog" link.  Is there something I can just add to the link above to make it work?  This might be really easy but I am not a PHP guy.  Does anyone know?
-
Thank you
-
Rob

Quote · 14 Nov 2008

Rob, just follow the logic.  The link would be this (see below) if you had it coded in the "function getBlockCode_MyAccountManagement() {}" that I have suggested.  I do not know how you have the block set up on your your system, but this is the correct code in a standard member.php block where there is a proper matching PageCompose  table entry in mysql.

.

<a href="/yourdolphindirectory/blogs.php?action=show_member_blog&ownerID=' . $this->iMember . '">My Blog</a>

.

I would be unable to help you beyond that. I am sure there are other ways to do this. I am happy to have one way that I know works.

.

Keep in mind that putting code in the 'Content' field of the PageCompose table for PBP BLOCK entry may not take advantage of the existing variables that are picked up in the member.php script.  If you are not following the method I have presented, it is possible that you are using resources to get the data you want each time each block is opened.  But, I do not know how you have created what you have, so it is impossible for me to comment.

.

Arthur

Quote · 14 Nov 2008

Hi Rob

You can test this code

(added PHP block inside Pages Builder -> My Account)

Paste code bellow to content area in phpMyAdmin on your block (remember to move your block after you save it)

 

 

$member = (int)$_COOKIE['memberID'];
$Name = getNickName( $results['UserID'] );

 

echo "<div class=\"boxContent\">";
echo "<table class=\"profile_info_block\" cellspacing=0 cellpadding=1>";

 

echo "<tr>
<td class=\"profile_info_label\">My Blogs: </td>
<td class=\"profile_info_value\" >
<a href=\"blogs.php?action=show_member_blog&ownerID=$member\"> My Blogs</a>
</td></tr>";

 

echo "<tr>
<td class=\"profile_info_label\">My Forum Post: </td>
<td class=\"profile_info_value\" >
<a href=\"orca/?action=rss_user&amp;user=$Name\" target=\"_blank\"> My Posts</a>
</td></tr>";

 

echo "</table>";
echo "</div>";

Quote · 15 Nov 2008

Fantastic Ottar (aka okweb) - worked perfectly!  I really appreciate your help in finally solving this.

-

Rob

Quote · 15 Nov 2008

Caltrade,

Great idea on the html tags.  I have begun using them for many modifications because they are easier and get the members to the right page fast.  Thanks for the code and the html idea.

Quote · 16 Dec 2008
 
 
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.