MouseOver: topic preview!

Started by A.M.A, October 15, 2004, 02:33:24 PM

Previous topic - Next topic

perro88

#100
oh, sorry, I made a mistake, it´s working perfect, thanks for the mod. How I can change the style of the preview?


icon

i really like this one,
help me so that it would work on 1.1.3 :'(

icon

Quote from: [Unknown] on October 15, 2004, 03:55:32 PM
Bloody.... grr... find, MessageIndex.php:

$row['firstBody'] = substr($row['firstBody'], 128) . '...';
$row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('<br />' => '')));
if (strlen($row['lastBody']) > 128)
$row['lastBody'] = substr($row['lastBody'], 128) . '...';


Replace:

$row['firstBody'] = substr($row['firstBody'], 0, 128) . '...';
$row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('<br />' => '')));
if (strlen($row['lastBody']) > 128)
$row['lastBody'] = substr($row['lastBody'], 0, 128) . '...';


Will be resolved in the next release.

-[Unknown]

im using 1.1.3, and i cant find this code, even at my default theme :(

kai920

this mod works great, but does anyone know how to style the hover tooltip via CSS? It's not showing all the characters (see below:)



avf

love this one !

Does it work on 1.1.5 ?
thanks
avf

ddabcd277

Hello,

Don't like to write in very old topics but I love the idea discussed here.  :)

Can someone explain how preview topic can be achived in SMF 2.0.1.?

Many Thanks,

Douglas

Okay, I was looking to get this implemented on my own forums... and figured out how to do this.  This works for both 2.0.1 AND 2.0.2.

First, in index.template.php (must be done for each theme folder separately), find
$settings['message_index_preview'] and set false to true.

Next, in MessageIndex.template.php (must be done for each theme folder that has this file), find
<span id="msg_' . $topic['first_post']['id'] . '">

Change it to
<span id="msg_' . $topic['first_post']['id'] . '" title="', $topic['first_post']['preview'], '">

Congrats, you now have this enabled for your SMF 2.0.1 / 2.0.2 forums!
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

ForumACK

Quote from: Douglas on August 19, 2012, 10:37:37 AM
Okay, I was looking to get this implemented on my own forums... and figured out how to do this.  This works for both 2.0.1 AND 2.0.2.

First, in index.template.php (must be done for each theme folder separately), find
$settings['message_index_preview'] and set false to true.

Next, in MessageIndex.template.php (must be done for each theme folder that has this file), find
<span id="msg_' . $topic['first_post']['id'] . '">

Change it to
<span id="msg_' . $topic['first_post']['id'] . '" title="', $topic['first_post']['preview'], '">

Congrats, you now have this enabled for your SMF 2.0.1 / 2.0.2 forums!

thanks!

rallepralle

Quote from: Douglas on August 19, 2012, 10:37:37 AM
Okay, I was looking to get this implemented on my own forums... and figured out how to do this.  This works for both 2.0.1 AND 2.0.2.

First, in index.template.php (must be done for each theme folder separately), find
$settings['message_index_preview'] and set false to true.

Next, in MessageIndex.template.php (must be done for each theme folder that has this file), find
<span id="msg_' . $topic['first_post']['id'] . '">

Change it to
<span id="msg_' . $topic['first_post']['id'] . '" title="', $topic['first_post']['preview'], '">

Congrats, you now have this enabled for your SMF 2.0.1 / 2.0.2 forums!
Thanks it works!

Does anyone know how to display the preview in a bigger window with all elements in the thread displayed, i.e. not only text but also pictures?

Kindred

that is getting into some potential use of "real" system resources....   and defeats the purposed of a "preview", IMO.   The preview is just that... a teaser. preview - not the whole message.   Click on the message and open it up if you want to see the whole thing.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Douglas

Bumping an OLD topic... I had forgotten that I posted step by step instructions on this and needed this again today.

ROCK ON! This still works through SMF 2.0.8, guys. :D
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Hj Ahmad Rasyid Hj Ismail

Nice tips Douglas. I will have a go on this soon.

Advertisement: