The Joomla! Forum ™





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
PostPosted: Sat Sep 06, 2008 4:38 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 14, 2007 4:26 pm
Posts: 31
Hello all,
I'm sorry to open a topic on something that has been written quite a bit on already. However, I'm not finding the answer I'm looking for.

What I'm trying to do:
I need to have a 'splash page' for an update that I'm doing on a client's site. From the splash page, he wants it to link to a specific page, like a table of contents. Easy, right?

What I've done:

- I modified .htaccess file to include the following: 'directoryIndex index.html index.php'
- Now I have the desired effect. I have my splash page that goes to the contents page I created. Groovy!

The problem:
- Well I couldn't get too happy, could I? Well, the problem is that the home menu item goes back to the splash page. I don't want that. The only time a visitor should see the splash page is when they first arrive at the site.

Troubleshooting:
- I tried replacing home link with another. I used 'link to url' and input http://dev.collegewebmagazine.com/index.php, however, the link just goes to the spash page.
- I tried unpublishing the Home menu item... That didn't work either.

What I don't want to do is have to create a sub-directory for the main site to 'live' within in order to have this splash page work properly. I've done some reading around and searching and haven't found the topic that offers the solution I'm looking for. What am I looking for? Splash page that links to main contents page with a 'Home' link that doesn't link back to the splash page, but back to the main contents page.

I'm using joomla 1.0.15. So if there are any suggestions or even extensions that could help, please let me know.

Thank you,
Alex


Top
 Profile  
 
PostPosted: Mon Sep 08, 2008 5:42 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 14, 2007 4:26 pm
Posts: 31
No one, huh?

Well, I do have a work around. While not a definitive answer, if you use the SH404SEF extensionhttp://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,2380/Itemid,35/ you can configure a 'forced' home page that will come up when someone clicks your home link from your navigation menu.

So that resolves my issue, essentially.


Top
 Profile  
 
PostPosted: Thu Jan 08, 2009 7:11 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jan 08, 2009 7:03 am
Posts: 1
I do have an idea and it might work...

If you make a splash.php and check to see what the referrer was. If it was your site, push back to index.php, otherwise run the splash code.

Taken from http://ca.php.net/manual/en/reserved.variables.server.php
Quote:
'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.


Otherwise you're going to have to get pretty creative to solve that pickle.


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 10:26 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Aug 26, 2008 7:48 pm
Posts: 54
Your solution can be found here:
http://forum.joomla.org/viewtopic.php?f=428&t=289658&p=1290030
greetings,
Piet


Top
 Profile  
 
PostPosted: Mon Apr 27, 2009 6:09 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 27, 2009 5:58 am
Posts: 6
Hi,

Here is the solution for it:

Your splash page index.html should be on the same root where your index.php have now open index.php page and add this line of code in the top of index.php just after <?php

//////////////////Code Help From Outdoorbranding.com//////////////////////////////

if(isset($_SERVER["HTTP_REFERER"]) && $_SERVER["HTTP_REFERER"]!=""){ } else { header("Location:index.html"); }

//////////////////Code Help From Outdoorbranding.com//////////////////////////////


Thats it ;)

Try it and it is working fine ;)

If you have some other questions or query do let me know i will provide the solution ;)


Muhammed Ameen


Last edited by ooffick on Tue Nov 24, 2009 1:51 pm, edited 1 time in total.
Mod Note: Removed manual Signature. Please read the Forum rules for details.


Top
 Profile  
 
PostPosted: Tue Oct 27, 2009 11:48 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Jul 16, 2008 4:42 pm
Posts: 164
Location: Columbus, Ohio
When I updated my template with the above code I get:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/site/html/templates/rt_solarsentinel_j15/index.php on line 8

_________________
RomansTwelve.net - Total Web Consulting
Joomla Hidden Secrets http://www.slideshare.net/brianteeman/hidden-joomla-secrets


Top
 Profile  
 
PostPosted: Tue Nov 24, 2009 1:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 27, 2009 5:58 am
Posts: 6
Dear Friend,
Below are the details to use the splash page:
you will need to copy your index.html file in which you will use swf file for splash page in the root of the joomla site directory. and then open the index.php file of the joomla site root directory and here are the steps below to modify it :

-Copy your index.html file on the root of the joomla site in which you will use your flash .swf file.

-Now open the index.php file of the joomla site root and add the following code at the top just after the " <?php "

//////////////////Code Help From Outdoorbranding.com//////////////////////////////

if(isset($_SERVER["HTTP_REFERER"]) && $_SERVER["HTTP_REFERER"]!=”"){ } else { header(”Location:index.html”); }

//////////////////Code Help From Outdoorbranding.com//////////////////////////////
Thats it.

Hopefully it will work if not then send me your index.php file i will update it and will send back it to you.


Top
 Profile  
 
PostPosted: Thu Feb 11, 2010 7:11 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed May 06, 2009 7:34 pm
Posts: 7
ameenkhan wrote:
Dear Friend,
Below are the details to use the splash page:
you will need to copy your index.html file in which you will use swf file for splash page in the root of the joomla site directory. and then open the index.php file of the joomla site root directory and here are the steps below to modify it :

-Copy your index.html file on the root of the joomla site in which you will use your flash .swf file.

-Now open the index.php file of the joomla site root and add the following code at the top just after the " <?php "

//////////////////Code Help From Outdoorbranding.com//////////////////////////////

if(isset($_SERVER["HTTP_REFERER"]) && $_SERVER["HTTP_REFERER"]!=”"){ } else { header(”Location:index.html”); }

//////////////////Code Help From Outdoorbranding.com//////////////////////////////
Thats it.

Hopefully it will work if not then send me your index.php file i will update it and will send back it to you.


I get an error message as well.


Parse error: syntax error, unexpected '"' in /Applications/MAMP/htdocs/index.php on line 6

Still looking for a solution here...


Top
 Profile  
 
PostPosted: Thu Feb 11, 2010 11:35 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Jul 16, 2008 4:42 pm
Posts: 164
Location: Columbus, Ohio
viewtopic.php?f=428&t=289658&p=1290030

Here is the fix, and the solution for this problem. forget the rest. it just doesnt seem to work with the latest Joomla

_________________
RomansTwelve.net - Total Web Consulting
Joomla Hidden Secrets http://www.slideshare.net/brianteeman/hidden-joomla-secrets


Top
 Profile  
 
PostPosted: Mon Jan 10, 2011 1:31 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jan 10, 2011 1:23 am
Posts: 2
In the suggested solution the splash screen will show even if the user goes straight to the page inside the joomla site. The code checks only for empty or non-existent referrer. It would be much better if the splash page is showed only if the user comes to the front page of the site either by typing it in the browser (empty referrer) or by clicking on the link form other site or search engine. I suggest something like that:

if (($_SERVER['REQUEST_URI'] == "/") && !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) {
header("Location:index.html");
}

The splash page is assumed to be index.html in the root of the joomla site.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group