dg_Amanda
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Shortcode with tribe_get_start_date()Hi mrprainx,
Could you post an example of how you were able to have the start date show in a user-friendly way in the Visual Composer Post Grid?
I’m attempting to do the same thing. However, I find that I cannot use the Visual Composer template variable to pass the post ID into the get_post_meta() function because it’s not available to PHP, just to the browser page.
I’m sure I’ve missed something in the links you provided and hope to learn from how you implemented this successfully.
Thank you for any help you can provide.
Here is the function I am using:
add_filter( 'vc_grid_item_shortcodes', 'my_module_add_grid_shortcodes' ); function my_module_add_grid_shortcodes( $shortcodes ) { $shortcodes['vc_post_id'] = array( 'name' => __( 'The Events Calendar Event Date', 'my-text-domain' ), 'base' => 'vc_post_id', 'category' => __( 'Content', 'my-text-domain' ), 'description' => __( 'Show current event date', 'my-text-domain' ), 'post_type' => Vc_Grid_Item_Editor::postType(), ); return $shortcodes; } // output function add_shortcode( 'vc_post_id', 'vc_post_id_render' ); function vc_post_id_render() { $tec_id = '{{ post_data:ID }}'; // usage of template variable post_data with argument "ID" $tec_start = get_post_meta($tec_id, '_EventStartDate', false); $tec_date = tribe_format_date(array_values($tec_start)[0]); return $tec_date; }
- This reply was modified 6 years, 5 months ago by dg_Amanda.
Forum: Plugins
In reply to: [Media Library Assistant] Apply Category to JPG images only on UploadHi David,
Success! Thank you for your help.
I did move one parentheses as an errant +] category was still being created for PDF uploads. In case someone else is reading this support thread, the template value that worked for me was:
template:([+conditional:is_upload,values('restricted','',image)+])
Now images receive the “restricted” tag and non-image uploads do not.
Perfect, thank you!!
Amanda
Forum: Plugins
In reply to: [Media Library Assistant] Apply Category to JPG images only on UploadHi David,
Thank you for the additional instructions. I installed and activated the plugin as you detailed. That is a really easy process now that I know what I was looking for. Nice work!
I have a partial success. Here are the results of my testing:
JPG and PNG images I tested get marked with “Restricted” category as intended. Perfect.
PDF files still get marked with a variety of new categories including “”, image)+], and [+conditional:is_upload.
Thank you again for your help.
Amanda
Forum: Plugins
In reply to: [Media Library Assistant] Apply Category to JPG images only on UploadHi David,
First, apologies for not getting back with you sooner. Truly, I appreciate your help and collaboration with this. I’ve been out of town for a little summer break. I’m back and excited to get our site ready for the new school year.
I downloaded the development version of the Media Library Assistant and installed it on my staging server. I can see the file that you referenced above. Do I need to do anything else to activate this new functionality?
After installing the development version, here is what I see:
– Change EXIF/Template value to
template:[+conditional:is_upload,values('restricted','',image)+]
– Save Changes
– Add a new image via Media Uploader
– Image uploads successfully.
– Edit image
– See that a variety of new categories have been created including “”, image)+], and [+conditional:is_upload have been created.I feel like I must have not deployed the development version correctly, or perhaps I did not add the new template value in the correct place in the admin. What you outline above seems exactly like what I would like to do.
Again, I so appreciate your help and will be quick to respond now that I’m back in town.
Best,
AmandaForum: Plugins
In reply to: [Media Library Assistant] Apply Category to JPG images only on UploadHi David,
Thank you! That would be most helpful.
I do have a mapping, here are the details:
– Settings > Media Library Assistant > IPTC/EXIF
– Taxonomy term mapping
– Att. Categories
> EXIF/Template Value: template:restricted
> All other values are default.I think that is what you asked. If not, please let me know.
I really appreciate your help.
Best,
AmandaForum: Plugins
In reply to: [Media Library Assistant] Apply Category to JPG images only on UploadHi David,
Thank you for your quick reply! Here is some additional context about what I’d like to do.
We are a preschool that has a website with an extensive private blog, requiring login to view. Most of the photos that get used on those private blog entries do not have photo releases to be used on the public-facing pages of our site. I am creating a system that categorizes all photos on upload as “restricted use” as a default. Then, if a photo can be used on the public site, we can remove the default category, and apply a “released” one.
Here’s the use case I’d like to have:
– user uploads a JPG image
– “restricted use” category is applied automatically.
– user uploads a PDF document
– no default category is applied automatically.I’d like to replace the current “all media” rule that I have with this new, more refined, one.
I think this is only for initial upload. It’s not a permanent assignment, just the default state until (or unless) an administrative user changes it through some other action.
I hope that helps explain what I am hoping to accomplish. I appreciate your time and consideration very much.
Thanks,
AmandaForum: Plugins
In reply to: [DreamObjects Backups] Backups Not WorkingHi Mika – Thanks for your reply, and for bumping up our memory.
I tried again, but backups are still not working for us. I’m talking with the team to see if we can remove some of the older, larger files. That may get us down closer to 275 … it is a large site ??
Thanks for the VaultPress recommendation. We’ll think about that for an intermediate solution.
Forum: Plugins
In reply to: [DreamObjects Backups] Backups Not WorkingThanks, Mika. The notes on GitHub said that the issue was with sites over 500 MB (https://github.com/Ipstenu/dreamobjects), so I wasn’t sure that this was the problem.
What do you suggest as a backup strategy in the meantime?