News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

The Way Preview Works

Started by billowingwillows, March 23, 2012, 07:47:03 AM

Previous topic - Next topic

billowingwillows

I've posted on this in the past and didn't get any replies, but I saw something today that stirred my interest once more.

I noticed that, when sending a PM to someone on this forum, if you click preview, it will reload the page with the preview on the top. However, when you are replying to a thread, and you click preview, it loads the preview above the box but doesn't move the screen up as well. So, unless you know what to expect, you wonder why nothing happened...

Is there an easy way to code it in so that the way the preview of a private message works can be used for post previews as well?
Thanks for any input! :)

kat

That's a damned good point!

I've always wondered about that, too.

billowingwillows

You've been a fervent supporter of my cause since I first mentioned this. :)
Maybe someone with some expertise will help us out a bit?  8)

kat

* K@ won't hold his breath.

Fingers crossed, though. :)



Antechinus

Hmm. Minor javascript wonkiness there. Move it to Bug Reports. :)

Sir Osis of Liver


That's interesting.  I've noticed it, too, but never paid much attention because I usually use quick reply.  Just tried it here, and it moves up to the preview on a long post, but not a short one.  How far it moves up depends on how many lines of text are typed in the reply box.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kat

Quote from: Antechinus on April 12, 2012, 02:59:16 PM
Hmm. Minor javascript wonkiness there. Move it to Bug Reports. :)

Seems like a plan...

emanuele

Just to understand: you would like that on posts preview after the preview is generated, the screen is moved at the top of the preview?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

emanuele

Quote from: Antechinus on April 12, 2012, 02:59:16 PM
Hmm. Minor javascript wonkiness there. Move it to Bug Reports. :)
You!
Stop moving things here! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Antechinus

I didn't move it. Wasn't me, guv. Blame t'other bloke. I'm innocent. :P

kat

Quote from: emanuele on April 12, 2012, 03:11:55 PM
Just to understand: you would like that on posts preview after the preview is generated, the screen is moved at the top of the preview?

Seems logical, Mannypoos. ;)

Sir Osis of Liver


It tries to do that, but if the post is only a couple of lines, the page doesn't move up far enough to show the preview.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

emanuele

Code (find) Select
if (typeof(smf_codeFix) != \'undefined\')


Code (add before) Select
location.hash = \'#\' + \'preview_section\';



That should work.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: