Subject: Weird thing with Profiles

Posted on: 10/05/05 11:25am
By: ltcolumbo

I notice that in user profiles on my site, it takes the last forum post and adds it in the Stories box, here are two examples:

http://www.radiationangel.org/users.php?mode=profile&uid=24

http://www.radiationangel.org/users.php?mode=profile&uid=11

Site statistics are fine, no strange listings. Any Ideas?
Is users.php calling anything from layout/themename?

Weird thing with Profiles

Posted on: 10/05/05 11:42am
By: knuff

Hmmm,

Don´t really see anything wrong with it with the default theme.

The user in question has posted two comments in the forum and they are listed in the last 10 forum posts.

Exactly same behaviour as here on GL

Weird thing with Profiles

Posted on: 10/05/05 11:49am
By: ltcolumbo

[QUOTE BY= knuff] Hmmm,

Don´t really see anything wrong with it with the default theme.

The user in question has posted two comments in the forum and they are listed in the last 10 forum posts.

Exactly same behaviour as here on GL [/QUOTE]

But it's adding the last forum post listing in the top stories box, like this:

Last 10 stories for user ValientCharity
No user stories
10. What are you living for? Tuesday, April 26 2005 @ 12:20 AM CDT
---

10. is the last forum post, and it's listed just like that.

I looked at your profile and it shows this:

Last 10 stories for user knuff
No user stories

no forum post.

Weird thing with Profiles

Posted on: 10/05/05 12:18pm
By: knuff

Than it must be a theme or an admin issue.

If I look with your standard theme as anonymous, I do see this.

User Name: Moody Goddess (Kara)

Member Since: Thursday, May 05 2005 @ 11:43 PM CDT
Email: Send Email
Homepage:
AIM Handle:
ICQ Identity:
YIM Handle:
MS Messenger Name:
Interests:
Occupation:
Location:
Bio:
PGP Key:

Last 10 stories for user Moody Goddess
No user stories

Last 10 comments for user Moody Goddess
No user comments.

Last 10 Forum posts by Moody Goddess
1. Sorry ^^; Monday, May 09 2005 @ 11:27 PM CDT
2. Sorry ^^; Monday, May 09 2005 @ 09:02 AM CDT

Posting statistics for user Moody Goddess
Total number of articles: 0
Total number of comments: 0
Total number of forum posts 2
Find all postings by Moody Goddess

So you have me confused what would be wrong ?


Here is a screenshot of what I see

Weird thing with Profiles

Posted on: 10/05/05 12:21pm
By: ltcolumbo

[QUOTE BY= knuff] Than it must be a theme or an admin issue.

If I look with your standard theme as anonymous, I do see this.

User Name: Moody Goddess (Kara)



So you have me confused what would be wrong ?


[/QUOTE]

Ah, I logged out of my session and now it looks fine.. could you create a profile and log in? I wonder if it's just with my account. I could create a fake user to see if it's related to admin or not.

Weird thing with Profiles

Posted on: 10/05/05 12:22pm
By: ltcolumbo

I created a test account and it does it when I log in. Weird.

Weird thing with Profiles

Posted on: 10/05/05 12:32pm
By: knuff

Hmmm, strange indeed.

When logged in you see this behaviour.

No user stories
2. Sorry ^^; Monday, May 09 2005 @ 09:02 AM CDT

Last 10 comments for user Moody Goddess
No user comments.

Last 10 Forum posts by Moody Goddess
1. Sorry ^^; Monday, May 09 2005 @ 11:27 PM CDT
2. Sorry ^^; Monday, May 09 2005 @ 09:02 AM CDT


Strange.


I don´t think this is a template issue.
Did you make any changes to users.php ?

Weird thing with Profiles

Posted on: 10/05/05 12:34pm
By: ltcolumbo

[QUOTE BY= knuff] Hmmm, strange indeed.

When logged in you see this behaviour.

No user stories
2. Sorry ^^; Monday, May 09 2005 @ 09:02 AM CDT

Last 10 comments for user Moody Goddess
No user comments.

Last 10 Forum posts by Moody Goddess
1. Sorry ^^; Monday, May 09 2005 @ 11:27 PM CDT
2. Sorry ^^; Monday, May 09 2005 @ 09:02 AM CDT


Strange.


I don´t think this is a template issue.
Did you make any changes to users.php ?[/QUOTE]

Should I download the source again and copy the file over? I don't think I edited this file. I'll try that.

Weird thing with Profiles

Posted on: 10/05/05 12:40pm
By: ltcolumbo

I extracted fresh source and backed up original file and copied a new one from the source. It still does the same thing. It must be related to the forum code or something.

Weird thing with Profiles

Posted on: 10/05/05 01:29pm
By: knuff

OK, did you take the original from Blaine ?

The one called
// $Id: users.php,v 1.1 2004/01/15 05:19:45 Blaine Exp $

Currently the latest stable one for 1.3.11 is
// $Id: users.php,v 1.93 2004/10/23 10:23:01 dhaun Exp $


I suggest you just edit the forum blocks in the new one.
That will most probably fix it.


Weird thing with Profiles

Posted on: 10/05/05 01:50pm
By: knuff

I quickly copy pasted them in the new users.php.

I didn´t really test it though, but if you feel uncomfortable with changing it yourself you could give it a try.

modified users.php

Weird thing with Profiles

Posted on: 10/05/05 02:28pm
By: ltcolumbo

[QUOTE BY= knuff] I quickly copy pasted them in the new users.php.

I didn´t really test it though, but if you feel uncomfortable with changing it yourself you could give it a try.

modified users.php[/QUOTE]

Thank you for trying, that didn't work.. I had to copy a file that wasn't in the correct path:

postsrow.thtml

After that it worked, and still ahd the same problem. =(

Weird thing with Profiles

Posted on: 10/05/05 02:56pm
By: ltcolumbo

I remember I did edit something, Dirk or someone here gave me the geeklog code to include more in the user profiles, but I can't remember what file I edited. It wasn't users.php, I"m pretty sure.

Weird thing with Profiles

Posted on: 10/05/05 03:11pm
By: ltcolumbo

I found my original post, I even restored the original file that I had backed up in that dir but it still does the same thing. Here's the link to that:

http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=47662

I'm really stumped on what it could be. Maybe some database issue? I don't know.. if anyone would like to poke around that account to see (developer maybe) email me.

Weird thing with Profiles

Posted on: 10/05/05 04:36pm
By: ltcolumbo

I also reinstalled the plugin, still does it. I'm wondering if one of the users deleting his account and still leavin the messages there had anything to do with it. Maybe some updates to the code are in order.


Weird thing with Profiles

Posted on: 12/05/05 08:36pm
By: ltcolumbo

AARRGHHH it's still hosed:

Last 10 stories for user Josefius
1. Made Monk in iRO Tuesday, May 10 2005 @ 11:24 PM CDT
2. System Maintainance @ 12:30am May 7 2005 Saturday, May 07 2005 @ 12:35 AM CDT
3. This made my blood run cold. Thursday, May 05 2005 @ 08:31 AM CDT
4. IRC Server added Monday, May 02 2005 @ 03:58 PM CDT
5. Cool and the gang. Tuesday, April 26 2005 @ 06:38 PM CDT
6. Power out Friday, April 08 2005 @ 04:31 PM CDT
7. Noobs and a big stick. Friday, April 01 2005 @ 01:25 PM CST
8. Updated Streaming Radio Block Wednesday, March 30 2005 @ 10:37 AM CST
9. Just the three of us... Friday, March 25 2005 @ 06:06 PM CST
10. Chat on website Sunday, March 20 2005 @ 05:41 PM CST
10. The Life Aquatic With Steve Zissou Wednesday, May 04 2005 @ 09:55 AM CDT

It puts 10. in there twice if there is a 10 with the last forum post. There has to be a fix for this!!!!

Weird thing with Profiles

Posted on: 13/05/05 06:57am
By: knuff

What groups does a standard user belongs too ?

Since the problem seems to occur only when you are logged in, it has to do something with the access rights in the select query that picks up this "orphaned" entry.

And since access rights depend on groups, well maybe it migh shed some light.

In addition, maybe a good idea to post it at
Tony´s website too.

Weird thing with Profiles

Posted on: 25/06/05 07:57pm
By: machinari

well, i spent all afternoon trying to figure out why this happens.
I was unseccessful, BUT I can fix it very easily.
What confused me more is why this issue doesn't seem to affect geeklog.net, but it does all of my sites, which run 1.3.10 and 1.3.11.

in users.php (i'm using version 1.93), about line 192, immediatly after the if/else statement:
    $user_templates->clear_var('strow');

done... works for me.

here is the context just so you are sure:
    // list of last 10 stories by this user
    if (sizeof ($tids) > 0) {
        $sql = "SELECT sid,title,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW()) AND (tid IN ($topics))" . COM_getPermSQL ('AND');
        $sql .= " ORDER BY unixdate DESC LIMIT 10";
        $result = DB_query($sql);
        $nrows = DB_numRows($result);
    } else {
        $nrows = 0;
    }
    if ($nrows > 0) {
        for ($i = 1; $i <= $nrows; $i++) {
            $C = DB_fetchArray($result);
            $user_templates->set_var('row_number', $i . '.');
            $articleUrl = COM_buildUrl ($_CONF['site_url']
                                        . '/article.php?story=' . $C['sid']);
            $user_templates->set_var ('article_url', $articleUrl);
            $user_templates->set_var ('story_begin_href',
                                      '<a href="' . $articleUrl . '">');
            $C['title'] = str_replace ('$', '$', $C['title']);
            $user_templates->set_var('story_title', stripslashes($C['title']));
            $user_templates->set_var('story_end_href', '</a>');
            $storytime = COM_getUserDateTimeFormat($C['unixdate']);
            $user_templates->set_var('story_date', $storytime[0]);
            $user_templates->parse('story_row','strow',true);
        }
    } else {
        $user_templates->set_var('story_row','<tr><td>' . $LANG01[37] . '</td></tr>');
    }
    $user_templates->clear_var('strow');


Weird thing with Profiles

Posted on: 26/06/05 10:37am
By: ltcolumbo

Damn, I thought this would work.. I put in that line it just blanks out forum posts completely.. it's getting closer though.. cause it did take out that line.. but unfortunately it took out everything else too for forum posts.

Weird thing with Profiles

Posted on: 26/06/05 12:26pm
By: machinari

oops, I was gonna mention that might happen.... I don't have the forum posts in my profiles so getting rid of that one post was all I was interested in... Have you posted this problem at Blaine's site?

Weird thing with Profiles

Posted on: 26/06/05 03:43pm
By: ltcolumbo

Yes I did I'm pretty sure, it could have been an email.. but no one answered.

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=52410