hi... im working on my Forum to make it better
now... here's the problem, the mod of Profile Views, by default put the info below the avatar... i have tried a long... but i cant get it
look:
The views are shown below the avatar... and if u see on the custom fields, you can find at the bottom...
"Perfil visto veces desde Ayer"... the only thing missing is the number of views... any idea??
i have this code on the template:
member_profile_customfields
<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center">
<tr><td class="tborder">
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" width="100%">
<tr>
<td colspan="2" class="thead"><strong>$lang->users_additional_info</strong></td>
</tr>
$customfields
<tr>
<td colspan="2" align="center" class="trow2">
<font size="1" face="verdana,tahoma,arial,helvetica">Perfil visto $profile_vc[views] veces desde $memregdate</font></td></tr>
</table>
</td></tr></table>
Umm it is because you are adding them to a template other than the base one which is the profile.
i guess this will help
open
./member.php
find
if($customfields)
above it add
$query = $db->query("SELECT views FROM ".TABLE_PREFIX."profile_vc WHERE uid='".$memprofile['uid']."'");
if($db->num_rows($query) <= 0)
{
$db->query("INSERT INTO ".TABLE_PREFIX."profile_vc VALUES ('',".$memprofile['uid'].",'1')");
}
else
{
$profile_vc = $db->fetch_array($query);
$new_vn = $profile_vc['views'] + 1;
$db->query("UPDATE ".TABLE_PREFIX."profile_vc SET views='".$new_vn."' WHERE uid='".$memprofile['uid']."'");
}
$query = $db->query("SELECT views FROM ".TABLE_PREFIX."profile_vc WHERE uid='".$memprofile['uid']."'");
$profile_vc = $db->fetch_array($query);
actually this way u will not need the plugin anymore
regards
above?? it shouldn't be below?? i mean, i want to look like in the screen
is correct?
mmm... it doesnt seems to work
in which template you have added the variable and what variable did u use
wow... know works... thanx zaher, i didnt realize it was something wrong thanx
now... one more question, how can i do to add the avatar caption... you know, the one that appear below the avatar on the post...
y want to make tha the avatar caption appears below the avatar on the profile
IMPORTANT
EDIT: There's a problem, every time i see a profile the views increase 2, instead of 1
fixed
hello there,
create a custom profile field for the captions.
then please open
./member.php
find
//
// Get the user's title...
//
above it add
//start caption
$caption = $db->query("SELECT * FROM ".TABLE_PREFIX."userfields WHERE ufid='$memprofile[uid]'");
$output = $db->fetch_array($caption);
$caption = $output['fid4'];
change fid4 to what your caption field's id is
then in the profile template add
$caption
regards
thanks men... the two things works perfect
u rock!