redirector script for default template

Started by clashbot, April 28, 2009, 08:29:53 AM

Previous topic - Next topic

clashbot

Hi, Not sure how many people are familiar with the watered down version of the ingame browser of eve, but basically what I am looking for a is a page redirector so that if someone hits the forum from within the game, it would redirect to an external browser.

I've been told that the following script should work, but not sure which file I need to add it to, to make sure that it is checked before anything on the forum is loaded.

Also, if any of you are eve players and have gotten something like this to work, I'm open to suggestions.
I am not a code-junkie, and know just enough to be dangerous, that being said, I am not adverse to monkeying around with the code if I can get it to do what I want. heh

Thanks
<?php

if(eregi("EVE-minibrowser"$_SERVER['HTTP_USER_AGENT']))
{
   
header("location: http://example.com");
   die();
}
?>


oh, if you are not familiar with the eve in game browser, it uses a shellexec header to open an external browser.

such as
<a href="shellexec:http://www.example.com/forum/index.php">Please visit our forums out of game</a>

naturally I would prefer to do this in a header that would allow the same page to either load normally if already in an external browser, or open in external browser if in game.

tyty1234

You may put it in the index.php of your SMF forum.
At least that's one place it can go.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

clashbot

did sort of a hack job fix for it.

Using the code in the index, I have it redirecting to an html file that then displays a link back to the original file with the shellexec. it works, as in external browser doesn't parse the redirect, it goes right in, and in game it just uses the small html to call the external browser. It's not pretty, and I am sure it could probably be done strictly within the php, it does do what I wanted it to do.

tyty1234

My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.


tyty1234

If you require no further assistance, you can mark this thread as solved. :)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Advertisement: