Forum Support

Shape 5
March 28, 2024, 08:13:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: loading  (Read 799 times)
chuckiegg
Jr. Member
**
Offline Offline

Posts: 4



« on: 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 ?
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: 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!
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
chuckiegg
Jr. Member
**
Offline Offline

Posts: 4



« Reply #2 on: October 29, 2007, 08:38:58 AM »

cool tnxs
Logged
chuckiegg
Jr. Member
**
Offline Offline

Posts: 4



« Reply #3 on: 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 ?
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #4 on: 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.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.