Teeks
Forum Replies Created
-
https://github.com/nerd-nite/user-photo
That’s the one I updated but on second thought I don’t know if its official.https://github.com/westonruter
This seems to be the guy that wrote user-photo but he doesn’t have a repo for it as far as I can tell.I updated the github repo after I posted here – there’s a pull request waiting ??
more troubles with the echo var, the following, where it looks for a different echo setting to default (which is true):
if ( ! $r[ 'echo' ] )
…was always reading true (so skipping the return and just echoing), even though i was passing it echo=false along with the cat IDs:
ciii_category_images('category_ids=10&echo=false');
I changed the type comparison in the if statement and it works now with this instead:
if ( $r[ 'echo' ] !== true )
sorry, not sure if all this is necessary but its been giving me problems at least.
Fixed it…
On line 527 where it handles cat IDs:
// Cat ID(s) passed? if ( $r[ 'category_ids' ] !== false ) { $cat_ids = explode( ',', $r['category_ids'] ); $CategoryImagesII->display_images( $cat_ids, $r[ 'link_images' ] ); return; }
It stores the images in $CategoryImagesII but then returns nothing, nor does it echo because it never gets to the part where it decides to echo (depending on echo arg) on line 541 because its already returned.
The simplest fix is to return the result in that same line, e.g.
return $CategoryImagesII->display_images( $cat_ids, $r[ 'link_images' ] );
But I really needed it to work with the echo arg, so I altered that whole section, to either get the ids from the passed ids or the loop, then do the echo part as normal.
// Cat ID(s) passed? if ( $r[ 'category_ids' ] !== false ) { $cat_ids = explode( ',', $r['category_ids'] ); // In the loop? } else { $categories = get_the_category(); $cat_ids = array(); foreach ( $categories AS & $category ) { $cat_ids[] = $category->cat_ID; } } if ( ! $r[ 'echo' ] ) return $CategoryImagesII->display_images( $cat_ids, $r[ 'link_images' ] ); echo $CategoryImagesII->display_images( $cat_ids, $r[ 'link_images' ] );
nope – doesn’t work. WP 3.0 i guess.
Nope, sorry, that wasn’t actually a solution. It seemed to work once, but I couldn’t replicate it.
My new theory is that it works only when you have at least two additional image sizes defined. That’s what it had when I was testing the above solution, one with px, one without, but as soon as I deleted the non-px one, the px one didn’t work anymore either.
If you have two it works, but for some reason it will still generate an error, even though it follows by saying that it worked. Double random.
Tried with two images and two image sizes and got the following result:
Something(s) went wrong:
error_getting_dimensions: Could not calculate resized image dimensions
error_getting_dimensions: Could not calculate resized image dimensionsThat went quite well:
Resized IMG_0033 to size Excerpt.
Resized IMG_0033 to size Featured.
Resized TK Test Image to size Excerpt.
Resized TK Test Image to size Featured.had this problem too. same all round.
it works when I use “300px” as the value, instead of just “300”.
the px is the important bit, not 300 ??random. hope that fixes it for you too.
Forum: Fixing WordPress
In reply to: Excerpt Length Limit, Manual and AutomaticYeah I’d like to know this too.
Trying to allow manual excerpts but still cut them off for sake of design if the user goes crazy.