Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter plug_n_author

    (@plug_n_author)

    That doesn’t help me any. I don’t have privileges to submit Trac tickets, I can’t register to submit Trac tickets, Trac is difficult to use in the first place but I don’t see any tickets after running a dozen or so searches, the WordPress Trac ticket login screen has a zillion warnings in Firefox about a bad/incorrectly configured SSL cert., and the option of editing the Wiki seems pointless – all the entries on the Wiki page seem to be roughly 2005-ish.

    What now?

    The codex is near worthless for authoring plugins. Hopefully you know how to use the command line. Under Windows, I use ‘findstr /sic:”somethingtosearchfor” *’ (without the surrounding quotes) to search the entire WordPress source code for something along the lines of what I’m looking for. You really end up winging it. Obviously, you will come to the same conclusion I have – WordPress is a hack and is a miracle it works at all. Unfortunately, WordPress is the best blogging software out there. That says to me there is significant room for improvement and is still really anyone’s game.

    No one really wanders this forum – you’re lucky I came along.

    As far as plugin authoring, you really are on your own. You have to have pretty in-depth PHP skills and former plugin authoring experience with other, more documented products, to author a plugin for WordPress that isn’t riddled with security holes. The plugin infrastructure in WordPress qualifies as decent – not the worst, but hardly the best.

    For those looking for a cleaner solution that is free of upgrade issues, drop this into your plugin directory and activate it:

    <?php
    /*
    Plugin Name: FLV Hack
    Plugin URI: https://www.someplace.com/
    Description: Quickie FLV hack/fix.
    Version: 1.0
    Author: Someone
    Author URI: https://www.someplace.com/
    */

    add_filter(“ext2type”, “FLV_Hack_ext2type”, 10, 1);
    add_filter(“upload_mimes”, “FLV_Hack_upload_mimes”, 10, 1);

    function FLV_Hack_ext2type($filters)
    {
    $filters[“video”][] = “flv”;

    return $filters;
    }

    function FLV_Hack_upload_mimes($mimes)
    {
    $mimes[“flv”] = “video/x-flv”;

    return $mimes;
    }
    ?>

    This does the exact same thing as editing functions.php to add FLV but without requiring you to apply the same mod to the WordPress core – plus it shouldn’t break even if WP includes this in the future. (The question becomes: Why isn’t FLV already in WP?!)

    Forum: Plugins
    In reply to: Plugin authoring questions
    Thread Starter plug_n_author

    (@plug_n_author)

    I’ve written the plugin and it works quite well.

    Forum: Plugins
    In reply to: Plugin authoring questions
    Thread Starter plug_n_author

    (@plug_n_author)

    Okay. I’ve decided that 4b is now impossible with this plugin.

    Forum: Plugins
    In reply to: Plugin authoring questions
    Thread Starter plug_n_author

    (@plug_n_author)

    Okay, I know the answer to #1 now: Yes – modifying the variables passed in does modify the caller. Still need answers for the rest.

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