Author Topic: Image System Bugs and Suggestions  (Read 2478 times)

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Image System Bugs and Suggestions
« Reply #75 on: August 09, 2011, 02:40:12 pm »
http://test.randomland.net/drupal/img

Minor update to the status of the imaging system. I looked up how to work the "image style" system in drupal 7 and used it in the theme for the gallery view to produce some rough thumbnails. Next will be to change how the formatting is done to get the grid items close together. 

Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #76 on: August 09, 2011, 03:23:52 pm »
There are also ways to specify the display format of File (module) types. I think it's overly generic, but I could be wrong. All I know is that they exist. Might be worth looking into...

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Image System Bugs and Suggestions
« Reply #77 on: August 09, 2011, 04:10:50 pm »
Show the documentation and I will play with it!

Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #78 on: August 10, 2011, 08:21:04 am »
I only skimmed it, but this is what I was referring to:

http://drupal.org/node/1242904

Sounds like it might be a generalized version of what we'd have to do.

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Image System Bugs and Suggestions
« Reply #79 on: August 10, 2011, 10:12:46 am »
That's for video. I think we will be ok using the built-in function for the images. All you need is the uri for the file, and those are easy to come by using views or the whole file path.

What we might need is a way to use the media ID to get the uri though.

Also, they just started a new branch of the media module. They are using a 'file entity' sister module now. Not sure what this will change. Probably just have to use a different function to get at the uri and field values.

Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #80 on: August 10, 2011, 11:43:04 am »
Whatever is going on in Configuration -> File Types, I don't understand....

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Image System Bugs and Suggestions
« Reply #81 on: August 10, 2011, 01:55:30 pm »
Configuration -> Media -> File Types ?

A poorly designed interface for changing how the files are displayed in various contexts (mostly for use when putting files into posts using the wyswyg editor.) And for adding fields to the file types like any other content type. Its confusing. I think there is a way to use those view modes in custom places (php code) but I don't know what does that.

I deleted most of the different view types and mostly got it to use the default.

I have found that
Code: [Select]
$file = file_load($fid); will fetch a file entity (or file node. I an not sure what to call them) with all its goodness and fields in an object. Then with
Code: [Select]
$image = array(
  'style_name' => 'thumbnail',
  'path' => $file->uri,
  'width' => '',
  'height' => '',
  'alt' => "Poots",
  'title' => "Pots",
  );
print theme('image_style',$image);

You can make a thumbnail. Or any other size image based on a preset.

Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #82 on: August 10, 2011, 02:39:28 pm »
Ok cool. That is the standard method for invoking a theme template. I used that in the old rlcore code. Should we create our own version of that image template which overrides this? That makes more sense than what I was doing -- wrapping/recreating such a template.

That still doesn't take care of the I input filter, but yeah.

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Image System Bugs and Suggestions
« Reply #83 on: August 11, 2011, 08:32:42 am »
Either way. I have no idea how to override/add to the template. I suppose it wouldn't be too hard, just implement some hooks or something in a module. But these are things I am still trying to lean.

I think I will make a temporary gallery setup with views, just using some php and template files. I am hoping at least some of the effort there will be of use with the RL module. Most of the php could eventually be replaced with a simple call to the RLimg module. And then the markup for the layout might be a starting point for a view that the module could create.


Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #84 on: August 11, 2011, 11:54:09 am »
Yep, that sounds good. Sorry I haven't gotten much done on that input filter part. Maybe I'll find some time within the next few days. It won't take long...I'm just busy procrastinating.

Offline zourtney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,206
    • View Profile
    • http://randomland.net/zourtney
    • Email
Image System Bugs and Suggestions
« Reply #85 on: August 22, 2011, 03:48:20 pm »
Out of Drupal-induced anguish, I tried installing Wordpress again. I slapped on a few plugins. Puzzled, I soon said, "um, wow, this kinda actually works."

I got a basic, taggable image system in place. You do BBCode-style text to display images by tag (Wordpress calls this "shortcode" syntax). You can use the admin pages to search and image names, tags, and body text.

Perhaps I've lowered my standards a bit, but this beats what we have no on both D6 and D7. Strangely, the part Nick has been working on in D7 is the part I haven't yet found a good, standalone module for -- a user-facing search/display page. But honestly, if we are to write* module code, I'd rather do it for Wordpress. The other obvious missing piece is a single-image embedment syntax (ala rlimg). Both of these exist in some for or another in other plugins, though may be incompatible. But we can dig/code more if we trait-upon das Dries.

true story: as I was writing that sentence, my phone autocorrected "towrite" to "torture". Coincidence? I think not.

Edit: oh yeah, test.randomland.net/wp
« Last Edit: August 22, 2011, 03:50:19 pm by zourtney »