Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: Signature Preview
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 04 December 2000 :  15:16:31  Show Profile
I got pretty tired going into my profile, changing my profile, and to see if it looks ok, post a message, then if it doesn't, do the step all over again. (Which could take a while. )
So here's the mod if anyone wants it.
http://www.dsilvera.com/forum/mods/signature_preview.zip

Blue lines are lines that have been added. Red lines/text are what have been changed. Green lines are commented. You are gonna modify 4 files. inc_profile.asp, register.asp pop_preview.asp and pop_profile.asp.

In inc_profile.asp, insert the following after line 522:
strTxtSig = RS("M_SIG") %>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align=right valign=top nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Signature: </font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><textarea maxLength="255" name="Sig" cols="25" rows=4><% =Trim(cleancode(strTxtSig)) %></textarea></td>
</tr>
<% ' ################ Signature Preview Mod ################ %>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align=right valign=top nowrap>& nbsp ;</td>
<td bgColor="<% =strPopUpTableColor %>"><center><input name="Preview" type="button" value=" Preview Signature" onclick="OpenPreview()"></center></td>
</tr>

<% ' #######################################################

In register.asp insert the following javascript after the <!-- # INCLUDE FILE="inc_top.asp" --> at the top:
<script language="JavaScript">
<!--// ####### Signature Preview Mod ##########
function OpenPreview()
{
var curCookie = "strSignaturePreview=" + escape(document.form1.Sig.value);
document.cookie = curCookie;
popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=450,height=250')
}
//-->
</script>

In pop_preview.asp, replace:
<%
strMessagePreview = Request.Cookies("strMessagePreview")
Response.Cookies("strMessagePreview") = ""
if strMessagePreview = "" or IsNull(strMessagePreview) then
strMessagePreview = "[ center ][ b ]< There is no text to preview ! >[ /b ][ /center ]"
end if
with:
<% ' ########## Signature Preview Mod #################
if Request.Cookies("strSignaturePreview") = "" or IsNull(strSignaturePreview) then
strMessagePreview = Request.Cookies("strMessagePreview")
Response.Cookies("strMessagePreview") = ""
if strMessagePreview = "" or IsNull(strMessagePreview) then
strMessagePreview = "[ center ][ b ]< There is no text to preview ! >[ /b ][ /center ]"
end if
strPreview = strMessagePreview
else
strSignaturePreview = Request.Cookies("strSignaturePreview")
Response.Cookies("strSignaturePreview") = ""
if strSignaturePreview = "" or IsNull(strSignaturePreview) then
strSignaturePreview = "[ center ][ b ]< There is no text to preview ! >[ /b ][ /center ]"
end if
strPreview = strSignaturePreview
end if
' ######################################################

Also change the strMessagePreview in the following line:
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =formatStr(chkString(strMessagePreview,"preview")) %></font>
to strPreview:
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =formatStr(chkString(strPreview,"preview")) %></font>


continued next post...

Edited by - Huwr on 05 January 2001 13:48:10

Edited by - Davio on 05 January 2001 20:03:50

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 04 December 2000 :  15:21:03  Show Profile
Last but not least, in <b>pop_profile.asp</b> add the javascript after the <i><!-- INCLUDE FILE = "inc_top.asp" --></i> and the 'end if':
<pre id=code><font face=courier size=2 id=code>
<!--#INCLUDE FILE="inc_top.asp" -->
<% end if
<font color=green>' ########### Signature Preview Mod #############</font id=green>
%>
<font color=blue><script language="JavaScript">
<!--
function OpenPreview()
{
var curCookie = "strSignaturePreview=" + escape(document.Form1.Sig.value);
document.cookie = curCookie;
popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=450,height=250')
}
//-->
</script></font id=blue>
<% <font color=green>' ##########################################</font id=green></font id=code></pre id=code>

That's it.

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"If you're headed in the wrong direction,
God allows U-turns."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>

<font size=1><font color=red>Edited by Richard, I had to edit it so that the code wouldn't be parsed</font id=red></font id=size1>

Edited by - Richard Kinser on 05 January 2001 13:34:06
Go to Top of Page

John
Junior Member

USA
427 Posts

Posted - 04 December 2000 :  17:04:52  Show Profile
now that's a good idea... saves users from having to do 10 'signature test' posts <img src=icon_smile_big.gif border=0 align=middle>

<b><font size=2>John Miller</font id=size2>
<font color=green><font size=1>Snitz Moderator</font id=size1></font id=green></b>
<img src="http://online.mirabilis.com/scripts/online.dll?icq=49005230&img=7" border=0>
"<i>You are now logged in! Please log in below:</i>"
Go to Top of Page

tteal
Junior Member

USA
438 Posts

Posted - 05 December 2000 :  15:16:34  Show Profile  Visit tteal's Homepage  Send tteal an AOL message  Send tteal an ICQ Message
This is an "OUTSTANDING" concept and I certainly appreciate it! Nothing more irritating to me then seeing 50,000 messages testing signatures :)

Cheers,
Tim

http://www.free-guestbook.com
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 December 2000 :  11:20:23  Show Profile
Yeah, I totally agree. I wanted to change my sig and realized what a long process it was. So i thought why not put the preview function to the signature box too? <img src=icon_smile.gif border=0 align=middle>
Don't know why we never thought of it before. LoL

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"If you're headed in the wrong direction,
God allows U-turns."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

isuru
Junior Member

464 Posts

Posted - 06 December 2000 :  12:11:07  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>now that's a good idea... saves users from having to do 10 'signature test' posts <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Dont people do 'signature tests' to get their post count up? <img src=icon_smile_wink.gif border=0 align=middle>

-=-=-=-=-=-=-=-
Isuru Amarasena <img src=icon_smile_big.gif border=0 align=middle>
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 05 January 2001 :  13:58:21  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
isuru, lolz.

it should be quality not quantity of posts that matter.

# of posts shouldn't be a concern.

I take that back, it does count when you want users to participate more in your own snitz forum.

Oh yeah good mod, Davio.

- Alan
alan@calvsa.net
www.calvsa.net


Edited by - aznknight on 05 January 2001 13:59:13
Go to Top of Page

concep86
Junior Member

USA
140 Posts

Posted - 05 January 2001 :  16:29:48  Show Profile  Visit concep86's Homepage
Sweeet..... I like this mod...

Concep86

Go to Top of Page

frankie
Junior Member

Vatican City
304 Posts

Posted - 05 January 2001 :  18:22:01  Show Profile  Visit frankie's Homepage  Send frankie an AOL message  Send frankie an ICQ Message  Send frankie a Yahoo! Message
Davio,

Great mod, but when I tried to preview my sig. I got a script error message box that pointed me to this line: <pre id=code><font face=courier size=2 id=code>var curCookie = "strSignaturePreview=" + escape(document.Form1.Sig.value);</font id=code></pre id=code>

Thoughts? Thank you

ô¿~
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 January 2001 :  18:32:34  Show Profile
You might try changing <b>Form1</b> to <b>form1</b>

just change the capital F to a lowercase f
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 January 2001 :  18:36:12  Show Profile
hmmm, I got this working ok in SR4, with the instructions in the zip.
What is the javascript error you are getting?
And you are using SR4 right?

Richard, would it make a difference with the common or capital F? I'm using it with a capital F and don't have any problems.

But Frankie, try Rich's suggestion and see if that fixes it. I will update the zip with the SR4 files in a few minutes.

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"To Get To Heaven,
It's Who You Know That Counts."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

frankie
Junior Member

Vatican City
304 Posts

Posted - 05 January 2001 :  18:47:17  Show Profile  Visit frankie's Homepage  Send frankie an AOL message  Send frankie an ICQ Message  Send frankie a Yahoo! Message
Richard,

First of all, congratulation (for the Global status). Secondly I already did that thinking the same way that javascript is case sensitive (NO LUCK!).

Davio,

The erro I get is this:

<center><pre id=code><font face=courier size=2 id=code><b>A Runtime Error hs occured.
Do you wish ti Debug?
line 370
Error: 'document.form1.Sig' is null or not an object</b></font id=code></pre id=code></center>.


I'm using v3.1 SR4

ô¿~
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 January 2001 :  18:51:39  Show Profile
The zip has been updated with the SR4 files.

Frankie, send me your inc_profile.asp, pop_preview.asp and your pop_profile.asp let me take a wuick look at them.
Mean while I'll see if I can re-create the error you are getting.

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"To Get To Heaven,
It's Who You Know That Counts."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

frankie
Junior Member

Vatican City
304 Posts

Posted - 05 January 2001 :  19:11:09  Show Profile  Visit frankie's Homepage  Send frankie an AOL message  Send frankie an ICQ Message  Send frankie a Yahoo! Message
Davio,

Sent, thank you!

Note: guys, I was wondering if my browser is generating the error not the code??!!

ô¿~
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 January 2001 :  19:11:59  Show Profile
Davio, the only reason I mentioned about the Capital F, is when I added the javascript code to Register.asp so that it would work there also, I got the javascript error, changing the case of the F in the register.asp file fixed it. But I still have it as Capital in the pop_profile.asp file and it works fine.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 January 2001 :  19:28:28  Show Profile
Richard, I think that's because the name of the form on the register.asp page is form1. The name of the form for the pop_profile.asp is Form1 with the capital F.
Oh ok, I see what you're talking about. On the register.asp page you will get the javascript error because of the name of the form. And because the OpenPreview() javascript function is missing from the register.asp page.
Is that where you are getting the error Frankie?
If so I will update the files in a few minutes.

Frankie, I got your email, but I got no files attached with it. Send it to admin@dsilvera.com instead will ya? Thanks

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"To Get To Heaven,
It's Who You Know That Counts."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>

Edited by - Davio on 05 January 2001 19:38:55
Go to Top of Page
Page: of 3 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.74 seconds. Powered By: Snitz Forums 2000 Version 3.4.07