Jeff Fuqua
Well-known member
I really like this but wondered if there was a way to move the position of it up. I use CometChat which covers up the button. Thanks.
Personally I don't use it on mobile device excepts tablets. May be Matt Varone will update his js script (I don't have time to check it line by line to try to understand it)Wondering how to go about disabling this.. My footer breaks terribly when its shown on smaller devices using your plugin..
Im using the footer plugin provided here similar to the XF footer and its not even close to responsive. Actually i suppose a CSS trick would work to.
outside of that. This is by far the best investment ive made regarding my forum since we moved away from vB and found XF. Thanks a ton for providing this for us..
No worries.. Wrong thread wrong plugin my bad.. Sorry!Personally I don't use it on mobile device excepts tablets. May be Matt Varone will update his js script (I don't have time to check it line by line to try to understand it)
I really like this but wondered if there was a way to move the position of it up. I use CometChat which covers up the button. Thanks.
/*
|--------------------------------------------------------------------------
| UItoTop jQuery Plugin 1.2 by Matt Varone
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|
| Edit: This file has been 'updated' to make it work with XenForo
/ which is using an older Jquery version. The '.on()' command has
/ been replaced with .bind()
|--------------------------------------------------------------------------
*/
(function($){
$.fn.UItoTop = function(options)
{
var defaults = {
text: 'To Top',
min: 200,
inDelay:600,
outDelay:400,
containerID: 'toTop',
containerHoverID: 'toTopHover',
scrollSpeed: 1200,
easingType: 'linear'
},
settings = $.extend(defaults, options),
containerIDhash = '#' + settings.containerID,
containerHoverIDHash = '#'+settings.containerHoverID;
$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
var bottomVal = $(containerIDhash).css('bottom'); //Must be executed after append
$(containerIDhash).hide()
.bind('click.UItoTop',function() {
$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
return false;
})
.prepend('<span id="'+settings.containerHoverID+'"></span>')
.hover(function(){
$(containerHoverIDHash, this).stop().animate({ 'opacity': 1 }, 600, 'linear');
}, function() {
$(containerHoverIDHash, this).stop().animate({ 'opacity': 0 }, 700, 'linear');
}
);
$(window).scroll(function() {
var sd = $(window).scrollTop(),
$win = $(window),
bottomDistance = $(document).height() - ($win.height() + $win.scrollTop()),
bottomHeightTrigger = 140,
bottomAdjust = bottomHeightTrigger - bottomDistance;
if(typeof document.body.style.maxHeight === "undefined") {
$(containerIDhash).css({
'position': 'absolute',
'top': sd + $(window).height() - 50
});
}
if ( bottomDistance < bottomHeightTrigger ) {
$(containerIDhash).css({ 'bottom': bottomAdjust+'px' });
}
else {
$(containerIDhash).css({ 'bottom': bottomVal });
}
if ( sd > settings.min )
$(containerIDhash).fadeIn(settings.inDelay);
else
$(containerIDhash).fadeOut(settings.Outdelay);
});
};
})(jQuery);
Ignore this "alert" in this case unless you want to edit a xenforo sprite and adds in it the picture you are usingCedric - I ran a Google speed test and they brought back this as one of the things I could improve:
The following images served from wdwv.net should be combined into as few images as possible using CSS sprites.
http://domain/forum/styles/sedo/toTop/ui.totop_blue.png
I honestly don't know what this means, but I thought you might want to know. Trying to help out.
This addon is on Github here, feel free to contribute and improve it. Adding a new picture selection requires a very little code edit, so you will have no problem to study the code and extend itAny possibility of adding one more color?
To get it to work for now I just renamed it to the white filename and use "White" which gives me "Orange".
View attachment 44414View attachment 44416
Thanks... already have modified the xml file (not using it yet) and am perusing the rest of it. Just didn't want to start hacking on it without knowing for sure it would be OK. Only problem I see is if I auto-update I'll have to do 'em over again.This addon is on Github here, feel free to contribute and improve it. Adding a new picture selection requires a very little code edit, so you will have no problem to study the code and extend it
Don't be afraid to send me a pull request on github, so I can use your code to update this addon with your new picture.Thanks... already have modified the xml file (not using it yet) and am perusing the rest of it. Just didn't want to start hacking on it without knowing for sure it would be OK. Only problem I see is if I auto-update I'll have to do 'em over again.
And now it's done with Orange as a selectable color. Thanks! Took all of 2 minutes to edit and get it to work - you were right, no need to be a code monkey to fix it.
I LIKE addons like this, makes it simple enough even a caveman like me can do it.
New picture(s)... I added a standard orange and then a darker burnt orange. Not familiar with github so will start doing some research.Don't be afraid to send me a pull request on github, so I can use your code to update this addon with your new picture.
OK... I "think" I submitted a pull request. Forked your project, made the edits locally, synced them to my fork and then submitted a pull request. Right process?Don't be afraid to send me a pull request on github, so I can use your code to update this addon with your new picture.
Yes, right process. I've received the fork notification yesterday, but after having spending a day to try to improve the Redactor code insertion inside the DOM and failing to do it properly, I was quite upset. But don't worry, I got your fork, I will share it for sure.OK... I "think" I submitted a pull request. Forked your project, made the edits locally, synced them to my fork and then submitted a pull request. Right process?
Yeah!!!! I figured it out right on the first attempt them. Amazing what you can do when the little marbles are shook up in the bowl on top of ones shoulders.Yes, right process. I've received the fork notification yesterday, but after having spending a day to try to improve the Redactor code insertion inside the DOM and failing to do it properly, I was quite upset. But don't worry, I got your fork, I will share it for sure.
Maybe you should try asking for the original images? Although I'm not sure if they have it. Since there is a big quality difference if you're editing the compressed image. For example, the image lost its gradient, colour is spilling out onto the border, arrows are distorted, etc.Any possibility of adding one more color?
To get it to work for now I just renamed it to the white filename and use "White" which gives me "Orange".
View attachment 44414View attachment 44416
I will check thisMaybe you should try asking for the original images? Although I'm not sure if they have it. Since there is a big quality difference if you're editing the compressed image. For example, the image lost its gradient, colour is spilling out onto the border, arrows are distorted, etc.
If I'm not mistaken, the .PSD's in the extra's folder are just that - and Gimp won't (as far as I can figure out so far) allow much to be done with a .PSD. I'm not a graphics artist by far, and just downloaded the trial version of PhotoShop - but I'm not going out and paying $399 for something I will use once in a blue moon - and never for any income related purposes.Maybe you should try asking for the original images? Although I'm not sure if they have it. Since there is a big quality difference if you're editing the compressed image. For example, the image lost its gradient, colour is spilling out onto the border, arrows are distorted, etc.
Nooo, it doesn't matter. Come one, keep your fork.If I'm not mistaken, the .PSD's in the extra's folder are just that - and Gimp won't (as far as I can figure out so far) allow much to be done with a .PSD. I'm not a graphics artist by far, and just downloaded the trial version of PhotoShop - but I'm not going out and paying $399 for something I will use once in a blue moon - and never for any income related purposes.
Cedric, just disregard...As soon as I can figure out how to delete the fork I'm removing it.
Fork is deleted.
Naw... once I can get the graphics portion of it down I may fork it again, but I don't want to be one that contributes to lower the quality of the add on. If I can figure out PhotoShop before the 30 day trial is over then I'll kick it back in.Nooo, it doesn't matter. Come one, keep your fork.
We use essential cookies to make this site work, and optional cookies to enhance your experience.