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)
 Avatar add on (avatar log-out)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

cripto9t
Average Member

USA
881 Posts

Posted - 28 November 2003 :  12:15:24  Show Profile
Very easy add-on to the avatar mod.

Replaces the log-out button or image with members' avatar.

Just one small change in inc_header.asp.



Update 11/30/03 Changed this line
strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = """ & strDBNTUserName & """"

To this
strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"

For sql server.

    _-/Cripto9t\-_

Edited by - cripto9t on 02 December 2003 07:05:57

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 28 November 2003 :  12:41:40  Show Profile
Cool! Might be able to use that on the site I'm working on at the mo'.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 29 November 2003 :  06:39:38  Show Profile  Visit richfed's Homepage
Tried this, but ended up with the following error [AFTER logging in]:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid column name 'richfed'.

/messageboard/inc_header.asp, line 548

No error message before I logged in.

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 29 November 2003 :  07:55:50  Show Profile
quote:
Originally posted by richfed

Tried this, but ended up with the following error [AFTER logging in]:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid column name 'richfed'.

/messageboard/inc_header.asp, line 548

No error message before I logged in.



Hi Richfed, I've only tested on mySql and access.
I had that error when I was putting this together. The cause was not enough quotes around """ & strDBNTUserName & """"

    _-/Cripto9t\-_
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 29 November 2003 :  17:21:41  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
Well, I have a suggestion, put "Log Out" text in a very small text, just underneath the avatar so they know how to use it.




»Snitz Graphics
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 29 November 2003 :  17:24:46  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
Ohh... you've already got it, just saw the demo again!




»Snitz Graphics
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 29 November 2003 :  17:53:43  Show Profile  Visit richfed's Homepage
quote:
Originally posted by cripto9t

quote:
Originally posted by richfed

Tried this, but ended up with the following error [AFTER logging in]:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid column name 'richfed'.

/messageboard/inc_header.asp, line 548

No error message before I logged in.



Hi Richfed, I've only tested on mySql and access.
I had that error when I was putting this together. The cause was not enough quotes around """ & strDBNTUserName & """"




Well. I tried playing around with more quotation marks, but received different errors each time. If anyone figures out how to make this neat little mod work on SQL Server, please post it here. Thanks!

Also, what is the CSS file for?
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 30 November 2003 :  10:57:18  Show Profile
I'm sorry its not working for you Richfed. I messed aroundd with it yesterday and like I said, was able to duplicate the error in mySql.
I can't think of another way to call it.
I'll post the code, maybe someone will have an answer as to why it don't or should work.
if strAuthType = "db" then 
			Response.Write	"<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
					"                <td align=""center"">"
                strSqL = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
                strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
                strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = """ & strDBNTUserName & """" 
 
                set rs = my_Conn.Execute (strSql)

                        if strGfxButtons = "1" and chkString(rs("M_AVATAR_URL"),"sqlString") <> "noavatar.gif" then 
                           Response.Write  "<input src=""" & chkString(rs("M_AVATAR_URL"),"display") & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine & _
                                           "<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>log-out</font><br />"
                        elseif strGfxButtons = "1" and chkString(rs("M_AVATAR_URL"),"sqlString") = "noavatar.gif" then
                           Response.Write	"<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
			else
				Response.Write	"<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">" 
                        end if
               rs.close
               set rs=nothing
               end if

Is anyone else having problems that I can't help them with .

    _-/Cripto9t\-_
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 30 November 2003 :  11:33:24  Show Profile
Just a shot in the dark .
Try this line
strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"

    _-/Cripto9t\-_
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 30 November 2003 :  12:49:05  Show Profile  Visit richfed's Homepage
Sometimes, it seems, shots in the dark work best!! That one sure did! Thank you, Cripto9t, seems to do the trick!!!

Question - if someone does NOT have an avatar what shows? The regular "Log Out" button?

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 30 November 2003 :  13:17:09  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
quote:
Originally posted by richfed
Question - if someone does NOT have an avatar what shows? The regular "Log Out" button?

The LOGOUT button I think. Try the DEMO without using an avatar.




»Snitz Graphics
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 30 November 2003 :  14:56:32  Show Profile
Cool . I'll have to up-date the zip.
Faizan is right. It is the same as the original code, only it checks for an avatar first. If you have images turned on in admin sec. you should see your log-out image, if not - the submit button. I suggest you check to make sure it works right on all 3 scenarios.

<edit>The css is for the readme, I'm gonna stick it in the readme head when I up-date the zip.</edit>

<edit2>Zip updated.</edit2>

    _-/Cripto9t\-_

Edited by - cripto9t on 30 November 2003 15:20:59
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 December 2003 :  12:57:41  Show Profile  Visit richfed's Homepage
Just to confirm ... MOD works as advertised on MS-SQL - log in/log out, with/without avatar. As one of my posters said, "Cool. Nice touch." I agree!

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 02 December 2003 :  07:03:36  Show Profile
quote:
Originally posted by richfed

Just to confirm ... MOD works as advertised on MS-SQL - log in/log out, with/without avatar. As one of my posters said, "Cool. Nice touch." I agree!


Thanks for the feedback Richfed. I'll add MS-SQL to original post .

    _-/Cripto9t\-_
Go to Top of Page

RichLondoner
Starting Member

United Kingdom
43 Posts

Posted - 15 December 2003 :  08:13:09  Show Profile  Visit RichLondoner's Homepage
Cool, nice little touch, for my intranet forums also just added the logout button as well straight after the Avatar and removed the text as that text isn't linked and my users may not work out that the Avatar is now the logout button. Also fixed the height/width as all our avatars are square dimensions, works fine with MS SQL.

Richard Mills
http://www.mysector.co.uk
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 15 December 2003 :  09:45:02  Show Profile
Thanks Richard

    _-/Cripto9t\-_
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.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07