Topic: "jump.php" (page 1 of 1)

1
Author Post
Int3rface
groupmastergroupmaster
hey guys,
i need a load of help. ive started a new job, and this guy wants me to help code this piece of php involveing jump.php.
what this is, is when you click a link on a page, it simply opens the links website in the main frame, and leaves a frame at the top saying the original site, and the url is still the site i clicked the link from.
I really need help on this one. please get back to me on this one asap!
i need to understand the code and get some of the code.

int3rface
private message EMail
quangntenemy
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
I don't quite get it. Is the layout similar to linkgoogle cache?
private message EMail Website
Int3rface
groupmastergroupmaster
yer kind of
private message EMail
Int3rface
groupmastergroupmaster
The idea is pretty much exactly what i was talking about. Just the website we saw it on placed a section of code in a webpage called jump.php.
When a link was clicked it would open the page like. www.mysite.com/jump.php?id=1543 or something liek that. When it loaded it would bring up a new webpage in the frame in the middle exactly like that google page did.
I was wondering if anyone new how to code that scipt or could help me place it into a webpage allowing the webpage im working on to do it.
Thanx for your reply quang.

int3rface
private message EMail
quangntenemy
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
So php include is what u need :P
private message EMail Website
Int3rface
groupmastergroupmaster
in the words of grease: tell me more tell me more.
private message EMail
Int3rface
groupmastergroupmaster
ok finnaly found my sample.
go to:
www.thecheesegig.com, then at the top click on LINKS then if you scrole your cursor over one of the links and look at the url that page links to. it is somehting like: www.thecheesegig.com/jump.php?id=1356. Click the link and you will see the website open in a new frame whilst maintaining thecheesgig.com url. There is also a frame at the top of the page saying:
external link to "website" click here to remove frame. The cheesegig are not responsible for the content on externel website.
I need to know how to do that. Best source of knowledge on the internet. google (already tried) and hackers.

Thanx guys
Edited by Int3rface on 29.06.2006 13:49:31
private message EMail
Inferno
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
http://www.php.net/include
http://www.google.com/search?hl=en&q=frameset

The only two things you need.
private message
Gome
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
My address changes into the link. I know what you want, what i do not know is why you want it. Just for the record, this is for keeping the short url ALWAYS in the address bar, even without query.. I now reread all your posts and maybe you weren't looking for this.. anyway, i wrote it and you WILL read it :).

Anyway, if i where to make such a thing i think of something like:

When i click on an external link i want to open a new window whilst the address bar still contains the original short url.
Well one way which i am pretty sure of will work is to redirect the user when he clicks on a link to the original short url. So every external link is redirected to: "http://www.someshorturl.com".
The only problem you now have to solve it how to get the correct content in the window and howto keep the address bar the same whilst the user browses through the external page.

One thing you have to remember is that you have to adjust the index.php which is automatically loaded if you type in the "www.someshorturl.com". So in the index.php you have to "known" that the user clicked an external link. You cannot use GET variables since those will show-up in the address bar. Well what alternative do we have? POST indeed. Well using POST variables gives the user irritating refreshing problems, but if you think it's more worth to keep a short address, we will use POST. So everytime a user clicks on a link you have to submit some POST variables to the index.php which will then read them and say.. hey i need to open an external page.

Then the last problem is pretty easy to solve. You create a framed page when opening an external link, so the user can still browse the page without changing the address bar.

Hopefully you understand what direction this is going and how to make such a thing work. Just for the record i will add some example script, i didn't do any testing.. but it should be able to assist you in understand my long post.

QuoteQuote:

links.php
---
<script language="javascript">
function submit(url)
{
document.linkForm.url.value = url;
document.linkForm.submit();
}
</script>
<form name="linkForm" action="http://www.someshorturl.com" method="POST">
<input name="url" value="">
<input name="externallink" value="1">
</form>
<a onclick="submit('http://www.google.com')">http://www.google.com</a>

QuoteQuote:

index.php
---
if($_POST["externallink"] == "1")
{
echo "<frameset rows=\"10%,*\">";
echo "<frame name=\"top\" src=\"top.html\">";
echo "<frame name=\"external\" src=".$_POSTlinkhttp://.">";
echo "</frameset>";
}
else
{
//Normal page
}


Enjoy the show..
Mark

PS: where do you work? can i e-mail your boss or at least receive some payment? :) hehe.. just kidding.. where do you work?
Edited by Gome on 29.06.2006 14:24:26
private message
Int3rface
groupmastergroupmaster
small shop in a brittish town called ilminster. It's part time as im 14, but the other guys know jack-shit bout php. thought id find out for em
private message EMail

Topic: "jump.php" (page 1 of 1)

1