SimplePortal
Customization => Custom Coding => Topic started by: bahgheera on December 02, 2013, 09:38:21 PM
-
Hi there, I have a question about modifying the shoutbox code. On my forum, The FLipside (http://www.theflipsideforum.com), I am attempting to implement a javascript scrollbar in the shoutbox called jScroll (http://jscrollpane.kelvinluck.com/index.html), and it works and looks nice except for the fact that whenever the content of .shoutbox_list_compact changes, the scrollbar needs to be reinitialized. There are api calls and such for just this occasion, only I don't know where I should insert them in the shoutbox code. It seems they belong in sp_submit_shout, sp_delete_shout and sp_refresh_shout. If I dump the bit of code there though I get random results.
If anyone has some insight on this I'd sure appreciate it.
-
Woops, just realized there is a more appropriate board for this. Please feel free to move it, mods.
-
It turns out that you need to replace the AJAX calls to use their API methods to get it working. More details here:
http://jscrollpane.kelvinluck.com/ajax.html
That's the best advice I can provide here.
-
Bah... well, thanks for the reply at any rate. That was one of the first things I tried. What happens is that I get random results - with that method, when I delete a shout the shoutbox goes to a full page and I lost control over the height of the element containing the shouts so that I can't scroll all the way to the end.
I'll go with webkit scrollbars for now, but there's got to be a way to do this.
Thanks again.
-
It certainly is doable. Just requires a lot more effort than it's worth, at least in my case. Sorry.