Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:21 pm EST
Geeklog Forums
Help with What's New Block
Status: offline
squatty
Forum User
Full Member
Registered: 01/21/02
Posts: 269
My what's new block ONLY displays comments for the Admin user? New stories and links show up fine for all users.... Here's what I've found so far.
There is a section in the COM_whatsNewBlock function (specifically the comments logic) that looks for SEC_hasAccess. This appears to ONLY include the Admin user? When I add the following echo statements, ONLY the Admin sees both comments...
// Cap max displayed at 15
if ($nrows > 15) $nrows = 15;
if ($nrows > 0) {
echo "made it this far";
$newcomments = array ();
for ($x = 1; $x <= $nrows; $x++) {
$A = DB_fetchArray($result);
if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) > 0) {
echo "<br>only the admin can see this?";
$robtime = strftime("%D %T",$A['day']);
$itemlen = strlen($A['title']);
if ($A['type'] == 'article') {
$titletouse = stripslashes ($A['title']);
$urlstart = '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '#comments">';
} else {
$titletouse = $A['question'];
$urlstart = '<a href="' . $_CONF['site_url'] . '/pollbooth.php?qid=' . $A['qid'] . '&aid=-1#comments">';
}
I would assume that my user data and or group assignments are messed up? Can anyone shead some light on the subject? Or at least explain what SEC_hasAccess and how to insure that all users are in this?
In a world without walls and fences, who needs Windows and Gates?
In a world without walls and fences, who needs Windows and Gates?
8
8
Quote
All times are EST. The time is now 12:21 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content