Ok, everyone. I've sorta figured out the "history not showing up" problem. Keep in mind, I'm a big time Perl amateur, so I'd be pleased if someone wants to explain this more clearly or verify my findings.
I traced everything back through karma.pl to the sub karmaMsg and did various kinds of troubleshooting to see what was working and what wasn't. The karma profiles were writing fine and the code to print the history was working fine, too. The problem seemed to be where the karma profile file opens and then loads into the array. I focused my attention on this bit of code:
open (MESSAGES, "$MembersPath/karma/$ProfileNumber.cgi");
@kMessages = ;
close (MESSAGES);
I subsituted the expression
open (MESSAGES, "$MembersPath/karma/$ProfileNumber.cgi");
for the direct path of a profile file I knew existed, like this:
open (MESSAGES, "/usr/otd/cgi-bin/ubb/Members/karma/00000003.cgi");
Sure as heck, it worked. My history was reading fine. I worked backwards and replaced the absolute path with $MembersPath/karma/ again and it continued to work, thus showing that the problem was with the variable $ProfileNumber. I assumed that $ProfileNumber is being reset to some other value in between loading the profile number at the beginning of the routine and where it is being used to load the karma profile from the Members/karma directory. I pinpointed the problem to this expression:
$PN = &GetUserNumber($UserName);
This expression finds the user number of YOU, the person looking up the karma, which is later used to make sure you're authorized. It calls sub GetUserNumber, which is located in ubb_libary.pl. During this routine, $ProfileNumber is set to YOUR user number and stays that value upon return to sub karmaMsg in karma.pl. So, in my case, with the history was trying to read from MY profile file that didn't exist because I *had* no karma adjustments, therefore no history was being displayed.
My fix:
I changed $ProfileNumber to $ProfileNumber2 everywhere in sub karmaMsg, in karma.pl. There are four instances of it.
It now seems to work reliably.
Good luck!
This message has been edited by Matthew on January 25, 2001 at 07:13 PM