running rn2.10.01 with cnbya4.4.2 modified by fade2gray from here. I have found the code that is missing in the cnbya file that will make it show any subscriptions you have but cannot get it to work.
Mod please move if you feel it would be better in another thread.
I have compared the code, here is the section that the cnbya file is missing.
Code:
echo _USERSTATUS.': <b>'.$online.'</b><br />'."\n";
if (($userinfo['newsletter'] == 1) AND (isset($cookie[1]) AND $username == $cookie[1]) AND (isset($cookie[2]) AND $userinfo['user_password'] == $cookie[2]) OR (is_admin($admin) AND ($userinfo['newsletter'] == 1))) {
echo '<i>'._SUBSCRIBED.'</i><br />';
} elseif (isset($cookie[1]) AND ($userinfo['newsletter'] == 0) AND ($username == $cookie[1]) AND (isset($cookie[2]) AND $userinfo['user_password'] == $cookie[2]) OR (is_admin($admin) AND ($userinfo['newsletter'] == 0))) {
echo '<i>'._NOTSUBSCRIBED.'</i><br />';
}
if (is_user($user) AND $cookie[1] == "$username" OR is_admin($admin)) {
$numpoints = $db->sql_fetchrow($db->sql_query('SELECT points FROM '.$user_prefix.'_users WHERE user_id = \''.intval($cookie[0]).'\''));
$n_points = intval($numpoints['points']);
echo _YOUHAVEPOINTS.' <b>'.$n_points.'</b><br />';
ok, I have figured it out. If anyone is using rn2.10.01 and cnbya4.4.2 you will need to make the following changes to the ya/public/userinfo.php file for it to show your subscriptions, points and group memberships.
if (((is_user($user) AND $cookie[1] != $username) OR is_admin($admin)) AND is_active("Private_Messages")) { echo "<br>[ <a href=\"messages-.html$usrinfo[user_id]\">"._USENDPRIVATEMSG." $usrinfo[username]</a> ]<br>\n"; }
echo "</center></font>";
} else {
echo "<center>"._NOINFOFOR." $username</center>";
}
CloseTable();
you will need to add this code:
Code:
//2006-03-09 montego: fix so group memberships only show to the logged in user and admin br#0000005
if ((is_user($user) AND $cookie[1] == $username) OR is_admin($admin)) {
// Group Memberships
// Add these to your Your_Account lang files:
//define('_MEMBERGROUPS','Group Memberships');
//define('_EXPIRES','expires');
//define('_NOTSET','non-expiring');
$result11 = $db->sql_query('SELECT gid, edate FROM '.$prefix.'_nsngr_users WHERE uid=\''.$userinfo['user_id'].'\' ORDER BY gid');
if (($db->sql_numrows($result11) > 0)) {
if($userinfo['user_dateformat']=='') { $userinfo['user_dateformat'] = grget_config(date_format); }
echo '<br />';
OpenTable();
echo '<b>'.$userinfo['username'].'\'s '._MEMBERGROUPS.':</b><br />'."\n";
echo '<ul>';
while(list($gid, $edate) = $db->sql_fetchrow($result11)) {
list($gname) = $db->sql_fetchrow($db->sql_query('SELECT gname FROM '.$prefix.'_nsngr_groups WHERE gid=\''.intval($gid).'\''));
echo '<li>'."$gname";
if (is_admin($admin)) { echo " ($gid)"; }
if ($edate != '') {
if ($edate != 0) {
echo ' - <i>'._EXPIRES.' '.date($userinfo['user_dateformat'], $edate).'</i>';
} else {
echo ' - <i>'._NOTSET.'</i>';
}
}
echo '</li>'."\n";
}
echo '</ul>';
CloseTable();
}
}
Now I am sure this post probably needs to be moved but I hope it helps someone.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum