Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter chtito

    (@chtito)

    I found out how to submit bugs and i did it.

    Thread Starter chtito

    (@chtito)

    Interesting indeed ??

    I don’t think that it would be so confusing to edit an attachment like a post since when using the option “Linked to Page” the attachment appears exactly as a post. It has a title, a content and possibly comments. Beside, changing the code to allow to edit an attachment like a post would require very little work.

    However i agree with you that one should also be able to edit an attachment’s information through the Browse options.

    Thread Starter chtito

    (@chtito)

    Yes, you’re right!! Here is the plugin (it’s too simple to be made a general purpose plugin, imo). I didn’t use the strftime function because the right locale is very difficult to get. It requires to have the date in the ISO format, like 2005-01-13. So here is the code:

    function frenchMonth($n)
    {

    $months = array("janvier", "f??vrier",
    "mars", "avril", "mai", "juin", "juillet", "ao??t",
    "septembre", "octobre", "novembre","d??cembre");
    return $months[$n-1];
    }

    function frenchWeekday($d)
    {
    $days = array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
    return $days[$d];
    }

    function localTimeFilter($theDate)
    {
    if (empty($theDate))
    return $theDate;
    $date = explode("-",$theDate);
    $phptime = mktime(0,0,0,$date[1], $date[2], $date[0]);

    return "<h2>".frenchWeekday(date("w", $phptime))." ".date("j", $phptime)." ".frenchMonth(date("n", $phptime))." ".date("Y", $phptime)."</h2>";
    //return "<h2>".strftime("%A %e %B %G", $phptime)."</h2>";
    }

    add_filter("the_date", "localTimeFilter");

    enjoy!

    chtito

    (@chtito)

    Ooops! Sorry…
    Still, i’d be happy to see the rss feeds of wordpress validate using the very simple hack i posted.
    cheers!

    chtito

    (@chtito)

    If you want to validate the rss feed you have to replace the lines like??:
    header('Content-type: text/xml', true);
    by
    header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
    Weird that the developer team has not fixed this… I hope it’ll be fixed for the next release.
    cheers!

Viewing 5 replies - 1 through 5 (of 5 total)