Toon posts:

[PHP] Help met uitlijning Foto album

Pagina: 1
Acties:
  • 42 views sinds 30-01-2008

Verwijderd

Topicstarter
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?


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>";

  • Equator
  • Registratie: April 2001
  • Laatst online: 13:01

Equator

Crew Council

#whisky #barista

zet het in een iframe waarvan jij kan bepalen hoe breed het is. Anders zou je kunnen mailen naar de auteur van de code.

  • Michali
  • Registratie: Juli 2002
  • Laatst online: 22-03 18:12
En is die code allemaal relevant voor het probleem?

Noushka's Magnificent Dream | Unity


Verwijderd

Topicstarter
De hele code is zover relevant dat als je tags moet plaatsen ik niet weet waar in dit stukje code :?

  • whoami
  • Registratie: December 2000
  • Laatst online: 14:06
sorry, maar we gaan hier geen dingen voor jou aanpassen, en al zeker niet als je het script ergens gedowned hebt.

In p&w gaat het over zelf programmeren, en worden er problemen opgelost die je tegenkomt bij code die je zelf schrijft.
Echter, het aanpassen van scripts die je download, daar hebben we hier geen ruimte voor.
Mail misschien ff de maker van het script.

[ Voor 54% gewijzigd door whoami op 01-07-2005 11:21 ]

https://fgheysels.github.io/


Dit topic is gesloten.