If a man speaks in a forest, and his wife's not there, is he still wrong?

Gallery images in geeklog articles

GeekLogThis hack modifies Geeklog so it is easy to insert images from Gallery into articles and comments. Links to larger images are automatically created.

The original code was written by Andy Bloch and described on his site here. The code to achieve this functionality is a custom function in lib-custom.php and a few bits of extra code in lib-common.php and system/lib-story.php.

I've created a diff against the latest geeklog CVS code. You can download it here.

Instructions

To insert an image in an article or comment simply add code like this in the article or comment body:

[ gallery/album/image.thumb.jpg]
"thumb" can be replaced with "sized" to insert a larger image or omitted to insert a full-size image.

Additionally, the image can be aligned using any valid HTML IMG alignment value as follows:

[ gallery/album/image.thumb.jpg right]
Finally, to create a text link to a gallery image, use code as follows:
[ gallery/album/image.jpg text link_text] 
For example, the code:
[ gallery/2004-07-28/DSC00712.jpg text my boy Billy!]
results in this link to my [gallery/2004-07-28/DSC00712.jpg text my boy Billy!]

(Actually, I had to insert an extra space before the word "gallery" so the code would not be replaced by the link!)

Enjoy!

Story Options

Gallery images in geeklog articles | 0 comments
The following comments are owned by whomever posted them. This site is not responsible for what they say.

Topics

  • Home
  • Misc (6/0)
  • Audio (5/0)
  • Linux (21/0)
  • Family (1/0)
  • Fishing Diary (1/0)
  • OpenSolaris (7/0)
  • Computing (11/0)
  • General News (7/0)
  • Chloe (1/0)
  • Emily (2/0)
  • Twins (5/0)
  • Classifieds (2/0)
  • GeekLog (2/0)
  • Project Management (1/0)
  • User Functions






    Lost your password?