On Thu, Mar 8, 2012 at 12:58 PM, Chad innocentkiller@gmail.com wrote:
On Thu, Mar 8, 2012 at 3:51 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
I don't know why this happens, but you really don't need internal API requests to get thumbnail URLs. This is much simpler:
$file = wfFindFile( 'Foobar.jpg' ); $thumb = $file->transform( array( 'width' => 200 ) ); if ( $mto && !$mto->isError() ) { $url = $mto->getURL(); } else { /* Handle error */ }
s/$thumb/$mto/?
Yeah, I changed my mind about the variable name halfway through. When I say $mto I mean $thumb (or vice versa).
Roan