Author |
Topic  |
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 28 November 2004 : 23:04:11
|
ignore the error, it was caused by commenting out the InStr checks. duh on me. Left was trying to read a zero length string.
another thing I did was force a value into doThumb and oddly enough, nothing changed.
doThumb = Join(splitStr, " ") doThumb = replace(doThumb, t1Tag, "") doThumb = replace(doThumb, t2Tag, "") doThumb = "TEST"
|
|
Edited by - dayve on 28 November 2004 23:08:16 |
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 28 November 2004 : 23:09:06
|
heh heh heh HA HA see what you get for checking your so-called "hunch"?
heh
wait so that means we still dont know why its not working 
grrrr
quote:
doThumb = "TEST"
see... VB does not like me at all. no matter what I do it has to be a pain in the ****s |
-Stim |
Edited by - Da_Stimulator on 28 November 2004 23:10:31 |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 28 November 2004 : 23:22:19
|
this line:
if Instr(fString, t1Tag) and InStr(fString, t2Tag) then
probably should be this:
if Instr(fString, t1Tag) > 0 and InStr(fString, t2Tag) > 0 then
in which I am getting the Left error reported earlier.
I also tried this:
if Instr(fString, "[thumb]") > 0 and InStr(fString, "[/thumb]") > 0 then
same error. |
|
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 28 November 2004 : 23:26:13
|
do a response.write on endtLoc or check to make sure its > 0...
perhaps thats screwing up and telling left 0, therefore causing an error |
-Stim |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 28 November 2004 : 23:29:51
|
endtLoc is reading 0. |
|
 |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 29 November 2004 : 05:54:52
|
How about using the auto image resize MOD, and setting the resize dimensions to thumbnail format? |
eXtremeGossip  |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 29 November 2004 : 10:39:32
|
quote: Originally posted by Jorrit787
How about using the auto image resize MOD, and setting the resize dimensions to thumbnail format?
you're not understanding what the script does. The resizing mod you are talking about I've been using for about a year. All it does is take a large image and resizes it, not resamples it. That means a 300K image with dimension of 640X480 is still a 300K image at 480X240. This does not help the load time of many photo threads. The mod I created takes that 300K image and resamples it to something around 20K and creates a thumbnail that can be clicked on to show the original 300K image.
Take a look at this thread:
http://www.burningsoulsforum.com/topic.asp?TOPIC_ID=10917
Right click on the thumbnails and look at the file size. Now click on one of the images and look at the file size of the original. See the difference?
Here is an example:

The above image is 62K, but if you click on it, you will be loading up a 551K image! Now imagine someone posting one of these images, or many of these images in your threads. It would kill your load up time whereas the thumbnails do not. The Resize Mod would not be able to accomodate for the load times as this mod does.
|
|
Edited by - dayve on 29 November 2004 11:12:01 |
 |
|
Jorrit787
Average Member
  
Netherlands
681 Posts |
Posted - 29 November 2004 : 10:46:07
|
I see, hadn't thought of that Sorry  |
eXtremeGossip  |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 29 November 2004 : 11:13:56
|
no worries... just trying to make sure everyone is not thinking I am trying to re-invent a mod that already exists. |
|
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 29 November 2004 : 20:34:13
|
I just recalled this topic:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=54891
I think I can use this for what I want to do because I can do one of these 2 options:
1. [attachment=SomeImage.jpg] 2. [attachment=10]
Option 1 allows me to use the image name and prefix it accordingly for the other image Option 2 allows me to pass the id number to the database and read the image then create the thumbnails accordingly
I'm going to try Option 1 first when I get home this evening. |
|
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 29 November 2004 : 23:53:50
|
Implemented the above concept (thanks -gary) and it worked out well... here is the end result.
Usage: [image=SomeImage.jpg]
Code:
Function ImageThumb(fString)
Dim objRegExpr, Matches
Set objRegExpr = New regexp
objRegExpr.Pattern = "\[image=.*?\]"
objRegExpr.Global = True
objRegExpr.IgnoreCase = True
Set Matches = objRegExpr.Execute(fString)
for each match in Matches
fString = Replace(fString, Match.Value, ImageString(mid(match.Value,8, len(match.Value)-8)))
next
Set Matches = Nothing
Set objRegExpr = Nothing
ImageThumb = fString
End Function
Function ImageString(intValue)
ImageString = "<a href=""#"" onClick=""popImage('files/~images/" & intValue & "','BSF Image','middle_center',true,true);return false;"">" &_
"<img src=""files/~thumbs/thumb_" & intValue & """ border=""0"" alt=""Click For Larger View"" style=""border: 1px solid silver;""></a>"
End Function
|
|
Edited by - dayve on 30 November 2004 00:29:33 |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 30 November 2004 : 05:03:55
|
Do we need to have any other MODs installed to use this? |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 30 November 2004 : 10:46:35
|
quote: Originally posted by muzishun
Do we need to have any other MODs installed to use this?
this thread is only a small portion of the entire feature. I have a script that requires the .NET Framework to be on the server your forum is on. This script is in C# and it allows members to upload images (greater in size than the new Windows 2003 allows for pure ASP) and creates a thumbnail. The filename is also stored in a table called FORUM_IMAGES which was not necessary but I wanted to use this for a future implementation of a photo album of all images uploaded in our topics. The second part is what I was discussing in this thread. The need for a custom forum tag to accommodate the viewing of the thumbnail with the ability to click on it to see the original image in a centered popup window so.... to answer your question, no, this is not all you need. There is a lot of other stuff that needs to be done. Once I am finished testing and tweaking, I'll gladly make it available for those interested, but it can't really be considered a Snitz Mod because it does not use purely ASP.
For more info on the engine of what drives this mod, view this thread:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=55845 |
|
 |
|
-gary
Development Team Member
 
406 Posts |
Posted - 30 November 2004 : 11:13:18
|
Check out the topic below. It describes how I use a script to check for a user thumbnail size preference and display the file how they want to see it. I use the [attachment] tag just like you describe above and any post that contains the [img] tag is parsed and downloaded to prevent dead links in the future.
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=54860 |
KawiForums.com
 |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 30 November 2004 : 11:51:42
|
thanks -gary, I will definitely check this out and implement it as well. |
|
 |
|
Topic  |
|