 |
 |
 |
 |
#36057 - 01/21/00 09:41 AM
Re: *Last Username To Post* in forumdisplay.cgi
|
Junior Member
Registered: 01/18/00
Posts: 15
Loc: Charlotte, NC USA
|
Thanks, Slurpee. This post will be much easier to find, I think. Incidentally, after uploading the changes, I didn't think it was working for me. I updated threads, reindexed and the username doesn't show up for prior posts. New posts, on the other hand, do.  ------------------ It is easy in the world to live after the world's opinions; it is easy in solitude to live after one's own. But the great man is he who in the midst of the crowd keeps with perfect sweetness the independence of solitude. -- Emerson
_________________________
It is easy in the world to live after the world's opinions; it is easy in solitude to live after one's own. But the great man is he who in the midst of the crowd keeps with perfect sweetness the independence of solitude.
-- Emerson
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36062 - 02/03/00 04:08 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Member
Registered: 01/11/00
Posts: 322
|
Hmmm....guys try changing this line in forumdisplay.cgi: if ($thesetotal > 0) { to if ($thesetotal > 1) { See what happens. ------------------ Webmaster Van Halen Links.com http://www.vhlinks.com UBB Moderator http://www.scriptkeeper.com/cgi-bin/Ultimate.cgi
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36065 - 02/03/00 08:20 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Junior Member
Registered: 02/03/00
Posts: 13
Loc: Florida
|
for (my $i=2; $i< $thesetotal; $i++){ Changed this to: for (my $i=20; $i< $thesetotal; $i++){ in forumdisplay.cgi And it now works  To guess what ???the 20th thread
_________________________
SalaTar Admin of www.mrcs.net Home of the free Linux Box
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36068 - 02/11/00 10:58 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Junior Member
Registered: 02/03/00
Posts: 13
Loc: Florida
|
You ever get it Chan? ------------------ SalaTar Admin of www.mrcs.net Home of the free Linux Box
_________________________
SalaTar Admin of www.mrcs.net Home of the free Linux Box
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36094 - 04/19/00 03:06 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Member
Registered: 11/06/01
Posts: 1046
|
Okee dokee. Two things. For one, it didn't work with Mutt's UBB Code Button hack (like it works on this forum) and I did have a problem with one of Slurpee's instruction. When he says to edit the forumdisplay file (for profile link) In the subroutine TopicGutsHTML Look for this code: $ThisURL = qq($NonCGIURL/$ExactPath/HTML/$threadinfo[1].html); Below it add the following: $lastAuthName = qq(<A HREF="$CGIURL/ubbmisc.cgi?action=getbio&UserName=$threadinfo[8]" target=_blank> ); $lastName = $threadinfo[8]; $lastName =~ tr/+/ /; That part has a white space that was giving me headaches. Deleting that white space fixed my problem... Just a though... OOPS! Sorry Cal!!! 
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36099 - 04/27/00 09:39 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Moderator
Registered: 08/11/00
Posts: 182
Loc: yes
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36101 - 04/28/00 07:26 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Moderator
Registered: 08/11/00
Posts: 182
Loc: yes
|
As you can see, none of the hacks is a real "final". There is always something to optimize  This hack occupied us for several weeks. There are two versions right now: - The first variation shows the last user and you can get into his profile with a click. This hack is also used here.
- The second variant leads us to the subscription of the last user in the covered thread.
And this is where our problem appears: there is no support for private forums with more than one page. because of that I build in the routine for that. what happened now was that every post that should still appear on the "old" page was linked to the new, and this was the same with every setting. To be short: something was totally wrong. I removed this bug so that the hack should be a "real" final now. hehe.
the change is very small and applies to Slurpee's original-routine in "forumdisplay.cgi" only, so this is the only thing you need exchanged. <FONT face="courier new"><FONT COLOR="blue">##Slurpee's Last Username Hack for Thread Link $replies = $threadinfo[3]; $totalposts = $replies; $lastpage = ""; $thesepages = $totalposts / $HTMLDisplayMax; my ($thesetotal,$remainder) = split(/./,$thesepages); $thesetotal = $thesetotal+2; $lastpage = "$ThisURL"; if ($PrivateMax eq "yes") { for (my $i=2; $i< $thesetotal ; $i++){ $lastpage = "$CGIURL/forumdisplay.cgi?action=displayprivate&number=$number&topic=$threadinfo[1]-$i"; } } else { for (my $i=2; $i< $thesetotal ; $i++){ $lastpage = "$NonCGIURL/$ExactPath/HTML/$threadinfo[1]-$i.html"; } } $lastName = $threadinfo[8]; $lastName =~ tr/+/ /; if ($replies >= 1) { $lastAuthName = qq( by <a href="$lastpage#$threadinfo[8]$TheDate$FormatTime">$lastName</a> ); } else { $lastAuthName = ""; } ############## </FONT f></FONT c> but just because it works perfectly for me it does not have to work for everyone else  Thats the reason for my question.
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#36118 - 11/21/01 03:01 PM
Re: *Last Username To Post* in forumdisplay.cgi
|
Junior Member
Registered: 06/20/01
Posts: 15
|
I'm revisiting this hack and since I just can not get the link to the "last user to post" to go to that user's last post (it just goes to the top of the thread and you still have to scroll down to get to the last post), I'm once again considering having it link to the user's profile instead. It says in the hack database description: I don't see that option, can anyone shed some light on this? I suspect I may have to change something in: if ($replies >= 1) { $lastAuthName = qq( Latest reply by: <a href=" $lastpage#$threadinfo[3]">$lastName</a> ); } else { $lastAuthName = ""; } But I'm not sure exactly what. The link to the instructions is here, if anyone is interested in looking into it for me: http://www.ubbdev.com/hacks/latestreplybyinforumdisplay.txt Thanks in advance. I'm sure that there will be some future users that will be interested in this option as well.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|