# UBB USER POSTS - LAST 50 BY USER

$MainButtonsLine = &MainButtonOptions;

# standard top of HTML page
print "$Header";


my $overfifty = $vars_wordlets{more_than_50_posts} if $total > 50;

print <<recent_posts_by_user;

<CENTER>
$standard_title_table
</CENTER>

<br />

$TBT

<TR bgcolor="$vars_style{AltColumnColor1}">
<TD valign="bottom" align="left">
<FONT size="1" face="$vars_style{FontFace}">
<B>&#187;
$show_logout
</B>
</font>
</TD>
<TD valign="bottom" align="right">
<FONT size="1" face="$vars_style{FontFace}"><B>
<a href="$vars_config{CGIURL}/ultimatebb.cgi">$vars_config{BBName}</a> &raquo; $vars_wordlets{recent_user_posts}: $user_public_name
</B></font>
</TD>
</TR>

$TBB

<br />

$TBT

<tr bgcolor="$vars_style{TableColorStrip}">
<td colspan="4">
<FONT size="$vars_style{TextSize}" FACE="$vars_style{FontFace}" color="$vars_style{TableStripTextColor}">
<b>$vars_wordlets{recent_user_posts}: $user_public_name</b>
</td>
</tr>

<tr bgcolor="$vars_style{CategoryStripColor}">
<td>
&nbsp;
</td>
<td>
<FONT color="$vars_style{CategoryStripTextColor}" size="1" FACE="$vars_style{FontFace}">
<B>$vars_wordlets{topic_header}</B>
</FONT>
</td>
<td>
<FONT color="$vars_style{CategoryStripTextColor}" size="1" FACE="$vars_style{FontFace}">
<B>$vars_wordlets{forum_column}</B>
</font>
</td>

<td>
<FONT color="$vars_style{CategoryStripTextColor}" size="1" FACE="$vars_style{FontFace}">
<B>$vars_wordlets{date_column}</B>
</font>
</td>

</tr>

recent_posts_by_user

foreach (@rev_posts) {
	$counter++;

	# split line
	my @inarray = split (/\|/, $_);
	$r = 0;
	my $d = shift @inarray;    #first item is the new date field, not used here
	($f, $t, $r) = @inarray;

	$d =~ m/^(\d\d\d\d)(\d\d)(\d\d)/;
	$d = "$2-$3-$1";

	# get forum info
	@this_forum = &GetForumRecord($f);

	if ($ExactPath{$f}) {
		$exact_path = $ExactPath{$f};
	} else {
		$exact_path = "Forum$f";
		if ($this_forum[6] eq 'private') {
			$exact_path .= "/private-$this_forum[7]";
		}
		$ExactPath{$f} = $exact_path;
	}

	#make sure topic exists
	if (-e "$vars_config{NonCGIPath}/$exact_path/$t.cgi") {

		# grab topic
		@this_topic = &OpenTopic($t, $f);

		# grab topic stat line
		@stat_line = split (/\|\|/, $this_topic[0]);

		# topic subject-> $stat_line[4]

		# forum name: $this_forum[1]

		print <<this_post;
<tr bgcolor="$vars_style{AltColumnColor1}">
<td valign="top">
<FONT size="1" FACE="$vars_style{FontFace}">
<B>$counter</B>
</font>
</td>

<td valign="top">
<FONT size="1" FACE="$vars_style{FontFace}">
<B><A HREF="$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_topic&f=$f&t=$t">$stat_line[4]</A></B> ($vars_wordlets{post} \#$r)
</FONT>
</td>
<td valign="top">
<FONT size="1" FACE="$vars_style{FontFace}">
<B>$this_forum[1]</B>
</font>
</td>

<td valign="top">
<FONT size="1" FACE="$vars_style{FontFace}">
<B>$d</B>
</font>
</td>

</tr>
this_post
	}    # unless post exists
}    # end posts loop


print <<NearBottom;
$TBB
<P>
NearBottom


# standard bootom of HTML page
print "$Footer";

# Nothing below this line should be changed.. and there is no more code!

# This entire program is copyright Infopop Corporation.
# For more info on the Ultimate Bulletin Board and other Infopop
# Products/Services, visit: http://www.infopop.com

# You may not distribute this program in any manner, modified or otherwise.

#You make modifications, but only for your own use and within the confines of the UBB License Agreement.

# DANGER: Do not remove the following line!
1;
