1

Topic: User profile on index page

Hi all,

I've been lurking here for about a month, since getting my forum set up. I couldn't find the answer to my question(s), so I finally registered.

I've got my index page set up so that the Title of last post, date/time of last post and poster is visible. I was trying to make the poster's name a link that pulls up their profile. I am not able to figure out how to pass the variable to profile.php. Can anyone help?

Did any of my babbling make sense?

2

Re: User profile on index page

Depends on how you set up your index.php.
Any more info?

The German PunBB Site:
PunBB-forum.de

3

Re: User profile on index page

Yes. I did not change much in the original index, just the way the links display. This is the line of code that I'm trying ot pass a variable too (BTW, in case it's not obvious, I have ZERO experience with PHP, but I'm trying my best to learn).

$last_post = '<br /> <a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'"'.$idmT.'><b>'.$idm.'</b></a><br />'.format_time($cur_forum['last_post']).' <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';

4

Re: User profile on index page

That is a bit problematic.
The query that gives you these variables does not look for the user id. But that's what you need for a link to profile.php.
You can solve that by adding a join to the user table but I would not do that as it causes a good deal of extra DB activity.

The German PunBB Site:
PunBB-forum.de

5

Re: User profile on index page

Tobi wrote:

That is a bit problematic.
The query that gives you these variables does not look for the user id. But that's what you need for a link to profile.php.
You can solve that by adding a join to the user table but I would not do that as it causes a good deal of extra DB activity.

Ok, I see what you mean. I definitely don't want to stress out  my DB.
Playing with this forum is probably not the ideal way of learning PHP, but I'm enjoying every moment of it smile