I'd like to have a separate home page with some HTML stuff show up when people visit the home page and they're logged out, is that possible, if so , how?
Maybe ExtraPpage or Custom Pages Plugin?
You could add the following code to the views/default.master.tpl file of your theme:
{if $User.SignedIn or isset($User.UserID)} <div>Welcome back!</div> {else} <div>Hi guest!</div> {/if}
The isset($User.UserID) is necessary due to $User.SignedIn not always being set for logged in users in Vanilla 2.2b1 - possibly a bug?
isset($User.UserID)
$User.SignedIn
This can also be done by changing the default controller for guests:
public function base_beforeDispatch_handler($sender) { $routes = &Gdn::router()->Routes; if (!Gdn::session()->isValid() && val('DefaultController', $routes)) { $routes['DefaultController']['Destination'] = 'GUEST ROUTE HERE'; } }
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Comments
Maybe ExtraPpage or Custom Pages Plugin?
You could add the following code to the views/default.master.tpl file of your theme:
The
isset($User.UserID)
is necessary due to$User.SignedIn
not always being set for logged in users in Vanilla 2.2b1 - possibly a bug?This can also be done by changing the default controller for guests:
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS