www.webdeveloper.com
Results 1 to 7 of 7

Thread: Dynamic Insert with static default...

  1. #1
    Join Date
    Jan 2014
    Posts
    5

    Dynamic Insert with static default...

    1. I previously had my website utilizing Aardvark Topsites, which I still do: http://www.jatslo.com/
    2. I recently installed WordPress: http://www.jatslo.com/wordpress/


    Before I fully integrate one into the other, I would like to load the particular Aardvark scheme within the following: http://www.jatslo.com/wordpress/link-directory/

    From what I understand, I can utilizing the following linking method:

    http://jatslo.com/wordpress/?url=www...om%2Findex.php

    However, I'll need to decode this instance: "%2F" to "/"

    Anyway, I want to print the URL, so that it loads into the following:

    <iframe src="http://{$URL}" height="2000" width="100%" frameborder="0" scrolling="no" align="center"></iframe>

    Secondly, if the parameter is not provided, I want the frame to load the default.

    It's faster to ask a question, rather than comb through text for my answer, I think. Any help is greatly appreciated!

  2. #2
    Join Date
    Jan 2014
    Posts
    5
    Is this too hard of a question, or too easy
    ?

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,251
    Quote Originally Posted by jatslo View Post
    1. I previously had my website utilizing Aardvark Topsites, which I still do: http://www.jatslo.com/
    2. I recently installed WordPress: http://www.jatslo.com/wordpress/


    Before I fully integrate one into the other, I would like to load the particular Aardvark scheme within the following: http://www.jatslo.com/wordpress/link-directory/

    From what I understand, I can utilizing the following linking method:

    http://jatslo.com/wordpress/?url=www...om%2Findex.php
    Up to this point, I have no idea (and not enough interest to help with your research ).
    However, I'll need to decode this instance: "%2F" to "/"
    Could be a job for urldecode(), or maybe just strreplace()?
    Anyway, I want to print the URL, so that it loads into the following:

    <iframe src="http://{$URL}" height="2000" width="100%" frameborder="0" scrolling="no" align="center"></iframe>
    Seems like a straight-forward PHP echo or printf() command?
    Secondly, if the parameter is not provided, I want the frame to load the default.
    Sounds like a straight-forward if/else block of code?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Jan 2014
    Posts
    5
    Yes, but the devil is in the details, so to speak. I had a similar script that I obtained from a book, but lost both. I know this is simple, but I don't remember how. I'll figure it out eventually, however. Load the script in the header, print or echo it on the intended page. Seems simple enough. If I figure it out, I'll post it here. Someone else is more than welcome to beat me to it, though.

  5. #5
    Join Date
    Jan 2014
    Posts
    5
    Wow! Still no answer.

  6. #6
    Join Date
    Feb 2014
    Location
    south africa
    Posts
    16
    here is a start :

    Code:
    $url = (isset($_GET['url']) ? str_replace("%2F",'/',$_GET['url']) : 'insert the standard url here');
    Code:
    <iframe src="<?php echo $url; ?>" height="2000" width="100%" frameborder="0" scrolling="no" align="center"></iframe>

  7. #7
    Join Date
    Jan 2014
    Posts
    5
    That didn't work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles