OSSN Ad Space scroll control like Facebook

Daniel DeSouza Posted in Component Development 7 years ago

I noticed on Facebook, that both the extreme right side and the left side of the page stops scrolling down when the content on those sides have stopped, while still allowing the news feed to freely continue scrolling down, this effect keeps the page looking full instead of seeing empty columns on the left and right side of the screen. This will also help the last ad to constantly be seen by the site users. On the OSSN Site, all 3 columns seem to move together, so when content on the 2 end sides stop, the page looks empty.

Can anyone show me how to get this done and where exactly should i put this new code.

Replies
German Michael Zülsdorff Replied 7 years ago

Pardon?
The component has not been removed - so which other way of sharing are you expecting?

ng Adebola Aderinto Replied 7 years ago

If you get this working can you share the code with us please?

German Michael Zülsdorff Replied 7 years ago

Okay,
there's a component available now to keep your ads fixed.
https://www.opensource-socialnetwork.org/component/view/2686

Enjoy.

German Michael Zülsdorff Replied 7 years ago

Daniel,
this can't be too complicated ...
You would just need a little javascript and math to calculate the height of the right column, the browser's window size and the scrollbar position.
If your window is larger than the ad(s), simply fix them.
If your window is smaller, then adsize - windowsize gives the number of pixels allowed to scroll.
That's it.
And: Don't put your code "somewhere", make it part of a component.

I'll try something like that on my developer site https://newblue.ongolito.net ...

us Mac Manson Replied 7 years ago

If you get this working can you share the code with us please?