• Welcome to Randomland - The Forum. Please login or sign up.
 
May 21, 2024, 08:03 PM

News:

Get Out, See Green!


Image System Bugs and Suggestions

Started by zourtney, Nov 04, 2009, 03:58 PM

Previous topic - Next topic

zourtney

Yeah. If it hasn't been explicitly mentioned, it's at least known as "missing feature número uno." In my mind anyway.

I really wish there were a decent image gallery module. Actually, it boggles my mind that there is not. The Drupal community is huge but irritatingly unproductive. And I'm kind of tires of inventing wheels :-\

Perhaps there is some better way we can serve up our images. There must be some free "media server" software out there....?

zourtney

So, last week Nick mentioned to me that he might know what to do with the image system (granted, it has been a week). Anyway, it sounds like we are shifting towards using the semi-official Media and Media Gallery modules and creating a few custom views and/or display pages.

I will update the rlimg module to work with it...somehow!

Sound like the plan?

Nick

I think so. I looked at the RLimg medule... but I am not sure how to make it work with drupal 7. It seems some of the stuff you were using before (token) are built into the core. And there is not a single function for doing text replacement. I spend a while confused and then gave up. Perhaps you can fill me in on what parts do what and where to be looking.

zourtney

Jul 29, 2011, 09:08 AM #63 Last Edit: Jul 29, 2011, 09:09 AM by zourtney
Really the only part you should care about is rlcore.filter.*. The other files were for setting up the nodes and taxonomies.

The filter stupidly delegates text processing to the class defined in rlcore.filter.processor.inc. I say "stupidly" because no other Drupal code is structured in this pseudo-object-oriented manner. parseParams()'s call to node_load() and the few lines in processAttributes() are about the only things of interest. We just need to change how those nodes are loaded (I hope). And I can mess with this. Probably this weekend or on a lunch break.

What's the bare-minimum I need to set up what you've got going? Just Drupal 7.4 with the the Media module?

Nick

They are up to 7.7 now!

Yeah, that should about do it. Also views if you want to test it with those. I can give you the XML or whatever files for recreating my views.

The login is admin and you already know the password for the test site if you want to investigate anything.

zourtney

Seven seven?? I'm calling 2011 the "year of inflated product revision numbers." I mean I already have Firefox 6b...when did 4 come out?...April??

Anyway, I'll play with that soon (probably start with a local copy). I'll test with Views later, unless you see a reason to add that complexity now.

Nick

No need to add views at the start. Buts that's how I will ultimately use it.

Regarding version numbers: I know! Its getting crazy. Firefox had like 400 versions of 3 and then 4 come out with big fan fair just to get stomped by 5 in what seemed like a few weeks later. And drupal seems to just be skipping revision arbitrarily.

zourtney

Jul 29, 2011, 01:39 PM #67 Last Edit: Jul 29, 2011, 02:37 PM by zourtney
7.7 was released (wow) yesterday. I'm guessing the second 7 refers to this month, July. Which I totally disagree with. Major and minor revisions should be feature-based milestones, not some release date ordinal! If you want to do that, make it a minor-minor revision, like 7.1.110728. Of course I could be wrong, just an observation/rant. It's like the world of software development went into a @$)"-measuring contest with Chrome's absurd release schedule and numbering scheme (v1.0 to 13.x beta in under 3 years)

Aaaaaanyway, I will download version 7.7.illegitimate and start playing. I think it'll be a fairy quick fix.

On a related note, where do we want to store the source? I've been using our SVN, but opened a GitHub account this week (under "zourtney"). It's nice. Drupal has also moved to a git-based system (away from their hated, ancient CVS). If we commit to that system, we should show up in their module lists and stuff, which is probably good. The only reason I haven't done this is because the code was too broken to be public (in my opinion).

Update: So, I got everything set up locally like test except Colorbox previews. Any tips?

Nick

Yes! You have to go into the colorbox configuration and turn on the inline options. Otherwise it will look like its trying but wont actually display an image.

Here are two ways to make colorbox links that I know of.

<a class="colorbox-load init-colorbox-load-processed-processed cboxElement" href="http://test.randomland.net/drupal/sites/default/files/P6280047.JPG">Linksers</a>


and
<a rel="" class="colorbox-inline init-colorbox-inline-processed-processed cboxElement" href="/drupal/?width=600px&amp;height=400px&amp;title=&amp;inline=true#colorbox-inline-2">http://test.randomland.net/drupal/sites/default/files/P6280047.JPG</a>

I am not 100% sure how the second one finds the image. I guess because the path is the link text.
Both of these can be seen at Views test-gallery

zourtney

So...we can do 90% of what we want with Colorbox and the overly verbose Media Markup found in Config->Text Formats.

Sample:
[[{"type":"media", "view_mode":"media_large", "fid":"3", "attributes":{"class":"media-image"}}]]

I propose we utilize this, keeping the simplified rlimg syntax as a wrapper along with the template files. Easy cheese.

Nick

Ok! So whats the missing 10%?

What will the rlimg syntax look like with this?

zourtney

Hmm, missing 10% is the "short descriptions" I liked having. Because it seems useful to have a one-line teaser text and a full description. I guess we can use titles? I don't know.

Syntax can stay the same, so long as we run our filter after the Media Markup one. Any change suggestions?

Nick

We could add a field for optional short descriptions. Other then that I think it sounds good.

zourtney

We now have a sandbox project on drupal.org. I will be committing all rlimg code here (once I get started on it). It's empty right now, but not for long.

You can grab a copy of the master branch with:
git clone --branch master randomnets@git.drupal.org:sandbox/randomnets/1236474.git rlimg

Nick