Gossamer Forum
Home : Products : Gossamer Forum : Pre Sales :

Inline Image Attachments

Quote Reply
Inline Image Attachments
Can Gossamer Forum display in-line images (GIFs and JPGs) that have been uploaded to the forum, or does it require the user to click on a link to see each attachment?

(Yes I have read the features list and the pdf manual)

Thanks in advance,

Matt
Quote Reply
Re: [memobug] Inline Image Attachments In reply to
Hi,

No, it currently only supports inline images via a URL. Although I suppose you could upload an attachment, and then put the URL to that attachment in your post.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
Thanks for the prompt response.

Knowing how flexible this software is, I was surprised at the response. I had actually anticipated you might say that tags for the image URL and filenames were available to be used in the templates!

I'm currently using a YaBB board, and was looking at the possibility of moving to Gossamer Forum mainly for speed benefits in searches and more flexibility in customizing the user profiles. It would be very difficult to give up the inline image feature we currently enjoy. Only a tiny minority of the posters have ever used UBB code of any kind to link images by URL.

Since mine is an art-oriented group, it would be very difficult to give up inline images and expect everyone to hunt for attachments and click on links. Our most successful competitors in our sphere have inline images as well, and about 1/3 of the postings are image posts.

Inline images do slow page loads, and that can be an issue both for the server and the users. Since my forum took off it has become pretty graphic-intensive, and I am thinking I will need to try to use imagemagick to generate some thumbnails that can be used as inline previews.

I will keep following developments here with Gossamer Forum, as it appears to be evolving along the lines of something we may be able to use. I have a reasonable ability with perl, but very little with MySql and knowing what it would take to implement inline image display.

Thanks again for the response,

Matt
Quote Reply
Re: [memobug] Inline Image Attachments In reply to
Hi,

What does the interface to attach inline images look like? How do you specify where the inline image should go in the post?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
Hi Alex,

I don't know about the other boards, but YaBB just has an administrative switch to toggle attachment inline display on and off, and the attachment itself appears immediately below the post in YaBB and in the other ones I have seen. It still displays a clickable link to the attachment in any case, similar to the one in GF.

Personally, I think that enabling switch should be a user control, with an administrative preference. Many users would want it enabled. A vocal minority with very slow connections would prefer not.

With GF, if enabled, I suppose inline images could be placed in the same position, or maybe there could be a tag or tags in the template to determine its location?

Thanks & regards,

Matt
Quote Reply
Re: [memobug] Inline Image Attachments In reply to
Ah, so it's not really inline, it doesn't let you display the image in the middle of your post like you could do with a [image] tag, right?

This could be done in the template then, you could just do something in the attachment loop so that if it is an image, add an <img> tag to display it.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
That's correct. The images actually appear between successive posts, I suppose that's why they were dubbed "in-line" by the developers. The term itself is confusing! It's nice to hear that you believe this type of in-line attachment display is possible.

Regards,

Matt
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
DCForum does display uploaded images inline. I think it has a javascript popup window to upload, and then javascript inserts the code into the message when the window closes.

In any case, for images it would be nice if the image code was automatically inserted, just at the end, or maybe to have some sort of [uploadedimage] tag to insert it automatically wherever?


Realiiity.com Forums
Quote Reply
Re: [ellipsiiis] Inline Image Attachments In reply to
yes ellipsiiis, I think that would be ideal. It's kind of how I thought it might work with the templates.

I understand that Gossamer Forum can have multiple attachments. So how might something like the [uploadedimage] tag work?


Regards,

Matt
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
Could you elaborate on how to do this?

I see that this is the template to edit: include_post_display.html

Right at:

<%body_font%>
<a href="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
<img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
<%postatt_filename%>
</a>
(<%GForum::Attachment::friendly_size($postatt_size)%>)
<%/body_font%>


But how do I do an <%if%> statement that checks postatt_filename to see if it contains ".gif" or ".jpg" at the end?

Thanks for your help!

Stephen




In Reply To:
Ah, so it's not really inline, it doesn't let you display the image in the middle of your post like you could do with a [image] tag, right?

This could be done in the template then, you could just do something in the attachment loop so that if it is an image, add an <img> tag to display it.

Cheers,

Alex
Quote Reply
Re: [biketrials] Inline Image Attachments In reply to
Hi,

You could try:

<%if postatt_filename like '.gif' or postatt_filename like '.jpg'%>
...
<%else%>
...
<%endif%>

(that does look for a .gif anywhere, not just at the end -- if you wanted it at the end, you'd need to write a global for it.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Inline Image Attachments In reply to
Thanks, Alex!

It appears to be working just fine now. I changed the attachment display section in include_post_display.html to:


<%body_font%>

<%if postatt_filename like '.gif' or postatt_filename like '.jpg'%>
<img src="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>" border=0><Br>
<%postatt_filename%>
<%else%>
<a href="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
<img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
<%postatt_filename%>
</a>
(<%GForum::Attachment::friendly_size($postatt_size)%>)

<%endif%>
<%/body_font%>



I, like many other posters I've seen on here, highly recommend making this kind of feature available in the standard installation without template modification.

Thanks for your help!

Stephen