jojaba
Forum Replies Created
-
Still works for me. Can you give me the source of the page where you display the calendar ?
The code snippet must be added after the jQuery call, is this the case for you?
Oh and what I get in the code is the h2 title of the day, so if you want to have all infos, just replace this:
qt_content = source_td.find('.gce-event-info h2');
By this:
qt_content = source_td.find('.gce-event-info');Forum: Plugins
In reply to: [WordPress Word Count and Limit] Patch to properly support custom post typesHello thanks for the feedback and the patch.
Overall, a nice & simple plugin that does it’s job. Javascript alert function as a warning is a little obtrusive though. Some bugs here and there. But thank you for writing this.
Somme bugs here and there? Just let me now what you found please so that I can release a better version 😉
It depends on where you display the calendar.
If you display it in a post or as a single page, you can put this code at the end of the single.php file or the footer.php file of your theme.
For single.php add this code:<script> /* Adding title to each day (td) for calendar */ var get_title_func = function() { jQuery("td.gce-has-events").each(function(){ // Finding infos content var source_td = jQuery(this); var qt_content = source_td.find('.gce-event-info h2'); // if multiple events on one day we have to loop qt_content.each(function() { var c = jQuery(this).html() source_td.append('<div style="font-size: 0.8em; margin: 10px; padding: 2px 5px; border-radius: 4px; background: #FFF">' + c + '</div>'); }); }); } // Launch function after window load and after ajax request jQuery(window).load(get_title_func); jQuery(document).ajaxSuccess(get_title_func); </script>If you choose to add it to the footer.php file:
<?php if(is_single()) : ?> <script> /* Adding title to each day (td) for calendar */ var get_title_func = function() { jQuery("td.gce-has-events").each(function(){ // Finding infos content var source_td = jQuery(this); var qt_content = source_td.find('.gce-event-info h2'); // if multiple events on one day we have to loop qt_content.each(function() { var c = jQuery(this).html() source_td.append('<div style="font-size: 0.8em; margin: 10px; padding: 2px 5px; border-radius: 4px; background: #FFF">' + c + '</div>'); }); }); } // Launch function after window load and after ajax request jQuery(window).load(get_title_func); jQuery(document).ajaxSuccess(get_title_func); </script> <?php endif; ?>You can also put it into your function.php file, probably the best way to do it…
Forum: Plugins
In reply to: [Polylang] wrong default category for dashboard draftTested with my 3 languages successfully. Thanks!
Thanks filtah.
I guess my code works on grid calendar and yours in the widget…Hey!
Managed to have it work! I only had to get the titles of my events which are enclosed in h2 tags. Here’s my code:
/* Adding title to each day (td) for calendar */ var get_title_func = function() { jQuery("td.gce-has-events").each(function(){ // Finding infos content var source_td = jQuery(this); var qt_content = source_td.find('.gce-event-info h2'); // if multiple events on one day we have to loop qt_content.each(function() { var c = jQuery(this).html() source_td.append('<div style="font-size: 0.8em; margin: 10px; padding: 2px 5px; border-radius: 4px; background: #FFF">' + c + '</div>'); }); }); } // Launch function after window load and after ajax request jQuery(window).load(get_title_func); jQuery(document).ajaxSuccess(get_title_func);you can get all the tooltip content by replacing this:
var qt_content = source_td.find('.gce-event-info h2');
By this:
var qt_content = source_td.find('.gce-event-info');Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingHello,
Found another issue about this.
When writing a draft on the dashboard, the category that should be automaticaly defined should be the one you set in the language (for me fr). This is’nt the case, same than the issue before, the last default cat (for me the german one) is set.I’m looking also for this feature and tried to think about how this could be done.
I saw that qtip (jQuery extension that display the tooltip) prints some divs containing all the infos to display at the end of the calendar page, just before </body> tag.
My suggestion: get the infos that are enclosed in the qtip divs and put them into the right tds (1 td = 1 day). I saw that the id of each qtip div matches the aria-describedby attribut of the td so we should be able to get this infos and put them into the right place using JS or jQuery.
The problem is that this qtip divs are displayed very late on the page so if you want to get infos about them, you have to launch your script after that. I didn’t manage to do that (tried to insert a script with defer attribut didn’t work). Maybe, the developper of this plugin could give us an advice 😉Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingTested with success.
Great Job Chouby. Thanks a lot for this quick fix.Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingI read here that you can delete the uncategorize category if you set a default category (wich is my case).
Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingI did remove it in WordPress 4.1! the id of the Uncategorize cat is 1.
I looked into the Database in wp_options table and found this line :
default_category 19You can only have one default category (the last one I set was the german one that overwrited the others.
I really think this is a missing functionnality of polylang, don’t you think?Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingNo, I removed the Uncategorized category after switching to the default categories.
Each defaut category has his own id :
Actualités » id 15
Neuigkeiten » id 19
News » id 22Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingI just saw that only one category has been set as default cat for all languages: Neuigkeiten (de).
See here the ‘en’ categories listing: http://jojaba.fr/pict/cat_same_for_all_lang.pngIs this not a wrong behaviour of polylang?
Forum: Plugins
In reply to: [Polylang] Cat add, when not set on post edit page when savingI’m not sure I understood what you asked.
See here : http://jojaba.fr/pict/cat_translated.png
I set for each language the default category in the Settings » Writing section.
I don’t understand why polylang takes the german translation although I’m in the french edit post window.
Default fr : http://jojaba.fr/pict/cat_default_fr.png
Default de : http://jojaba.fr/pict/cat_default_de.pngForum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Using Gcal v3 API on localhostNo it doesn’t work for the moment. Yes, it comes from the Google not allowing connections from localhost and Donna gave some links on her post to fix this : https://wordpress.org/support/topic/gce-210-now-updated-for-gcal-api-v3?replies=84#post-6239648
But this didn’t work for me…