Need some help from a php guru... (Humorsoftware video script)

Discussion in 'PHP' started by SirPsychoSexy, May 25, 2007.

  1. #1
    I'm using the http://www.humorsoftware.com/ video script and in the overall header.php of my phpbb forum I have it set so that it gets four random videos from the script and displays them in horizontal fashion each time the page is loaded. I would like to do the same thing on my main site pages but so that it simply displays the random thumbnails vertically rather than horizontally.

    I have three files. One is the iframe to display the thumbnails within, one is the formatting code for the actual thumbnail (like the border properties and link) and the third is the one I think I need to change which i've pasted below. Is there something i can add to this code to make it display the thumnails vertically?

    
    <?php
    require_once ('global.php');
    require_once ('include/class_pagination.php');
    // ##### PULL RANDOM MEDIA #####
    $random_query = $db->query ("SELECT * FROM files WHERE file_id != '" . $file['file_id'] . "' AND added <= '" . time() . "' ORDER BY RAND() LIMIT 4,". intval($initialize->settings['random_limit']));
    while ($random = $db->fetch ($random_query))
    {
    	$link = $initialize->create_sef ($random['file_id'], $random['title'], 'file', 'file.php?id=');
        echo $tpl->pull_template ('randomfiles');
    }
    
    
    ?>
    
    Code (markup):
    Thanks for your time. Rep+ on standby. :D
     
    SirPsychoSexy, May 25, 2007 IP
  2. yedy72

    yedy72 Well-Known Member

    Messages:
    198
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #2
    i think that is not a php question more a css question.
    anyway the script you post do the random select from the database.
    maybe you have to change the 'randomfiles' template
     
    yedy72, May 25, 2007 IP
  3. tutankh

    tutankh Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,
    check your View (html files?). I think there is answer.

    Regards,
    M
     
    tutankh, May 25, 2007 IP
  4. SirPsychoSexy

    SirPsychoSexy Well-Known Member

    Messages:
    388
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Heres the other two files which relate to the displaying of the random thumbnails. All of the other files are standard parts of the script unmodified...

    The iframe which displays the results...
    
    <IFRAME SRC="http://example.com/video/random.php" FRAMEBORDER=0 MARGINHEIGHT=5 MARGINWIDTH=0 SCROLLING=no WIDTH=425 HEIGHT=90></iframe>
    Code (markup):

    and randomfiles.php
    
    <a href="{link}" target="new">
    <body bgcolor="#2c2c2c"><img border="1" width="105" height="80" src="thumbnails/{random[filename]}.png" alt="{random[title]}"  style="border-color: rgb(0, 0, 0);" border="2" /></a></td>
    
    Code (markup):
    This is confusing to a php noob like me. :(
     
    SirPsychoSexy, May 25, 2007 IP