ullemehner
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WP 3.5.1 wp-image-editor: Scaling up images does not workI set up a ticket at http://core.trac.wordpress.org/ticket/23713 and it turns out to be more a feature than a bug.
In case someone needs scaling up functionality, put this in functions.php:
/* Scale up images functionality in "Edit image" ... * See http://core.trac.wordpress.org/ticket/23713 * This is slightly changed function image_resize_dimensions() in wp-icludes/media.php */ function my_image_resize_dimensions( $nonsense, $orig_w, $orig_h, $dest_w, $dest_h, $crop = false) { if ( $crop ) { // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h $aspect_ratio = $orig_w / $orig_h; $new_w = min($dest_w, $orig_w); $new_h = min($dest_h, $orig_h); if ( !$new_w ) { $new_w = intval($new_h * $aspect_ratio); } if ( !$new_h ) { $new_h = intval($new_w / $aspect_ratio); } $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); $crop_w = round($new_w / $size_ratio); $crop_h = round($new_h / $size_ratio); $s_x = floor( ($orig_w - $crop_w) / 2 ); $s_y = floor( ($orig_h - $crop_h) / 2 ); } else { // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box $crop_w = $orig_w; $crop_h = $orig_h; $s_x = 0; $s_y = 0; /* wp_constrain_dimensions() doesn't consider higher values for $dest :( */ /* So just use that function only for scaling down ... */ if ($orig_w >= $dest_w && $orig_h >= $dest_h ) { list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h ); } else { $ratio = $dest_w / $orig_w; $w = intval( $orig_w * $ratio ); $h = intval( $orig_h * $ratio ); list( $new_w, $new_h ) = array( $w, $h ); } } // if the resulting image would be the same size or larger we don't want to resize it // Now WE need larger images ... //if ( $new_w >= $orig_w && $new_h >= $orig_h ) if ( $new_w == $orig_w && $new_h == $orig_h ) return false; // the return array matches the parameters to imagecopyresampled() // int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); } add_filter( 'image_resize_dimensions', 'my_image_resize_dimensions', 1, 6 );Cheers,
UlleForum: Fixing WordPress
In reply to: WP 3.5.1 wp-image-editor: Scaling up images does not workBump.
No one here who can upload a jpg and try to scale up an image with the “Edit image” functionality of media library?Like http://codex.wordpress.org/Media_Add_New_Screen#Edit_Media
I wonder if there is something wrong with my installation or just with wordpress.
Cheers,
UlleDid you try adding parameter ?ai1ec_cat_ids=XX to your calendar address?
If you want more than one category, add them separated by a comma like =XX,YY,ZZ,… .This still seems to be limited by the maximum events per page field in calendar settings.
The category ID you can get from the value of parameter tag_ID when editing a event category.
Cheers,
UlleI just checked in release candidate (1) for 1.8:
This issue, that all paragraphs in event description are wrapped in <p></p>, is still not fixed, neither in free and premium.Most programs showing those events (like Thunderbird Lighnting plugin) don’t render HTML and thus display the description with these <p> beasties.
Hope the simple solution with remove_filter() or any other way solving the issue will finally make it into final 1.8
Cheers,
UlleI just checked in release candidate (1) for 1.8: This issue is still not fixed, neither in free and premium.
Hope the simple solution suggested by shrmn will finally make it into final 1.8
Cheers,
UlleI just checked in release candidate (1) for 1.8: This issue is still not fixed, neither in free and premium.
Hope the simple solution by shrmn will finally make it into final 1.8:
Line 69, change
$content = apply_filters( 'the_content', $event->post->post_content );to
$content = html_entity_decode( strip_tags(apply_filters( 'the_content', $event->post->post_content )), ENT_QUOTES, 'UTF-8');Cheers,
UlleUnfortunately there is no way to do that currently …
This has been asked before with a statement from yani.iliev:
http://wordpress.org/support/topic/plugin-all-in-one-event-calendar-clone-a-calendar-event?replies=5Cheers,
UlleHi all,
in this thread
Exported Calendar shows htmlentities
shrmn suggests something promising for html entities in titles.
Cheers,
UlleHi all,
in this thread
Exported Calendar shows htmlentities
shrmn suggests something promising for html entities in titles.
Cheers,
UlleThank you shrmn for this helpful hint!
And now I see why it makes the difference, giving html_entity_decode() an explicit character set to decode:
The default mode for html_entity_decode() is to decode html entities to ISO-8859-1 characters. But only if the decoded character belongs to ISO-8859-1 !
Otherwise – like the special dash (mdash) you mentioned – it leaves it undecoded 🙁 …So this could help solving the problems in those threads:
– Compatibility with French – accentuated letters – Google export
– Special characters and html in ical and googlecal
If it does, I hope this will make it into next update of Ai1ec!
Cheers
UlleHi mimosatree,
I checked again the code I posted for 1) and I don’t get any errors here (version 1.4).
Note that the code has to be on one line.Please look into your webservers error logs, if there is something related.
Cheers,
UlleForum: Requests and Feedback
In reply to: WordPress.org Support Forums: Filter Search for specific tag?Ok, so at least I know I didn’t miss something.
Forum: Requests and Feedback
In reply to: WordPress.org Support Forums: Filter Search for specific tag?Thanks esmi,
I did not articulate my question properly …Of course I know that link, there are 16 pages with 30 posts each. Thats why I am asking.
I would like to know what is the best way to search in these 16 pages only. Or filter a search result by tags.Googling with (example)
site:wordpress.org/tags/all-in-one-event-calendar/ event details
isn’t really helpful, as it doesn’t show all posts containing this in title.Cheers,
UlleHi mimosatree,
For topic 1)
see this post/thread:
http://wordpress.org/support/topic/plugin-all-in-one-event-calendar-compatibility-with-french-accentuated-letters-google-export?replies=5#post-2648579It seems, that wordpress is converting non ascii characters into those entities automatically (at least for title field). In regular posts as in ai1ec posts. This could depend on certain plugin(s)/wysiwyg-editor.
So it is not ai1ec’s fault.I found some idea in the comments of this page:
http://www.php.net/manual/en/function.html-entity-decode.phpSo
In file class-ai1ec-exporter-helper.php
in wp-content/plugins/all-in-one-event-calendar/app/helper/
at about line 68just replace the line
$e->setProperty( 'summary', html_entity_decode( apply_filters( 'the_title', $event->post->post_title ), ENT_QUOTES ) );with this code:
$e->setProperty( 'summary', preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, apply_filters( 'the_title', $event->post->post_title )));For topic 2)
see this post/thread:
http://wordpress.org/support/topic/plugin-all-in-one-event-calendar-filter-html-tags-and-wpautop?replies=1This hasn’t changed in version 1.4.
As a quick help:
In file class-ai1ec-exporter-helper.php
in wp-content/plugins/all-in-one-event-calendar/app/helper/
at about line 69just replace the line
$content = apply_filters( 'the_content', $event->post->post_content );with this code:
# No wrapping <p></p> in event description if( $export ) { remove_filter( 'the_content', 'wpautop', 10 ); } $content = apply_filters( 'the_content', $event->post->post_content ); # No HTML code in event description if( $export ) { $content = strip_tags($content); }Note that these changes get overwritten with every new ai1ec update .
Cheers,
Ulleyour support and effort in tracking down this evil bug (and other problems) is absolutely outstanding!
I am not affected by those blank pages, but quite impressed of your patient posts with step by step help .All-in-One Event Calendar is for sure the best plugin for sharing calendars and events! And having such an active support beside makes it even more ahead!
Thank you and http://theseednetwork.com
Cheers,
Ulle