RhymedCode Forum » Custom Write Panel

WP 2.3+ Changes to Categories (CWP currently broken using trunk)

(7 posts)
  • Started 3 years ago by leekelleher
  • Latest reply from Rokwan

  1. Firstly, great work with the plugin so far!

    I'm running the latest version of WordPress from the trunk (currently 2.3-alpha). I'm aware that alphas are considered unstable, but since the introduction of the tagging system to the core... the current release of your plugin breaks with the categories.

    I hacked around (slightly) with your code... here's a diff/patch of the changes I made:
    http://wordpress.pastebin.ca/646960

    I tried to make it backwards compliant - it should work with the WP 2.0 branch - but I haven't actually tested it myself.

    Let me know what you think.

    Cheers,
    - Lee

    PS. I also had a major problem with the installation of CWP, but it was related to a WP-bug with the register_activation_hook on Windows; (more info on trac). So I had to create the db tables manually! :-$

    Posted 3 years ago #
  2. dizzy100
    Member

    Thamks for the DIFF / PATCH lee. Works perfectly on 2.3 now.

    Many regards.

    Posted 2 years ago #
  3. ndb
    Member

    how to use this patch? Do i have to paste the code into plug in files?

    Btw When the official version of CWP compatible with 2.3 will be relesed?

    Posted 2 years ago #
  4. As well as installing the patch, to get CWP to support tags you need an extra entry in the standard_fields table. While we wait for the next release it's possible to create the required entry using SQL, eg.:

    insert into wp_rc_cwp_standard_fields (id, name, css_id, default_inclusion) values('14','Tags','tagdiv','false');

    Posted 2 years ago #
  5. yujin
    Member

    Hello. This plugin is exactly what I wanted. Thanks so much. And thank you for the patch for wordpress 2.3. It will probably work also on WPMU, which I use.

    Wel, I just wonder why not simply using the wordpress standart library functions, get_categories() and get_catname(), something like below (if not changing elsewhere):

    RCCWP_Application.php (around line 25)
    function GetWpCategories() {
    return get_categories('hide_empty=0');
    }

    RCCWP_CustomWritePanel.php (around line 150)
    function GetAssignedCategories($customWritePanelId) {
    global $wpdb;
    $sql = "SELECT cat_id FROM " . RC_CWP_TABLE_PANEL_CATEGORY . " WHERE panel_id = " . $customWritePanelId;
    $results = $wpdb->get_results($sql);
    if (!isset($results))
    $results = array();
    for ($i=0; $i<count($results); $i++)
    $results[$i]->cat_name = get_catname($results[$i]->cat_id);
    return $results;
    }

    Posted 2 years ago #
  6. proba
    Member

    "leekelleher" patch disappeared form the internet, and he said, that he stopped to use this plugin. I need to work this plugin under WP 2.3. Please anyone who have a (leekelleher's or anyone's) patch (or full version or anything) to this plugin please send me or post here this code!

    Posted 2 years ago #
  7. Rokwan
    Member

    The "leekelleher" patch doesn't work for me, but you can find it here: http://wordpress.pastebin.ca/852545

    Hope that helps

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.