1864 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FRESHFACE says

Hi guys!

thank you for your interest. I will fix the multisite bug when I will have a time :) Anyway I’m now heading to final exams at my university, so I will not be available about a week or so :)

cheers, freshface

1074 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

Multisite compatibility is a must.

final exams at my university
Good luck. :)
1864 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FRESHFACE says

New version added( 1.1 ) .

This version is wordpress independent, so you can use it in your HTML demo previews.

Still missing:

1.) resizing images to be bigger than the original

2.) WP Multi Site testing

cheers, freshface

1864 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FRESHFACE says

VERSION 1 .2

Features:

  • - completely independent at WordPress
  • - allowed to zoom images
  • - correct cropping

Bugs:

  • - when you are using WPMU and use /wordpress/something/something/ structure, it won’t work, minor bug

Testing:

  • - we just added it to all our demo servers. Is there some volunteer who can help us to test this script ?

LINK

https://github.com/boobslover/freshizer
91 posts Be different!
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Referred between 500 and 999 users
  • Exclusive Author
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
UnitedThemes says

Hi,

will start testing soon and get back to you then :)

Cheers UT

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

VERSION 1 .2

Features:

  • - completely independent at WordPress
  • - allowed to zoom images
  • - correct cropping

Bugs:

  • - when you are using WPMU and use /wordpress/something/something/ structure, it won’t work, minor bug

Testing:

  • - we just added it to all our demo servers. Is there some volunteer who can help us to test this script ?

LINK

https://github.com/boobslover/freshizer

Hi,

regarding the MU bug, if the problem is to retrive the real url of the files i do something like this on the file path that WP returns:

global $blog_id;
//$url = image url returned by WP

    if (is_multisite() && isset($blog_id) && $blog_id > 0) {

        $url = explode('/files/', $url);

        if (isset($url[1])) {

            $url = '/blogs.dir/' . $blog_id . '/files/' . $url[1];

        }

    }

Now i didn’t look into your code, so not sure how you should implement this, but I guess this might help.

Kudos for your work ;)

Parker

498 posts
  • Won a Competition
  • Most Wanted Bounty Winner
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Australia
  • Has been a member for 3-4 years
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Envato Studio (Microlancer) Beta Tester
simonswiss says

Looks great!

Could you please explain how to use this in the Loop to display a post’s featured image?

Cheers!

Simon

1864 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FRESHFACE says


VERSION 1 .2

Features:

  • - completely independent at WordPress
  • - allowed to zoom images
  • - correct cropping

Bugs:

  • - when you are using WPMU and use /wordpress/something/something/ structure, it won’t work, minor bug

Testing:

  • - we just added it to all our demo servers. Is there some volunteer who can help us to test this script ?

LINK

https://github.com/boobslover/freshizer

Hi,

regarding the MU bug, if the problem is to retrive the real url of the files i do something like this on the file path that WP returns:

global $blog_id;
//$url = image url returned by WP

    if (is_multisite() && isset($blog_id) && $blog_id > 0) {

        $url = explode('/files/', $url);

        if (isset($url[1])) {

            $url = '/blogs.dir/' . $blog_id . '/files/' . $url[1];

        }

    }

Now i didn’t look into your code, so not sure how you should implement this, but I guess this might help.

Kudos for your work ;)

Parker
Ahh, I didnt know that “is_multisite()” function exists :) Anyway the final problem is, that I need to retrieve the original wordpress path, explanation
localhost/wp/ -> ORIGINAL
localhost/wp/aaa/bbb -> MU1
localhost/wp/bbb/ccc -> MU2

could you please tell me how to do it ? :) get_bloginfo(‘wpurl’); returns the MU, and I need the original for correctly build url of the image :)

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

Why do you need the original blog URL to build the images?

In sub blogs the images are stored in a different folder, not within the main blog uploads, that’s why I do this:
$url = '/blogs.dir/' . $blog_id . '/files/' . $url[1];
Additionally this url is safe, because it baypasses any rewrite rule on server.

The only thing I’m not sure about, is what happens when sub blogs are not in sub folders, but in sub domains… it should work, because I think that when you select sub domains for blogs the only thing that changes is the rewrite rule in the .htaccess file, so the files are always in the same folders.

I used this system with timthumb and it worked…

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

To make it clearer, this is how I use my functions to use timthumb with mu installation:

This function builds the image URL , if is a sub blog it changes the URL to the correct one, otherwise if it’s the main blog ($blog_id == 0) it doesn’t do anything.
function pk_build_image($url = '', $width = 0, $height = 0, $zc = 1, $amp = '&') {

    if ($url == '') {

        return '';    

    }

    global $blog_id;

    if (is_multisite() && isset($blog_id) && $blog_id > 0) {

        $url = explode('/files/', $url);

        if (isset($url[1])) {

            $url = '/blogs.dir/' . $blog_id . '/files/' . $url[1];

        }

    }

    $final_image_path = '';

    $width_string = ($width <= 0 || $width == '') ? '' : $amp.'w='.$width;
    $height_string = ($height <= 0 || $height == '') ? '' : $amp.'h='.$height;
    $zc_string = ($width_string == '' && $height_string == '') ? '' : $amp.'zc='.$zc;

    if ($zc_string == '') {

        return esc_url($url);

    }

    $final_image_path = PK_THEME_DIR.'/timthumb/timthumb.php?src='.$url.$width_string.$height_string.$zc_string;

    return esc_url($final_image_path);

}

How I use this function:

<?php
$image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full')
?>
<img src="<?php echo pk_build_image($image[0], 600, 450, 1); ?>" />

Let me know ;)

by
by
by
by
by
by