CK-Gallery is now UberGallery

CK-Gallery has been updated to version 1.5.0 and renamed to UberGallery.  Also, it’s found it’s own home with all the same CK-Gallery awsomeness at http://www.ubergallery.net.

First Friday script updated and simplified

This is an update to the previous post found here: http://www.web-geek.net/posts/2008/10/20/calculate-the-first-friday-of-next-month-with-php/

With this update I have drastically reduced and simpified the code to produce the same results.  I did some rigorous testing of my own to make sure this script will calculate the correct date, but that doesn’t mean it’s bullet-proof.  If you find a bug, please email me so I can fix it.

first-friday.php

<?php // first-friday.php v0.1.3 by, Chris Kankiewicz <http://www.web-geek.net>
 
  // Calculate next Friday 
  for ($x = date('d'); $x <= (date('d') + 6); $x++) {
    $timeStamp = mktime(0,0,0,date('m'),$x,date('Y'));
    if (date('w',$timeStamp) == 5) {
      $nextFriday = mktime(0,0,0,date('m'),$x,date('Y'));
    }
  }
  // Check if next Friday is the first friday of the month.
  if (date('d', $nextFriday) <= 7) {
    $firstFriday = $nextFriday;
  } else {
  // Calculate first Friday of next month
    for ($x = 1; $x <= 7; $x++) {
      $timeStamp = mktime(0,0,0,date('m')+1,$x,date('Y'));
      if (date('w',$timeStamp) == 5) {
        $firstFriday = mktime(0,0,0,date('m')+1,$x,date('Y'));
      }
    }
  }
 
  // Echo next first Friday
  echo date("F j, Y", $firstFriday);
 
?>

CK-Gallery Update: Version 1.0.1

CK-Gallery version 1.0.1 just released.  This addresses a small display bug with the page navigation when you are running the script in your own web page.

1.0.1 Changelog

  [ Changes to 1.0.1 ]

    - Style changes to fix a display bug with the pagination navigation when the
      script is installed to a pre-existing web page
    - Changed PHP compression code
    - Updated Readme to reflect these changes
    - Miscellaneous index.php changes

CK-Gallery Update: Version 1.0.0 Final

Well, it’s finally here, after approximately a month and a half, many late nights and many liters of caffeine, version 1.0.0 of CK-Gallery has been released!  Version 1.0.0 introduces a few new features, the most noticeable to the end user being dynamic pagination.  Just open the script, edit a single value specifying the number of images you’d like to display per page, and the script will dynamically generate your pages and the menu to navigate between them.

Behind the scenes much work has also been done.  Not only have I improved the speed and reliability of the gallery, but I’ve also managed to improve compatibility with older versions of PHP as well.  Also, GZip compression was enabled on the default index.php to help reduce load time and bandwidth when possible.  And don’t even get me started on the number of bug fixes I’ve resolved!

Read the rest of this entry »

CK-Gallery Update: Version 1.0.0 Beta

I have been hard at work late into many nights to get this up and going.  With the update to version 1.0.0, CK-Gallery now has dynamic pagination. This will let users with larger galleries split the gallery up into several smaller pages and allow visitors to easily navigate to those pages via a small navigation bar below the gallery.  This beta must have seen 20+ operational sub-versions before reaching the point you see here.

While dynamic pagination is the biggest update, and most relevent to the end user, there are many other updates as well.  Here is the changelog for version 1.0.0:

Read the rest of this entry »

CK-Gallery Update: Version .83

A lot has changed in CK-Gallery since I last posted about it.  I have since stared hosting it on SourceForge, and made many a bug fixes.  Also, a decent amount of optimizing of code for both readability and performance has occurred.

I’ve also got plans for the future of this script, namely pagination for multitudes of images, but more on that later.

Head over to the CK-Gallery page and check it out.

CK-Gallery Current Changelog

  [ Changes to .83 ]

    - Modified thumbnail creation algorithm to check if the file is an image
      before checking if the file exists in the thumbnail dir
    - Miscellaneous spelling corrections
    - Miscellaneous formatting corrections

  [ Changes to .82 ]

    - Merged file extension conversion, thumbnail generation and markup output
      gerneration into one while() loop, reducing code and overhead slightly
    - Moved thumbnail cleanup to end of script

Read the rest of this entry »