1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you do this?

Discussion in 'BlackHat Lounge' started by korfx04, Sep 11, 2011.

  1. korfx04

    korfx04 Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    152
    Likes Received:
    96
    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.
     
  2. scraper1

    scraper1 Regular Member

    Joined:
    May 28, 2011
    Messages:
    214
    Likes Received:
    207
    Location:
    Kontiki
    Home Page:
    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)">
     
  3. purewealthinc

    purewealthinc Regular Member

    Joined:
    May 3, 2010
    Messages:
    427
    Likes Received:
    383
    Occupation:
    Web Fishing
    Location:
    World Wide Web City
    Mate,

    use Wordpress and it does the job done all!
     
  4. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    PHP:
    <?
    $previousLocation $_SERVER['HTTP_REFERER'];
    echo 
    "<a href=\"$previousLocation\">Go back.</a>";
    ?>
     
    Last edited: Sep 11, 2011
  5. korfx04

    korfx04 Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    152
    Likes Received:
    96
    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: Sep 11, 2011
  6. korfx04

    korfx04 Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    152
    Likes Received:
    96
    Something like this
    [​IMG]

    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: Sep 11, 2011
  7. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    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.
     
  8. korfx04

    korfx04 Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    152
    Likes Received:
    96

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

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    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.
     
    • Thanks Thanks x 1
    Last edited: Sep 11, 2011
  10. korfx04

    korfx04 Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    152
    Likes Received:
    96

    Thats it... thank you
     
  11. DebtFreeMe

    DebtFreeMe Regular Member

    Joined:
    Mar 14, 2010
    Messages:
    418
    Likes Received:
    363
    Occupation:
    Military
    Location:
    Earth
    Iframe can do that also... But artizhay is all over it...
     
  12. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    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.
     
    • Thanks Thanks x 2
  13. ChanzGrande

    ChanzGrande Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 16, 2008
    Messages:
    2,484
    Likes Received:
    1,158
    Occupation:
    Accountant
    Location:
    Northern Woods Counting Money
    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.