Welcome Guest Search | Active Topics | Log In | Register

2 Pages 12>
[Updated] Image preview instread of full sized images (1.9.3 RC2) Options · View
TommyB
#1 Posted : Tuesday, July 22, 2008 9:54:22 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
Image preview instread of full sized images
or in other (maybe better) words:
Thumbnails for attached images

Do you want to allow file attachments in your YAF, specially images? Do you know there are displayed with the original size of the image and may can cause problems in your page or forum layout if they are to large?
Well, then read on, this is maybe your solution Smile

I have had this problem, also I have seen something like this in some other forums, and I thought it was time to create this. So i spend an hour or two into this, and now everything looks very well (see the attached image below, it's out of my forum).


Important:
This enhancement REQUIRES that you are running YAF v1.9.3 RC2 ( Dated 10/7/2008 )
This is the version that I use. If there are new versions of YAF available please be patient, I will update this, too.

Otherwise you can implement this in I think most newer YAF versions your choise, too, if you have the (yaf) source files of it and know how to compile it. Any changes I have made are commented in my SRC files using tag // TommyB: Start / End MOD.


Binary? Source?
Use the BIN if you want to add this to a compiled instalation (ONLY for 1.9.3 RC2).
Otherwise use the SRC if you want to compile your own YAF with preview images added. You can simply overwrite the source files (ONLY 1.9.3 RC2) or merge my changes with your files.


Installation: (BINary version)
- Verify that your web is running version 1.9.3 RC2
- Download the attached BIN file and extract it
- Go to your web root and backup the file "resource.ashx"
- Go to /Bin and backup the file "YAF.Controls.dll"
- Upload the resource.ashx from the archive to your web root, overwrite the existing one
- Upload the /Bin/YAF.Controls.dll from the archive to your web root's bin directory. Overwrite again

*) With web root I mean the web root of your forum, mostly / if you have it directly on your page, or /forum if it's placed in an subdirectory called "forum" Wink


Installation (SouRCe version)
- Download the attached SRC file and extract it
- Go to your source root, backup the file "\YetAnotherForum.NET\resource.ashx"
- Go to your source root, backup the file "\YAF.Controls\MessageAttached.cs"
- Overwrite the files above with that ones out of the archive (ONLY 1.9.3 RC2) or merge it with my changes out of the archived files.


Notice:
If you, members or guests only see something like:
Quote:
joeuser attached the following image(s):
test2.JPG (37kb) downloaded 0 time(s).

... instread of the preview images, then you need to enable the "Download" access mask.
Thanks to camoto for figuring this out Smile


Feel free to post a comment, thanks, questions, whatever ^^
Greetz
File Attachment(s):
PreviewImages BIN (1.9.3 RC2).zip (38kb) downloaded 37 time(s).
PreviewImages SRC (1.9.3 RC2).zip (7kb) downloaded 27 time(s).
TommyB attached the following image(s):
PreviewImages.png
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
TommyB
#2 Posted : Wednesday, October 08, 2008 1:32:49 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
Updated to 1.9.3 RC2

No modifications made, except I have attached a smaler preview here.
Also I have uploaded the new compiled .dll if you don't want to compile the whole YAF for this.

Enjoy Smile
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
midwestSS
#3 Posted : Wednesday, October 08, 2008 3:26:18 PM

Rank: YAF Commander


Joined: 8/17/2008
Posts: 101
Location: il
when i download the zip file, it tells me the zip file is corrupted..
maybe upload the zip file again?
TommyB
#4 Posted : Wednesday, October 08, 2008 3:37:49 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
Whoops?

Sorry for that, I have uploaded them again, should be fine now.
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
midwestSS
#5 Posted : Wednesday, October 08, 2008 7:05:12 PM

Rank: YAF Commander


Joined: 8/17/2008
Posts: 101
Location: il
i just tried it twice more.
dunno whats up with it, but it keeps telling me the zip file is corrupted.
TommyB
#6 Posted : Wednesday, October 08, 2008 7:18:34 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
strange ?! I have tried it before posting without problems.

I have uploaded the files to another location, too. Hope this works for you!?

Click me
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
midwestSS
#7 Posted : Wednesday, October 08, 2008 7:53:41 PM

Rank: YAF Commander


Joined: 8/17/2008
Posts: 101
Location: il
yep that worked, now where do i put the resource.ashx file?
TommyB
#8 Posted : Wednesday, October 08, 2008 10:06:38 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
Binary version only:

This file is directly in your web root Smile
The other one into your /bin directory.

Overwrite the files (both), but backup them first
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
midwestSS
#9 Posted : Wednesday, October 08, 2008 10:22:18 PM

Rank: YAF Commander


Joined: 8/17/2008
Posts: 101
Location: il
got it!
nice work!
TommyB
#10 Posted : Wednesday, October 08, 2008 10:39:30 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
Thanks for your feedback Smile

Nice to hear that I'm not the only one that uses that Wink
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
camoto
#11 Posted : Friday, October 10, 2008 3:14:27 PM

Rank: YAF Forumling


Joined: 10/7/2008
Posts: 7
Location: USA
I downloaded the BIN files. Do I just upload these two files? Where do they go?


Thanks for the help!
midwestSS
#12 Posted : Friday, October 10, 2008 3:57:26 PM

Rank: YAF Commander


Joined: 8/17/2008
Posts: 101
Location: il
TommyB wrote:
Binary version only:

This file is directly in your web root Smile
The other one into your /bin directory.

Overwrite the files (both), but backup them first



there..
TommyB
#13 Posted : Friday, October 10, 2008 5:23:18 PM

Rank: YAF Commander



Joined: 7/6/2005
Posts: 92
Location: Germany
I've updated the first post (added installation instructions)
Hope it's a bit clearer now Smile

Thx @ midwestSS Wink
- Sry for my english Wink

BattCursor.Net - Official homepage of that tool for vista laptops!
camoto
#14 Posted : Friday, October 10, 2008 8:02:24 PM

Rank: YAF Forumling


Joined: 10/7/2008
Posts: 7
Location: USA
thanks for the instructions, it was fairly straighforward but I wanted to be sure before I ran with it.

easy to implement and works great!!

thanks!!
camoto
#15 Posted : Friday, October 10, 2008 9:07:00 PM

Rank: YAF Forumling


Joined: 10/7/2008
Posts: 7
Location: USA
I take that back!!

Everyone can upload fine. However, only Admin can see the thumbnails and click on them.

Regular members only see:

joeuser attached the following image(s):
test2.JPG (37kb) downloaded 0 time(s).


EDIT***

Nevermind, you need to enable the "Download" access mask. Sorry if I missed that.
Users browsing this topic
Guest (2)
2 Pages 12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.154 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET