Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
WhosOnline: Whole Forum in Sidebar (Solved)
When I enable this plugin, I get the entire forum 'duplicated' over in the right hand column where I expect to see the list of Who's Online. It's obviously really ugly, making the plugin sadly unusable.
I tested this in both Chrome and IE8 with the same results.
I tested this in both Chrome and IE8 with the same results.
0
Comments
Could this be an issue with not using friendly urls? That might explain why the sidebar gets 'redirected' to the main messagelist.
It seems that the ob_start() and ob_get_contents() aren't quite doing what they should. It appears that for some reason that I can't figure out, ob_get_contents() is retrieving the entire page rather than just the bit of code above it like I would expect.
Any idea why the id would cause the entire page to repaint? Should I be looking in the js for the answer to this question?
Further experimentation shows that the js is the problem. It is requesting the url WEB_ROOT/plugin/imonline which isn't a valid path, hence being redirected to the main site and having it print in the sidebar.
Question is, what url is it *supposed* to be reaching for in order for the ajax to work correctly?
The javascript very clearly calls out to that URL. Perhaps it is supposed to be created somehow? Could it be a permission issue? A config issue?
Does it rely on rewrite rules at all? I don't have Friendly URLs turned on and I'm using Lighttpd instead of Apache.
It just seems like this should be a straightforward issue. That URL either exists for the javascript or it doesn't. I just have to figure out why it doesn't and what it is that I need to do to make that URL resolve. Could it be a Vanilla Route that should be created but isn't?
Can you verify that the javascript file that you have on your working copy is the same as what's in the repository to download from the site?
Fixed AJAX issues that broke functionality when RewriteUrls was disabled
Vanilla Forums COO [GitHub, Twitter, About.me]
Now that I have a better understanding of what's going on, I was able to figure out that all I had to do to fix the javascript is to change line 4 to:
var url = gdn.combinePaths(webRoot, '/index.php?p=/plugin/imonline');
I'm sure it works fine with friendly URLs. Unfortunately, none of the Lighttpd rewrite rules that I've found have fully worked and I've had no luck writing my own. It mostly works, but the pop-ups (like change picture) say page not found when I turn them on. /shrug
At any rate, if anyone else is in my boat, that's the solution. It's actually quite obvious now that I understand friendly urls better. Ideally, this addon would honor the friendly URLs setting somehow.
Url('plugin/imonline');
That call will generate the appropriate link based on your RewriteUrls setting.
Vanilla Forums COO [GitHub, Twitter, About.me]
Until that time, it seems like it would be good practice for Plugin developers to always reference the unfriendly URL in ajax. If friendly URLs are enabled, the request will be rewritten anyway.
Go nuts
Vanilla Forums COO [GitHub, Twitter, About.me]
Vanilla: 2.0.17.10
WhosOnline: 1.3
When the page initially loads you can see a "who's online" section, but then the whole forum page is loaded into the sidebar, which then loads the whole forum page into its sidebar, and so and so on, creating a recursive loop.
It might be missing the Foot asset.
http://vanillaforums.org/addon/527-vanillaforums.org-old-blue
tags in my theme's .tpl files contained an {asset name="Foot"} so it looks something like this:
... {asset name="Foot"} ...
And that fixed it, without needing to use Lykaon's modification (which caused other problems for me).