filters – ACF Relationship Previous Next links of CPT

I have a CPT for artworks with custom taxonomy for artists. Then I have another CPT for artists. The artist pages are basically the the page title (artist name) and a relationship field where you add the artist’s artwork from the artworks CPT where you can filter by the custom taxonomy (since there are 50+ artists and 100s of artworks).

Each artwork is its own page as mentioned. When you click on the artwork from an artist page, we want to have the option of going to the next or previous artwork based on the order displayed on the artist page as determined by the order you set from its relationship field.

I’ve tried many solutions but none have worked yet. The only way I even get a hint of success is by adding a ACF field to the artworks post type that selects the artist post type via a post object field. I was using THIS PAGE as my guide.

There seems to be an issue with the following code. I’m note sure how $current_post_id applies to the array_search. If I print_r $current_index nothing appears. Same goes for $prev_module and $next_module. However, if I print_r $module_ids the array appears as it should in the order I set on the Artist page in the Relationship field. $first_module and $last_module show the correct IDs too. I just can’t seem to get the current post ID to then determine next and previous.

// create empty array for module ids
$module_ids = array();
             
// loop through modules and add them to array
foreach( $modules as $module ) :
    $module_ids() = $module->ID;
endforeach;
             
// get the current index
$current_index = array_search( $current_post_id, $module_ids );
             
// find the prev/next items
$prev_module = $current_index - 1;
$next_module = $current_index + 1;
             
// find first and last modules
$first_module = $module_ids(0);
$last_module = end($module_ids);

Create a custom sort order for filters in Google Data Studio

I have a dashboard where I am filtering by month, but I have had to change the dates that fall within each month because of fiscal periods so they are stored as text. Because of this, my filter shows all the months out of order. I can’t seem to figure out a way to re-order these. Help!

filters – How to run php code only for a specific widget on a page and not all widgets on that page?

I want to display extra information below the post title only for the posts block on the home page and not the portfolio. I’m using WordPress’ the_title filter to do this and that works fine, but at the moment, it shows the extra info in both the portfolio and the posts block. I need a condition to restrict the filtering only to the posts block. The post block’s class name is “home-post-block”

My current code looks like this.

function add_rating_html( $title) {

    if (in_the_loop()){
        $out = "Rating: 5";
        $title .= $out;
    }
    return $title;
}

add_filter('the_title', 'add_rating_html',1);

Any help would be most appreciated.

extjs – How do I add filters and filter the data correctly?

i have window ExtJS:

let height = Ext.getBody().getViewSize().height,
width = Ext.getBody().getViewSize().width,
store = Ext.create('CRM.store.MessageCenter.Messages.List');

Ext.define('CRM.window.MessageCenter.Messages.List', {
    extend: 'Ext.window.Window',
    xtype: 'window',
    name: 'MessageCenter_Messages_List_Window',
    iconCls: 'mails',
    title: 'MessageCenter_Messages',
    width: width,
    height: height - 26,
    x: 0,
    y: 26,
    layout: 'fit',
    dockedItems: ({
        xtype: 'pagingtoolbar',
        dock: 'bottom',
        displayInfo: true,
        extend: 'Ext.PagingToolbar',
        displayMsg: 'Показано {0} - {1} из {2}',
        emptyMsg: "Нет данных для отображения",
    }),
    initComponent: function() {
        var that = this;
        that.store = store;
        that.dockedItems(0).store = store;
        this.callParent();
    },
    items: ({
        xtype: 'grid',
        name: 'MessageCenter_Messages_List_Grid',
        border: false,
        store: store,
        columns: (
            {
                text: 'ID',
                dataIndex: 'id',
                width: 100,
                hidden: false
            },
            {
                text: 'Дата создания',
                dataIndex: 'date',
                width: 150,
                xtype: 'datecolumn',
                format: 'd.m.Y H:i:s',
                hidden: false
            },
        ),

    }),
});

My store:

let name = 'CRM.store.MessageCenter.Messages.List';
Ext.define(name, {
    extend: 'Ext.data.Store',
    autoLoad: true,
    pageSize: 35,
    fields: (
        'id',
        'date',
    ),
    sorters: ({
        property: 'date',
        direction: 'DESC',
    }),
    proxy: {***},
});

I need to add filters to select data from the database. For example, by date or ID, but I do not know how to do it correctly. And whether it is necessary to use data models in my case. Please tell me, I’m just starting to learn ExtJS, thank you for your help.

Does Power Automate work with SharePoint Online with active ip filters?

Background: My corporation restricts access for certain networks on SharePoint Online. This is not negotiable and a security mechanism we want to employ. We know that there are some scenarios where data can still be exposed through other networks, but the threat is negligible to us.

A few months ago our Power Automate workflows began to fail specifically on getting user account information (Get user profile (V2)) with an error that corporate policies disallow access on this ressource. If the SharePoint IP-Filter is deactivated, the flows run without error.

There is some documentation about which Azure and SharePoint IPs need to be whitelisted, but it still doesn’t work. The field where you can specify networks to be whitelisted is limited to 5000 characters, so I needed to use CIDR notations and expand the ranges a bit, especially on IP6 adresses. But the needed IP wasn’t among those. You can also fill in 0.0.0.0/0 which results in the flows working again, so a missing IP is very likely.

Has anyone encountered similar problems and has a solution? We are currently porting back to Workflows 2013, but I fear they will deprecated too at some point. I know that IP whitelists aren’t the prefered mechanism to restrict access, but it currently is our only option because manpower is quite limited.

Sorry for the long text and I would appreciate any input.

neutral density – Is there an optimal order when using both polarized and ND filters on a lens?

Try it both ways and see what happens. Maybe it is different one way from the other. Now you have two possibilities to create a picture you want. Or maybe it doesn’t make a difference in a way that matters to you.

The most likely way it will make a difference is mechanically.

One way is probably a little easier in terms of making photographs than the other. Maybe it is easier to turn the polarizer if it is first. Maybe it is easier to turn if it is second.

Maybe it is easier to compose and set exposure with one filter on. (or maybe not).

The right way is the way that works for you. Not what someone on the internet says…well except for this of course.

What is the benefit of using “filters” instead of “folders” in Visual Studio C++ projects?

I noticed that the default behavior for Visual Studio C++ projects is to organize files using filters instead of folders on disk. Essentially all the source files within the project are stored in the same disk directory, but the filters virtualize the files into a hierarchy.

What value do “filters” offer compared to the traditional “folders organized on disk”?

java – Convert tokenized filters to where clause

I receive tokenized filter in the below format:
{"column", "operation", "value"}

Is there a smart way (using any library CriteriaQuery/QueryDSL/plain string) to convert it to multiple where clause in SQL query.

Let’s say i receive these filters:

({"name", "contains", "abc"}, {"owner.name", "startWith", "xyz"}, {"date", "lessThan", "30/06/2021"})

And it should be converted to

SELECT FROM orders o JOIN users u on (o.id = u.order_id) WHERE o.name like '%abc%' AND u.name LIKE 'xyz%' AND o.date < TO_DATE('30/06/2021', 'dd/mm/yyyy')

I’m looking for some generic way of creating multiple where clauses depending on the number of received filters. I’m not looking for technical ways of how to convert ‘contains’ to ‘sql like’.

mobile – Force users to select only one of X filters in list display

Looks like a radio button would be fitting here. Radio buttons are designed so that only one option can be active at once.

mockup

download bmml source – Wireframes created with Balsamiq Mockups

If you have only a few people in the second group, you could use a combobox (like in Type of operation). If there are more people, you could still use a combobox, but with search feature – like this one: https://select2.github.io/examples.html

On mobile, you could surround each radio button “section” with color or variable saturation or lightness, or gray-out other input fields when their group is not selected. The circle in radio group should be clear enough indicator to users that only one option can be active at a time.

As for the default selection – there are two paths you can take:

  1. Don’t select anything at first. This will let user choose what they want. It would be wise not to gray out anything at first, or the user might think nothing is editable.
  2. Test your app and pre-select one option the user is most likely going to use.

neutral density – Do ND filters increase the dynamic range that a camera can ‘see’?

Your question references ND filters which I think most would consider to be a solid ND filter. Those are mostly used to decrease your shutter speed for long exposures or by allowing you to open up your aperture for a more shallow depth of field in bright light.

A graduated ND filter is typically used to balance the exposure. With a traditional ND filter the top part of the filter is darker (by the rated stops for the filter) and it gradually moves to transparent. You place the darker part over the brightest parts of the scene (a bright sky) in order to properly expose the foreground.

In the foreground you do not lose shadow detail because it’s viewed through the transparent part of the filter. If anything you gain shadow detail as you’re able to properly expose it without the bright sky causing the foreground to underexpose.

However, if you have shadow detail you need preserved in the bright area…those would most likely be lost anyway due to the bright source and just about your only choice would be to use an HDR technique. Some of the highlights would be lost in the bright area but I think if you’re trying to balance the overall exposure this is a point of choice – what do you want to show in the image? Before filters or HDR you always had to choose – expose for foreground or expose for the sky/background.

There are also reverse grad ND filters which help with sunsets/sunrises – when the brightest part of the sky is along the horizon line. You are able to preserve highlight and shadow detail in the sky above the sun due to how the graduation is applied to this filter. It’s darkest at the center, bottom is transparent…but from the middle dark area it gradually lightens toward the top.