Not signed in (Sign In)

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

    • CommentAuthortheg3nius
    • CommentTimeOct 10th 2005
     
    I wrote this before seeing the last script niceday posted. It's a little different than his. It displays five random images from your Plogger gallery. It's pretty sloppy, but it gets the job done. If you know a bit of php and some basic html, it is very customizable.

    You can get it here: http://theg3nius.com/wordpress/2005/10/10/plogger-add-in-script/
    • CommentAuthorJrnymnJay
    • CommentTimeNov 23rd 2005 edited
     
    Thanks for this script work theg3nius....I used your script to display Plogger thumbnail links within the http://www.squible.com/my-work/squible/ Squible theme instead of the native flickr feed.

    below is the script
    <?php
    $host="hostname";
    $username="username"; //Database username here
    $password="dbpassword"; //Database password here
    $database="dbname"; //Database name here
    $amount="6"; //How many images do you want shown?
    $siteurl="http://yoursite.com/ploggerdirectory"; //The URL of your Plogger directory E.G. http://yoursite.com/ploggerdirectory ***IMPORTANT*** DO NOT INCLUDE A TRAILING SLASH LIKE THIS http://yoursite.com/ploggerdirectory/

    //Database Connection
    $connection = mysql_connect($host, $username, $password);
    $db = mysql_select_db($database);

    $q = "SELECT * from plogger_pictures order by RAND() LIMIT $amount";
    $result= mysql_query($q) or die
    ("Could not execute query : $q." . mysql_error());

    while ($row=mysql_fetch_array($result))
    {
    $id=$row["id"];
    $path=$row["path"];

    $number=strrpos($path, '/');
    $number=$number+1;
    $url=substr($path, $number);

    ?>
    <a href="<? echo "$siteurl"; ?>/index.php?level=picture&id=<? echo "$id"; ?>"><img src="http://yoursite.com/ploggerdirectory/thumbs/<? echo "$id"; ?>-<? echo "$url"; ?>" border="1" style="border-color:black"></a>
    <?php } ?>

    the previous code is substituted for flickr.php in squible/elements/
    in squible/inc.php you have to comment out the Flickr Integration variables
    •  
      CommentAuthorkimchihead
    • CommentTimeNov 25th 2005
     
    This is very, very cool! I added it to my blog's landing page, at http://www.kimchihead.com/.

    Thanks! :)
    •  
      CommentAuthorCroila
    • CommentTimeNov 25th 2005
     
    I too would like to add my thanks - I've used it at my home page, www.croila.net.

    It was so easy to implement: brilliant! Thank you.
    •  
      CommentAuthorkent
    • CommentTimeDec 3rd 2007
     
    $q = "SELECT * FROM plogger_pictures WHERE parent_album = '2' ORDER BY RAND() LIMIT $amount";

    2 is album number..
    • CommentAuthorpandianbe
    • CommentTimeJul 12th 2008
     
    Great Script.Lot of thanks.Can we get this output as Mode Rewrite URL?

    Thanks !!!
    Pandian
    • CommentAuthorpandianbe
    • CommentTimeSep 4th 2008
     
    Function $picurl = generate_url("picture",$id); is working in one server to get SEO Friendly URLs.

    But the same is not working in some other server Please help.

    For gallery.php full path has been specified even though generate_url() is not working.

    Thanks !!!

    Pandian