Topbar Focusizer Download 1.1.1

5.0
us Allon Prooit 3 years ago

A small component to keep the topbar in focus. Also includes javascript that is supposed to make the topbar scroll up when scrolling down and then return after scrolling back up.
Needing help to further develop it.
V1.0 - Initial release. Keeps the topbar constantly in focus.
V1.1 - Code corrected for the community to help develop it.
V1.1.1 - Code corrected by Rafael Amorim. Code needs to be adjusted for right side buttons in CSS.

Comments
German Dominik L Replied 1 month ago

on PC there are the icons for notifications etc missing and on smartphone the topbar is over the "Friends online" widget

on mobile:

enter image description here

enter image description here

on PC:

enter image description here

Can you maybe update?

maybe add if(ossn_isLoggedin()){ to your ossn_com.php so it is only active for logged in users, everything else makes no sense

German Dominik L Replied 1 month ago

Okay, it is not working with GoBlue and OSSN 7.6

Can you maybe update?

German Dominik L Replied 2 months ago

Hey, is it still working with GoBlue and OSSN 7.6?

Indonesian Arsalan Shah Replied 1 year ago

The theme you are using already have the same feature without this component.

us Allon Prooit Replied 1 year ago

Works good in OSSN 7.1!

German Dominik L Replied 2 years ago

Hey, I tested it with Awesome Theme on OSSN 6.4, but it's not working anymore.

Are you going to update?

us Allon Prooit Replied 2 years ago

Many thanks to Rafael Amorim for the code adjustment. I am still not able to make this component work for the White Theme I use but apparently it works on a number of other themes. Indeed, Facebook, built on OSSN 3.0 seems to be using this component now to make the upper bar scroll up when scrolling down and reappear when scrolling up. Please let me know if you have any success with this working for the White Theme and, if so please let me know what adjustments, if any, had to be made. Thanks!

Breton Rafael [redcrested.net] Replied 3 years ago

Allon

With propper free time, I looked at your code, same as Arsalan and Michael do with my code all the time :-)

First of all, put the code on GitHub, not only the zip file. It allows other developers to look at your code and easily point out where is needed some fix.

Second, it is helpful if any new changes in your component are an increment in version, such as 1.1.1 or beta-1, beta-2, etc. It allows users and developers to check the local version and decide if an update is a good decision.

Finnaly, I tested the component on 6.1 with goblue theme (default installation). CSS code works, but JS code
document.getElementById("topbar") don't call nothing, because the div has a topbar class, not an id. So, my sugestion is:

var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
  var currentScrollPos = window.pageYOffset;
  if (prevScrollpos > currentScrollPos) {
    $('.topbar').css('top','0px');
  } else {
    $('.topbar').css('top','-60px');
  }
  prevScrollpos = currentScrollPos;
}

This code solve the animation issues. Buttons and menu item at top right still need attention. Take a look on CSS.

I hope it helps.

Respectfully

us Allon Prooit Replied 3 years ago

Ok, I've uploaded a new V1.1 with some slight adjustments. I'm not getting any error messages now and hoping the community can help with the javascript code.

Component

Developer: Allon
License GPL v2
Type: Tools
Requires Ossn Version : 5.6
Latest Version: 1.1.1
Last Updated 3 years ago
Repository Url View Repository

Versions