"Last reply by" hack for 6.2 ? - 02/23/2002 11:58 PM
Will the 6.1 version work, or will it need to be rewritten for 6.2 ?
quote:in "ubb_forum.cgi"
$last_hyphen_date = $last_post[3];
quote:my board is version 6.2.1
$last_hyphen_date = $this_topic_data[12];
quote:then later in the same file:
local ($poll_new, $poll_old, $pollid, $poll_link, @pntf_locations, $pntf_string, $last_julian, $GetMonth, $GetDate, $GetYear, @this_forum, $category, $permission, $cat_name, $mod, @mods, %topic_legend, %reply_legend, $topic_restrict, $reply_restrict, $forum_name, %topic_view, $DPJulian, @thefinalarray, %forum_topics, $topic, $one, @this_topic, $closed, $total_replies, $subject, $user_name, $msg_icon, $last_hyphen_date, $last_time, @rev_file, @last_post, $TheDate, $Breaker, $DateSize, $hot_icon, $new_topic_button, $key, $value, $Sections, $count, $j, $start_point, $array_stop, $total_good, $more_topics_wording, $Block, $starting, @topics, $Section, $topic_start_name, $cat_line1, $extra_pages, $topic_view_line, $topic_start_un, $last_post_username, @user_profile);
quote:Why wouldn't it work? I emptied the cache (actually at this point I turned it off), I did the templates and wordlets deal right obviously since I get the words "last reply by: " under the last post date, I am going nutz here!
$last_hyphen_date = $this_topic_data[12];
# begin last post hack
if ($last_post[1] eq "000000"){
$last_post_username = "";
}
else { $last_post_num = &GetUserNumber($last_post[2]);
# get latest public name for latest post replier!
my @user_profile = '';
if (-e "$vars_config{MembersPath}/$last_post_num.cgi") {
@user_profile = &OpenProfile($last_post_num);
chomp($user_profile[15]); chomp($user_profile[0]);
$last_post_username = $user_profile[15];
if ($user_profile[15] eq '') { $last_post_username = $user_profile[0]; }
}
else {
$last_post_username = $last_post[2];
}
my $total_posts = $total_replies + 1;
my $page_num = '';
if ($total_posts > $vars_display{HTMLDisplayMax}) {
my $total_pages = int ($total_posts / $vars_display{HTMLDisplayMax});
if ($total_posts % $vars_display{HTMLDisplayMax}) { $total_pages++; }
if ($total_pages > 1) {
$page_num = "&p=$total_pages";
}
}
$last_post_username = qq!
$vars_wordlets_mods{last_reply_by}: $last_post_username!;
}
# end last post hack
[/code]Replace with**
[code]