How do you do this?

korfx04

Junior Member
Joined
Feb 27, 2009
Messages
153
Reaction score
85
When a user clicks the title of a post, it takes that user to that persons website to read the article. What i'm wanting to do is show like a header of some sort so that the user can easily go back to my site.
 
A back button, that's what I think you are referring to.

Code:
<a href="#" onClick="history.go(-1)">Back</a> 
<input type=button value="Back" onClick="history.go(-1)">
 
PHP:
<?
$previousLocation = $_SERVER['HTTP_REFERER'];
echo "<a href=\"$previousLocation\">Go back.</a>";
?>
 
Last edited:
Mate,

use Wordpress and it does the job done all!

it is wordpress letsallplaygames [dot] com

i just don't know what its called, but i don't think any of the suggestions is what i'm looking for i will do something in photoshop
 
Last edited:
Something like this
14622141.png


i'm wore out and i really cannot think of how to do this, i've seen stuff like this before and i cannot for the life of me think where. If you goto my website i listed above and click any title for a posy, it will take you to the "Offsite Author" website.. I Have been getting 50+ new sites to review a day and if they are up to my standard, i will add their site and to my offsite authors lineup and every time they post on their site our bot gets a snippet from their site and saves it as a draft and a mod from my site will go over the site and publish if it's interesting. I Got to thinking, i need a way to get the visitors that are leaving my site can get back to mine easily, and maybe show the inline adsense ad in the top portion of the picture above.

allot of late nights, hardly any sleep whatsoever. I'm in the top 10 pages for gaming news now and i fill like i can get it up a few more pages the more i work on it.. crazy i know.
 
Last edited:
Something like this
[image]

i'm wore out and i really cannot think of how to do this, i've seen stuff like this before and i cannot for the life of me think where.
I gave you a PHP snippet you can use to do this...just change the HTML to how you desire.

Code:
<?
$previousLocation = $_SERVER['HTTP_REFERER'];
?>

<a href="<?=$previousLocation;?>">Go back.</a>

Just change "Go back." to whatever you want: different text, an image, etc.
 
I gave you a PHP snippet you can use to do this...just change the HTML to how you desire.

Code:
<?
$previousLocation = $_SERVER['HTTP_REFERER'];
?>

<a href="<?=$previousLocation;?>">Go back.</a>

Just change "Go back." to whatever you want: different text, an image, etc.


This shows the go back on my website, i need it to be on the website that doesn't belong to me like in the image. i know it can be done
 
This shows the go back on my website, i need it to be on the website that doesn't belong to me like in the image. i know it can be done
Oh! Sorry man. I know what you mean now. Take a look at this page about framesets:
http://www.htmlcodetutorial.com/frames/frames.html

Here's the code you will need:
HTML:
<html>
<head>
     <title>My Title</title>
</head>
<frameset rows="100, *">
     <frame src="go-back-bar.html">
     <frame src="http://www.external-site.com">
</frameset>
</html>

Essentially the file is still hosted on your domain, except it'll display the nav bar with the "Go Back" button in the first frame, and the rest of the page will display the external page.

rows="100, *"
means the top frame (your go back navigation) is 100 pixels high, and the second frame takes up the rest of the page. These values can be edited.

go-back-bar.html
is your go back navigation button. You should actually be able to use that PHP code I gave you and name the file go-back.php or something and then use that as the frame source.

Go here:
http://www.jmarshall.com/easy/html/testbed.html
and enter that HTML code I just gave you. You will see the GENERAL outcome and how it relates to the screenshot you posted. You will have to go through that tutorial I linked you to about framesets to learn how to remove borders, stop scrolling, etc.
 
Last edited:
Oh! Sorry man. I know what you mean now. Take a look at this page about framesets:
http://www.htmlcodetutorial.com/frames/frames.html

Here's the code you will need:
HTML:
<html>
<head>
     <title>My Title</title>
</head>
<frameset rows="100, *">
     <frame src="go-back-bar.html">
     <frame src="http://www.external-site.com">
</frameset>
</html>

Essentially the file is still hosted on your domain, except it'll display the nav bar with the "Go Back" button in the first frame, and the rest of the page will display the external page.

rows="100, *"
means the top frame (your go back navigation) is 100 pixels high, and the seconds frame takes up the rest of the page. These values can be edited.

go-back-bar.html
is your go back navigation button. You should actually be able to use that PHP code I gave you and name the file go-back.php or something and then use that as the frame source.

Go here:
http://www.jmarshall.com/easy/html/testbed.html
and enter that HTML code I just gave you. You will see the GENERAL outcome and how it relates to the screenshot you posted. You will have to go through that tutorial I linked you to about framesets to learn how to removed borders, stop scrolling, etc.


Thats it... thank you
 
Iframe can do that also... But artizhay is all over it...
iframes will work too, but for his application, frames work better, even if they are old school. Frames are much more browser-compatible when dealing with whole screen frames (whereas iframes require crazy ass CSS fixes, especially for IE), and are made for just what he wants to do.
 
Seems to me this could easily be implemented using cakeslice, and fits with the basic original intention of it's use. As far as formatting and CSS fixes ... if you slice your iframes right, it's relatively easy to make them appear on your site exactly the way you want.

I use iframes consistently in a particular implementation model I use, and it works quite well. Basically you'd just slice out the portion of the site you want to show, and then you could use whatever html you wanted since you would place the iframe on YOUR site.

Anyway - good luck.
 
Back
Top