I place this code in ubb_new_reply.cgi:
open (FILE, ">$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");
&lock;
print FILE ("$GotTime{HyphenDate} $GotTime{Time}
n");
print FILE ("
$this_subject By
$pubnamen");
print FILE ("
$mess_truncatedn");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");
Now, up at the top of the page, I've added a couple of variables. To be honest, I don't remember which ones, so here's what I have:
&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_mods.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_img.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_err.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_misc.cgi");
Within each one of your forum folders, (i.e., Forum1, Forum2, etc.) it will
automatically create a page called "_lastpost.txt"
Where did I add the code?
Right
below:
# create promo edition of message
$mess_truncated = &promo($message);
Then all you have to do is call the page "_lastpost.txt". I use a script to call mine instead of SSI because it works easier for me.