Author |
Topic |
Old Ager
New Member
Italy
59 Posts |
Posted - 03 June 2001 : 15:52:19
|
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
|
Do you have a url to your forums I can look at?
|
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 04 June 2001 : 03:17:00
|
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 |
|
|
e3stone
Average Member
USA
885 Posts |
Posted - 04 June 2001 : 03:39:06
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 04 June 2001 : 14:57:07
|
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.
|
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 04 June 2001 : 16:55:59
|
Davio,
Thanks a lot. I really appreciate the help.
OA
Old Ager |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 04 June 2001 : 21:13:30
|
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.
|
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 05 June 2001 : 00:38:55
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 05 June 2001 : 00:48:12
|
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?
|
|
|
Old Ager
New Member
Italy
59 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 05 June 2001 : 12:23:02
|
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 |
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 05 June 2001 : 14:09:41
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 05 June 2001 : 18:41:07
|
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.
|
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 08 June 2001 : 08:35:53
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 08 June 2001 : 08:45:38
|
That's how it is originally intended to do.
|
|
|
Old Ager
New Member
Italy
59 Posts |
Posted - 08 June 2001 : 09:48:48
|
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 |
|
|
Topic |
|