Ik heb dit foto album van internet gehaald en een aantal dingen aangepast naar mijn smaak.
Maar één ding krijg ik niet voor elkaar. En dat is op de http://www.nothok.com/test/gallery.inc.php album index pagina, dat ik de pagina breedte niet op bijv. 80% kan krijgen of een breedte van bijv. 600px.
Het stukje code hieronder gaat het om!!
Wie weet hier iets op?
Maar één ding krijg ik niet voor elkaar. En dat is op de http://www.nothok.com/test/gallery.inc.php album index pagina, dat ik de pagina breedte niet op bijv. 80% kan krijgen of een breedte van bijv. 600px.
Het stukje code hieronder gaat het om!!
Wie weet hier iets op?
PHP:
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
| // ***************************** MAIN ***************************** // **************************************************************** // if not in admin mode }else{ // get gallery list from data file $galleries=false; if ($gals=file($galfile)){ foreach ($gals as $gal){ $gal= explode('|', rtrim($gal)); $galleries[$gal[0]] = array($gal[0], $gal[1], $gal[2]); } krsort($galleries, SORT_NUMERIC); } // show the galleriy list if (!isset($_REQUEST['mggal'])){ if ($galleries!==false){ foreach($galleries as $gal){ echo "<div class='mggallery'>"; // show preview thumbnail if ($thumbnailonlist!==false){ $pictures = getpics($gal[0], $imgdir, $pathtoscript, $thumbnails); $c=count($pictures); $imgsrc=$pictures[rand(0, ($c-1))]['thumb']; $tooltip=str_replace("{gallery}", stripslashes($gal[1]), $txtviewthisgal); echo "<span style='float:left;'><a href='$me$getvars&mggal=$gal[0]' title='$tooltip'>[img]'$imgsrc'[/img]</a></span>\n"; } echo "<a href='$me$getvars&mggal=$gal[0]'>".stripslashes($gal[1])."</a><br/>$gal[2]\n"; echo "<div style='clear:both;'></div>\n"; echo "</div>\n\n"; } } // show specific gallery }else{ $gal=$_REQUEST['mggal']; if ($pictures = getpics($gal, $imgdir, $pathtoscript, $thumbnails)){ $numpics=count($pictures); echo "<center>\n"; // show thumbnails page if (!isset($_REQUEST['mgid']) && $thumbnails){ echo "<a name='mgtop'></a><span class='mggalcap'>".stripslashes($galleries[$gal][1])."</span><br><br>\n"; echo "<span class='mgsmall'>"; if ($slideshow) echo "[<a href='$me$getvars&mggal=$gal&mgid=0'>$txtslideshow</a>] "; echo "[<a href='$me$getvars'>$txtback</a>]</span><br><br>\n"; echo "<table border='0' cellpadding='0' cellspacing='5'><tr>\n"; $i=0; $caps=getcaps($gal, $imgdir); foreach ($pictures as $pic){ echo "<td valign='top' align='center'><a href='$me$getvars&mggal=$gal&mgid=$i&mgcmd=noslide'>[img]'".$pic['thumb']."'[/img]</a>"; if ($showcapsonthumbs && isset($caps[$pic['id']])) echo "<br><span class='mgsmall'>".stripslashes($caps[$pic['id']])."</span><br>"; echo "</td>\n"; if (fmod(($i+1), $thumbcols)==0) echo "</tr><tr>\n"; $i++; } echo "</tr></table>\n"; // show specific pic }else { if (!isset($_REQUEST['mgid'])) $id=0; else $id=$_REQUEST['mgid']; $backurl="$me$getvars".(($thumbnails) ? "&mggal=$gal" : ""); if ($id==($numpics-1)) $nexturl=$backurl; else $nexturl="$me$getvars&mggal=$gal&mgid=".($id+1); // Gallery caption and other text echo "<a name='mgtop'></a><span class='mggalcap'>".stripslashes($galleries[$gal][1])."</span><br><br>\n"; if ($slideshow && $_REQUEST['mgcmd']!="noslide") echo "<em>$txtnextslide</em><br>\n"; echo "<em>$txtclickpic</em><br><br>\n"; echo "<span class='mgsmall'>[<a href='$backurl'>$txtback</a>]</span><br><br>\n"; // picture & caption $caps=getcaps($gal, $imgdir); if (isset($caps[$pictures[$id]['id']])) echo "<span class='mgimgcap'>".stripslashes($caps[$pictures[$id]['id']])."</span><br>"; echo "<a href='$nexturl&mgcmd=noslide#mgtop'>[img]'".$pictures[$id]['pic']."'[/img]</a>\n"; echo "</center>\n"; if ($slideshow && $_REQUEST['mgcmd']!="noslide") echo "<meta http-equiv='refresh' content='$slideshowtime;URL=$nexturl#mgtop'>\n"; } }else echo "<center class='mgsmall'>[<a href='$me$getvars'>$txtback</a>]</center>"; } } echo "<br><br><center><span class='mgsmall'>[<a href='$me$getvars&mgdo=admin'>$txtadmin</a>] :: Powered by <a href='http://www.nothok.com' target='_blank'>Mark $version</a></span></center>"; |