vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Improved Thread Preview Hack (https://vborg.vbsupport.ru/showthread.php?t=35645)

Tungsten 01-21-2003 01:46 PM

Aside from rolling back the PHP file and template changes, what else do I need to do to uninstall this hack? It was causing MySQL errors. :(

I did drop the 'firstpostid' field from the forum db table, but I see that it appended that field into the index as well. How do I revert that change?

wooolF[RM] 02-14-2003 01:46 PM

]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], 0100) . "...";
    } 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!

maxxxxxx 02-19-2003 12:14 PM

I want also this nice hack, but nothing works...

I have all installed and also run the install file from the forum directory not from admin directory.

I have the 2.3.0 if vb

cu and thx
maxxxxxx

amykhar 02-20-2003 01:36 PM

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.

Amy

Silenced Soul 02-22-2003 02:57 AM

beautiful hack, my only thing was that in the threadpreview-search it says to replace:
PHP Code:

In searchresultbit_threadonly

Find
:
<
a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwords">$searchresult[threadtitle]</a>

Replace with:
<
a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwordstitle="fppreview">$searchresult[threadtitle]</a

when you should replace it with
PHP Code:

<a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwordstitle="$fppreview">$searchresult[threadtitle]</a

By the way, this'll fix those people having problems with the search threadpreview not working, assuming all that is showing up is the fppreview.

N!ck 02-22-2003 03:18 AM

Yeah, that's been like taht forever, but I'm too lazy to fix it. :D

Silenced Soul 02-22-2003 05:08 AM

lol, I know all about that... :p

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

Nice work.

drumsy 03-18-2003 01:19 PM

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.

N!ck 03-19-2003 02:57 AM

:-/ Could you PM me with more details? I'd like to help fix it.

drumsy 03-27-2003 01:15 PM

Quote:

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:

In forumdisplay.php, find:
Code:

    $fppreview=preg_replace("/\[[^\]]*\]/","",$fppreview);
    $fppreview=str_replace("\"","",$fppreview);

and add this after it:
Code:

    $fppreview=str_replace("<","&lt;",$fppreview);
    $fppreview=str_replace(">","&gt;",$fppreview);

Again, thanks to N!ck for this support! https://vborg.vbsupport.ru/external/2003/03/1.gif


All times are GMT. The time now is 11:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01227 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete