Yet Another Splash Page Question...

For Joomla! 1.0 Coding related discussions.
yannibmbr
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon May 14, 2007 4:26 pm

Yet Another Splash Page Question...

Postby yannibmbr » Sat Sep 06, 2008 4:38 am

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

yannibmbr
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon May 14, 2007 4:26 pm

Re: Yet Another Splash Page Question...

Postby yannibmbr » Mon Sep 08, 2008 5:42 pm

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.

kephryn
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 08, 2009 7:03 am

Re: Yet Another Splash Page Question...

Postby kephryn » Thu Jan 08, 2009 7:11 am

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
'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.

micran
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue Aug 26, 2008 7:48 pm
Contact:

Re: Yet Another Splash Page Question...

Postby micran » Wed Mar 04, 2009 10:26 am

Your solution can be found here:
http://forum.joomla.org/viewtopic.php?f=428&t=289658&p=1290030
greetings,
Piet

ameenkhan
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Apr 27, 2009 5:58 am

Re: Yet Another Splash Page Question...

Postby ameenkhan » Mon Apr 27, 2009 6:09 am

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.
Reason: Mod Note: Removed manual Signature. Please read the Forum rules for details.

User avatar
JeremyRReger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 164
Joined: Wed Jul 16, 2008 4:42 pm
Location: Columbus, Ohio
Contact:

Re: Yet Another Splash Page Question...

Postby JeremyRReger » Tue Oct 27, 2009 11:48 pm

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

ameenkhan
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Apr 27, 2009 5:58 am

Re: Yet Another Splash Page Question...

Postby ameenkhan » Tue Nov 24, 2009 1:24 pm

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.

dysfunctional
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Wed May 06, 2009 7:34 pm

Re: Yet Another Splash Page Question...

Postby dysfunctional » Thu Feb 11, 2010 7:11 am

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...

User avatar
JeremyRReger
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 164
Joined: Wed Jul 16, 2008 4:42 pm
Location: Columbus, Ohio
Contact:

Re: Yet Another Splash Page Question...

Postby JeremyRReger » Thu Feb 11, 2010 11:35 am

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

Ruthenium
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jan 10, 2011 1:23 am

Re: Yet Another Splash Page Question...

Postby Ruthenium » Mon Jan 10, 2011 1:31 am

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.


Return to “Joomla! 1.0 Coding”

Who is online

Users browsing this forum: No registered users and 1 guest