mdlax1
07-Jan-2004, 04:53 PM
a mod that lets you preview a post in the index before clicking for 1.2/1.3 some busted ones came out a while back.. any info on this?
Can't Find A Good One.. - NBS |
|
|
View Full Version : Can't Find A Good One.. mdlax1 07-Jan-2004, 04:53 PM a mod that lets you preview a post in the index before clicking for 1.2/1.3 some busted ones came out a while back.. any info on this? mdlax1 09-Jan-2004, 04:54 PM i can hear them crickets baby MikeC 09-Jan-2004, 05:20 PM so do i LMAO im not sure what type of hack you mean though Ash 09-Jan-2004, 05:47 PM tried invisionhacks.com? :P mdlax1 09-Jan-2004, 09:26 PM /---------------------------------------------------/ // Show First 300 Characters of The Topic (now vBulletin style) // Written by ChrisK (webmaster@isubars.com) // // When a person hovers over the topic url // it will show 1st 300 charecters of the post /---------------------------------------------------/ /-----------------------------------------/ /Step 1: Open sources/Forums.php and find /-----------------------------------------/ $topic['start_date'] = $std->get_date( $topic['start_date'], 'LONG' ); ----------------------------------------- add under: ******PAY ATTENTION TO THE AREAS THAT SAY [ ], YOU NEED TO ADD YOUR INFO TO THOSE SPOTS THERE ARE 3 SPOTS TO EDIT IN THIS SECTION******* ----------------------------------------- $link = mysql_connect("localhost", "mdlax1", "ERIc1616") or die("Could not connect"); mysql_select_db("isubars_forum"); $tquery = "SELECT post FROM ibf_posts WHERE topic_id={$topic['tid']} ORDER BY pid ASC LIMIT 1"; $tres = mysql_query($tquery); $tline = mysql_fetch_array($tres, MYSQL_ASSOC); $text = $tline['post']; $text = preg_replace('/<a href=\'(.*?)\'>(.*?)<\/a>/', '\\1', $text); $text = preg_replace('/\' target=\'_blank/', '', $text); $text = preg_replace('/<img src=\'(.*?)\'>/', '\\1', $text); $text = preg_replace('/<img src=\'(.*?)\' \/>/', '\\1', $text); $text = preg_replace('/http:\/\/www.[yourdomain].com\/forums\/html\/emoticons(.*?)alt=(.*?).gif/', '', $text); $text = preg_replace('/\' border=\'0\' alt=\'user posted image/', '', $text); $text = preg_replace('/\' \/>/', '', $text); $text = preg_replace('/<span style=\'(.*?)\'>/', '', $text); $text = preg_replace('/<span style=\'(.*?)\' \/>/', '', $text); $text = preg_replace('/<\/span>/', '', $text); $text = preg_replace('/<!--emo&/', '', $text); $text = preg_replace('/<!--endemo-->/', '', $text); $text = preg_replace('/-->/', '', $text); $text = preg_replace('/<u>(.*?)<\/u>/', '\\1', $text); $text = preg_replace('/<i>(.*?)<\/i>/', '\\1', $text); $text = preg_replace('/<b>(.*?)<\/b>/', '\\1', $text); $text = preg_replace('/<br>/', "\n", $text); $maxTextLenght=300; $aspace=" "; if(strlen($text) > $maxTextLenght ) { $text = substr(trim($text),0,$maxTextLenght); $text = substr($text,0,strlen($text)-strpos(strrev($text),$aspace)); $text = $text.'...'; } ----------------------------------------- then find: ----------------------------------------- return $p_end . $this->html->RenderRow( $topic ); ----------------------------------------- replace that with: ----------------------------------------- return $p_end . $this->html->RenderRow( $topic, $text ); /-----------------------------------------/ /Close sources/Forums.php /-----------------------------------------/ /-----------------------------------------/ /Step 2: Open Skin/s*/skin_forum.php and find /-----------------------------------------/ <a href="{$ibforums->base_url}showtopic={$data['tid']}" title="{$ibforums->lang['topic_started_on']} {$data['start_date']}">{$data['title']}</a> ----------------------------------------- replace that with: ----------------------------------------- <a href="{$ibforums->base_url}showtopic={$data['tid']}" title="{$text}">{$data['title']}</a> ----------------------------------------- then find: ----------------------------------------- function RenderRow($data) { ----------------------------------------- replace that with: ----------------------------------------- function RenderRow($data, $text) { /-----------------------------------------/ /Close Skin/s*/skin_forum.php.php /-----------------------------------------/ /-----------------------------------------/ /ALL DONE !! /-----------------------------------------/ :) MikeC 09-Jan-2004, 10:03 PM ahh right so doesnt that work? mdlax1 10-Jan-2004, 02:27 AM sure does.. i did it on a 1.2 board im pretty sure it works on a 1.3 doesn't work on stickies/pinned though im gonna see if i can tackle that www.civicland.com/forums is a example (you have to click on one of the parent forums first get to a topics index |