The MU forums have moved to WordPress.org

basic image sanity check please (7 posts)

  1. Anonymous
    Unregistered
    Posted 15 years ago #

    Hi,

    So please correct my assumptions...

    WPMu 1.5, PHP5

    Is there some sort of conversion required to use a WP2.5 template with WPMu?

    I have a template that uses custom fields for the thumbnails on the home.php. When I "Add Media" to load the image, the URL location diplayed is http://domain.tld/files/2008/07/grandma.gif

    The files are located correctly in their blog.dir/1/ etc.

    There are many (identical?) threads dealing with issues (identical to?) like this one but most are from earlier versions or the threads are too old to revive.

    I spent most of the day hacking at template files to insert the mu image path stuff but it just didn't feel right. The .htacess file does the switcheroo to get the files stored in the correct place, right? Then it's the URL from the media uploader that's going to be a problem...

    The custom field would ideally have the full URL for that image and the template would just echo that src, right?

    Question:

    Is it possible to have the media manager display the WPMu path to the images that it manages? When a user uploads an image I'd like for them to simply cut and paste what is displayed into the custom field (which is enough of a PITA for 99% of them). I must be doing something wrong to get the RedX in IE. Permissions are all good (755 for d, 644 for files). Images are accessible directly (in browser). What else is there?

  2. andrea_r
    Moderator
    Posted 15 years ago #

    I personally think there's a bug. :) I ran across a mention of it yesterday and I have to go dig it up again.

    Question: in your same link, you used domain.tld - are the sub-blogs off their own domains?

  3. Anonymous
    Unregistered
    Posted 15 years ago #

    Hey nice lady :)

    The sub-blogs are off of their own subdomains but I haven't reached that stage of testing yet. I'm still working on blogid =1.

    In my template, whenever an img src is required, I came up with this: $muIMGpath = get_bloginfo('siteurl').'/'.UPLOADS.$cfKeyYYMMimgname;

    I was hoping to eventually use http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin to take care of users that can barely insert images never mind cut and paste cf key values...

    There is another script out there that I paid $50 for, vista thumbs or something but it didn't look WPMu friendly and the code was, well, if I had the time to do it myself I'd have saved $50. What I liked about that script was the on-demand generation of theme-specific images (wrt dimension) so that as themes are added, the correct (machine cropped!) thumbs are available.

    It seems to me that before I hope to modify anything, I need a predictable process for extracting the WPmu image path... In fact, crystal-balling, when I start pulling posts from different subblogs to aggregate on the home page, I need to be able to pull the correct blog.dir element of the image URI, do you see where I'm headed? Am I fussing over something that WPmu already takes care of (content aggregation)?

    Thanks.

  4. andrea_r
    Moderator
    Posted 15 years ago #

    So... let's backtrack to the original issues. you're using a theme which places thumbnails from the post into the main page, yes? Like a mag theme I bet (I heart those).

    And for my assumptions - you;re using on the main page and possibly on all blogs, and maybe eventually pulling in recent sitewide posts (with thumbnails) onto said main page. Have I got it? :D

    *Sometimes* there's issues with the custom field and the image path, but I've yet to narrow it down. Partly because I haven't gone and done it myself yet...

    Hmmm...

  5. musnake
    Member
    Posted 15 years ago #

    get_bloginfo('siteurl') is deprecated:

    $muIMGpath=get_option('siteurl').'/'.UPLOADS.$cfKeyYYMMimgname;

    The "thumbnails from the post" is the path to the thumbnails which is pasted in your custom field, right? It's not (necessarily) an actual image inserted into the post, right?

    I heart maggythemes, expecially the gpp ones. I could use this information too. I've been tempted to 'adjust' the core uploader file to get it to display the mu path...

  6. lunabyte
    Member
    Posted 15 years ago #

    Why use the uploads path when /files/ is what should be rendered in the browser. Not that it makes a particular difference, but the whole /wp-content/blogs.dir/X/files/... is just so, well, ugly.

  7. Anonymous
    Unregistered
    Posted 15 years ago #

    So, in the template I can specify src=UPLOADS and the system will figure out which blogid that post is associated with? What was my problem again? Sheesh, I'd better start over before I invent fire. Sitewide feeds is probably what I was headed to anyway...

    @Musnake: correct, I'm not inserting images, just adding cf's. The template directions say to use the full URI including http://

    I'll try this on Monday.
    Thanks peoples.

About this Topic

  • Started 15 years ago by intheweeds
  • Latest reply from intheweeds