Forum Replies Created
-
AuthorPosts
-
david.h
ParticipantHi Anh,
I suggested a boolean for bi-directional (reciprocal) relationships in this post:
https://support.metabox.io/topic/post-relationships/#post-7797
Hope this helps,
Daviddavid.h
ParticipantHi Anh,
Apologies, I realise my question was not well written.
The taxonomies are not already setup, they are imported directly into a fresh WordPress database using SQL - these scripts form the WordPress taxonomy hierarchy by creating entries in wp_term_taxonomy that relate to the imported wp_terms data.
At present, the scripts also add related taxonomy meta into wp_termmeta, although I wish to use Metabox's Custom Tables feature to store these entries in a separate table.
Maybe this is straightforward, so I will give it a try and come back if there are any problems.
Thanks,
DavidFebruary 4, 2019 at 8:42 PM in reply to: ✅Change Destination Of Custom File Upload Field Type #13204david.h
ParticipantThanks Anh,
I had shown your suggestion in my snippet:
'upload_dir' => fnCreateOrReturnFolder
Although I'm interested in how Metabox would handle an error creating or retrieving the folder, whereupon in the snippet I have set it to return 'error' instead of the folder path?
January 31, 2019 at 6:40 PM in reply to: ✅Change Destination Of Custom File Upload Field Type #13173david.h
ParticipantHi Anh,
Thanks for the pointers, I have come across those before, although I'm interested in logical and structural separation.
Would this pseudocode work, and could Metabox handle being returned an error?
array( 'upload_dir' => fnCreateOrReturnFolder ) fnCreateReturnFolder { $userdir = get_current_user_id() if $userdir != 0 { $userdirpath = '/path/to/users/folders/' . $userdir if ( !file_exists($userdirpath) ) { if ( wp_mkdir_p( $userdirpath ) ) { return $userdirpath } } } return 'error' }January 30, 2019 at 6:16 PM in reply to: ✅Change Destination Of Custom File Upload Field Type #13166david.h
ParticipantHi Anh,
Could this be used to restrict users to accessing their own upload directory/files in the Media Library, an often requested feature in many forums.
The concept would appear to integrate nicely with all the Metabox upload fields, for example:
https://docs.metabox.io/fields/image-upload/
where the array attribute 'upload_dir' uses/creates a "home" folder which could be a user's wordpress ID or an secure, unique algorithmic hash.
Thanks,
Daviddavid.h
ParticipantThanks Anh,
I'll let you know when I have something working.
David
david.h
ParticipantEven better!
Thanks for the update.
david.h
ParticipantHi MindSpark,
Take a look at this, it's old but should point you in the right direction:
https://chillicream.com/blog/2013/09/12/jquery-steps-form-wizard
http://www.jquery-steps.com/Thanks
August 14, 2018 at 4:22 AM in reply to: ✅Open Street Maps: binding of Latitude and Longitude, keeping the map in English? #10994david.h
ParticipantHi Mauro,
Glad you got it sorted - OSM/Leaflet is a really great combination.
All the best
August 10, 2018 at 7:22 PM in reply to: ✅Open Street Maps: binding of Latitude and Longitude, keeping the map in English? #10969david.h
ParticipantHi Mauro and Anh,
It is possible to display international (i.e. English) and localised (e.g. Arabic) names using OSM although it requires a custom tile server like:
https://tile.iosb.fraunhofer.de//#map=10/30.9482/34.048/3
Obviously MetaBox cannot provide this level of customisation, but it shows that OpenStreetMap can (and should) provide this functionality natively.
Thanks
david.h
ParticipantAnh,
Rather than post here, I sent you an email about this last week - did you get it?
david.h
ParticipantHi Anh,
This looks perfect.
I'm currently juggling several projects and my staging environment is down at the moment, but I'll try and test it next week.
Thanks
david.h
ParticipantIf you haven't time to look at Leaflet too much (it's massive), here are some Leaflet geocoding plugins:
david.h
ParticipantHi Anh,
That's looking great.
There are some ways to geocode without Google, the following is a reliable open source service with an accomplished API:
https://github.com/komoot/photon
http://photon.komoot.de/A different (and maybe better) approach is a Metabox extension using Leaflet which handles nearly all of Google's paid services but using open source data/APIs:
https://github.com/Leaflet/Leaflet
Hope this helps.
david.h
ParticipantHi Anh,
The MetaBox API won't work for my needs, see example:
http://www.unofficialmysqlguide.com/covering-indexes.html
I'll add the index manually.
Thanks
-
AuthorPosts