jalbaiges
Forum Replies Created
-
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] locations' categoryBtw, I already created the taxonomy with the plugin you mentioned, so this step is already done. ??
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] locations' categoryWow, @mariusz, that’s great!
Could you lend me a hand on how doing this? In fact, my case is quite simple. I just need to call the [locations_map] shortcode with a loc-category attribute, as @rplakas suggested. No need to search or anything else. Just place the shortcode in a page.
Any suggestion? Thank you very much!
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] locations' categoryThank you for your quick answer, Mariusz!
I assume that in your map every different icon is related to a location category. Is this true? But, the important question is: can you filter what you show in the map, ie, which category or categories? This is the key for me, as I would have two kind of locations (shops and events places) and I would like to show a different map for every category.
Thank you again!
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] locations' categoryDone!
It worked! Thank you, Marcus. ??
By the way, if you are interested in taking a look at my site, here it is: https://www.landlifeweek.eu. You may find traces of EM in many places: the locations map in the home page, the event submission form in the Run an event section, a bigger map and a search form in the Search an event section and so on.
I’ll tell the organisers to make a donation for the plugin. It is really a great, great piece of WP software. If I could say just one thing in order to improve it I would ask (as already mentioned in another thread) for a better integration with plugins like qTranslate.
Thank you very much, Marcus and Agelonwl!
Jaume
PS. Marcus, as you said you were in Barcelona or around, you can get a free pint (or two) whenever you want.
Marcus, this sounds great, of course.
Won’t it affect the normal server processing of the form? As long as you left the action empty I thought it would have some kind of effects if I placed something there.
Anyway, I will try it and let you know.
Thank you!
Jaume
Thank you for your answer, agelonwl.
I don’t feel confortable enough with hooks and filters, so I think I will take the risk of hardcoding that anchor.
I have been able to do it for a successful event post by replacing
wp_redirect( $redirect );
by
wp_redirect( $redirect."#eventform" );
in the “event_save” action block in em-actions.php.
But I can’t figure how to do the same for a non successful event post, ie, for an event containing errors (required fields, etc.). In fact, this is the case when it is more important to show properly the feedback messages to the user.
Could you help me?
Thank you again,
Jaume
Forum: Plugins
In reply to: [qTranslate] qtranslate secondary languages crash photosmash bottonGlad to help you!
I also downloaded a “kind-of-lightbox-plugin” and got it to run, so I think now everything is fine.
See you!
Jaume
Forum: Plugins
In reply to: [qTranslate] qtranslate secondary languages crash photosmash bottonHola yosoyluke,
I had exactly the same problem and I think I have found a workaround without touching the code.
Just go to the plugin general settings and in the Uploading section unset “Use floating Upload Form” checkbox. This will insert the uploading form in the page of the gallery instead on a popup layer. I just found that this way the form is properly shown in every language.
By the way, I noticed a second problem when dealing with languages that you don’t seem to have: when I click on a thumbnail in a gallery, in the default language it displays the full image using the thickbox method, but in other languages it won’t show. In you case this is ok and I believe you are using some other plugin to display the full pictures. May you help me with this?
Thank you very much,
Jaume
Thank you, Marcus. Although I’m not so WP expert when talking about “hooking” and so on, I would like to leave my code as clean as possible, so I will try your suggestion.
Marcus, thanks for answering.
As I said before:
“If this field is left blank everything is ok. When it is populated, the error occurs, probably when the plugin tries to send a mail to notify the creation of the new event.”
I will try what you suggest and say you something.
Thanks,
Jaume
PS. By the way, are you around in Barcelona area?
Well, as it seems there is no easy way to do it, I have finally modified a couple of files. In case of others interest, here it is what I have done:
1) Let’s assume you have created an event attribute through EM settings. Let’s call it “attribute1”.
2) Open classes/em-event.php.
3) Add the following line below Field names area (around line 60). This will declare the attribute as a property for event class.
var $event_attribute1;
4) Add the following line inside get_post() function (around line 320). You will find a similar line for “event_name”. Just put them together. This will request the value provided in the public form.
$this->event_attribute1 = !empty($_POST['em_attributes']['attribute1'] ) ? wp_kses($_POST['em_attributes']['attribute1'], array()):'';
5) Add the following code inside validate() function (around line 450). As mentioned, you will find a similar piece of code for “event_name”. This will check if the value is non-empty.
if( empty($this->event_attribute1) ){ $validate_post = false; $this->add_error( __('attribute1').__(" is required.", "dbem") ); }
6) Open templates/forms/event-editor.php.
7) Add the following code beside the input field in the event attributes section (around line 165). This will place the asterisk sign, showing to the user it is a required field.
<?php echo $name == 'attribute1' ? $required : ''; ?>
8) You’re done.
I feel this might not be the better way of achivieng this goal, so I will listen to your suggestions.
Jaume
Agelonwl, thanks for answering.
I solved my first question (categories translation). For those interested, let say you want to translate the event categories in the public events submission form. Just search for the following code around line 125 in /templates/forms/event-editor.php:
<?php echo $EM_Category->name ?>
and replace it by
<?php _e($EM_Category->name); ?>
For the second one (attributes translation), things seem more complicated. As attributes are stored as an WP option and have some kind of parsing work when dealing with them, I can’t get a good result.
Please, I will really appreciate a solution for this issue.
Thanks,
Jaume
Sorry, I didn’t answered properly your question, Agelonwl. Bookings are not enabled in my website, so I have no related mails.