Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 3,702 total)
  • Author
    Posts
  • in reply to: Getting an Image from a Setting Page Value #14608
    Anh TranAnh Tran
    Keymaster

    Hi Mark,

    When you use an image field like image_advanced, the return value from the helper function is an array of full info for the image, such as URL, alt text, width and height. See this for full details.

    You need to change your code to:

    return "<img src=\"{$icon['url']}\" alt=\"organization-icon\" width=\"64\" height=\"64\" class=\"dgtl-admin-menu-profile\" />$org";

    in reply to: [BUG] No Feedback Given if Address not Found! #14603
    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just updated the plugin to add an alert when users clicking the Find Address but no address found.

    According to the options:

    – the pin to either be locked (so the user can’t drag it around), or to actually update the coordinates to the position the user places it.

    That would be confusing when users want to manually select or adjust an address on the map.

    – the find address function to be triggered every time the user changes the address, city, and country

    That's possible. But that might cause a non-friendly experience if users are entering the data and see the "No results found" message.

    I think that can be done when user done typing on the address fields.

    Implementing this behavior, we don't need the "Find Address" button anymore.

    – give the user feedback when the address is updated, and especially if no address is found using the entered data

    Done the part of notifying users when no address is found.

    Showing a notification when an address is found seems weird, especially if we do the automatically adjust the map as above.

    – trigger the find address function on submit if the user doesn’t click on the button

    I don't think this is a good option, since it confuses users (as they didn't select an address).

    In my opinion, implementing the "auto adjust the map when address change" is the best option. I'll try to do that now and let you guys see the result.

    Update: I've done that here. Please download and let me know what you think.

    What's done:

    • Remove "Find Button"
    • Auto adjust the map when address fields change. Work only for multiple address fields. Single address field already have autocomplete.
    in reply to: How to set default map bounds on OSM field? #14600
    Anh TranAnh Tran
    Keymaster

    Hi,

    You can set the default location via std parameter, like this:

    'std' => '53.346881,-6.258860'

    By passing a pair of latitude, longitude, you can set the default location of the map.

    in reply to: Input type image_advanced vs image #14581
    Anh TranAnh Tran
    Keymaster

    Hi Hazmi,

    The data for these 2 field types are the same, so you want to switch field type, it's ok to do so.

    Besides, the ajax request is very minimal as it only queries for attachments. There's no requests to other resources (CSS, JS). So if you see a lot of errors, I think the website should be optimized.

    in reply to: image_upload validation error #14580
    Anh TranAnh Tran
    Keymaster

    I'm very sorry, but I don't have a quick solution for that at the moment.

    in reply to: "MB" vs "Meta Box" #14565
    Anh TranAnh Tran
    Keymaster

    Hi,

    Nice question!

    This is actually my personal inconsistent. At first, I and other developers used "Meta Box" simply because it's the name of the main plugin. And then, I realized the name is quite long, so I changed to "MB". That's why you see 2 "versions" now.

    From now on, everything will be just "MB" for short.

    in reply to: Javascript Error disable switching the editor tabs #14563
    Anh TranAnh Tran
    Keymaster

    Thanks a lot for your feedback. WordPress 5.2 added another version of the clipboard library into its core, which conflicts with the current version of the MB Builder.

    I've just fixed and updated the extension and AIO. Please update.

    in reply to: image_upload validation error #14562
    Anh TranAnh Tran
    Keymaster

    I got it. Thanks for your code.

    This problem is expected behavior because the validation module doesn't support image_upload. The fields image_upload, image_advanced works differently from other fields since they use the Media Library and thus, the validation can't inject into the process.

    Anh TranAnh Tran
    Keymaster

    I've just checked the field and I don't see the problem.

    Does the user have the privilege to upload?

    in reply to: image_upload validation error #14534
    Anh TranAnh Tran
    Keymaster

    I've just checked the field and I don't see the problem. Can you give me more details? What's the code for the meta box?

    in reply to: Not working with conditional check from inside group #14532
    Anh TranAnh Tran
    Keymaster

    Hi aaron,

    The problem here relates to the scope of the conditions. When a condition is put on a field that inside a cloneable group, the plugin sets the scope = the group. So it searches for elements inside the group only.

    In this case, the scope of the condition for the field "Column Image" is the group. And the plugin can't search outside it.

    in reply to: Validation does not work when field is clonable #14530
    Anh TranAnh Tran
    Keymaster

    Hi Calpaq,

    The problem is the jQuery selector $("input[name$='fill-time\]'], input[name$='peak-pressure\]']" ). It's static, while cloning creates new elements.

    To fix that, you need to listen to a higher element, such as body, like this:

    $( 'body' ).on("focusout", "input[name$='fill-time\]'], input[name$='peak-pressure\]']", function (){} );

    in reply to: MB Custom Table beginner questions #14529
    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    Is there something I can add to phpmyadmin so that on import of the csv file it also creates the needed info for each in the wp_post table?

    Creating a new post in the wp_posts table requires coding. So, I think this can be done with custom code only. Take a look at this tutorial on how to process a CSV file with PHP.

    Is there a hook that I can add to functions.php to tell my field to output the full url path and not the ID.

    File and image fields save attachment IDs in the database instead of URL. To get file URL, you can use wp_get_attachment_url function.

    Anh TranAnh Tran
    Keymaster

    Thanks for letting me know. Let me check it.

    in reply to: image_upload validation error #14517
    Anh TranAnh Tran
    Keymaster

    Thanks for letting me know. Let me check it.

Viewing 15 posts - 1,111 through 1,125 (of 3,702 total)