|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
In the "Last Post" column on the "Main Index" page, lengthly topic headers are cut off with "..." trailing the last acceptable character. Is it possible to make it so that when you hold your mouse over the topic line it will display the full text header in the little box above the pointer for IE users? Hope this makes sense... worked all day on only 5 hours sleep. Jason
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
For example, here is a current "Last Post" topic: Re: Useful MySQL Queries f... but the full topic header is: Re: Useful MySQL Queries for UBB.Threads
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
In ubbthreads.php, try changing this: [] $lastpost = "<img src="{$config['images']}/icons/$Icon" $imagesize $imagestyle alt="*" /> <a href="{$config['phpurl']}/$linker.php?Cat=$Cat&Number=$lastnumber&Main=$lastmain#Post$lastnumber"> $Subject</a>"; [/] to this: [] $lastpost = "<img src="{$config['images']}/icons/$Icon" $imagesize $imagestyle alt="*" /> <a href="{$config['phpurl']}/$linker.php?Cat=$Cat&Number=$lastnumber&Main=$lastmain#Post$lastnumber" alt="$Subject"> $Subject</a>"; [/] Not tested, but it should work. Should be stock, IMHO.
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
Okay, no, that doesn't work. I haven't delved into raw HTML in a while. I put it on the image, but it seems the $Subject variable is being truncated beforehand, so I have to pinpoint that.
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
Okay, this WILL work. In ubbthreads.php find: <br /> // If we have a last post for this board we link to it <br /> $lastpost = ""; <br /> if ($Poster) { <br /> $append = ""; <br /> if (strlen($Subject) > 26) { <br /> $append = "..."; <br /> } <br /> $Subject = substr($Subject,0,26); <br /> $Subject .= $append; <br /> if (!$Icon) { $Icon = "blank.gif"; } <br /> $imagesize = $images['icons']; <br /> $lastpost = "<img src=\"{$config['images']}/icons/$Icon\" $imagesize $imagestyle alt=\"*\" /> <a href=\"{$config['phpurl']}/$linker.php?Cat=$Cat&Number=$lastnumber&Main=$lastmain#Post$lastnumber\"> $Subject</a>"; <br /> $lastposter = "($Poster)"; <br /> } <br /> else { <br /> $lastposter = ""; <br /> } <br /> and replace it with: <br /> // If we have a last post for this board we link to it <br /> $lastpost = ""; <br /> $SubjectLong = "$Subject"; <br /> if ($Poster) { <br /> $append = ""; <br /> if (strlen($Subject) > 26) { <br /> $append = "..."; <br /> } <br /> $Subject = substr($Subject,0,26); <br /> $Subject .= $append; <br /> if (!$Icon) { $Icon = "blank.gif"; } <br /> $imagesize = $images['icons']; <br /> $lastpost = "<img src=\"{$config['images']}/icons/$Icon\" $imagesize $imagestyle alt=\"$SubjectLong\" /> <a href=\"{$config['phpurl']}/$linker.php?Cat=$Cat&Number=$lastnumber&Main=$lastmain#Post$lastnumber\"> $Subject</a>"; <br /> $lastposter = "($Poster)"; <br /> } <br /> else { <br /> $lastposter = ""; <br /> } <br />
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
Hi DLW, Thanks for the suggestion! Unfortunately when I made the changes it didn't work. I have Josh's spider code installed and a couple of other mods, maybe that has something to do with it since it seems to work for you. Maybe it will be stock in 6.5 final. Anyway, I appreciate your obvious effort... thank you. Jason
|
|
|
|
Joined: Jun 2000
Posts: 190
Enthusiast
|
Enthusiast
Joined: Jun 2000
Posts: 190 |
Well, I tried it too and it didn't work for me either. What happened when I added the mod was the "Last Post" text changed to: etc...?? and no mouseover text. I too appreciate the effort even though it wouldn't work for me. [] http://www.the-highway.com/Smileys/sad02.gif[/] Jeff
Artificial Intelligence is no match for natural stupidity!
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
Does the stock code I posted look the same as yours? I too have PetJoshs' spider code, but that's not an issue since the code of it is not involved here.
|
|
|
|
Joined: Jun 2000
Posts: 190
Enthusiast
|
Enthusiast
Joined: Jun 2000
Posts: 190 |
[] DLWebmaestro said:Does the stock code I posted look the same as yours? I too have PetJoshs' spider code, but that's not an issue since the code of it is not involved here. [/] [] http://www.the-highway.com/Smileys/yep.gif[/] Looks the same as what I have. And, I don't have the "spider code".
Artificial Intelligence is no match for natural stupidity!
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
DLW, Yes, stock code is the same... I thought maybe a [modified] dependent php module might depend on ubbthreads.php or something. In any case I do appreciate the effort. Jason
|
|
|
|
Joined: Aug 2000
Posts: 1,290
Addict
|
Addict
Joined: Aug 2000
Posts: 1,290 |
Here's how I did it on mine.. // If we have a last post for this board we link to it $lastpost = ""; if ($Poster) { $append = ""; $Subject_full = $Subject; if (strlen($Subject) > 26) { $append = "..."; } $Subject = substr($Subject,0,26); $Subject .= $append; if (!$Icon) { $Icon = "blank.gif"; } $imagesize = $images['icons']; $lastpost = "<img src="{$config['images']}/icons/$Icon" $imagesize $imagestyle alt="*" /> <a href="{$config['phpurl']}/$linker.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}$lastnumber{$var_sep}Main{$var_eq}$lastmain{$var_extra}#Post$lastnumber" title="$Subject_full" alt="$Subject_full"> $Subject</a>"; $lastposter = "($Poster)"; } else { $lastposter = ""; }
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
Works like a charm, thanks J.C.
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
Whoops! Not compatible with the spider mod... oh well, maybe it'll be stock in 6.5 since it's supposed to include the spider mod. Thanks anyway, J.C.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Change this line like this and it should work: href="{$config['phpurl']}/$linker.php/Cat/$Cat/Number/$lastnumber/Main/$lastmain/#Post$lastnumber" title="$Subject_full" alt="$Subject_full"> $Subject</a>";
|
|
|
|
Joined: Aug 2000
Posts: 1,290
Addict
|
Addict
Joined: Aug 2000
Posts: 1,290 |
Thanks Josh, feel free to edit my post to make sure there are no more probs..
|
|
|
|
Joined: Dec 2003
Posts: 123
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 123 |
Beauty... once and for all (w/vs. 6.4.2) I can say it works like a charm! Thanks guys. J
|
|
|
|
Joined: Jun 2000
Posts: 190
Enthusiast
|
Enthusiast
Joined: Jun 2000
Posts: 190 |
I just got a complaint that when you click on the linked subject in that "Last Post" column, after installing this hack.... (both JC's and Josh's tried) you get a 404 Error Page not Found (w/JC's version) and a Board error, Cannot find the file (w/Josh's version). I don't have the "spider mod" installed, so I'm not surprised that Josh's version didn't work, either in displaying the mouseover etc. But JC's version does fix the mouseover display as I reported earlier, but I never bothered to click on any of the links in that column myself [] http://www.the-highway.com/Smileys/duh2.gif[/]. So, I'm wondering if anyone else using 6.4.1 who has tried this fix has the same problem? Jeff
Artificial Intelligence is no match for natural stupidity!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Copy the URL that it's trying to go to - make sure that's a valid link. Might be a typo or invalid tag. Looking at what link is producing the 404 error will give you a clue.
|
|
|
|
Joined: Mar 2004
Posts: 118
Journeyman
|
Journeyman
Joined: Mar 2004
Posts: 118 |
[] J.C. said: $lastpost = "<img src="{$config['images']}/icons/$Icon" $imagesize $imagestyle alt="*" /> <a href="{$config['phpurl']}/$linker.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}$lastnumber{$var_sep}Main{$var_eq}$lastmain{$var_extra}#Post$lastnumber" title="$Subject_full" alt="$Subject_full"> $Subject</a>"; [/] I guess we should define $var_eq, $var_sep and $var_extra
Kind regards, PaNTerSan
|
|
|
|
Joined: Sep 2000
Posts: 159
Member
|
Member
Joined: Sep 2000
Posts: 159 |
I just changed the "26" number in the code to "50" or some other number large enough to get in all the chracters you want.
|
|
|
|
Joined: Jul 2001
Posts: 1,157 Likes: 82
coffee and code
|
coffee and code
Joined: Jul 2001
Posts: 1,157 Likes: 82 |
Small revision and my final code... this removes that "Re: " from the subject replies.. and also get rid of the the special charactors such as Quotes and Apostraphies that may mess with html. in ubbthreads.php, find... <br /> if ($Poster) {<br /> $append = "";<br /> if (strlen($Subject) > 26) {<br /> $append = "...";<br /> }<br /> $Subject = substr($Subject,0,26);<br /> $Subject .= $append;<br /> if (!$Icon) { $Icon = "blank.gif"; }<br /> replace with... <br /> if ($Poster) {<br /> $append = "";<br /> $Subject = str_replace("Re: ", "", $Subject);<br /><br /> $Subject_full = $Subject;<br /> $Subject_full = strip_tags($Subject_full); <br /> $Subject_full = htmlspecialchars($Subject_full); <br /><br /> if (strlen($Subject) > 26) {<br /> $append = "...";<br /> }<br /> $Subject = substr($Subject,0,26);<br /> $Subject .= $append;<br /> if (!$Icon) { $Icon = "blank.gif"; }<br /> and just under that line, at "$lastpost =", replace... <br />> $Subject</a>";<br /> with... <br />title=\"$Subject_full\" alt=\"$Subject_full\">$Subject</a>";<br />
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|