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: General / Previous versions
 Need a nested forum tag created.
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

dayve
Forum Moderator

USA
5820 Posts

Posted - 28 November 2004 :  23:04:11  Show Profile  Visit dayve's Homepage
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
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 28 November 2004 :  23:09:06  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
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
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 28 November 2004 :  23:22:19  Show Profile  Visit dayve's Homepage
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.

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 28 November 2004 :  23:26:13  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
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
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 28 November 2004 :  23:29:51  Show Profile  Visit dayve's Homepage
endtLoc is reading 0.

Go to Top of Page

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 29 November 2004 :  05:54:52  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
How about using the auto image resize MOD, and setting the resize dimensions to thumbnail format?

eXtremeGossip
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 29 November 2004 :  10:39:32  Show Profile  Visit dayve's Homepage
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
Go to Top of Page

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 29 November 2004 :  10:46:07  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
I see, hadn't thought of that Sorry

eXtremeGossip
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 29 November 2004 :  11:13:56  Show Profile  Visit dayve's Homepage
no worries... just trying to make sure everyone is not thinking I am trying to re-invent a mod
that already exists.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 29 November 2004 :  20:34:13  Show Profile  Visit dayve's Homepage
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.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 29 November 2004 :  23:53:50  Show Profile  Visit dayve's Homepage
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
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 30 November 2004 :  05:03:55  Show Profile  Visit muzishun's Homepage
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)
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 30 November 2004 :  10:46:35  Show Profile  Visit dayve's Homepage
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

Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 30 November 2004 :  11:13:18  Show Profile
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


Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 30 November 2004 :  11:51:42  Show Profile  Visit dayve's Homepage
thanks -gary, I will definitely check this out and implement it as well.

Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07