Show member's IP for admin on profile edit page

For Dolphin 7.1.3+ versions only.

Run the following query in phpMyAdmin(or some other tool) for Dolphin database: 

SET @iMaxOrder = (SELECT `Order` + 1 FROM `sys_page_compose` WHERE `Page` = 'pedit' AND `Column` = 2 ORDER BY `Order` DESC LIMIT 1);
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES
('pedit', '1140px', 'Show member''s IP', 'IP', 2, @iMaxOrder, 'PHP', 'if (!isAdmin()) return false;return bx_member_ip_get_last(bx_get(''ID''));', 11, 28.1, 'non,memb', 0, 0);

 
 

Clean db cache.

New block will be added to the second column on profile edit page for admin.

Rules → http://www.boonex.com/terms
Quote · 8 Jun 2013

I did this and now in the edit profile I have this error:

Parse error: syntax error, unexpected T_STRING in /home/chambert/public_html/inc/classes/BxDolPageView.php(698) : eval()'d code on line 1

Quote · 9 Jun 2013

It looks like this part: (!isAdmin()) return false;rnreturn

 

Needs to be (!isAdmin()) return false;rn return

or just remove the rn after the ;

(!isAdmin()) return false; return

http://www.mytikibar.com
Quote · 9 Jun 2013

Yea. Just another example of these forums messing up code that's posted.

That rn i suspect should be \r\n but the slashes got stripped.

https://www.deanbassett.com
Quote · 9 Jun 2013

Ok. I went in a tried the rn in all sorts of different ways.. and none worked.. But I took out the rn and now works..

So now that line is:

if (!isAdmin()) return false;return bx_member_ip_get_last(bx_get('ID'));

Quote · 9 Jun 2013

Thank you, I've removed 'rn' form the code above. 

Rules → http://www.boonex.com/terms
Quote · 11 Jun 2013

Fine ALEX T,work

Quote · 21 Mar 2016

Does this code still work for 7.3.0 ?

Quote · 21 Mar 2016

Yes, it should still work 

Does this code still work for 7.3.0 ?

 

Rules → http://www.boonex.com/terms
Quote · 26 Mar 2016
 
 
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.