The often discussed, semi-fabled video on Flickr feature is finally released. It’s actually pretty cool. They’ve decided not to fight Yahoo! Video or You Tube for video supremacy. Instead, they’ve limited the time length to 90 seconds and hope to build a community of shorter, more personal videos that you can mix with your photographs.
It also includes more storage for your photographs. Here’s a sample of a video that I just posted. It’s a non-captioned capture of a train pulling into the Chemin Vert Metro stop.
Related articles
- Yahoo extends Flickr with video [via Zemanta]
Captioning Sucks and Needs a Jump Start
1 Comment Published 1 month, 2 weeks ago in Accessibility, Standardista, Video and Yahoo! Digg This
The internet is awash in video. YouTube, Yahoo Video, and other video sites host millions of videos with little attention to close captioning. For many sites, the text translations exist, they simply are not used. This sucks.
Television shows have featured captioning for many years. It’s sometimes the only way to figure out what they are saying on South Park. However, captioning standards are all over the place, the quality of text is questionable, and the industry is not supporting new innovations. This sucks.
Joe Clark is working on a new standard to fix these issues. He probably knows more about captioning than any other breathing creature in the world CaptioningSucks.com is the new home to the future of captioning. Perhaps it is time to buy the domain: CaptioningRules.com, for hopefully it won’t suck much longer.
Related articles
- Yahoo Video classifies porn as “Health and Beauty” [Nsfw] [via Zemanta]
- Flickr Video beta due in April [via Zemanta]
- Yahoo is less prudish than Google [Health And Beauty] [via Zemanta]
How to fix your K2 powered wordpress blog after upgrading to 2.5
0 Comments Published 1 month, 2 weeks ago in CSS Digg ThisDid you upgrade to Wordpress 2.5 and now discover a fatal error? You may see this error when you log into the admin section if you have enabled the K2 sidebar manager:
Fatal error: Call to undefined function wp_register_sidebar_widget() in /home/.foo/bar/mywebsite.com/wp-admin/includes/dashboard.php on line 31.
Brad at ChaoticTech has created a simple solution.
Here’s why: WordPress 2.5 has a slick new dashboard that takes use of widgets to work. K2 blocks widgets when you use Sidebar Modules (which is awesome), so WordPress 2.5 can’t get to widgets.
What this does is make it so that Widgets is disabled for everywhere so that Sidebar Modules will work, EXCEPT for the dashboard. This pretty much solves it.
Nice and simple.
K2 + WordPress 2.5 = Broken? I can fix that
Visit Chaotic Tech for the php code. You’ll simply over-write the widgets-removal.php file. Thanks Brad, you’ve saved me a ton of headaches.
Related articles
- WordPress 2.5 Is Finally Out [via Zemanta]
- WordPress Gets Major Overhaul [via Zemanta]
- Wordpress 2.5 Available for Download [via Zemanta]
Multiple asides categories in Wordpress?
0 Comments Published 2 months, 1 week ago in PHP, Wordpress and YUI Digg ThisI’m working on a new theme for Wordpress. It’s a generic theme that I hope will make it easier to build multiple business sites in the future. Part of the goal is integrating the Yahoo! YUI library into the superb K2 theme.
I’ve come across a problem that should be easy to solve. Wordpress allows you to create a category whose posts are displayed differently than other category posts. These “asides” are short posts that appear in the side bar and not in the main body of the blog. This functionality is baked into the latest versions of Wordpress and the K2 theme’s admin screen makes it really easy to use.
However, I need to add a second variation of the asides. I want to create a new landing page with three promo spots just below the topnav. This branding section would allow the site to highlight important features, promos, sales, or blog posts. This could be done with asides, however I don’t want to lose the functionality of asides in the blog section.
Asides become Promos
I’ve started by cloning the asides module and functionality and creating a new set of functions (promos). The admin screen now allows you to choose a category that will be defined as a promo. Everything seems to be working until you get to the blog post page. Blog posts labeled as the asides category appear as they should.
However, the promos category and promo posts are not following the aside functionality. I’ve looked at the loop to see where it excludes the asides category and can’t find it. I can’t find the “the_post()” function, which may be the source of the issue. I would assume that the promos module is telling the_post that “promos” category is special and these posts should not be included in the loop, nor in the category list.
help?
Have you worked with the asides functionality in Wordpress? Do you have any suggestions? I’ll post a summary when I get the solution figured out.
Resources
Here’s a list of related web pages that include information but haven’t answered my questions.
- Wordpress Codex: The Loop
- WP_Query function reference
- 1 post, 3 asides on front page support question
- Adding Asides
Updates
The above link for the loop has some interesting information on multiple loops within one page. I’m going through the examples for some answers. Here’s a snippet of the post:
Loop Examples
Below are two examples of using multiple loops. The key to using multiple loops is that $wp_query can only be called once. In order to get around this it is possible to re-use the query by calling rewind_posts() or by creating a new query object. This is covered in example 1. In example 2, using a variable to store the results of a query is covered. Example 3 documents the use of the update_post_caches(); function to avoid common plugin problems. Finally, ‘multiple loops in action’ brings a bunch of ideas together to document one way of using multiple loops to promote posts of a certain category on your blog’s homepage.
Wordpress Codex: The Loop
Updated: the solution
During my initial modification of the files, I missed an important line that tells the loop to honor a new filter. So, if you want to duplicate the asides functionality with a new category, add this new section to wordpress/wp-content/themes/k2/app/includes/info.php
-
function k2promos_filter($query) {
-
global $k2sbm_current_module;
-
$promos = get_option(‘k2promoscategory’);
-
// Only filter when it’s in the homepage
-
if ( ($promos != 0) and ($query->is_home) and (!$k2sbm_current_module) and
-
-
$priorcat = $query->get(‘cat’);
-
$priorcat .= ‘,’;
-
}
-
$query->set(‘cat’, $priorcat . ‘-’ . $promos);
-
}
-
return $query;
-
}
-
// Filter to remove promos from the loop
-
add_filter(‘pre_get_posts’, ‘k2promos_filter’);
In a fit of cleverness, I changed the naming convention on my promos from promos_sidebar_module to promos_module. This threw my code off for a while.
This is the rough draft of my promos.php file that sits in wordpress/wp-content/themes/k2/app/modules/promos.php
-
<div class=“bd”>
-
have_posts() ):
-
$promos->the_post();
-
?>
-
-
<div class=“<?php k2_post_class($promos_count++, true); ?>”>
-
-
‘,’‘); ?>
-
</div>
-
</div>
-
<p><label for="promos-module-num-posts"></label> <input id="promos-module-num-posts" name="promos_module_num_posts" value="<?php echo(sbm_get_option(’num_posts‘)); ?>" size="2" type="text"></p>
-
3));
-
register_sidebar_module_control(’Promos‘, ‘promos_module_control‘);
-
?>
There are also some changes in the options.php file and sbm section. Do a search for asides and start replacing with your new function, i.e. promos.
Remove the categories from latest posts and categories modules
The next step in this process was to make sure the promos category (and asides) don’t appear in the category and latest posts modules. These two modules sit inside the /k2/app/modules/ folder. They also use similar logic. We need to create a comma delimited list of categories to exclude from the functions that build the appropriate lists.
This code checks for aside and promos categories. It then creates a comma separator and then combines the categories into a string, i.e. “12,13″
-
global $k2sbm_current_module;
-
-
$promos = get_option(‘k2promoscategory’);
-
$asides = get_option(‘k2asidescategory’);
-
/* lets create a new variable, excludes and use this to populate the exclude=foo parameter.*/
-
$excludes = “”;
-
if ( ($asides != 0) or ($promos != 0 )) {
-
$separator = (($asides!=0)&&($promos!=0)) ? “,” : “”;
-
$excludes = $asides . $separator . $promos;
-
}
For the latest posts, we’ll need to create a slightly different string. We need to create a parameter and add a negative sign to each category
-
$excludes = ‘-’ . $asides . $separator . ‘-’ . $promos;
actually, this is bad logic, I need to only add the - if the category exists. That’s what is great about blogging your code. You realize your mistakes before it is too late.
Finally, we use that excludes variable in the logic to hide the categories, for example (categories.php)
-
wp_list_categories(‘title_li=&show_count=1&hierarchical=0&exclude=’ . $excludes);
These snippets assume you do not want to include your asides posts into the latest posts and categories modules. you can simplify the code if you only want to exclude the promos.
IE7 and IE8 hack behavior
0 Comments Published 2 months, 1 week ago in CSS, CSS3, Hacks, IE7 and IE8 Digg ThisWe’ve had the luxury of hacks to fine tune Internet Explorer bugs. Internet Explorer 7 disabled the majority of hacks, with the exception of the * hack. This hack allowed you to send a style only to Internet Explorer by prefacing an attribute with an asterisk.
-
/*this is for all browsers*/
-
#main p {color:black;}
-
/* this is for Internet Explorer */
-
#main *p {color:red;}
-
/*this is ignored by IE7 and will target IE6 */
-
#main _p {color:green;}
This set of hacks allowed us to control IE7 and IE6. However, IE8 does not recognize the * hack. Special IE8 rules will either need to be defined with conditional comments, the Microsoft proposed meta tag, or some new hack to be discovered. Let’s hope the mature version of IE8 will reduce the need for these hacks.
For more information on the above hacks, visit an earlier post: IE7 Hacks
About
Advanced CSS resource guides.
This site features helpful hints, in-depth exercises, and book reviews. It's the site that I'd want to have handy to remember how to do something and what to look out for.
Please note: In the process of copying content from one site to another, some of the coding examples have been mangled. If you see a page that needs attention, please leave a comment to let me know. I am actively updating the pages to make sure they are accurate.
Latest
- Flickr Video is live
- Captioning Sucks and Needs a Jump Start
- How to fix your K2 powered wordpress blog after upgrading to 2.5
- Multiple asides categories in Wordpress?
- IE7 and IE8 hack behavior
- Internet Explorer 8 beta released for testing
- Yahoo! Music - Easy, semantic, unobtrusive music badges
- RNIB releases guidelines for accessible Flash banner ads
- Learn more in your spare time with iTunes University
- Use a content delivery network for dirt cheap

