Verschil ie en firefox in fotoalbum

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Kristof Debleu

Kristof Debleu

19/02/2008 20:52:00
Quote Anchor link
Beste

Ik heb volgend probleem, als ik volgende pagina http://www.kristofdebleu.net/website/index.php?pagina=fotos en een fotoalbum aanklik dan ziet het er in firefox goed uit, maar bekijk ik hem in ie, dan zet hij alle fotos naast elkaar, dit is niet de bedoeling.

Hier is mijn foto.php bestand (sript van arjan zit hierin verwerkt):
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<td align="right" valign="top">

            <table width="605" border="0" cellspacing="0" cellpadding="0" height="5">
              <tr>
                <td height="5"><img src="images/empty.gif" width="5" height="5"></td>
              </tr>
            </table>
            <table width="605" border="0" cellspacing="0" cellpadding="0">
              <tr>

                <td width="5">&nbsp;</td>
                <td><table width="600" height="23" border="0" cellpadding="0" cellspacing="0" background="images/toprond600.png" class="text_black_12">
                  <tr>
                    <td width="10">&nbsp;</td>
                    <td width="410" class="text_white_11"><b>Foto's</b></td>
                    <td>&nbsp;</td>
                  </tr>
                </table>

                  <table width="600" height="220" border="0" cellpadding="0" cellspacing="1">
                                     <td class="text_black_12">
                   <?php
require_once('curl.php');

$gebruikersnaam = 'kristofdebleu';

$curl = new CURL();
$curl->enableCache();

echo '<a name="fotoalbum"></a>';

if(isset($_GET['album']) && !empty($_GET['album']))
{
    
    $xml = $curl->get('http://picasaweb.google.com/data/feed/api/user/'.$gebruikersnaam.'/album/'.$_GET['album']);
    
    if($xml != 'No album found.')
    {

        $xml = new SimpleXMLElement($xml);
    
        echo '>> <a href="index.php?pagina=fotos#fotoalbum" class="text_darkblue_12">Fotoalbum</a> >> <a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'#fotoalbum" class="text_darkblue_12">'.$xml->title.'</a> (<a href="'.$xml->link[2]['href'].'" target="_blank" class="text_darkblue_12">Presentatie</a>)<br>';
    
    if(count($xml->entry) > 0)
    {

            echo '<hr><div style="text-align: center">';
            
            if(isset($_GET['foto']) && !empty($_GET['foto']))
            {

                for ($i = 0; $i <= count($xml->entry)-1; $i++)
                {

                    if($xml->entry[$i]->title == $_GET['foto'])
                    {

                        $tmp = $i;
                    }
                }

                
                if($tmp == 0)
                {

                    echo '<< Vorige';
                }
else{
                    echo '<< <a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'&amp;foto='.$xml->entry[$tmp-1]->title.'#fotoalbum" class="text_darkblue_12">Vorige</a>';
                }

                
                echo '&nbsp;&nbsp; Foto '.($tmp+1).' van '.count($xml->entry).' &nbsp;&nbsp;';
                
                if($tmp == count($xml->entry)-1)
                {

                    echo 'Volgende >><br><br>';
                }
else{
                    echo '<a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'&amp;foto='.$xml->entry[$tmp+1]->title.'#fotoalbum" class="text_darkblue_12">Volgende</a> >><br><br>';
                }


                echo '<img src="'.$xml->entry[$tmp]->content['src'].'?imgmax=576" title="'.$xml->title.' - '.$xml->entry[$tmp]->title.'" alt="'.$xml->title.' - '.$xml->entry[$tmp]->title.'">';  
            }
else{
                foreach($xml->entry as $album)
                {
                    
                    echo '<a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'&amp;foto='.$album->title.'#fotoalbum" class="thumbnail"><img src="'.$album->content['src'].'?imgmax=400" class="thumbnail" title="'.$album->title.'" border="0" alt="'.$album->title.'"></a>';
                }
            }

            
            echo '</div>';
            
    }
else{
        echo '<p>Sorry, er zijn op dit moment nog geen fotos aan dit album toegevoegd</p>';
    }
    }
else{
    echo '<p>Sorry, ik heb dit album niet kunnen vinden!</p>';
    }
}
else{
    echo '<p>Uw fotoalbum hieronder? Neem contact met me op.</p>';
    
    $xml = $curl->get('http://picasaweb.google.com/data/feed/api/user/'.$gebruikersnaam);

    $xml = new SimpleXMLElement($xml);
    
    if(count($xml->entry) > 0)
    {

    foreach ($xml->entry as $album)
    {

        echo '<img src="images/folder.gif" style="vertical-align : middle; margin-right: 10px;">';
        echo '<b><a href="index.php?pagina=fotos&amp;album='.strtolower(str_replace(' ','',$album->title)).'#fotoalbum" class="text_darkblue_12">'.$album->title.'</a></b>';
        echo ' Laatst geupdate op '.strftime("%e %B %Y om %H:%M", strtotime($album->updated)).'<br>';
    }
    }
else{
    echo '<p>Sorry, er zijn op dit moment nog geen albums toegevoegd!</p>';
    }
}

?>

</td>
                </table>
</td>
              </tr>
            </table>
            <table width="605" border="0" cellspacing="0" cellpadding="0" height="5">
              <tr>
                <td height="5"><img src="images/empty.gif" width="5" height="5"></td>
              </tr>
            </table>
               &nbsp;</td>
        </tr>
      </table>


Weet iemand wat ik precies moet veranderen om men foto's toch allemaal onder elkaar te krijgen, dus zoals in firefox... ?
 
PHP hulp

PHP hulp

28/03/2024 13:15:04
 
J A

J A

19/02/2008 20:55:00
Quote Anchor link
Heeft dit niet met CSS te maken?
 
Kristof Debleu

Kristof Debleu

19/02/2008 21:05:00
Quote Anchor link
De css, kan je hier terugvinden: http://www.kristofdebleu.net/website/css/style.css

Maar ik denk dat het eerder een php fout is ...
 
Lode

Lode

19/02/2008 21:07:00
Quote Anchor link
Mr. Gates heeft een beetje zijn eigen standaarden aangenomen tegenover de rest... dus lijkt me typisch geval van CSS...
 
Kristof Debleu

Kristof Debleu

20/02/2008 21:07:00
Quote Anchor link
En weet iemand waar de fout zou kunnen zitten?
 
Danny Roelofs

Danny Roelofs

20/02/2008 21:24:00
Quote Anchor link
Dit is even een gokje hoor, ik denk dat ik weet waar je ongemak zit en ja hoe het hele ding werkt vind ik nou niet echt goed opgebouwd. Maar daar gaat het niet om, je wilt een oplossing op je probleem.

En ik denk dat dit je op weg helpt, op regel 74 t/m 77 in de geplaatste code en daar zijn dan deze regel nummers op gebaseerd, zie ik dit:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?php
               foreach($xml->entry as $album)
                {
                    
                    echo '<a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'&amp;foto='.$album->title.'#fotoalbum" class="thumbnail"><img src="'.$album->content['src'].'?imgmax=400" class="thumbnail" title="'.$album->title.'" border="0" alt="'.$album->title.'"></a>';
                }

?>


Maak daar nu eens dit van:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?php
               foreach($xml->entry as $album)
                {
                    
                    echo '<a href="index.php?pagina=fotos&amp;album='.$_GET['album'].'&amp;foto='.$album->title.'#fotoalbum" class="thumbnail"><img src="'.$album->content['src'].'?imgmax=400" class="thumbnail" title="'.$album->title.'" border="0" alt="'.$album->title.'"></a><br>';
                }

?>


Uiteraard niet de php code tags mee nemen...

En kijk eens of dit je helpt, hoor het wel van je!.
Gewijzigd op 01/01/1970 01:00:00 door Danny Roelofs
 
Kristof Debleu

Kristof Debleu

21/02/2008 19:40:00
Quote Anchor link
Heel erg bedankt Danny Roelofs, het werkt !!!!
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.