XF 1.5 Smallest possible blank forums page for refreshing the sessions

Triops

Well-known member
How do I generate / build a totally blank (or smallest possible) forums page (best would be without header, footer and any content), which refreshes the session time when a user loads that page?

We use such a vBulletin page to embed it within external applications (such as MediaWiki) as 1x1 px iframe, to refresh login status / session in forums.
I now would need the same for Xenforo 1.5

Thanks for any hint!
 
If you want a true, empty or reasonable response, you'd likely need to custom develop an action to do that. Almost all of our HTML responses will have the page wrapper unless it's removed.

Incidentally though, there is one place where we do explicitly remove this and if you don't pass a value in, it does appear to render an empty page: index.php?editor/dialog
 
Thank you, @Mike . Although the domain.com/xenforo/index.php?editor/dialog delivers a blank page, it does not refresh the session of the user loading the page.

There was a tutoral/ressource here which described how to generate a page (for PHP use?!) in Xenforo, but I do not find the thread again. Probably it would have included header and footer, which would be too much overhead. Mmmmhh.
 
When you say "refresh the session", what do you mean? Because I'm hitting this dialog page and I can see the session expiry date changing, which would be refreshing the session (keeping it alive/triggering it) in my mind.
 
Mmmh, do we speak from the same page? Probably I am doing wrong.

The URL domain.com/xenforo/index.php?editor/dialog (in my case it is localhost:81/xenforo/index.php?editor/dialog or localhost:81/xenforo/?editor/dialog on a local XAMP instance with Apache listening at port 81) delivers a totally blank white page here (may be a system/PHP error page!).

Single call of ?editor ("The controller XenForo_ControllerPublic_Editor does not define an action called Index.") or ?dialog ("Route dialog/ could not be found.") deliver XF-error pages with header and footer, just tried that too ;)

BTW - http://localhost:81/xenforo/index.php?info/privacy and http://localhost:81/xenforo/info/privacy (from an addon "info") which uses the same syntax show correct xf-pages (but with header + footer, of course)

I take two browsers, Edge and Chrome, and login with two different users. One user/browser watches the current users "online", the other refreshes above mentioned page. In "online" the other user stays on his last valid page, minute for minute, even when refreshing the blank page several times. After 15 minutes he disappears from the online list. He should stay in "online" as long as the empty page is refreshed.

So, I assume I have a wrong URL or routing problem. The page you suggested should not show a total empty white page, I assume?

Sorry for taking your time for this and thank you for your help, @Mike!
 
Well what you were after and what I thought you were after are different. I thought you just wanted to maintain a session; the URL I gave would do that. Users showing online is a different thing and only generally gets triggered by actions that are designed to display a full page.

To do that, you'll need a different URL and there really isn't one that does this and does/displays nothing. If you're not happy to point it at an existing URL that you know will return something (but you throw away), you'd need to do some custom development.
 
Once again thank you @Mike! I wasn't sure, if loading the blank white page would do anything. I thought, because of fading of the online user list, that the user session would not be refreshed. In vBulletin it was "the same": keeping the session as well as staying visibly online.

We'll take a look on it, if the session is enough. I feel that I would like to keep the user online too, so we have to look further. Thank you!
 
Last edited:
Top Bottom