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
us Allon Prooit Replied 3 years ago

It was taken from ImagesInMessage component. From the ossn_com.php file of it.

German Michael Zülsdorff Replied 3 years ago

" I gleaned that from another fully functional component..."
which one exactly?

us Allon Prooit Replied 3 years ago

Sorry Z Man, but the first version in my opinion needed to be a working version without bugs or error codes. So, I switched it out for the communities sake. Not going to have any version of any component I produce causing problems if I can help it. As for the change in the ossn_com.php file, I gleaned that from another fully functional component as a well working code snippet. The component still needs development to get it to function the way I want it. Right now it holds the topbar in focus, but will eventually have the topbar scroll up and away when you scroll down and present the topbar whenever you scroll up. This is a nice innovation to have for any OSSN installation and hope the community helps to make it happen.

German Michael Zülsdorff Replied 3 years ago

Hmm, I don't find it very helpful that you deleted the code I commented earlier today. My basic idea is always to let the whole community participate, because there's a good chance that others will make similar mistakes and can learn how to do it right this way.
Aside from that: releasing different code under the same version number is just a no-go.

Okay, but let's talk about

ossn_extend_view('js/ossn/site/head', 'js/topbarfocusizer');

in your latest code. How do you come up with a line like that? I mean, you won't find such an instruction anywhere else, that's why I'm a little surprised...

us Allon Prooit Replied 3 years ago

Sorry for any difficulties this little project of mine may have caused. I pulled out the <script></script> tags and adjusted the ossn_com.php file to read js/ossn/site/head instead of js/ossn.site and now the javascript errors are gone, and the chat, notification, and comment errors are gone. Does this make it work for OSSN 6.1?

German Michael Zülsdorff Replied 3 years ago

Yeah, that's a start!
And a good example which way some faulty code of one component may stop the code of other components from working. The side effect here: We can't comment anymore. :p

So, what's going wrong?
Pressing F12 and having a look at the Console tab gives an idea ...

enter image description here

Clicking that line 2976:1 will show some more details

enter image description here

Ok, then <script> is causing the problem?!?
Yes, because (you may have a look at the Network Tab first) Ossn doen't load each component's javascript individually, but is merging it to one script file. Now, that this file IS already recognized as Javascript, any additional <script></script> tags inside are not allowed / confusing the script interpreter.

Indonesian Arsalan Shah Replied 3 years ago

I get a lot of errors in JS after enabling it and the functions like post, comments, chat stopped working.

enter image description here

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