Welcome Guest, Not a member yet? Register   Sign In
Gallery problem: one query, different images size
#3

[eluser]Référencement Google[/eluser]
That's a very good start for me Walesmd, thank you.
Now, I've got difficulties with arrays, I am again stopped with thumbnails loop, so actually my code looks like that:

Code:
<?php
        
        $i = 0;        
        foreach($latestprofiles as $profile)
        {
            $i++;
            $data['pics'][$i] = $profile->photo_file;            
        }
        
        // $data['pics'][1] will always be your the big picture
        // $data['pics'][2] -> $data['pics'][...] will be thumbnails
        
        // We reset $i to 2, then we will start below the thumbnails loop at 2
        $i = 2;
        
        ?>
        
        <a class="big_picture" href="&lt;?=site_url('members/register')?&gt;" title="Voir le profil de Simonne"><img src="&lt;?=$GLOBALS['photos_path'].$data['pics'][1]?&gt;" /></a>
        
        <div class="thumbnails clearfix">
            
            &lt;!-- HERE I don't know how to make --&gt;
            &lt;?php foreach($data['pics'][$i] as $thumb_file): ?&gt;            
            
            <a href="&lt;?=site_url('members/register')?&gt;" title="Voir les actrices porno et acteurs porno"><img src="&lt;?=$GLOBALS['photos_path'].'thumbs/th_'.$thumb_file?&gt;" /></a>
            
            &lt;?php endforeach; ?&gt;

How should I do ?


Messages In This Thread
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 10:54 AM
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 11:19 AM
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 12:03 PM
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 12:16 PM
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 12:28 PM
Gallery problem: one query, different images size - by El Forum - 09-20-2007, 12:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB