Skip to main content

TR Memescape

  • TalkRational: Do you have to allow so much swearing and name calling on your website? Is it really necessary? I came by this web site by asking a Bargain Hunt question and was surprised that such a family, morning TV programme has cause for such mindless profanities. It makes one ask why watch the programme then?

Topic: Zombie forum is a 404 / Current forum upgrade discussion (Read 930 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • ravenscape
  • Administrator
  • Triggered
Re: Zombie forum is a 404 / Current forum upgrade discussion
Reply #50

  • ravenscape
  • Administrator
  • Triggered
Re: Zombie forum is a 404 / Current forum upgrade discussion
Reply #51
Oi Raven. There's a setting for the embedding of twits javascript which loads the buggers before you get to them, and after testing it on local I think it's much less annoying than the default behaviour.

The "Setting Threshold" section on this page describes it: http://www.appelsiini.net/projects/lazyload

Code change for the Elk file (sauces/subs/TwitterEmbedder.integrate.php) is:

Code: (Find) [Select]
		if (self::$load_js === true)
{
loadJavascriptFile('twitter_embed.jquery.js', array('defer' => true));
addInlineJavascript('
$(document).ready(function() {
$(".twitter_embed").lazyload();
});', true);
self::$load_js = false;
}
Code: (Replace) [Select]
		if (self::$load_js === true)
{
loadJavascriptFile('twitter_embed.jquery.js', array('defer' => true));
addInlineJavascript('
$(document).ready(function() {
$(".twitter_embed").lazyload({
threshold : 800
});
});', true);
self::$load_js = false;
}
That loads up the twittery 800 px before you get to it, which is enough to have it sitting there happily by the time you want it, without making all the twits on the entire page load all at once.

It's not a perfect solution, because if you go straight to a post infested with twits it will still do the jumpy in yer face loading shiz, but it'll make a lot of them far less annoying.
 

done!

  • osmanthus
  • Administrator
  • Fingerer of piglets
Re: Zombie forum is a 404 / Current forum upgrade discussion
Reply #52
Bonzer. :parrot:
Truth is out of style