vernal pool

Mittineague

WordPress widgets.php Hack

There are 41 plants in blossom on May the 23rd.
Blue Toadflax Linaria canadensis blossoms between May 23 and Jun 17
Bluets Houstonia caerulea Apr 18 to Jun 18
Canada Mayflower Maianthemum canadense May 15 to Jun 03
Celandine Chelidonium majus May 07 to Sep 11
Cleavers Galium aparine May 15 to May 27
Common Chickweed Stellaria media Mar 26 to Jun 09
Common Cinquefoil Potentilla simplex Apr 30 to Aug 19
Common Dandelion Taraxacum officinale Apr 03 to May 21
Common Winter Cress Barbarea vulgaris Apr 25 to May 30
Cow Vetch Vicia cracca May 23 to Aug 29
Dame's Violet Hesperis matronalis May 15 to Jun 18
Dwarf Cinquefoil Potentilla canadensis Apr 18 to May 30
False Solomon's Seal Smilacina racemosa May 15 to May 30
Field Hawkweed Hieracium pratense May 23 to Sep 07
Garlic Mustard Alliaria officinalis Apr 29 to Jun 17
Golden Alexanders Zizia aurea May 15 to May 30
Great Chickweed Stellaria pubera May 07 to Jun 19
Ground Ivy Glechoma hederacea Apr 20 to Jun 18
Hooked Crowfoot Ranunculus recurvatus May 18 to May 23
Jack-in-the-pulpit Arisaema atrorubens May 18 to May 23
Japanese Honeysuckle Lonicera japonica May 21 to May 30
Larger Blueflag Iris versicolor May 21 to Jun 05
Moss Phlox Phlox subulata Apr 16 to Jun 01
Mouse-ear Chickweed Cerastium vulgatum Apr 24 to May 27
Myrtle Vinca minor Apr 11 to Jun 01
Northern White Violet Viola pallens Apr 21 to May 21
Oxeye Daisy Chrysanthemum leucanthemum May 15 to Aug 02
Pink Lady Slipper Cypripedium acaule May 15 to May 28
Red Clover Trifolium pratense May 23 to Oct 24
Small Jack-in-the-pulpit Arisaema triphyllum May 18 to May 23
Star of Bethlehem Ornithogalum umbellatum May 26 to Jun 01
Tall Buttercup Ranunculus acris May 15 to Jul 16
Thyme-leaved Speedwell Veronica serpyllifolia May 10 to Aug 02
True Forget-me-not Myosotis scorpioides May 02 to Jun 07
Water Hemlock Cicuta maculata May 15 to Jul 16....
If you are looking for a way to stop RSS feeds with a character encoding different than your WordPress blog's character encoding from causing validation errors, please see rss.php Hack 1

This hack stops feeds in the WordPress sidebar feed widgets that have different character encodings from causing non-valid mark-up.

I say "hack" because this is NOT a plugin, but involves direct modification of the widgets.php file. If you try this, Please be Sure to Save a Back-up of the original file.

Important* Note* This hack requires the iconv function. From the PHP documentation:

To use functions provided by this module, the PHP binary must be built with the following configure line: --with-iconv[=DIR].

Also, if you are on a Windows or IBM server, or the results are not what you expect, Please read the documentation (actually, it's not a bad idea to read it anyway).

Open the content/plugins/widgets/widgets.php file.

In the widget_rss function find this section of code:

<?php
//php tags needed for highlighter
//.............................
 
      } else {
        $desc = str_replace(array("\n", "\r"), ' ', wp_specialchars(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)), 1));
        $summary = '';
      }
 
//.............................
?>

After the line with the closing curly brace add:

<?php
//php tags needed for highlighter
//.............................
 
      $feed_char_enc = $rss->feed_encoding;
      $board_char_enc = get_bloginfo('charset');
      if($feed_char_enc != $board_char_enc)
      {
        $conv_link = iconv($feed_char_enc, "$board_char_enc//IGNORE", $link);
        $conv_desc = iconv($feed_char_enc, "$board_char_enc//IGNORE", $desc);
        $conv_title = iconv($feed_char_enc, "$board_char_enc//IGNORE", $title);
        $conv_summary = iconv($feed_char_enc, "$board_char_enc//IGNORE", $summary);
        $link = ($conv_link != FALSE) ? $conv_link : $link;
        $desc = ($conv_desc != FALSE) ? $conv_desc : $desc;
        $title = ($conv_title != FALSE) ? $conv_title : $title;
        $summary = ($conv_summary != FALSE) ? $conv_summary : $summary;
      }
 
//.............................
?>

Which will now be before this line:

<?php
//php tags needed for highlighter
//.............................
 
      echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>$summary</li>";
 
//.............................
?>

Notice that for the "out charset" I appended the "//IGNORE" string. This removes any characters that can't be converted. This is not entirely desirable, but using the default will result in the converted strings being terminated at the last valid character. A third option is to append the string "//TRANSLIT" instead. You may want to try it, but I found that the converted strings still caused non-valid mark-up.

About - Blog - Sitemap - Contact - Forums - Home 

PHP icon. PEAR icon. MySQL icon. phpBB icon. Sitepoint icon. Valid XHTML 1.0 icon. Valid CSS! icon. Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0