So you want to show your phpWebSite themes to anonymous viewers as well? That's not possible out of the box, as Layout, the module which is responsible for Themes, supports only logged in users. Well, it's possible now, some hours hacking later...
Where to look | |
---|---|
Actually, the process as such is rather straight forward. First, we modify the dispatcher of layout. In index.php (found in mod/layout), add something like the following near the very top, after the nullification of content and title. 1 if(isset($_REQUEST["theme"])) { yes, you are limited to the themes you enter here. And that's good that way, as I don't check, wether a chosen Theme exists. And: You can limit the themes that are available to anonymous users. By the way, you could change $_REQUEST to $_POST, if you were to support only submitted post-forms. Or to $_GET, if you were to support only get parameters, the one that can follow a url with ?parameter=value. |
Our workhorse | |
---|---|
The dispatcher of course delegates the work to someone else. To the overrideLayout() method, which is still to be written. Let's include it somewhere in Layout.php, preferrably above initializeLayout(). In fact, initializeLayout() does "more of the same", a couple of checks for example. I've skipped them, you might want to include them. 1 /** |
Comments - Make a comment |
The comments are owned by the poster. We are not responsible for its content.
|
AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki
Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread
Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread
Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread