Internet Madman – Tech & Web News

Bringing you web hotness…

Browsing Posts in XHTML & CSS Design

Well anyway, I’ve moved to the beach since my last post, and I’ve had to delay a ton of projects, as I’ve gained some meaningful work for a client, and I’m only one Internet Madman and therefore my time must be carefully managed, but I was noticing some meta tags on the New York Times website, (Not a fan of the NY Times) (to lefty for me…) and wondered if anyone had any meaningful insight as to the validity of these tags. After all they are a newspaper, and not I’m sure they’re more intended as extra data just to have extra data, but Post your comments if you have something to say about them. I’ve posted the tags for your reference. Thanks in advance for any info.

I’ve noticed they have some Trim() or Alltrim() or TrimLeft() or whatever code they be using issues!

<meta name=”DISPLAYDATE” content=”June 8, 2010″ />
<meta name=”hdl” content=”McDonald’s Offers Cash in Recall of Shrek Glasses” />
<meta name=”byl” content=”By WILLIAM NEUMAN” />
<meta name=”lp” content=”McDonald’s will pay $3, a bit over the top price of $2.49, for each glass.” />
<meta name=”cre” content=”The New York Times” />
<meta name=”edt” content=”NewYork” />
<meta name=”pdate” content=”20100608″ />
<meta name=”ttl” content=”" />
<meta name=”virtloc” content=”" />
<meta name=”des” content=”Recalls and Bans of Products;Glassware;Metals and Minerals” />
<meta name=”per” content=”" />
<meta name=”org” content=”McDonald’s Corp” />
<meta name=”geo” content=”" />
<meta name=”ticker” content=”McDonald’s Corp|MCD|NYSE” />
<meta name=”misspelling” content=”" />
<meta name=”dat” content=”June 8, 2010″ />
<meta name=”tom” content=”News” />
<meta name=”cat” content=”" />
<meta name=”col” content=”" />
<meta name=”dsk” content=”Business” />
<meta name=”articleid” content=”1247468009837″ />
<meta name=”ARTICLE_TEMPLATE_VERSION” CONTENT=”700″>
<meta name=”hdr_img” content=”/images/article/header/sect_business.gif” />
<meta name=”thumbnail” content=”" />
<meta name=”thumbnail_height” content=”" />
<meta name=”thumbnail_width” content=”" />
<meta name=”xlarge” content=”" />
<meta name=”xlarge_height” content=”" />
<meta name=”xlarge_width” content=”" />
<meta name=”sectionfront_jsonp” content=”http://json8.nytimes.com/pages/business/index.jsonp”>
<meta name=”CG” content=”business”>
<meta name=”SCG” content=”">
<meta name=”PT” content=”Article”>
<meta name=”PST” content=”News”>

Please do not try to post any political opinion here as in reply to the fact that I don’t care for the NY-based Newspaper.

Popularity: 13% [?]

If you are like me, you probably want your website to have excellent navigation, and let people know where they are on your website pretty much all the time.

SO I WAS LOOKING FOR A WAY TO DISPLAY SOME INFORMATION LIKE CATEGORY NAME IN WORDPRESS (to be a header for an ordered list of that category’s other posts.) That topic will be covered later by the way.

So I made it happen, but then my Word Press pages were showing the header for the category ‘uncategorized’ (Not cool!)

Here’s a good way to show the header on all pages except your main web pages.

global $post;
$category = get_the_category();
if ( is_page() ) {
}
else{
echo 'Posting Filed in ' .$category[0]->cat_name;
}
?>

***UPDATE***

The above code works great, but unfortunately I just noticed that it still shows up even if there are no posts in that category. That’s fine because I am using that page as an index page, and there aren’t supposed to be ‘POSTS’ in that category, however just having a header hanging out there is kind of stupid (that’s what I’m using this code for, a header in a widgetized sidebar)

Use this PHP instead…

global $post;
$category = get_the_category();
if ( is_page() ) {
}
else{
if ( have_posts() ) {
echo $category[0]->cat_name;
}
}
?>

Popularity: 5% [?]

import-from-wordpressAs you can see, I import from an RSS file sometimes into installations of WordPress. Default PHP installations limit your maximum filed upload size to 2MB. Even if you increase this setting in your php .ini file, the WordPress mechanism will not import a much larger file.

I recommend limiting file sizer to about 1.5 MB.

This way, you will not lose any posts that you are trying to import. It seems to break around 950 – 980 posts. It’s happened multiple times, even though if you increase you PHP upload file maximum limit to 20 MB or more, and the tool report this setting in the administration &raguo; import area, the import WILL FAIL.

So for people that have went to all the trouble to create a program to create RSS to import into WordPress, be sure to keep the file size below 2MB.

Popularity: 29% [?]