This mod shows percentage of your profile, how many fields are filled.
see screenshot.
Here are the install instructions:
open include/class_user.php
find:
and after:
add this code:
then open templates/profile.tpl
and add after the photo table, this code.
open styles.css
and add this style to it:
demo site: СуÑіди.com - Соціальна мережа України!
see screenshot.
Here are the install instructions:
open include/class_user.php
find:
PHP Code:
function &getProfileValues($user_id)
PHP Code:
$user_profiles[$user_id] = $database->database_fetch_assoc($resource);
PHP Code:
$count_values = 1;
$filled = 1;
for($i=2;$i<100;$i++)
{
if(isset($user_profiles[$user_id]['profilevalue_'.$i.'']))
{
$count_values++;
if(!empty($user_profiles[$user_id]['profilevalue_'.$i.'']))
{
$filled++;
}
}
}
$user_profiles[$user_id]['percentage_filled'] = round(($filled/$count_values)*100);
and add after the photo table, this code.
PHP Code:
{* SHOW PERCENTAGE GUM*}
<div class="gum_percent">
{if $owner->profile_info.percentage_filled >= 70 }
<div class="gum_percent_green">
<div class="gum_percent_green_percent" style="width:{$owner->profile_info.percentage_filled}%;"></div>
<div class="gum_percent_green_text">{$owner->profile_info.percentage_filled}% </div>
</div>
{elseif $owner->profile_info.percentage_filled >= 40 }
<div class="gum_percent_yellow">
<div class="gum_percent_yellow_percent" style="width:{$owner->profile_info.percentage_filled}%;"></div>
<div class="gum_percent_yellow_text">{$owner->profile_info.percentage_filled}%</div>
</div>
{else}
<div class="gum_percent_red">
<div class="gum_percent_red_percent" style="width:{$owner->profile_info.percentage_filled}%;"></div>
<div class="gum_percent_red_text">{$owner->profile_info.percentage_filled}%</div>
</div>
{/if}
</div>
and add this style to it:
PHP Code:
/* GUM PERCENT */
.gum_percent {
width:100%;
background-color: #eeeeee;
font-weight:bold;
height: 20px;
line-height: 22px;
}
.gum_percent_green {
position:relative;
border-top:1px solid #769C25;
width: 100%;
}
.gum_percent_green_percent {
background-color: #C7E38A;
height: 19px;
position: absolute;
top: 0px;
left: 0px;
}
.gum_percent_green_text {
position: absolute;
color: #769C25;
text-align: center;
width: 100%;
}
.gum_percent_yellow {
position:relative;
border-top:1px solid #ffcc33;
width: 100%;
}
.gum_percent_yellow_percent {
background-color: #ffff66;
height: 19px;
position: absolute;
top: 0px;
left: 0px;
}
.gum_percent_yellow_text {
position: absolute;
color: #EC9933;
text-align: center;
width: 100%;
}
.gum_percent_red {
position:relative;
border-top:1px solid #CC6666;
width: 100%;
}
.gum_percent_red_percent {
background-color: #ffcccc;
height: 19px;
position: absolute;
top: 0px;
left: 0px;
}
.gum_percent_red_text {
position: absolute;
color: #CC6666;
text-align: center;
width: 100%;
}
/* END OF GUM PERCENT */