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

Open in the same windows Ifame

Wuebit

Well-known member
#1
I have this php file which pulls from my datebase

PHP:
<?php
$cdb = new PDO('mysql:dbname=xxx;host=localhost', 'xxx', 'xxx');

foreach ($cdb->query("SELECT * FROM images ORDER BY posted DESC LIMIT 3") AS $img)

{
$twofirst = substr($img['hash'], 0, 2);
    echo '
                <a style="position: relative; display: block; height: 140px;" href="/booru/post/view/' . $img['id'] . '" target="_blank">

                    <img src="booru/timthumb.php?src=images/' . $twofirst . '/' . $img['hash'] . '&h=125&w=125&q=100" width="125px" style="border-style: none"/>
                </a>
                ';

}
And in the xenforo template is as follows

HTML:
  <div class="section">
    <div class="secondaryContent">
            <h3>New Cosplays</h3>
              <iframe marginwidth="0" marginheight="0" width="125px" height="400px" scrolling="no" frameborder=0 src="image.php">
              </iframe>
   </div>
 </div>
Is there a better way I can get this to work?
If I don't add the
PHP:
target="_blank"
It just opens the page in the Iframe which is 100% fail

Thanks for your time.
 

James

Well-known member
#7
Hmm I'll give it ago. But is that not for loading overlays and "click to show AJAX" am after it been loaded all the time without click but I guess some of the code could be changed

Cheers

Doh there is more than one video I'll watch the rest my bad..
The second video shows how to load another page into the current page using the ContentLoader class.
 

Wuebit

Well-known member
#11
Just a small update if anyone else the same problem, I asked on stackoverflow and someone said to change the _blank to _top and it works :) woot

Cheers