php forum
php mysql forum
php mysql smarty
 
Topic Options
#115820 - 05/25/04 09:20 AM Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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..?
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115821 - 05/25/04 10:54 AM Re: Displaying Post Count
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
You'll probably need to declare @user_profile, since it's not declared globally.

Code:
@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. smile

Top
#115822 - 05/25/04 11:25 AM Re: Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
Actually I've tried that, but no success just yet.

Code:
	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 = '';
			}
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115823 - 05/25/04 12:22 PM Re: Displaying Post Count
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
So what exactly are you trying to do, and where?

Top
#115824 - 05/25/04 12:56 PM Re: Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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.
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115825 - 05/25/04 01:50 PM Re: Displaying Post Count
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
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?

Top
#115826 - 05/25/04 06:28 PM Re: Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
post count of any user logged in & if they their not logged in, it'll show nothing smile
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115827 - 05/25/04 06:37 PM Re: Displaying Post Count
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
You guys are approaching this all wrong then. This can be done quite easily with a simple edit Allen\'s Fsum Status mod .

Top
#115828 - 05/25/04 11:24 PM Re: Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
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
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115829 - 05/26/04 12:50 AM Re: Displaying Post Count
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
Ok I figured out the hard part wink

open up ubb_status.cgi

add:
Code:
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! thumbsup
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top



Moderator:  Gizmo, tackaberry 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks