NicoWp
Forum Replies Created
-
Hi, I used this code for customize my widget, but I want to delete list and work only with table elements.
The widget is visible in this page https://www.officinebeat.com/en/events/.The html generated by the widget is:
<ul> <li> <table class="table table-cal"> <tbody> <tr> <td width="8%"> <div style="border: 1px solid #02c0e6; border-radius: 0 5px 0 5px; overflow: hidden; color: #525252; float: left; font-weight: normal; line-height: 1.3em; margin: 0px 0px; text-align: center; width: 3.4em; font-size: 10px;"> <div style="background: #02c0e6; text-transform: uppercase; color: #ffffff;"> … </div> <div style="padding: 0.2em 0 0.1em !important; background: #fff; font-size: 11px; font-weight: bold;"> … </div> <div style=" line-height: 1.2em; background: #fff;"> … </div> </div> </td> <td width="92%"> <div style=" font-size: 0.8em; font-weight: bold; color: #515151; line-height: 1.5em"> <a href="https://www.officinebeat.com/en/event/a-trio-modern-jazz/"> … </a> </div> </td> </tr> </tbody> </table> </li>
How can I delete list mark-up elements?
Ok, I close this thread and open another one only for category description.
I tested Daedalon’s PHP snippet and it works properly.
Thank you, Daedalon.
Thank you, I tested your solution and it works fine for Ajax search indeed.
Anyway, I want to inform all that I solved my first problem installing ‘qtranslate slug plugin’. Now the links to each event are setted properly on calendar.
The second problem remains. I’m searching for this. If I’ll find a solution I will post it here.
I pasted it in my theme’s functions.php file but it seems it doesn’t affect anything. I’m sure it’s my fault. I don’t understand what this function has to do.
Perhaps I noticed that if I’ll try to navigate in english in my website when I click on a title event in the full calendar, the linked page is the italian one.
You can see it in this url: https://www.officinebeat.com/en/eventi/
If you click on an event title into the full calendar, it will appear the italian page content, so you must to switch to english again to back to the english menu.
In fine, the category page and any single category event is linked properly, even if the descriptions are always in italian because of the original problem I wrote in this thread – concerning category description.
I must solve theese two issues and all will be right.
Thank you Daedalon,
I took a look to your solution, that I post here, so that all those who use EM and QT can have all in one post.You suggest to include in wp-admin.php this:
('EM_AJAX_SEARCH', true);
Ok, but where do I include the following snippet?
add_filter( 'em_wp_localize_script', 'ml_em_ajaxurl_fix', 1, 2 ); function ml_em_ajaxurl_fix( $em_localized_js ) { if ( function_exists( 'qtrans_getLanguage' ) ) { $em_localized_js['ajaxurl'] = admin_url('admin-ajax.php?lang=' . qtrans_getLanguage() ); $em_localized_js['locationajaxurl'] = admin_url('admin-ajax.php?action=locations_search&lang=' . qtrans_getLanguage() ); } return( $em_localized_js ); }
Thanks for your help.
This is can be useful, I think, but I don’t an expert in php code. I ask for an help.
1) Many users have fixed some problems between qtranslate and events manager adding this patch into function.php, as you know:
// qtranslate function em_qtranslate($target, $arg1=null, $arg2=null, $arg3=null) { $target->event_name = em_qtranslate_string($target->event_name); $target->event_owner = em_qtranslate_string($target->event_owner); $target->post_content = em_qtranslate_string($target->post_content); $target->event_category = em_qtranslate_string($target->event_category); } function em_qtranslate_string($raw_string) { if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $output = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($raw_string); else $output = __($raw_string); return $output; }
With this patch all things go well, but not for category description. But it is a little step forward solution, I think.
Now it is possible to make work qtranslate with category name adding this other patch:
function qtranslate_edit_taxonomies(){ $args=array( 'public' => true , '_builtin' => false ); $output = 'object'; // or objects $operator = 'and'; // 'and' or 'or' $taxonomies = get_taxonomies($args,$output,$operator); if ($taxonomies) { foreach ($taxonomies as $taxonomy ) { add_action( $taxonomy->name.'_add_form', 'qtrans_modifyTermFormFor'); add_action( $taxonomy->name.'_edit_form', 'qtrans_modifyTermFormFor'); } } } add_action('admin_init', 'qtranslate_edit_taxonomies'); add_filter('get_term', 'qtrans_useTermLib'); ?>
In this case we have a field for each language to name a category.
This patch creates a field for each category “article” name in admin panel.
Now, my questions are:
1) Can I fix event taxonomy in the same way of the first solution I posted?
2) Has anyone an idea I can have a field for each category description, and so for event-category-description, elaborating the second patch?
Excuse for my english, I don’t know if all is clear.
Thanks
Thank you for your answer,
I think a solution can be elsewhere. Maybe it will be possible to act on some part of wp code inherent description category, tags and similar. If I can fix it, I think, then it will be simple to write a description in a specific language using only lang tags.Qtranslate permits to manage a multilingual site in this way: every page or post can be written in two or more languages, because the editor presents two or more windows in which you can add any text you want. In this case one for italian language and one for the english one – even if my english is very bad, I know ??
This is great, because you can manage a website in many languages without creating a mirror site for each language.
Widgets don’t have a real editor, but the plugin recognize the language’s tags. For example I can write on a single widget title “[:it]informazioni[:en]information” and when I switch on english, for example, the widget is translated correctly: “information”.
This property doesn’t work for category description, and neither for category event description of events manager.I think – but it is only an intuition – I need to change a php file and I’m not an expert.
Can you help me?
I mean both of them if it is possible. But for the moment I need a quick solution for events manager ??
Thank you, Angelo, I’ve just taken a look to that thread. Infact qtranslate now works perfectly with articles, pages and events – title, content and so on – but I don’t understand how I can make it works with category description. For me it is enough that the language tags – [:en] or <!–en–> behave as in the widgets.
Has anyone a solution for this?
Thanks for your help. Even if it is not clear for me why this method doesn’t work. Maybe, I think, I must enhance my knowledge about EM (it is the first time I find this in my projects)
In any case I’ll try to follow your suggestions.
Best