How to link to Members Profile

Hi - I want to make a link from a new html block that goes to the Members Profile page presuming they are logged in. How do I code this in the html block?

Is it something like <a href="member.php?ID={memberID}"> or is the format completely different?

Thanks

Dan V

Quote · 22 Apr 2009

Oh yeah and also -is it possible from a normal html page to make a link that will go to the members profile if they are logged in? The first question is about doing it inside an html block in a proper Dolphin php page. But I would also like to be able to do it from html pages that I have added to my site. Thanks again D.V.

Quote · 22 Apr 2009

Bump

Quote · 25 Apr 2009

Oh come on surely this is an easy question, no? How to make a link to the members own Profile page when they are already logged in?

Thanks in advance

Dan V

Quote · 27 Apr 2009

You most likely don't have an answer yet becuse as far as i know it cant be done in an html block. You would need PHP for this.

The {memberID} tag does not work everywhere.

Somewhere in the forums are instructions for making a PHP block in which case you can get the member id from the cookie. $_COOKIE['memberID'] or the members nickname using getNickName((int)$_COOKIE['memberID'])

But both of those options would require php be used.

Sorry, but it's not as simple as you might think.

https://www.deanbassett.com
Quote · 27 Apr 2009

Thanks Deano - that might be enough to get me what I need. I can call it from a php page. DV.

Quote · 27 Apr 2009

So this doesnt work ... <a href="<?= "{$site['url']}".getNickName((int)$_COOKIE['memberID']); ?>">MyProfile </a> and gets an error msg Fatal error: Call to undefined function getnickname()

Would someone please explain to a beginner how to code the link properly?

The rest of the page is html but its saved as a php page obviously or the code would not work at all.

Thanks Dan V

PS hey Boonex I bet Im not the only one who occassionally clicks 'Post Reply' and wipes out their post, instead of scrolling down to the 'submit' button. Its reeeaaaalllyy annoying !

Quote · 28 Apr 2009

The function getNickName is not a standard php function. It's a Dolphin function. Thus in order to use it the php file it is used in must include the php file the function is defined in.

In this case that function is defined in inc/profiles.inc.php

Notice most dolphin scripts have lines like this at the top of them.

require_once( 'header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'images.inc.php' );
ect....

This is the reason why. I am not sure if you understand. You would have to examine dolphins scripts more closely and get some PHP books.

https://www.deanbassett.com
Quote · 28 Apr 2009

Hi Deano - thanks very much thats got me there!

For anone who wants to know how to add a link from a normal html page on your same domain to the members own profile page when they are logged in. ...

1) Name your html page as .php

2) Before the <html> tag at the top add the required statements such as

<?
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'members.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'news.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'sharing.inc.php' );

require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolClassifieds.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' );
?>

3) code the link wherever you like on your page ... <a href="<?= "{$site['url']}".getNickName((int)$_COOKIE['memberID']); ?>">MyProfile </a>

Quote · 6 May 2009

I have another attempt.  I want a link on My Profile page to popup window with close and print function and get functions such as: logo.gif, PrimPhoto, NickName, ID, Title string, DateReg

Any ideas?

Quote · 11 May 2009
 
 
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.