Forum Replies Created

Viewing 15 replies - 1 through 15 (of 174 total)
  • bdd

    (@bws-online)

    It’s not CSS whitespace — it’s actually writing a <br> tag?

    I’ll see if I can recreate it with default theme and no plugins.

    I can’t post a link here (client site).

    bdd

    (@bws-online)

    Any insights please?

    bdd

    (@bws-online)

    Okay, thanks. The site is using Avada theme — how do I determine if it loads JavaScript in the footer area of each page?

    Yes, if it’s a different situation, it should definitely have a different log message.

    bdd

    (@bws-online)

    Thank you. That updated the threshold.

    Problems, though. When I look at the Status section in Flamingo, it’s saying “Spam log: reCAPTCHA score (0.00) is lower than the threshold (0.30).”

    So I set it to 0.0 — and it still didn’t send, and the Status section said “Spam log: reCAPTCHA score (0.00) is lower than the threshold (0.00).”

    1. How do I get messages to send using CF7 and reCAPTCHA in this situation?

    2. If I have to set it to 0, how long does it take before you can raise that and still have messages go through?

    Thanks.

    bdd

    (@bws-online)

    I’m not seeing how the link you included would help me modify the existing search so that it looks at adverts_person in addition to what it’s already searching.

    I don’t see where it indicates what fields it’s searching (which seem to be just title and description). Are they being added to the visible group somewhere and that’s how it’s controlled? Or is there another place where this is set?

    Any direction you could provide would be very much appreciated.

    I see the default search form info in defaults.php:

    // Set default search form in [adverts_list] shortcode
    Adverts::instance()->set("form_search", array(
        "name" => "search",
        "action" => "",
        "field" => array(
            array(
                "name" => "query",
                "type" => "adverts_field_text",
                "label" => "",
                "order" => 10,
                "placeholder" => __("Keyword ...", "adverts"),
                "meta" => array(
                    "search_group" => "visible",
                    "search_type" => "half" 
                )
    
            ),
            array(
                "name" => "location",
                "type" => "adverts_field_text",
                "label" => "",
                "order" => 10,
                "placeholder" => __("Location ...", "adverts"),
                "meta" => array(
                    "search_group" => "visible",
                    "search_type" => "half"
                )
            )
        )
    ));

    It feels like I need to add to that a bit.

    Okay, with a little more exploration, I found your snippets for search by price, date, and category. I created a new plugin for search by name — almost there, but not quite. Can you help me with some of the key variables for this? For example, am I missing anything in this section?

    $form['field'][] = array(
            "name" => "adverts_person",
            "type" => "adverts_field_text",
            "order" => 20,
            "label" => __("Member Name"),
            "meta" => array(
                "search_group" => "visible",
                "search_type" => "half" 
            )
        );

    And are the names right in this?

    function search_by_name_query( $args ) {
        
        if( ! adverts_request( "adverts_person" ) ) {
            return $args;
        }
        
        $args["tax_query"] = array(
            array(
                'taxonomy' => 'adverts_person',
                'field'    => 'term_id',
                'terms'    => adverts_request( "adverts_person" ),
            ),
        );
        
        return $args;
    }

    The field is showing up under the Keyword… field on my page, but text typed into the field doesn’t get recognized/produce in any results. I feel like I’m close!! I don’t think I have something right to search the list of people who have ads posted.

    Thanks again.

    bdd

    (@bws-online)

    Got it. Done. Thanks.

    bdd

    (@bws-online)

    Thank you. I wondered how to do this conditionally in the future if I were to allow more than a few images (so that the arrows might be appropriate at times).

    But since at the moment I’m just allowing 2 images per ad, it’s a non-issue.

    (I didn’t realize they were fake arrows initially.)

    bdd

    (@bws-online)

    Thank you. Turns out I just needed to set the minimum files to upload to 0 in the Limit File Uploads snippet.

    bdd

    (@bws-online)

    They weren’t in the published ad, but they WERE in the Media Library. I did more testing now, though — it’s fine. Thanks.

    • This reply was modified 1 month, 3 weeks ago by bdd.
    bdd

    (@bws-online)

    When only one image is uploaded, there are the arrows on left and right (when using Thumbnails Slider for Gallery Pagination) — .wpadverts-als-container .als-nav-fake — that’s what I was referring to. They show up with 2 images, too, but they do nothing.

    I wanted to know if there was a way (other than always hiding them via CSS) to remove them — and to do so in a way that wouldn’t impact them when they WERE needed/functioned.

    (Do those arrows ever function?)

    bdd

    (@bws-online)

    Tried all sorts of tweaks to the code, different examples from other posts, etc. — nothing was working. I was doing all this in my theme functions.php because that’s what you’d said to do. Finally decided just to try it as a plugin — and it worked.

    So thanks, looks to be set now.

    bdd

    (@bws-online)

    Nevermind — found the answer to my own question in your Limit File Uploads snippet.

    (The answer is yes, for anyone else looking. 🙂 It’s in the “Set allowed file types section” of that snippet.)

    bdd

    (@bws-online)

    Making progress!!

    I cleaned up some revisions and went back to the original Limit File Uploads snippet from GitHub — all good regarding the max limit getting followed.

    Do you want a new ticket regarding the NOTE on the last post?

    bdd

    (@bws-online)

    I see it’s working on the demo on the iFlyChat site — it opens a pop-up window chat between the 2 members. I have Show Popup Chat enabled (on Frontend) and the pop-up chat works if you activate it from the icon on the bottom right.

    Looking forward to a reply. Thanks.

    bdd

    (@bws-online)

    I used the snippet like this:

    function limit_file_uploads( $form ) {
        
        if( $form['name'] != "advert" ) {
            return $form;
        }
    
        foreach( $form["field"] as $key => $field ) {
            if( $field["name"] != "gallery" ) {
                continue;
            }
            
            $form["field"][$key]["validator"] = array();
            
    
            // Set minimum and maximum file upload size.
            // Note. this is a limit for an individual file, not whole gallery field.
            $form["field"][$key]["validator"][] = array(
                "name" => "upload_size",
                "params" => array( 
                    "min" => null,     // minimum file size
                    "max" => "200KB"     // maximum file size
                )
            );
        }
    
        return $form;
    }

    I added an image on an ad that was 5.70MB — it allowed that. When I view the image in the ad itself, it shows an image with an intrinsic size of 5312×2988 pixels at 878×494 pixels. If I look in the Media Library, there’s an image with that intrinsic size that’s 6MB. It did not stick to my 200KB max as in the snippet.

    NOTE: There are 2 other images there, too, even though I removed them from the ad before publishing. Shouldn’t it delete images that weren’t used in the final ad? Can that be revised so it happens?

Viewing 15 replies - 1 through 15 (of 174 total)