PHP Block

Hi All,

 

I have a tool that allows me to add a PHP block to any page at my site. If I want to have a block that links to the profile edit page, where the ID is a variable, is that something I can do myself, or it require a developer support?

 

http://mysite.com/pedit.php?ID=1

 

How to do it?

the block will be added to the account page.

 

Best Regards,

okatanani

Quote · 28 May 2011

this has been written about here in the forums. not sure of the topic, but if you were to try a few searches you may be able to locate it. i also think deano was the one who provided the answers on this very topic or extremely similar.

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 28 May 2011

The code would be something like this.

$memID = (int)$_COOKIE['memberID'];
if ($memID > 0) {
$sCode = '<a href="http://mysite.com/pedit.php?ID=1" target="_blank">http://mysite.com/pedit.php?ID=' .        $memID . '</a>';
echo $sCode;
}



Of course you will want to make sure that block is shown only to guests.

https://www.deanbassett.com
Quote · 28 May 2011

Just tried it, that is kinda cool.   I had a thought just after I did this and was viewing the edit page - specifically the "manage avatars" part.   Would there be any way to have a php block that had "profile picture upload"?  That might help mitigate the horrible design and bugs in the avatar section a bit.

Quote · 28 May 2011

I am sure it's possible. It would be a lot harder though and off the top of my head i do not know how. It would have to be researched.

https://www.deanbassett.com
Quote · 29 May 2011

You could just provide a link to the add photo page for the default album like so.

$iMemID = (int)$_COOKIE['memberID'];
$sNickName = getNickName($iMemID);
$sLink = 'm/photos/albums/my/add_objects/' . $sNickname . '-s-photos/owner/' . $sNickName;
$sCode = '<a href=' . $sLink . '>Upload Profile Photo</a>';
echo $sCode;


https://www.deanbassett.com
Quote · 29 May 2011
 
 
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.