Knowledge Base: Including Images in Group Posts and Comments

The “Groups” facility in Ratburger.org is based upon the Group feature of BuddyPress, which is a plug-in (or more precisely, bolt-on) to WordPress which was intended to turn what was originally blogging software into a crude kind of social network, with emphasis on “crude”.  BuddyPress can best be thought of as a kludge hanging in bag crookedly nailed to the side of the hack which is WordPress.  Much of the work expended in software development since the launch of Ratburger has been in fixing outright flaws and limitations of BuddyPress.  Raw BuddyPress is something to behold: group posts and comments, once posted, cannot be edited or deleted, except by an administrator, and there is near complete opacity about what is going on, with notifications completely haphazard.

The whole Groups facility is a hack.  The way a discussion group add-on to WordPress should work is self-evident to anybody who gives it a few minutes’ thought: each group should be its own little site, with its own posts and comments, but with notifications confined to members.  Posts could be promoted from groups to public pages by administrators.  All of the composition, editing, and administration functions should be identical for the main site and groups.

What we have, of course, is nothing like that.  Groups don’t work remotely like the main site, and users are constantly frustrated trying to do simple things in groups which are easy on the main site.

For example, consider including an image in your post or comment.  On the main site, you just use the “Add Media” button, upload the image, and shazam, there it is!  But in a group, you’ll look in vain for an Add Media button—groups were basically intended by the developers of BuddyPress as glorified text-only bulletin boards, and if you want to do something as 1995-era edgy as including an image in your post, you have to jump through hoops.  Here are the details of the hoops, in case you remain undeterred.

First, upload your image to the Media Library.  There’s no “Add Media” button, but you can open up another tab or window, go to the Dashboard (via the little thing that looks like a speedometer in the bar at the top left of the page), then select Media/Add New.  This will display the familiar “Upload New Media” page, where you can select an image on your local computer and upload it to Ratburger.  This does not include the image in your group post; it simply adds it to your Media Library.

Next, display the Media Library.  In the sidebar, click Media/Library and you’ll see all images you’ve uploaded, with the most recent one at top left.  Click it and you’ll see the image full sized.  Make a note (copy and paste to an external text file) the following information about the image:

  • Dimensions
  • URL
  • Alt Text

For example, for an image I uploaded some time ago, I’d note:

  • Dimensions: 640 by 425 pixels
  • URL: https://www.ratburger.org/wp-content/uploads/2018/09/S146.jpg
  • Alt Text: HDR image: total solar eclipse 2010-07-11

Now go to the group post where you wish to include the image.  Starting on a line by itself, include an HTML img tag for the image like the following:

<img src="https://www.ratburger.org/wp-content/uploads/2018/09/S146.jpg"
  width="640" height="425" class="aligncenter"
  alt="Alt Text: HDR image: total solar eclipse 2010-07-11" />

Replace the various fields with the information you’ve recorded for your image. The “aligncenter” specification will centre the image (what you usually want); you can also use “alignleft” or “alignright” if you know what you’re doing.

If your image is larger than will fit on the screen (for example, images from digital cameras), you’ll need to recalculate the width and height to rescale it to fit. You typically don’t want an image to be wider than 640 pixels, and 600 pixels is a good choice. Let’s assume you have a monster image which is 6016×4016 pixels (as produced by a Nikon D600 digital camera) and you wish it show it as 600 pixels wide. You’d specify width=“600” in the img tag, but then you need to calculate the height in order to preserve the shape (“aspect ratio”) of the image. To do this, multiply the original height by the new width divided by the original width, in this case:

4016 × (600 / 6016) ≈ 401

(round to the nearest integer), and then specify height=“401”.

When you publish your post or comment in the group, the image should now appear.

Why should something so conceptually simple as including an image in a discussion group require such contortions?  Welcome to “the software that runs one third of the Web” (which is what they say, without adding the concluding phrase, “into the ground”).  As I mock their download page:

WordPress: Worthless, and also free

4+

Users who have liked this post:

  • avatar
  • avatar
  • avatar
  • avatar

Breaking: Notre Dame on Fire

https://www.dailymail.co.uk/news/article-6925015/Fire-breaks-historic-Notre-Dame-cathedral-Paris.html

Has anyone heard about the causes?

Added information from article.

Notre Dame – which means ‘Our Lady’ – was build in 1160 and completed by 1260, and has been modified on a number of occasions throughout the century.

A spokesperson for the cathedral said the blaze was first reported at 5.50pm (GMT) and the building was evacuated soon after.

Officials in Paris said the fire could be linked to restoration works as the peak of the church is currently undergoing a 6 million-euro ($6.8 million) renovation project.

1+

Users who have liked this post:

  • avatar

Makes me wonder…

Why are we so dependent on our utilities?

We had a storm come through at 2:14 AM and we, along with 390 other customers, lost power for nearly 12 hours. It was starting to get cold in the house as the gas furnace needs electricity for the pumps. The battery operated sump pump nearly depleted it’s battery. The basement did not flood, it couldn’t because the water would flow out the garage door like it did the first mid winter thaw we had some 25 years ago. I was ready to go out and buy a generator when the power came back on.

Still thinking about a generator…..

2+

Users who have liked this post:

  • avatar
  • avatar

News You Can Use: What Happens When a 63 Amp, 36000 Volt Fuse Blows?

Last year, a solar power farm in the United Kingdom had a really bad day and blew one of the main fuses on its three-phase AC output feed.  (If you work it out, this phase had a maximum power of 2.25 megawatts.)  An engineer sent the blown fuse to Big Clive, who proceeds in the following video to find out what’s inside with the cheap-o X-ray device, how it works, and what the aftermath of  a blown fuse event looks like.  Cameo appearance by an ever-helpful cat.

The fuse is rated to break a short-circuit current of 40,000 amperes.  The 36 kV rating is between phases, with 20 kV above ground.

3+

Users who have liked this post:

  • avatar
  • avatar
  • avatar