Firefox PHP

Inline-Attachments-Module

Posted by Thomas Seifert 
Re: Inline-Attachments-Module
March 04, 2005 07:02PM
sakar,
inline_attachments.php

http://www.krang.org
Re: Inline-Attachments-Module
March 04, 2005 07:04PM
Thom,
I liked the fact that it would show images but didn't like the fact I couldn't download any of the other files any more, so I fixed it for my site. I thought the point of this board was to share. Well I am sharing.

http://www.krang.org
Re: Inline-Attachments-Module
March 04, 2005 07:53PM
Krang, yeah thats fine. My post was meant for sakar.

but what do you mean with other files? pdf/doc etc.?
You would have a broken image for them with your change if I'm not mistaken.
You might want to put an if-statement there to separate between images and other files.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Inline-Attachments-Module
March 04, 2005 08:44PM
Thom,
Sorry if my comment sounded flippent I look at the page in thread view and your comment is attached to mine, not sakar's.

----
I thought it would too but I was surprised that it just shows the file name. At least in Firefox and Internet Explorer it does. Haven't tried with any others. I usually test with Operah too, but I soooooo detest it.

http://www.krang.org



Edited 1 time(s). Last edit at 03/04/2005 08:48PM by Krang.
Re: Inline-Attachments-Module
May 15, 2005 07:11PM
Hi, I am new to Phorum and need help.

I've downloaded the inline attachment module and now what happens is that when I upload more than one picture to my phorum they all display together, with absolutely no space between them, how could I solve this problem, if I could at least insert one blank line between one another it would look much better.

Re: Inline-Attachments-Module
May 16, 2005 09:04PM
edit inline-attachments.php
there is a line
$msgs[$id]['body'].="<img src=\"".$att_data['url']."\" alt=\"".$att_data['name']."\" title=\"".$att_data['name']."\"><br />\n";

which is used for every image. change it to every way you like it.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Inline-Attachments-Module
May 16, 2005 11:37PM
Thanks a lot,
I have no idea of php but I tried for a while changing things and IT WORKED

Great Job. Thanks
Re: Inline-Attachments-Module
August 15, 2005 02:00PM
Please review my inline-attachments.php .
I've added an array of extentions that can be treated as images; everything that is not in_array :) will be shown as a link.
Attachments:
open | download - inline_attachments.php (903 bytes)
Re: Inline-Attachments-Module
August 21, 2005 06:15PM
Probably a bit excessive in CPU usage but you could just use something like
$attachmentsize = getimagesize($attachment);
if ($attachmentsize)
{
  echo ('<img src="$attachment" alt="user posted image" height="$attachmentsize[1]" width="$attachmentsize=[0]" />');
} else {
   echo ('<a href="$attachment">$attachment</a>');
}
It's only an idea and probably wide of th emark but thought I would pass it on.

This method should also stop most forms of abuse (ie viruses).

Carbonize



Edited 1 time(s). Last edit at 08/21/2005 06:17PM by carbonize.
Re: Inline-Attachments-Module
September 24, 2005 05:37PM
how do i remove the inline mod from making my videos inline. i want them to link. the only way it does that is if i turn of the inline mod. but i like to inline my pictures.

thanks
Sorry, only registered users may post in this forum.

Click here to login