Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Please add join, where filter to GetCustomWritePanels() to support category filtering
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
agapetry  
View profile  
 More options Sep 19 2009, 2:35 am
From: agapetry <ke...@agapetry.net>
Date: Fri, 18 Sep 2009 23:35:19 -0700 (PDT)
Local: Sat, Sep 19 2009 2:35 am
Subject: Please add join, where filter to GetCustomWritePanels() to support category filtering
Congratulations on a powerful plugin!

I'm the author of the <a href="http://wordpress.org/extend/plugins/
role-scoper/">Role Scoper plugin</a>, looking to cooperate with you in
satisfying a mutual user.  Role Scoper enables post editing roles to
be restricted or assigned for specific categories.  Jens Wedin has
requested that access to Custom Write Post Panels be synchronized with
these category-specific roles.  The goal is to hide and block access
to a Panel if the logged user cannot post in any of that panel's
categories.

I have written some code which accomplishes this goal, but for a clean
implementation it requires the following change (or something like it)
in your RCCWP_CustomWritePanel::GetCustomWritePanels() function.  The
idea is to add join and where filters, as in the WP posts query:

<pre>
function GetCustomWritePanels()
{
        global $wpdb;

        $sql = "SELECT id, name, description, display_order, capability_name,
type, single  FROM " . RC_CWP_TABLE_PANELS;

        $join = apply_filters( 'panels_join_fp', '' );
        $where = apply_filters( 'panels_where_fp', '' );

        $sql .= " $join WHERE 1=1 $where ORDER BY display_order ASC";
        $results = $wpdb->get_results($sql);
        if (!isset($results))
                $results = array();

        return $results;

}

</pre>

I will include this Flutter support in my next release if you can
support it on your end.

Let me know if you'd like any more feedback from me.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mathespup@googlemail.com  
View profile  
 More options Oct 9 2009, 5:33 pm
From: "mathes...@googlemail.com" <mathes...@googlemail.com>
Date: Fri, 9 Oct 2009 14:33:15 -0700 (PDT)
Local: Fri, Oct 9 2009 5:33 pm
Subject: Re: Please add join, where filter to GetCustomWritePanels() to support category filtering
this would be so great! :)

On Sep 19, 8:35 am, agapetry <ke...@agapetry.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »