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
 Signature Preview MOD Problem
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Old Ager
New Member

Italy
59 Posts

Posted - 03 June 2001 :  15:52:19  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
When I preview a signature with this mod installed, all I get is the text and HTML tags in the preview window. It doesn't show the end result.

Any ideas?

Old Ager

Edited by - Old Ager on 08 June 2001 08:32:26

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 03 June 2001 :  20:09:19  Show Profile
Do you have a url to your forums I can look at?

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 04 June 2001 :  03:17:00  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

My forum is here:

http://www.old-ager.com/forum/default.asp

I forgot to mention that if you try to preview your sig during initial registration, you will get an Error on Page message.

Thanks!
(I hope I'm not being really dumb here, but I have gone through the mod several times and all of the code appears to be as it should be.)

Old Ager

Edited by - Old Ager on 04 June 2001 03:17:59

Edited by - Old Ager on 04 June 2001 03:45:28
Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 04 June 2001 :  03:39:06  Show Profile  Send e3stone an AOL message
I haven't installed the sig preview mod and I'm not really a Javascript expert, but shouldn't this:

function OpenPreview()
{
var curCookie = "strSignaturePreview=" + escape(document.form1.Sig.value);
document.cookie = curCookie;
popupWin = window.open('pop_preview.asp?preview=sig', 'preview_page', 'scrollbars=yes,width=450,height=250')
}

be within the <head></head> tags?

I think I'm mistaken..I'm sorry
<-- Eric -->


http://insidewaco.com/forum/home.asp

Edited by - e3stone on 04 June 2001 03:41:56
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 04 June 2001 :  14:57:07  Show Profile
Ok, I see what the problem is. Also tried it on my server and got the same thing.
The login form at the top of the page has the same ID or NAME that the registration form has. So the javascript function is looking at the login form at the top and doesn't find the "Sig" field and throws an error.

I don't know the best way to deal with this. One of the form names will have to be changed. Don't think we can change the register form as that is gonna be submitted. Probably would have to change the login/logout form name. I will get back to you with a fix.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 04 June 2001 :  16:55:59  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

Thanks a lot. I really appreciate the help.

OA



Old Ager
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 04 June 2001 :  21:13:30  Show Profile
Ok here it is. In the register.asp file do a search for "form1". Change all instances of it to "Form1". You should find 3 instances.

I would have replied sooner but my internet connection was giving trouble.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 05 June 2001 :  00:38:55  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

Thanks, that solved the error problem, but the preview still shows the sig with HTML code and not the end result. Here's a screenshot:



Am I missing something simple?

Thanks again,

OA



Old Ager
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 June 2001 :  00:48:12  Show Profile
hmmm, does this happen also when you preview a message you are about to post?

Can you post a link to a .txt version of your inc_functions.asp file?

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 05 June 2001 :  08:25:34  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

Yeah, it happens during registration and prior to posting. Here's the file link:

http://www.old-ager.com/files/inc_functions.txt

Cheers!

Old Ager
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 June 2001 :  12:23:02  Show Profile
Ok, I made a small change in your inc_functions.asp file. Here it is:
http://user.7host.com/davio/inc_functions.txt

Just save it as a .asp file and overwrite the inc_functions.asp file you have. Hopefully it will work.

Edited by - Davio on 05 June 2001 12:24:16
Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 05 June 2001 :  14:09:41  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

Thanks a lot. I really appreciate the help. BTW, what was the change you made? I'd like to take a look and hopefully learn something.

Could you give me the line number(s), or did you mark the changes in a ny way?



Old Ager
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 June 2001 :  18:41:07  Show Profile
I made the change to the "ChkString()" function. I commented out the "preview" section out of that function and moved it up in the function. This is what i added:
elseif fField_Type = "preview" then
if strAllowHTML <> "1" then
fString = HTMLEncode(fString)
end if
And you can scroll further down to see the code I commented out.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 08 June 2001 :  08:35:53  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

I have everything working fine except for one thing:

When I preview a post, the sig is not included. I have checked and rechecked all of the mod additions and everything is right. Is this a sig preview mod issue, or is it a problem with the original code?


Old Ager
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 June 2001 :  08:45:38  Show Profile
That's how it is originally intended to do.

Go to Top of Page

Old Ager
New Member

Italy
59 Posts

Posted - 08 June 2001 :  09:48:48  Show Profile  Visit Old Ager's Homepage  Send Old Ager an ICQ Message
Davio,

Is there any way to include the sig in the message preview?

EDIT:

OK, figured it out, but since I don't know the first thing about ASP, there may be a better way to do this.

Changes are marked with red text

Add this line in inc_functions.asp around line 428:

fString = doCode(fString, "[ p ]", "", "<p>", "")
fString = doCode(fString, "[ b ]", "[ /b ]", "<b>", "</b>")
fString = doCode(fString, "[ s ]", "[ /s ]", "<s>", "</s>")

In pop_preview.asp, add this line to Davio's Signature preview code after the else:

else
    strSignaturePreview = Request.Cookies("strSignaturePreview")
    strMessagePreview = Request.Cookies("strMessagePreview")
    Response.Cookies("strMessagePreview") = ""

and at the end of the code, change strPreview = strMessagePreview to:

    end if
    strPreview = strMessagePreview & "[ p ]" & strSignaturePreview
end if

Don't forget to take the spaces out of the forum code tags

I added the "p" tag to the forum code because I couldn't figure out how to use the HTML tag when setting the value of strPreview.

If there is a better way to do this, please let me know.

Edited by - Old Ager on 08 June 2001 12:33:27
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
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.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07