This tutorial will show you how to create amazing black and white images using the new CS3 Black and White Adjustment Layer in Photoshop. This is relatively simple to do, and depending on what you want the final product to look like you wont need to mess around with layers and levels.
Black and white seams to capture more emotion and can give a lot to the viewer. It also helps show the subtle details that might be lost in colour photos.
I’m working on a template that was designed to have Tabs and I really didn’t think to much of it, I naturally assumed that it would be possible to add a <span ? tag around the title in the site navigation. Um yea not true. After a bit of searching I found a line in the classes.php in the wp-includes folder that looks like this (around line 517 in version 2.2):
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';
I simply added a tag around the title area and viola it worked like a hot damn.
$output .= $indent . '
<li class="' . $css_class . '"><a title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '" href="' . get_page_link($page->ID) . '"><span>' . apply_filters('the_title', $page->post_title) . '</span></a>';
$output .= $indent . '
<li class="' . $css_class . '"><a title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '" href="' . get_page_link($page->ID) . '"><span>' . apply_filters('the_title', $page->post_title) . '</span></a>';
Hope this helps.
I have been doing a lot of searching in regards to Google Maps and information on there API. In my Addressbook I had a some what dynamic but clumsy way of showing some ones location.
So when I would pull the information I would use a PHP function called “urlencode” it basically converts spaces to underscores so your URL won’t explode and make Google angry.
This works fine but I was opening a new window that I had no control over. so that’s when I began to look into the API and after a bit of looking I found that they had support for HTTP Request and by doing so Google spits out a bit of XML.
Read on..
This is a handy little snippet of code for any one that is trying to optimize there code. I just used this in my Addressbook to see how the pages were loading.
microtime — Return current Unix timestamp with microseconds
There isn’t much to this script, we are going to assign $time-start with a value (start time). Then we would place your code you want to time next. Once the script has executed we then assign a value to $time-end. Simple math will tell us that subtracting $time-start from $time-end will give us the difference, Thus your execution time.
$time-start = microtime(true); // Code Here $time-end = microtime(true); $time = $time_end - $time_start; echo "Loaded in $time seconds\n";
This is a tutorial more or less on principle for sessions with PHP. I used this chunk of code in my Address Book and Spoke Calculator. The source code is available to download and its more or less together for you to look at. its not a working micro site. the components however should work.
Here is the work flow that i used:
The Php Switch is a neat little script. it can be used for a lot of different things. but today we will create a script that will let a user change what style sheet they want and the script will create a cookie to remember the users input.
we can start off by making a few different style sheets. All i did is changed the background colour, you could change whatever you want with these files.
Horizontal navigation is huge on the internet and the easiest way to do it is with a little bit of CSS. The first step is to make your navigation list:
A lot can be done with a basic if statement, this is why it is so important to programmers. its boils down to basic logic. “if something is true then do it., if not do something else.”
here is a quick example:
$name = "Adam";
if ( $name == "Adam" ) {
echo "Hello Adam!"; }
echo "Welcome to my homepage!";
A lot of people for the first time opening up WordPress can be over come by all of the stuff that there is to a theme. I like many others, one tip I can offer is to open up your header.php footer.php and sidebar.php and insert a php comment or an html comments, making sure not to put and html comment at the top of the header page, it will cause your problems later on down the road.
Let’s create a file lister that will go perfect with an upload script that will come later on. First well make a variable ($maindir) this is the location on your web server you want to list.
Now we us another variable ($mydir) and give it a opendir handle, now opendir is to be used with closdir as well, so remember this.
We also don’t want to show all the files, so we create another variable ($exlude) we make it an array and put in things like the name of the file or anyfile you dont want listed, in this example we will use index.php.