Laguna Beach Bikini

Fashion•Travel•News•Entertainment•Money•Tech•Talent Career
Subscribe

Archive for the ‘Geek Squad’

Wordpress: How To Get A Random Post On Front Page

March 08, 2010 By: web developer Category: Geek Squad No Comments →

I thought I would post this tip since it might be of interest to to anyone running a wordpress blog.

Wordpress has become the most popular blogging software. Normally a blog displays the posts on the front in normal blog order, which is reverse chronological order. Kind of like a diary. I know many bloggers would prefer to have the blog posts somewhere besides right on the front page. Maybe they want a “splash” page, or a page with static information.

Wordpress allows you to have a static front page for you website.

Getting A Random Post On Front Page
Suppose you have been blogging for a while and have a lot of blog posts in various categories in your archives. Suppose you would like your front page to show one sample post chosen randomly from your category archives. Here is how to do it.

First you have to locate the index.php in your themes directory. This would be at something like /wordpress/wp-content/themes/mytheme directory. Save a backup and edit index.php using your favorite text editor, like vi or BBEdit.

Find just before you enter The Loop. Use query_post with the parameter orderby=rand to select one random post from several categories. You have to know the category id numbers, which in this case are 100, 101 and 102.

<?php query_posts('orderby=rand&showposts=1&cat=100,133,155,156&paged=$page'); ?>
<?php if (have_posts()): ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>

The parameter showposts=1 displays only one post. The parameter paged=$page makes the Next and Previous links work right.

Using your ftp client, upload the new index.php to your webserver. On the Macintosh, Cyberduck is one ftp program you can use.

That is all there is to it. Every time the page gets loaded, there will be a new random post on your front page.

AddressMunger.com munges your text so you can Display HTML/Javascript/php code on a webpage.

Measuring Website Speed with WebPagetest

March 03, 2010 By: web developer Category: Geek Squad No Comments →

I have been tasked with optimizing the web pages at LBB for speedy page loads. Well you can’t optimize something unless you can measure it. So here is a free tool at webpagetest.org for webmasters to measure how long it take to load a webpage: WebPagetest. It was originally known as AOL Pagetest.
What is WebPagetest?
Pagetest [...]

Search Engine Optimization: Speed Counts

March 02, 2010 By: Chief Category: Geek Squad No Comments →

Let me say right up front that I know very little about Search Engine Optimization.
What is Search Engine Optimization?
From my limited understanding, Search Engine Optimization, or SEO in geek-speak, means optimizing your website so that it gets into the search engines and gets found by users. Website owners want to increase the volume of traffic [...]

How To Save Flash Movies with Mac OS X

February 19, 2010 By: web developer Category: Geek Squad No Comments →

Many websites, such as youtube and daily motion, show videos using Flash. If you like a video enough to want to watch it later, you will find that you can’t just right-click to save the movie. One thing you can do is bookmark the page. But sometimes the video might get deleted. So it would [...]

Fixing OS X Font Errors In ImageMagick

February 11, 2010 By: web developer Category: Geek Squad No Comments →

We installed ImageMagick on Mac OS X 10.4.11 using MacPorts. Everything worked great except for the text. If you run the convert command and try to draw text you get this message:
convert: unable to read font `/Library/Fonts/Arial’ @ annotate.c/RenderFreetype/1044.
Open up fontbook and find where you fonts are by right clicking on a Font. Arial is [...]

Installing ImageMagick on Mac OSX

February 09, 2010 By: web developer Category: Geek Squad No Comments →

We have a need to quickly resize JPEGs. There are tons of programs for Mac OS X that can do this, freeware and payware. We tried a few of them. Most of them are either drag and drop or you browse for a folder. In general they work pretty well. But they never quite seems [...]

How To Restore A Wordpress Database

February 05, 2010 By: web developer Category: Geek Squad No Comments →

Recently our wordpress database got corrupted and needed to be repaired. In another article, What To Do When Your Wordpress Blog Vanishes, I wrote about how to using phpMyAdmin to repair tables that were corrupted .
But sometimes repairing tables does not fix the problem. You try to the repair tables command and get a bunch [...]

How To Disable All Comments in Wordpress

February 03, 2010 By: web developer Category: Geek Squad No Comments →

Yesterday we had some problems with the database getting corrupted. As mentioned in a previous article What To Do When Your Wordpress Blog Vanishes, some of the database tables have been getting Overhead which can be fixed with repair table command in phpMyAdmin.
One of the tables that shows some overhead is wp_comments, which is the [...]

What To Do When Your Wordpress Blog Vanishes

February 03, 2010 By: web developer Category: Geek Squad No Comments →

Last night around 9:30pm, I received an urgent call from the editor of launabeachbikini.org. Their website, which is powered by Wordpress, had completely vanished.
Just like on the cover of the Hitchhiker’s Guide to the Galaxy, the first thing is: Don’t Panic.
I tried to access the home page with a web browser. Nothing.
I tried to access [...]

New Webcam Camera for Christmas

December 28, 2009 By: web developer Category: Geek Squad Comments Off

The original webcam we had was a Logitech E1000 that was purchased at Tesco department store in Prague for about 500 crowns. It almost immediately started acting flaky like it had a bad connection.
Finally today I hooked up a high-end video camera to use as the webcam. This gives a great image although it is [...]

Apple Introduces New 27-inch iMac

October 31, 2009 By: Chief Category: Geek Squad Comments Off

Last week Apple announced new iMacs, a 21.5-inch and a 27-inch. Here is what Apple said about the new displays:
The 21.5-inch, 1920-by-1080 display has 17 percent more pixels than the previous 20-inch iMac. The 27-inch, 2560-by-1440 display has a whopping 78 percent more pixels than the 21.5-inch iMac. And a 1000:1 contrast ratio gives you [...]

Performance Guide for Macintosh

September 26, 2009 By: web developer Category: Geek Squad Comments Off

Buying a computer for digital photography can be confusing, to say the least. Which model is optimum and how do you get the best performance out of it? Here is an invaluable resource for anybody looking to purchase a Macintosh computer.
This report will help you:
1. Choose the right Mac the first time.
2. Save money buying [...]

Limits of Digital Photography

September 01, 2009 By: Chief Category: Geek Squad Comments Off

Here is an article about the limits of digital photography using current technology. I was going to post this in the Camera Corner, but this has some major geek stuff going on like quantum physics. The author is both a photographer and a physicist. Check out this quote:
Thus today’s equipment is sufficiently powerful to allow [...]

Remote Stripping of EXIF Meta Data

August 27, 2009 By: web developer Category: Geek Squad Comments Off

In a previous article, I wrote about stripping EXIF meta data from jpeg image files to speed up downloads. We used ExifTool by Phil Harvey which runs from the unix command shell.
Well suppose you have thousands of jpeg files already on a webserver and you would like to strip the meta data from them. If [...]

How We Added Live WebCam

July 07, 2009 By: web developer Category: Geek Squad 1 Comment →

There is a live StudioCam feature on Laguna Beach Bikini. Here are a few technical notes on how we added this feature to the website and how you can easily do the same thing.

The StudioCam is just another name for a webcam. I suppose if it was set up on the beach it word be [...]

Stripping Exif Meta Data

June 16, 2009 By: web developer Category: Geek Squad 5 Comments →

One thing that is useful to do if you are creating images for the web is to strip out the EXIF meta data from the files before uploading them to your webserver.
Starting with the moment you press the shutter on a digital camera, additional information is added to every image file. This information includes camera [...]

Easter Egg in Slide Show

May 28, 2009 By: web developer Category: Geek Squad Comments Off

An Easter egg is a hidden bonus feature of software that is undocumented. You have to discover it. It is kind of like the opposite of a bug. Well I just discovered an Easter egg in our slideshow widget which you see running at the top of the right side bar titled “Picture Show.”
The slideshow [...]

Alexa Traffic Rank

May 26, 2009 By: web developer Category: Geek Squad Comments Off

On the right-hand sidebar, just below the blogroll links, we added an Alexa traffic rank widget. According to Alexa, for the last three months lagunabachbikini.com is the 8,082,109 ranked site measured by traffic. We are right behind Luigi’s Sub & Pizza and just beat out Empire State Hat Blocking.
But for the last month we [...]

New Feature: Live Chat

May 24, 2009 By: Chief Category: Geek Squad Comments Off

Yesterday we added another new feature to Laguna Beach Bikini: live chat. If you click on the StudioCam link in the menu bar above you will go to the page with the webcam. Below that is the live chat window. Just type in your name or handle and your can start chatting as a guest.
Chat [...]

Live Webcam from Studio

May 22, 2009 By: Chief Category: Geek Squad Comments Off

We added a new feature to Laguna Beach Bikini: a live webcam. Just click on the StudioCam link along the top menu bar to see a live image from photo studio.
This is not a live video feed. Only still images are captured every so often like once per minute. When you go to the StudioCam [...]