Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

July 21 2011

05:45

Japan - Women's World Cup triumph an inspiration for now and the future

Mainichi Daily :: The morning of July 18 was a happy one in Japan, energizing the entire country. The Japanese people, faced with so much sorrow over recent months, were able to rejoice winning the Women's Soccer World Cup final, bringing the championship to Japan for the first time.

But have you recognized that: After every match including the final, the Japan team unrolled a banner reading "To Our Friends Around the World, Thank You for Your Support" and carried it around the edge of the pitch to great roars of appreciation from the crowd? And did you know that in the past, women selected to the national team had to pay half their own expenses for international tournaments? 

Continue to read mdn.mainichi.jp

September 24 2010

14:19

How to create a wordpress magazine theme using Twenty Ten – Part 4

This is part three of a short series outlining how to tweak a wordpress template to get some magazine style functionality. Part onePart Two and Part three are available here.

In part three of this short series we looked at adding a second loop to our edited index page to get round the problem of our Featured Post being repeated on the front page. In this final part I’ll look at adding a thumbnail and styling up the page.

Image thumbnails

Over the years, theme designers magazine themes have come up with many weird and wonderful ways of getting thumbnail images on front pages. But it’s only recently that WordPress developers added solid support.

One of the things I wanted to do with this series is to avoid too much tweaking of files. So I’m going to be relying on some of the core features for wordpress to get thumbnails on the page rather than fancy tricks. So beefore we get back in to editing the template code to display thumbnails there are few things we need to check.

Media settings

When you add an image to a blog post you are given the option to add it as a thumbnail, medium, large or original size. We are going to be using the standard function to to get a thumbnail (you may remember it from part 1) and it uses the same shorthand to get an image

[php]

[/php]

The sizes for each these are set in the Media section of the settings tab.

The image size options

So our edited front-page is going to be based on these sizes. If you want any other sizes for your page you should set them here first. The downside of working this way is that this will impact on the sizes of images placed in your blog posts -that’s the trade off of keeping things simple.

Adding a featured image.

Version 2.9 of WordPress included a new post thumbnail option which allowed you to define an image to display “as the representative image for a Post or Page. The display of this images is up to the theme. This is especially useful for “magazine-style” themes where each post has an image.” The feature was renamed “featured image” in wordpress 3.0 – I’m guessing to avoid confusion with thumbnails. Whatever it’s called it’s ideal for our front page.

Adding a featured image

When you write a post you should see a panel called Featured Image. Clicking the Add featured image link opens up a standard image browser. You simply find the image you want to use and click the Use as Featured Image link and you’re done.

So before we go on, add a featured image to the post in your Featured Story category.

Adding the thumbnail to the template

Now that we have set up the Featured image we can edit our template file and get an image on our frontpage.

Open up the Main Index Template file and add the following and edit the first loop so it looks like this:

[php]

Our medium thumbnail

Now do the same with the second loop.

[php]

Thumbnails added to each loop

And that’s it.

Adding some style.

Technically we are done. All the elements we want are on the page. But it’s not looking as good as it could be. We need to add some styling information and make some amendments to the stylesheet file.

I’m not going to go in to a big write up of CSS here (try the excellent W3Schools for a basic intro) but if you’re interested in tweaking wordpress templates it’s one of those areas you’ll be spending a lot of time with.

For now, its enough that when dealing with stylesheets, we need to keep our eye open for two things; divs and classes.

Divs

If you look at the Main Index template file, you’ll see the following lines
[html]

……


[/html]

The div tag is an html element that doesn’t actually display anything by default, it defines a section of the page. When it comes to look and feel, the key part is the id . This ‘connects’ the div to display instructions defined in the stylesheet. The style definition for container is:

[css]
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
[/css]

Anything that sits between the div tags will be effected by this definition.

Classes

One restriction of ID’s is that you can only use them once on a page. So if you have a lot of elements on a page that you want to style you have to use a class. Remember the html we used for our post title:

[php]

[/html]

That means we take the standard H2 formatting and add some custom styling.
[css]
#content .entry-title {
color: #000;
font-size: 21px;
font-weight: bold;
line-height: 1.3em;
margin-bottom: 0;
}
[/css]

This says, any time the class entry-title (denoted by the full-stop) is referenced inside the content div (denoted by the # symbol) apply the following styling.

Image Alignment

The first thing to sort out is the alignment of the images. I’m going to cheat a little here and pick up the standard style call for images.

Change the post_thumbnail function call in the first loop to the following :

[php]
“alignleft”)); ?>
[/php]

The post thumbnail function allows you to stack extra information in parameters that can be ‘added’ to the code as it’s generated. We have stuffed a reference to a style called alignleft. If you call up the Stylesheet file in the theme editor you can find the definiton of that style (you may have to search for while)

[css]
#content .alignleft,
#content img.alignleft {
display: inline;
float: left;
margin-right: 24px;
margin-top: 4px;
}
[/css]

This is very similar to our post title example above but this time there is also a reference to the image tag (img).

To finish up we can add the same class to the thumbnail call in the second loop:
Change the post_thumbnail function call in the first loop to the following :

[php]
“alignleft”)); ?>
[/php]

Boxing in the featured story

To make my featured story stand out I’m going to wrap it in a grey box. To start with I’m going to use a DIV to define that extent of the box.

[php]

…the rest of the loop….



[/php]

I’ve added a new DIV tag with an id called FeaturedStory and closed the div after the end of the loop.

If you update the file and looked at the page you should see nothing new. Remember DIV tags don’t show up till you style them.

Open the Stylesheet file in the editor window and scroll all the way down to the bottom. Add the following:

[css]
#FeaturedStory {
background: #f7f7f7;
color: #222;
margin-bottom: 18px;
padding: 1.5em;
height: 350px;
}
[/css]

This does the following:

  • Changes the background colour to grey
  • Changes the text colour to a dark grey
  • Pads the bottom of the box with 18 pixels of space
  • Pads the all the way round with 1.5 em of space
  • Sets the height of the box to 350pixels

Save the file and look at the results. You’ll see a box around the featured content.

Conclusion

That’s pretty much it. We’ve pulled in a featured post and thumbnail to go with it. Then we added a second loop to pull in the rest of the posts without duplicating our featured post on the page and added a thumbnail to them. Then we styled the results to align the thumbnail and wrap the featured post in a box to make it stand out.

Along the way we’ve touched on PHP, functions, variables and stylesheets. All of which are play a big part in theme development. But we have done it all with the minimum of alteration to the core theme files.

Some issues

This method is not without its issues. Editing the raw files like this is risky if you forget to back things up. There is also the risk that if the theme is updates by wordpress (as it is from time to time) then your customization will be deleted. But the exercise has been more about some of the basic concepts than a robust solution.

So I hope you found it useful and it made sense. Here’s the finished Main index template file:

[php]
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

/* This is the new loop to display a featured story.
* It creates a variable and then loads all the posts that match the query.
*/

$my_query = new WP_Query('category_name=Featured Story&showposts=1');

/* Now it loops through the results and displays the content.
*/

while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;

/* We load the Page ID in to a variable to check for duplicates later on
* Then it displays the title as a working link with formatting to
* match the Twenty Ten template.
* Then we display the excerpt.
* Then we finish the loop with the endwhile statement
*/
?>

“alignleft”)); ?>

/* This is the second loop that replaces the standard loop
* It uses the standard loop function calls
*/

if (have_posts()) : while (have_posts()) : the_post();

if( $post->ID == $do_not_duplicate ) continue;
update_post_caches($posts);

/* This line gets the post ID and checks it agains our duplicate variable
* If it matches it does nothing. If it’s different we display the content
*/

?>

“alignleft”)); ?>

/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
//get_template_part( 'loop', 'index' );
?>


[/php]

Don’t forget, you need to update the Stylesheet file as well.

Questions, comments etc always welcome

February 14 2010

07:48

Any Video Converter 3.02 – Google Nexus One Converter And Support New Encryption Dvd


January 27, 2010, Anvsoft Inc releases Any Video Converter Pro V3.0.2 and Any DVD Converter Pro V4.0.2. In the new version, Any Video/DVD Converter Pro is added Google Nexus One output profile. Users can easily convert their videos to Nexus One by selecting this profile. Any DVD Converter Pro is updated to support directly ripping and converting all encrypted DVD no matter what DVD copy protection method is used. The newly released DVD movies including G.I. Joe: The Rise of Cobra, District 9, Inglourious Basterds, The Proposal and etc. are supported. With new Any DVD Converter Pro V4.0.2, you can avoid converting the potential fake main movie titles and get the scenes played back in the right order.

New Any Video/DVD Converter Pro 3.02/4.02 which is available at: http://www.any-video-converter.com/ adds some new useful options and functions, updates engine and fixes some bugs:

1. Add new DVD navigation mode to show the progress of Opening DVD;

2. Update the mplayer engine;

3. Add Ripping DVD tittles in DVDNav mode and Show fake tittles in copy protected DVD disc two options to DVD Tab in Options;

4. Add Avoid incomplete conversion option to Advanced Tab in Options;

5. Fix the bug that controlling the slider in DVD preview or Clipping mode is not accurate;

6. Update the language files;

7. Add mp2 audio output in the DVD PAL output profile;

8. Add new DVD analysis capabilities to analyze the structure of new encryption DVD, get the accurate position of the main titles and not show the fake titles;

9. Fix the bug of displaying error when merge videos;

10. Add Google Nexus One output profile;

The Nexus One is an Internet and multimedia enabled smart phone designed by Google, Inc, which runs the Android open source mobile operating system. Being a multimedia enabled smart phone, Nexus One can play videos encoded by H.263, H.264 and MPEG-4 codec, play audio formats including MP3, AAC+, Ogg Vorbis, WAV and MIDI. Using new Any Video/DVD Converter Pro 3.02/4.02 can easily convert all kinds of video formats or DVD to MP4 videos playable on the Nexus One. There is a Google Nexus One MPEG-4 Movie output profile for you to choose to start converting.

With new DVD analysis capabilities, Any DVD Converter Pro V4.0.2 can analyze the structure of almost all new encryption DVD. When users insert DVD to Any DVD Converter Pro which is in default settings, the program will display the DVDNav mode to tell the users what is going on. After the analysis, Any DVD Converter Pro will tell the users where the main titles are. This function can prevent users from converting the wrong titles to save users’ time. Also, new Any DVD Converter Pro can handle some new encryption DVD which are difficult to be ripped and converted.

Some bad quality DVD and videos will be fast forward or incomplete after conversion. Now, the new mplayer engine and new option Avoid incomplete conversion for new Any Video/DVD Converter Pro 3.0.2/4.0.2 can help users fix those problems. When users check this option, that means adding -noskip option in mencoder command. With this option, the output videos from those bad quality DVD or videos will play normally.

New Any Video/DVD Converter Pro 3.0.2/4.0.2 (http://www.any-video-converter.com/) is designed with user-friendly and easy-to-use graphical interface. Also, Any Video/DVD Converter Pro is famous for its fast converting speed and excellent video quality.

For more information or questions about Any Video/DVD Converter Pro Series Software, please visit http://www.any-video-converter.com/

###

Contact Information

support@any-video-converter.com

Related posts:

  1. Video Converter And Dvd Ripper For Nexus One The Nexus One is an Internet and multimedia enabled...
  2. How to convert YouTube, google, yahoo, stream, limewire video to Google Phone Nexus One? Better than iPhone and Droid, Google Phone Nexus One...
  3. How to sync iTunes music video movie to Google Nexus One convert DVD to Google Android phone Wanna sync iTunes music video movie to Google Nexus...

Related posts brought to you by Yet Another Related Posts Plugin.

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl