Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Proeder's File Attachment MOD -display image??
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

milo145
Starting Member

7 Posts

Posted - 18 April 2007 :  15:40:31  Show Profile
I've read that you can config the MOD to display an uploaded image in the post. Is that possible and how do you config the MOD to do it?

I've got " Download Attachment: Image2.gif" in the post but not the actual image.

Thanx

Edited by - milo145 on 18 April 2007 15:41:01

PPSSWeb
Junior Member

312 Posts

Posted - 18 April 2007 :  15:59:25  Show Profile
Do you have images in posts set to on in your admin options -> Feature Configuration -> Posting Features?
Go to Top of Page

milo145
Starting Member

7 Posts

Posted - 18 April 2007 :  16:04:26  Show Profile
Yes
Go to Top of Page

milo145
Starting Member

7 Posts

Posted - 18 April 2007 :  16:10:32  Show Profile
I took a look at the code it places in the post and I think I've found the problem. The MOD generates the following.

<img>icon_paperclip.gif</img> <b>Download Attachment:</b> <url="IMAGES URL GOES HERE">
Image2.gif</url><br>7.17 KB

The tag should be img not url. Any idea how or where to change it?
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 18 April 2007 :  16:30:12  Show Profile
The code that enters the post text for images immediately follows the code below in outputfile.asp:
	  If ImageFileType=true then
    		%>
		    <script>
(line 187 in an unmodified version)

I just checked my version against the original and found that the value for ImageFileType was not modified in the original. Verify that you have something like the following before the lines mentioned above.

	select case extension
	case ".jpg", ".jpeg", ".gif", ".png", ".bmp"'##Image File extensions
		ImageFileType=true
	case else'##Downloadable file extensions
		ImageFileType=false
	end select


I forgot about making this correction before. I believe it was detailed in an archived post for this mod.
Go to Top of Page

milo145
Starting Member

7 Posts

Posted - 18 April 2007 :  16:47:25  Show Profile
I think the following is the culprit, line 200-207

<script>
if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
var caretPos = opener.document.PostTopic.Message.caretPos;
caretPos.text = "\n\n Download Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/url]
<% =strFileSize %>";
} else {
opener.document.PostTopic.Message.value+="\n\n Download Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/url]
<% =strFileSize %>";
}
</script>

What do you have?
Go to Top of Page

milo145
Starting Member

7 Posts

Posted - 18 April 2007 :  16:55:21  Show Profile
Got it, use the following.

<script>
if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
var caretPos = opener.document.PostTopic.Message.caretPos;
caretPos.text = "\n\nInsert Image:

<% =strFileSize %>";
} else {
opener.document.PostTopic.Message.value+="\n\nInsert Image:

<% =strFileSize %>";
}
</script>

Peace
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07