: loading : chuckiegg October 29, 2007, 02:17:39 AM hey there i must say what a great template you guys have created here just one thing i would like to change is to make the loading screen only happen on the home page is this possible ?
: Re: loading : mikek October 29, 2007, 08:05:41 AM Sure you can do that. First set the page loader to no in the template config, that will be the default setting and with the code below we'll over-write that setting for the homepage. You'll have to edit your index.php file and just above your opening <body> tag insert this:
<?php $domain = $_SERVER['HTTP_HOST']; $path = $_SERVER['SCRIPT_NAME']; $queryString = $_SERVER['QUERY_STRING']; $url = "http://" . $domain . $path . "?" . $queryString; $url2 = "http://" . $domain . $_SERVER['REQUEST_URI']; ?> <?php if ($url == "http://www.shape5.com/demo/game_vision/index.php?option=com_frontpage&Itemid=1" || $url == "http://www.shape5.com/demo/game_vision" || $url == "http://www.shape5.com/demo/game_vision/index.php?" || $url == "http://www.shape5.com/demo/game_vision/index.php" || $url2 == "http://www.shape5.com/demo/game_vision/") { ?> <?php $s5_loader = "yes"; ?> <?php } ?> I set it up for it to work on one of our demos. You'll need to replace the urls just like they are above with your own domain. It's basically just checking the url that the person is on. Because Joomla is very dynamic there are multiple options for the url to be when on the homepage, that is why there are several urls in the if statement. The last one is a default url that most websites hold and strip the files and just display folders, but doesn't always work. Anyway, I hope that's what you're looking for! : Re: loading : chuckiegg October 29, 2007, 08:38:58 AM cool tnxs
: Re: loading : chuckiegg October 29, 2007, 10:31:24 AM if i just put url indexp.php will it only work the frist time you come to the site ?
: Re: loading : mikek October 29, 2007, 11:14:51 AM No, you would need a custom cookie for that. To check to see if it was loaded before or not.
If you just did http://www.yoursite.com and http://www.yoursite.com/ You could probably get away with it though. |