Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Using “Code Snippets” plugin (that allows you to leave your theme unchanged), I added your code (my contact form page happens to be named “contact”) as a snippet (with option “Run snippet everywhere”) and it seems to work.
    Thanks!

    Same here. A lot of spam messages with version 3 whereas I got none with version 2.

    It works, thanks!

    The congress we are organizing will be held simultaneously in two locations (in different cities), so I don’t need multiple datetimes for the (single) event, but multiple locations.

    Home country of attendee.

    I see. I edited my review and started to explore plugin functionalities.

    cicopitalia

    (@cicopitalia)

    I managed to write a snippet (that I add to WordPress by means of Code Snippets plugin) that filters media library items by multiple (one or more) categories. It is customized to be used with Shortcode Ultimate plugin, in fact the snippet just define a shortcode ([mmj-gallery ...]) that is used to create the actual shortcode string of a ‘Shortcode Ultimate’ image gallery. It might be called a ‘metashorcdode’.

    // needs 'Shortcode Ultimate' plugin
    // default limit: -1 (no limit)
    // default size: 180
    // 'attachment_category' in the example is the category name for attachments created by 'Media Library Assistant' plugin
    // usage examples:
    // [mmj-gallery categoryname='attachment_category' categoryterms='term1,term2,term3']
    // [mmj-gallery limit=20 categoryname='attachment_category' categoryterms='term1,term2,term3']
    // [mmj-gallery size=180 categoryname='attachment_category' categoryterms='BRAU1,Santa Verdiana']
    
    function mmj_gallery_call($atts)
    {
        // Attributes
        $a = shortcode_atts(array(
            'categoryname' => 'not_provided',
            'categoryterms' => 'not_provided',
            'limit' => -1,
            'size' => 180
        ), $atts);
        
        // Output Code
        $tax_query_array = array();
        foreach (explode(',', $a['categoryterms']) as $value) {
            array_push($tax_query_array,array(
                'taxonomy' => $a['categoryname'],
                'field' => 'slug',
                'terms' => array($value)
            ));
        }
        if (count($a)>1) {$tax_query_array["relation"]="AND";}
    	//print_r($tax_query_array);
        $args = array(
            'post_type' => 'attachment',
            'post_status' => 'any',
            'post_mime_type' => array( 'image/jpeg','image/gif','image/png','image/bmp','image/tiff','image/x-icon' ),
            'posts_per_page' => -1,
            'tax_query' => $tax_query_array
        );
        $query_images = new WP_Query($args);
        $id_list = "";
        foreach ($query_images->posts as $image) {
            $id_list .= (($image->ID) . ",");
        }
        return do_shortcode("[su_custom_gallery source=\"media: ".$id_list."\" limit=".$a['limit']." link=\"lightbox\" width=\"".$a['size']."\" height=\"".$a['size']."\"][/su_custom_gallery]");
        //return "[su_custom_gallery source=\"media: ".$id_list."\" limit=".$a['limit']." link=\"lightbox\" width=\"".$a['size']."\" height=\"".$a['size']."\"][/su_custom_gallery]";
    }
    
    add_shortcode('mmj-gallery', 'mmj_gallery_call');
    

    Let me know if it useful for you.
    Possible improvements:
    – add the chance to combine AND and OR clauses
    – automatic management of tranlsated taxonomy with multilingual sites
    – make it a standalone plugin (I don’t have the knowledge nor the time to do it)

    • This reply was modified 2 years ago by cicopitalia.
    • This reply was modified 2 years ago by cicopitalia. Reason: improve language
    • This reply was modified 2 years ago by cicopitalia. Reason: add ul
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    • This reply was modified 2 years ago by cicopitalia. Reason: fix typo
    • This reply was modified 2 years ago by cicopitalia. Reason: fix typo
    • This reply was modified 2 years ago by cicopitalia. Reason: improve description
    cicopitalia

    (@cicopitalia)

    @chouby
    If I change such behaviour through wpml-config.xml, what happens to existing taxonomy terms having a language specification?

    Follow up

    Errata corrige: “170” is related to category term

    I managed to retrieve programmatically a comma separated list of image ids (like “1244,1242,1241,1240,1239,1238,”) using the following snippet:

        $args = array(
            'post_type' => 'attachment',
            'post_status' => 'any',
            'post_mime_type' => array( 'image/jpeg','image/gif','image/png','image/bmp','image/tiff','image/x-icon' ),
            'posts_per_page' => -1,
            'tax_query' => array(
                array(
                    'taxonomy' => "media_category",
                    'field' => 'slug',
                    'terms' => array("term1","term2")
                )
            )
        );
        $query_images = new WP_Query($args);
        $id_list = "";
        foreach ($query_images->posts as $image) {
            $id_list .= (($image->ID) . ",");
        }

    So it means that database and input arguments are correct. I also had a look at the code but is not easy to find the problem without debugging tools.

    Same issue on Android 5.1.1.
    SMS sharing maight be important to somebody, could you please have a look at the issue?

    Same issue here, tried with default SMS app on Huawei Y5 with Android 5.1.1.

    • This reply was modified 3 years, 1 month ago by cicopitalia.
Viewing 11 replies - 1 through 11 (of 11 total)