Profile View Counter

Is there any way of adding a view counter onto the member's profile page?

Quote · 23 Apr 2013

will add a php block on profile page with some info, like below

Profile Viewed: xxx time(s)
Featured Member
Location: Flag/Country/zip/City

1)
Go to DB and table sys_page_compose and click on Insert and add as bellow


Page: profile
Desc: Simple PHP Block
Caption: Profile Info
Func: PHP


Content:

global $site;
global $aPreValues;
global $p_arr;
$Memb = (int)$p_arr['ID'];

$arr = db_arr("SELECT `Views` FROM `Profiles` WHERE `ID` = '$Memb'");
$MemViews = $arr['Views'];
if ( $MemViews > 0 )
{
echo "
<div align="center">
<font color="#006A00" size="4"><b>Profile Viewed: $MemViews time(s)</b></font>
</div>
";
}

$arr = db_arr("SELECT `Featured` FROM `Profiles` WHERE `ID` = '$Memb'");
$MemFeatured = $arr['Featured'];
if ( $MemFeatured > 0 )
{
echo "
<div align="center">
<font color="#006A00" size="4"><b>Featured Member</b></font>
</div>
";
}

$arr = db_arr("SELECT `Country`, `zip`, `City`  FROM `Profiles` WHERE `ID` = '$Memb'");

$MemCountry = _t($aPreValues['Country'][$arr['Country']]['LKey']);                             
$MemFlag = '&nbsp;<img src="'. ($site['flags'].strtolower($arr['Country'])) .'.gif" alt="flag" />';
$MemZip = $arr['zip'];
$MemCity = $arr['City'];

if ( $arr > 0 )
{
echo "
<div align="center"><br><b>
Location: $MemFlag $MemCountry $MemZip $MemCity
</b><br><br></div>
";
}


SAVE


2)
Admin panel -> Builders -> Page Builder

Select Profile page

Move Block Profile Info from Inactive Blocks to Active Blocks

3)
Go to your site and look at a profile, you will see a new block here.

Quote · 23 Apr 2013

Thanks, that was a great help!

I made some modifications to the content field to fit in with the site's overall UI.

Content:

global $site;
global $aPreValues;
global $p_arr;
$Memb = (int)$p_arr['ID'];

$arr = db_arr("SELECT `Views` FROM `Profiles` WHERE `ID` = '$Memb'");
$MemViews = $arr['Views'];
if ( $MemViews > 0 )
{echo "<p>$MemViews visitors have viewed this profile</p>";}

Quote · 24 Apr 2013

Moreover, this enhancement is invaluable!

Our art site, "This is Art" is greatly enhanced for the artists. One artist profiles has been viewed over 1700 times, they love it, and it really endorses the site creditability.

I recommend that Boonex incorporates this feature in future releases.

Thanks again Okweb

Quote · 24 Apr 2013

Gorpus had a free profile stats module that showed such things as views, greets, photos added, files added, forum posts, etc.  Can't seem to find it in his market place although I have a copy and it seems to work in 7.1.

Geeks, making the world a better place
Quote · 24 Apr 2013
 
 
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.