|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
How do you go about displaying the post count for a user other than in public_display_profile and public_topic_page ?
I know its in $Authorextra (well 3 fields are) and that it also refers to user_profile[7]
however putting those variables elsewhere in the template files dont call the post count? Do I need to do a "require" or..?
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
You'll probably need to declare @user_profile, since it's not declared globally. @user_profile = &OpenProfile($user_number); That will open the profile for the current logged-in user and place their profile data in the @user_profile array. 
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Actually I've tried that, but no success just yet. if (!$this_user_number) {
# old post- we need to find user number $this_user_number = &GetUserNumber($thisline[2]);
if ((&FileExists("$vars_config{MembersPath}/$this_user_number.cgi")) && ($this_user_number ne '')) { @user_profile = &OpenProfile("$this_user_number"); } else { $thisline[8] = 'unreg';
if (!$public_name) { $show_public_name = $thisline[2]; } else { $show_public_name = $public_name; }
$user_status = $vars_wordlets{unregistered}; }
} else {
# already have user number @user_profile = &OpenProfile("$this_user_number");
}
# author info options undef($post_total_line); undef($location_line); undef($regdate_line); @author_extra = @blank;
$post_total_line = qq( $vars_wordlets{author_posts} <b>$user_profile[7]</b> ); push (@author_extra, $post_total_line);
if ($author_extra[0]) { $AuthorExtra = join ("|", @author_extra); } else { $AuthorExtra = ''; }
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
So what exactly are you trying to do, and where?
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
ubb_forum_summary is where the code should go, Im assuming. Im trying to display total post count somewhere on public_forum_summary and possibly when the user registered.
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Havoq, more specifically, who's post count are you trying to show? The post count of the newest member, the viewers post count, another person's post count?
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
post count of any user logged in & if they their not logged in, it'll show nothing 
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
You guys are approaching this all wrong then. This can be done quite easily with a simple edit Allen\'s Fsum Status mod .
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
huh? I know Ian, what do u think I've been using! lol
Im trying to get a variable in there that isnt though.. a.k.a post count
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Ok I figured out the hard part open up ubb_status.cgi add: print qq~document.posts = "$user_profile[7]";
document.getElementById('posts').appendChild(document.createTextNode('$user_profile[7]'));~; but when u sign out and are a guest, ur post count says nothing, its a blank. How can I make it to say 0 or none? OK then, n/m took some thought but I figured it all out! Thanks havoq! 
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|