UK Vintage Radio Repair and Restoration Discussion Forum

UK Vintage Radio Repair and Restoration Discussion Forum (https://www.vintage-radio.net/forum/index.php)
-   Forum Announcements and Comments (https://www.vintage-radio.net/forum/forumdisplay.php?f=18)
-   -   Picture attachments within the text. (https://www.vintage-radio.net/forum/showthread.php?t=136256)

ukcol 4th May 2017 8:31 am

Picture attachments within the text.
 
When I have wanted to add a picture to a post I have always used the "attachments" tab and then worked with the dialog that appears. The picture then appears at the bottom of the post outside the body of the text. However I have noticed that sometimes contributors add pictures within the main body of the text.

I looked at one today by using the "quote" button and it takes the form "[A-T-T-A-C-H]123456[/-A-T-T-A-C-H]" where the 123456 is presumably a file name. (I have added dashes in between the letters of the word "attach" to prevent the forum software from acting on it).


If I want to add a picture within the body of the text do I have to type out the form as above or is there another easier way?

ThePillenwerfer 4th May 2017 10:58 am

Re: Picture attachments within the text.
 
I've long wondered that. It would be so much easier than writing something and having to add "See second picture" or whatever.

mhennessy 4th May 2017 12:29 pm

Re: Picture attachments within the text.
 
1 Attachment(s)
Testing...

Attachment 142089

OK, I've worked it out...

Attach the image as normal. Once back to the main window with the "reply" interface, scroll down to where the attachments are shown in a list, just above the "Manage Attachments" button.

If you click on an attachment, it will open in a new tab or window.

Look closely at the URL. Here's my one:

Code:

http://www.vintage-radio.net/forum/attachment.php?attachmentid=142089&stc=1&d=1493896996
The key thing is "attachmentid" - 142089 in this case.

If you quote this to reply, you'll see that I've enclosed that ID in the ATTACH tags. Job done :thumbsup:

Perhaps there's a simpler way of doing it, but as I do a lot of HTML and similar stuff, I'm OK with this.

But the downside: it doesn't use the "Lightbox" plugin, so once you've viewed the image, click "Back" in the browser to go back to the post.

Hope this helps,

Mark

ThePillenwerfer 4th May 2017 12:30 pm

Re: Picture attachments within the text.
 
Thanks, Mark. Duly noted.

mhennessy 4th May 2017 12:43 pm

Re: Picture attachments within the text.
 
And, it sort-of works for existing attachments. This is handy, because I'm sure we've all uploaded the same file more than once on occasion. Sometimes I'll try to find the original post and link to that, but it's not always easy to find what you're looking for...

If you go to your UserCP, scroll down to the bottom, looking for the "Attachments" link on the left. It's in the "Miscellaneous" section. Click this link, and you can browse all your attachments. To help, at the bottom is a "Show Thumbnails" link...

Having located the desired one, click it and get the ID from the URL, as described above:

Attachment 64985

Also, it works for any attachment on the forum, so we can readily "steal" someone else's pictures!

Attachment 141676

This was chosen at random from a recent thread. Click the image and up it pops in Lightbox. Click the image again and it opens in a new tab, and you can get the ID as before.

I said "sort-of" earlier, because it doesn't appear to put a preview in the post, but it converts the ATTACH tags to a clickable link. So, the preview is only shown for images that were attached while you were making that post (fair enough).

Dave Moll 4th May 2017 2:39 pm

Re: Picture attachments within the text.
 
I hadn't picked up on the list of attachments in my profile. Definitely soounds like something to investigate.

I notice, however, that (at least for me) the attachments referenced in the above post don't appear as images, but in the form Attachment nnnnn.

Paul Stenning 4th May 2017 2:48 pm

Re: Picture attachments within the text.
 
I think if the attachment is an image and is in that post it appears as an image, however if it is in another post it appears as a link. I'm not sure though.

I am not aware of an easier way of doing this than described above.

Generally I think it is easier to just attach as normal and refer to them as image 1, image 2 etc in the post.

mhennessy 4th May 2017 2:58 pm

Re: Picture attachments within the text.
 
Quote:

Originally Posted by Dave Moll (Post 941450)
I notice, however, that (at least for me) the attachments referenced in the above post don't appear as images, but in the form Attachment nnnnn.

Indeed; see my last paragraph.

I know little about vBulletin, but MyBB works in a similar way - there's clearly a link between posts and attachments in the database which causes this behaviour. Whether than can be altered is not known, but it's hardly worth investigating - it's just a thumbnail after all. I do like the possibility of saving attachment space, but doubt I'd be able to persuade users to think about doing this in practice.

AC/HL 4th May 2017 3:25 pm

Re: Picture attachments within the text.
 
If you give the attachments appropriate filenames it's perhaps easier than if they're all called, say, Imagexx

mhennessy 4th May 2017 6:10 pm

Re: Picture attachments within the text.
 
Sadly, the filename doesn't appear in the link - that comes from the code/database, based on the image ID. So yes, using the ATTACH tag to link to attachments not in the current post is of limited utility - one of those "might be occasionally useful" things, rather than an exciting new discovering ;)

On MyBB, it's slightly different. To achieve the same, you do this:

Code:

[attachment=64985]
...rather than:

Code:

[ attach]64985[ /attach]

EDIT: Extra spaces added, because "ATTACH" is parsed, even in a CODE block...

And if you change "attach" to "attachment" here, it doesn't work. I've been doing a bit of reading around, and seen suggestions that "attachment" is a later addition to BBCode (and "attach" is actually a vBulletin mod?). Obviously we're running a fairly old version of vBulletin, so that might explain that one.

BTW, that's probably a good thing. One forum I lurk on recently changed to vBulletin 5, and it's radically different, and not in a good way. It's rather Javascript/JSON heavy, and a worse user experience compared to this site. I've no idea if/what their admin could do more to improve things, but it's fair to say the site owner is pretty disappointed, especially give that vBulletin is not exactly cheap!

factory 4th May 2017 7:21 pm

Re: Picture attachments within the text.
 
2 Attachment(s)
I had also forgotten how to add pictures in the text, but by trial & error found how to again recently.

Upload the pictures as you normally do, then click on the "paper-clip" symbol above then select the picture you want, which will appear where the cursor is at that moment.

Attachment 142095

I appears in the code shown below.

Attachment 142096

Hope this helps.

David

ukcol 4th May 2017 9:41 pm

Re: Picture attachments within the text.
 
3 Attachment(s)
Thanks for the pointers folks.

Here goes my test run.

My Decca TP75

Attachment 142101

Display at a recent Dulwich museum event

Attachment 142102

My older son (many years ago)

Attachment 142103

I've just looked at the preview and it worked OK. :thumbsup:

Dave Moll 5th May 2017 7:36 am

Re: Picture attachments within the text.
 
Quote:

Originally Posted by mhennessy (Post 941502)
Extra spaces added, because "ATTACH" is parsed, even in a CODE block...

Unless you surround it with "[noparse]...[/noparse]".

mhennessy 5th May 2017 2:55 pm

Re: Picture attachments within the text.
 
Having just checked, that seems to be another "funny" with vBulletin.

My understanding of CODE tags is that BBCode within them should be ignored - it seems that vBulletin have decided to do the opposite. I've just checked a v5 vBulletin forum that behaves the same as this one, so it's not the ages of this software to blame.

Out of the box, MyBB and phpBB ignores BBCode in CODE blocks, just showing them as typed, and also don't support NOPARSE tags.

All good reasons to "keep it simple" on forums ;)


All times are GMT +1. The time now is 2:36 pm.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.