• Welcome to Randomland - The Forum. Please login or sign up.
 
Apr 25, 2024, 01:06 PM

News:

Get Out, See Green!


Randomland's Drupal Module

Started by zourtney, Oct 21, 2009, 03:06 PM

Previous topic - Next topic

zourtney

Last weekend I made a Drupal module to display a custom image block (seen here if you have permission). It just pulls the image node description and sets the alt text and throws a gallery link at the bottom. It can be called by simply inserting [rlimg <node#>]. It needs a little refining if we're going to use it. It was an idea I had toyed with trying for a few months; I just tried it out on Sunday and got that. And making it a Drupal module seemed like a good learning experience.

Does anyone see any benefit in using this? If so, we could expand our toolset in include other commonly used elements.

Nick

I like it. I also like that it pulls the image from a node. If in the future that nodes image changed then you have updated that picture site-wide (say your replacing a low quality or outdated image)

zourtney

Oh -- a potential pitfall I just thought of though -- if that image ever gets deleted, and a new one is added in its place, you'll have to update place that references it. Because the node IDs are not ever recycled, I don't think. But that's not much worse than static linking. Just don't delete the nodes.

Nick

And you can always fix it by hand in the database, though thats not desirable to do often. So be strong, don't delete! Just unpublish if need be. 

zourtney

Exactly!

Quote from: Nick on Oct 22, 2009, 07:10 AM
...be strong, don't delete!. 

:) This phrase, along with "swamp diving" need more obscure references on this site! I actually did have a "be strong, don't delete" page up once, years ago. Back in the free-stuff-and-t-shirts days.

Nick

I would wear one of those shirts. We should also make some pamphlets to hard out to offending deleters to enlighten them of the atrocity that they are committing!  Or maybe just for download.

zourtney

Maybe we should make a tri-fold pamphlet, complete with dying polar bears and crying applesauce. And some nonsense argument about future generations having a skewed perspective on life in the early 21st century because of posed portrait shots*. Or maybe we shouldn't do that.

*It's more likely that we'll be viewed as idiotic for all of our worthless "look, it's me in the mirror" snapshots, offensive avatars, and haphazard framing of shots.

Nick

I do like me some good satire.

zourtney

It used to spring from my fingers like a mighty flowing river onto the pages of the Randomland. But here we suffer the dead heat of the summer of satire, for my river doth run dry. Oh! how I long for the refreshment of the winter solstice.

Nick


zourtney

Yeah.

Another thing that I would find useful when writing pages is the ability have links autogenerate the title text. This would be quite easy to implement.

Just go:
[rllink 150 "Tentin'"]
And it makes
<a href="http://randomland.net/node/178"; title="Tentin' on the Ten-Ten â€" Fall Camping Trip, 2009">Tentin'</a>

And any changes to the node title would be automatically updated. Hover text ease! There is likely something out there that is 9000x more powerful and written back in like 2005. I think I came across something similar once. Oh, did I mention the part where it would take 3 hours to configure and learn to use?

zourtney

So, should we continue to use my little image block module, or ditch it for straight embedding of images? I never quite got the divs to float around like I thought they should, but it's almost right. I think our normal "Full HTML" input type does something nasty to the code -- just try [rlimg 237] or whatever on its own line. It makes a big fat box all the way across the screen. Or perhaps I don't understand what I'm doing.

Either way, the question stands: Expand RL module? Leave as is and use? Or ditch it?
Note: this applies to anyone who might ever write something on the main site. AKA: anyone looking at this.

Nick

It does do horrible things to the code. It ends tags early (stops the span from doing its job) and apps superfluous <p> tags. It's annoying.

zourtney

Yeah. It has to be one of those extra input filters we have on there. I haven't messed with it too much though. I have enabled the rlimg for all input type (including PHP).

I don't believe it's the wysiwyg editor itself causing us grief. I actually like that thing, once I got used to using it. Unfortunately, we can't use that to embed our image blocks (unless I make some weirdo extension to the editor, which sounds possible, actually).

Plah. I don't know. I like uniformity more than I like my module.

Nick

Yep. A nice consistent 'look and feel' site wide.