Author Archives: Mark Headrick

Not Counting Views Made by Gallery 3.0.1 Admin

Update: June 22, 2011: This information also applies to Gallery version 3.0.2.

After upgrading my Gallery to version 3.0.1, I needed to re-add my code modifications to stop the gallery from counting views made by the administrator since I don’t care how many times I view my own pictures LOL. Some of the core files had changed so I had to make the following changes this time.

First, in /themes/(your theme)/views/page.html.php add the following code near the top (below the first line, making sure you keep the code within PHP opening and closing tags.):

2
3
4
5
6
7
8
<?
if ($user->admin == '1') {
   $_SESSION['admin'] = true;
} else {
   $_SESSION['admin'] = false;
}
?>

Then in /modules/gallery/models/item.php around line 1019 modify the increment_view_count() function by adding the check around the query statement:

1019
1020
1021
1022
1023
1024
1025
  public function increment_view_count() {
    // mrh added the session admin check
    if(!$_SESSION['admin']) {
      db::query("UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = $this->id")
      ->execute();
    }
  }

Now, views will not be counted by the gallery administrator! Since I am the only one that uploads photos, this is all I need to do. For those wanting to stop view counts made by any owner of a photo, check out this thread on the Gallery forums. 🙂

Gallery Upgraded to Version 3.0.1

A couple days ago I upgraded my Gallery to version 3.0.1. The process wasn’t quite as easy as it is to upgrade my blog these days in that it’s not just a simple point-and-click operation. Even so, it did go without issue as I understood how I needed to go about it. My process was as follows, which closely follows these upgrade instructions:

  1. Backed up the current database and files (I had modified several of the core code files so wanted to make sure I saved everything for later comparison).

  2. Created a new temporary directory both locally and on the server that would receive all the updated code before switching it to the live version.

  3. Copied over my customized .htaccess, robots.txt, favicon.ico, php.ini, local.php and other necessary files that I use into the new directory.

  4. Downloaded the Gallery 3.0.1 code and extracted it locally. I then removed the included .htaccess and robots.txt files so they would not overwrite my custom ones. I then re-zipped the files into the proper directory structure for my situation.

  5. Uploaded and extracted these files into the new directory I had made on the server.

  6. Copied over the /var directory to its corresponding location in the new directory I made in step 2.

  7. Changed my theme within the Gallery admin section to the default theme so that when I switched directories, it would have a theme to load as I knew I would be re-doing my custom theme based off the new default.

  8. I went to gallerymodules.com to make sure I had the latest versions of the 3rd-party modules that I use, several of which did have newer versions. I extracted the modules locally and combined them all into a single MYMODS.ZIP file to upload to the server. I then extracted these into the /modules directory of the new gallery directory I had created.

  9. Renamed my gallery directories such that the new code would be active and ran the upgrade script. It updated both core and 3rd-party modules that needed to be. The new gallery code was then active and everything seemed to work fine.

At this point it was time to re-create my theme with the new Gallery default Wind theme as the base and add back the various code tweaks I had made over time if needed. Rather than go into any code specifics with this post, I will make separate posts as warranted, most notably about how to not count views by the Gallery admin. 🙂

Samsung BD-C6500 Blu-ray Player Added to Home Theater

Samsung BD-C6500 Blu-ray player - top, front viewMy sister and brother in-law gave me my first Blu-ray player for Christmas which happened to be the Samsung BD-C6500 Blu-ray Player. Thanks guys! Following are my experiences with this player so far. I’ve debated with myself what to include in this post and I’ve decided to focus on the installation, setup, and normal playback of music and movies.

Installation

Samsung BD-C6500 Blu-ray Player - rear viewThe installation into my home theater system was pretty easy as all I did was disconnect the component video and optical digital audio cables from my Denon DVD player and hook them into the Samsung player. While my Denon A/V Receiver does have some HDMI connectors, they are only HDMI 1.1 and the Samsung player uses the HDMI 1.3 specification and I’m not entirely sure what functionality might be lost (Wikipedia article on HDMI). From what I’ve read so far I think I would loose the ability to play the Blu-ray DTS Master Audio streams.  Anyway, since my Denon DVD player has no HDMI connectors, I just connected everything with component video cables at the time because I already had those cables handy. I may change everything over to HDMI; however, I would need to buy at least two more HDMI cables. One for my DVR and one to connect my receiver to my Samsung HDTV. I did get one HDMI cable for Christmas which I could use to connect the Blu-ray to the receiver with. My parents have the same Samsung HDTV that I do and is connected to their cable box via HDMI and, to be honest, I can tell very little difference between the pictures.

This Blu-ray player also has both WiFi and RJ-45 Ethernet internet capability. I decided to use the wired connection by running a 50-foot Cat5 ethernet cable to the router in the other room where my computer is. While I do have a wireless router, I’d rather use a wired connection for a more consistent, stable, and probably faster internet connection (better for streaming movies through Netflix or other service). This also lets me keep the wireless portion of my router disabled.

Setup

After I turned it on the first it went through its configuration routine. Honestly, I don’t remember what order things happened in. I think the first thing it did is ask about the TV Aspect ratio (I chose 16:9 Normal) and type of internet connection (I picked wired).  After this, it connected itself to the internet and recognized that a firmware update was available. I let it go ahead and upgrade the firmware. After it came back alive, I configured it as follows (I am only including the relevant audio/video/network settings I could chose based on my connection methods):

Display

  • TV Aspect: 16:9 Normal – So that all content would have the proper aspect ratio. I don’t like seeing 4:3 content stretched.
  • Resolution: 1080i – This is the best component video will do.
  • Progressive Mode: Auto
  • Still Mode: Auto

Audio

  • Digital Audio: Bitstream (Audiophile) – I choose this to get Dolby Digital signals when playing Dolby Digital content via the optical connection.
  • PCM Downsampling: Off – My receiver is capable of handling 96KHz signals.
  • Dynamic Range Control: On – It was the default so I’ve left it here for now.
  • Downmixing Mode: Surround Compatible – My receiver supports Dolby Pro logic and all those other surround modes.
  • DTS Neo:6: Off – Let my receiver handle this.

Network

  • Network: Wired – Internet Protocol and DNS both set to Auto.

Normal Use

So far I have played the three Blu-ray movies I have and several DVD movies, including several on DVD-R media. I have also played normal Audio CDs and a MP3 CD on CD-R media. The only weird thing that has happened so far is the player did freeze on me once in the middle of a DVD movie and once while navigating the menus on another. All I could do was hit the power button when this happened. I was able to go back and play the section of the movie that the player froze on several times after it happened so I’m not sure what caused the lockup as the disc itself appears to play fine. Likewise, I was able to navigate the menus successfully on the other disc afterwards.

As far as the picture quality goes it’s fine. Nothing to complain about. It may just be all in my head but I do think the DVD images are slightly better than my Denon DVD-2200; however, without being able to compare them side-by-side for a more objective comparison it’s really hard to tell. The one thing I do like more about this player is its ability to play 4:3 content in the proper aspect ratio. My Denon would play 4:3 content in a stretched mode when configured for a widescreen TV.

The other features of the player that I have tried so far are: streaming movies from Netflix, listening to Pandora radio, watching YouTube videos, using Twitter from it, and playing with the Samsung AllShare feature that let’s you play music and videos from your PC. I will write separate posts about each of these experiences; otherwise, this post would become way too long.

So far I would to give this player a thumbs-up. 🙂

Several Movies Added to DVD and Beginning Blu-ray Collection

As is usually the case after the holidays, I’ve added several movies to my DVD and now beginning Blu-ray collection.

Here’s a list of my new DVD movies:Avatar DVD

Here’s a list of my first Blu-ray movies:

Like previous additions, I’ve scanned in at least the front case cover images and have included a trailer for the movie, provided I could locate or make one.

Obviously, to play the Blu-ray movies, I must have received a new Blu-ray player for Christmas also. I did! 🙂 I got a Samsung BD-C6500 Blu-ray player from my sister and brother in-law. By the way, they also gave me a year free subscription to Netflix! I will be writing a separate post about my experiences with this player and the features that I’ve tried. Right now I am trying to decide if I want to write a single post or a separate post for each aspect of the player that I’ve tried. Having said that, my initial impressions at this point are that I like it. Once again I’d like to thank my mom, dad, sister and brother in-law for all this cool new loot! Love yah guys! 🙂