Version: 1.00, by N!ck
Developer Last Online: Oct 2008
Version: 2.2.x
Rating:
Released: 03-02-2002
Last Update: Never
Installs: 88
No support by the author.
The idea for this hack was originally that of Parker Clack, a regular here on vBulletin.org.
What this hack does:
Basically, this hack pops up a little box/window when the mouse is run over a thread title that shows the first three hundred characters of the first post in the thread (that is, the post that started the thread).
Improvements to Parker Clack's hack:
Far, far less code...
Easier installation (one file edit, one template edit)...
Less space usage...the beginning of the first post in each thread is not stored twice - only once now!...
]nice hack... just installed it
there's only one "problem" > it shows the first 300 characters of the first post in the thread ( nomatter how many replies there were done )...
I have a code that will show u the LATEST post in the thread without opening it... just with hovering mouse over it will show 300 characters from *latest* post in the given thread...
Code is atathced here and "kinda" buggy cause it adds 1 query per each thread shown at the forum... I share cause I have it and I really would like to mix this great hack made by nicksaunders ant the others with the code I made here... I know it's possible but my knowledge in vBB is not that big that I can do it myself...
Anyway, here's the code:
PHP Code:
$intrid = $thread[threadid];
$intrinfo = $DB_site->fetch_array($DB_site->query("SELECT pagetext FROM post WHERE threadid = '$intrid' ORDER BY dateline DESC LIMIT 1"));
if (strlen($intrinfo[pagetext]) > 100) {
$intrpreview = substr($intrinfo[pagetext], 0, 100) . "...";
} else {
$intrpreview = $intrinfo[pagetext];
}
$intrpreview = htmlspecialchars($intrpreview);
$intrpreview = preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $intrpreview);
This code should go right after
PHP Code:
while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
in forumdisplay.php and then u can use $intrpreview anywhere as your table attribute (same as in this original hack)
If anyone can help me, please do so I would really appreciate it Thanx again!
The hack works just fine. One hint, if a bunch of people have installed it and run it and it doesn't work for you, the problem isn't with the hack, it's with your installation.
But, very nice hack, I was trying to do something like this awhile back, but, it wasn't working, could take random posts from a thread and display those instead of the first post, that was annoying.. lol
I've encountered a very nasty problem that a member discovered, and exploited. It allows a member to post any image whatsoever on the forumhome (in our case it was a highly disturbing one) and I would like to know how to fix it. If someone can help me with a fix, I will share the code with you. I've disabled thread preview in the meantime.
03-18-03 at 10:19 AM drumsy said this in Post #148 I've encountered a very nasty problem that a member discovered, and exploited. It allows a member to post any image whatsoever on the forumhome (in our case it was a highly disturbing one) and I would like to know how to fix it. If someone can help me with a fix, I will share the code with you. I've disabled thread preview in the meantime.
Thanks to N!ck for the support and the solution. The following is the fix for this bug as related by N!ck via PM: