Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorkimparsell
    • CommentTimeFeb 13th 2010
     
    @zzark: We can look into creating something like that. Would you want it to only display the latest album (one), or would you want it to display more than one?
    • CommentAuthorheeenke
    • CommentTimeFeb 13th 2010
     
    was thinking about the same thing and started to search around hehe. i was looking for a plugin with latest 5 albums or so. And maybe if possible make it say the name of the album also (dunno if it would look any good)
    • CommentAuthorchrisH
    • CommentTimeMay 12th 2010 edited
     
    Yo,

    Only been fooling around with PHP for about 2 months now but this is what i came up with lol
    The biggest problem is the file size of the images. It calls on the big image from the DB and resizes it, it really should be a thumbnail (my next step in the process)

    $name = mysql_query("SELECT name FROM plogger_albums ORDER BY id DESC LIMIT 3"); // album name for meta
    $albumName = mysql_query("SELECT path FROM plogger_albums ORDER BY id DESC LIMIT 3"); // album name for URL
    $id = mysql_query("SELECT id FROM plogger_albums ORDER BY id DESC LIMIT 3"); // LAST 3 ALBUM id's

    $thumbID_0= mysql_result($id,0);
    $thumbID_1= mysql_result($id,1);
    $thumbID_2= mysql_result($id,2);


    and then choose where you want to display the images ... i have mine on the home page and when a new gallery is added it updates the image and text i.e...

    // FIRST GRID
    div class="grid">
    <h1><a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 0); ?> " > <?php echo mysql_result($name, 0); ?> </h1></a>
    <a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 0); ?> " ><img class="photos" src="http://localhost/penylane/gallery/plog-content/images/<?php echo mysql_result(mysql_query("SELECT path FROM plogger_pictures WHERE parent_album = '$thumbID_0' "),0); ?>" width="255" height="255" title="<?php echo mysql_result($name, 0); ?>" alt="<?php echo mysql_result($name, 0); ?>" </a> />

    // SECOND GRID
    div class="grid">
    <h1><a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 1); ?> " > <?php echo mysql_result($name, 1); ?> </a> </h1>
    <img class="photos" src="http://localhost/penylane/gallery/plog-content/images/<?php echo mysql_result(mysql_query("SELECT path FROM plogger_pictures WHERE parent_album = '$thumbID_1' "),0); ?>" width="255" height="255" title="<?php echo mysql_result($name, 1); ?>" alt="<?php echo mysql_result($name, 1); ?>" />
    </div>


    etc ..

    i only have a need for 3 grids soo the mysql LIMIT is 3 .. but you can all fool around with that etc

    one other thing , the last zero ('0') in the img src can be changed to alter the image used as the faux-thumbnail

    please rip me to shreds and teach me how to write better code lol
    • CommentAuthorchrisH
    • CommentTimeMay 12th 2010 edited
     
    sorry

    // FIRST GRID
    <div class="grid">
    <h1><a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 0); ?> " > <?php echo mysql_result($name, 0); ?> </h1></a>
    <a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 0); ?> " ><img class="photos" src="http://localhost/penylane/gallery/plog-content/images/<?php echo mysql_result(mysql_query("SELECT path FROM plogger_pictures WHERE parent_album = '$thumbID_0' "),0); ?>" width="255" height="255" title="<?php echo mysql_result($name, 0); ?>" alt="<?php echo mysql_result($name, 0); ?>" </a> />
    </div>

    // SECOND GRID

    <div class="grid">
    <h1><a href="http://localhost/penylane/gallery/index.php?level=album&id= <?php echo mysql_result($id, 1); ?> " > <?php echo mysql_result($name, 1); ?> </a> </h1>
    <img class="photos" src="http://localhost/penylane/gallery/plog-content/images/<?php echo mysql_result(mysql_query("SELECT path FROM plogger_pictures WHERE parent_album = '$thumbID_1' "),0); ?>" width="255" height="255" title="<?php echo mysql_result($name, 1); ?>" alt="<?php echo mysql_result($name, 1); ?>" />
    </div>
    • CommentAuthorshafiq
    • CommentTimeMay 18th 2010
     
    i have a question , can we change the picture position????????

    if there r 40 pix and i want to change the picture position? do i have to install any plugging for that?