Author |
Topic |
|
work mule
Senior Member
USA
1358 Posts |
Posted - 29 May 2001 : 18:42:05
|
Work Mule's Disclaimer: I want to make sure that everyone understands that this is NOT an official mod release, nor can I nor want to support it like a mod at this time! These Code Snippets are provided AS IS. No warranty for performance.
Keep in mind that this code was ripped out of a modified forum so things will be different. This code is being provided for reference purposes and may require some additional work to integrate into your forum. Don't expect to dump the code directly into your forum and expect it to work without any modification.
Okay all that aside, I've received requests asking to share the code for the navigation and login/logout pages so that's what I'm doing. I've already shared parts of this in the past and this morning, I packaged up some of the code and sent an email about the code, so I'll include parts of the same message up here.
In regards to releasing as a mod, I would love to release a mod for modifying the inc_top.asp, but I'm still not happy with the code on The Writer's site. I know it can be done a lot better. Plus then there's documentation and all...
Some notes about what you'll find:
The formatting should be similiar to the original Snitz format, although some of it may rely on CSS. The bulk of the forum's CSS conversion is performed with a Perl script to convert all table bgcolors and font tags to CSS prior to the forum code being copied to the production server.
I don't rely on the querystring for passing the titles so the code for including that in the querystring has been stripped out. Keep that in mind for post new topics, replies, etc.
I also split up inc_top.asp and moved some of the code into another include named inc_forum_variables.asp. When you see the reference to the new include file, that's what that is.
INC_TOP.ASP I did post the code for the top navigation at one point (not as a mod), and it was picked up in one of the portal mods. I have modified it since then. I'm still not thrilled with it, it's sort of ugly, but it works. If you look in the inc_top.asp file you should be able to find it. Originally I had relied on passing a sectionid via the querystring to determine what navigation options to display, now I rely on a sectionid variable which is hardcoded at the top of each file/page.
LOGIN/LOGOUT The login and logout files have also been provided. They are nothing fancy. On the login.asp file, primarily on the space at the right, I wanted to include more promotional information, like why users should register, benefits, etc., but I never got around to it.
DOWNLOAD http://www.scalemodelernetwork.com/downloads/snitz/navcodesnippets.zip
Final Comments If anyone has questions about some of this, I don't mind trying to answer them. Just please keep in mind that I can't spend a lot of time trying to offer support for this.
Hope someone will find this somewhat useful! David Voss Web Developer for The Writer Community
I hope this isn't the end for my forum's individuality.
--The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson
Edited by - work mule on 29 May 2001 18:42:37 |
|
stuF
Average Member
United Kingdom
561 Posts |
Posted - 30 May 2001 : 07:29:52
|
cheers for that, ill let you have a look a look atit when im finished ;)
|
|
|
bcooper
Starting Member
34 Posts |
Posted - 09 June 2001 : 12:54:34
|
I know I am posting this like a month after you made it, but I cant seem to get it to work. All I get is:
Microsoft VBScript runtime error '800a01a8'
Object required: 'my_Conn'
/pages/forum/inc_functions.asp, line 646
cookies are set to website, and the top table loads fine, it just wont load the my_Conn. any tips?
quote:
Work Mule's Disclaimer: I want to make sure that everyone understands that this is NOT an official mod release, nor can I nor want to support it like a mod at this time! These Code Snippets are provided AS IS. No warranty for performance.
Keep in mind that this code was ripped out of a modified forum so things will be different. This code is being provided for reference purposes and may require some additional work to integrate into your forum. Don't expect to dump the code directly into your forum and expect it to work without any modification.
Okay all that aside, I've received requests asking to share the code for the navigation and login/logout pages so that's what I'm doing. I've already shared parts of this in the past and this morning, I packaged up some of the code and sent an email about the code, so I'll include parts of the same message up here.
In regards to releasing as a mod, I would love to release a mod for modifying the inc_top.asp, but I'm still not happy with the code on The Writer's site. I know it can be done a lot better. Plus then there's documentation and all...
Some notes about what you'll find:
The formatting should be similiar to the original Snitz format, although some of it may rely on CSS. The bulk of the forum's CSS conversion is performed with a Perl script to convert all table bgcolors and font tags to CSS prior to the forum code being copied to the production server.
I don't rely on the querystring for passing the titles so the code for including that in the querystring has been stripped out. Keep that in mind for post new topics, replies, etc.
I also split up inc_top.asp and moved some of the code into another include named inc_forum_variables.asp. When you see the reference to the new include file, that's what that is.
INC_TOP.ASP I did post the code for the top navigation at one point (not as a mod), and it was picked up in one of the portal mods. I have modified it since then. I'm still not thrilled with it, it's sort of ugly, but it works. If you look in the inc_top.asp file you should be able to find it. Originally I had relied on passing a sectionid via the querystring to determine what navigation options to display, now I rely on a sectionid variable which is hardcoded at the top of each file/page.
LOGIN/LOGOUT The login and logout files have also been provided. They are nothing fancy. On the login.asp file, primarily on the space at the right, I wanted to include more promotional information, like why users should register, benefits, etc., but I never got around to it.
DOWNLOAD http://www.scalemodelernetwork.com/downloads/snitz/navcodesnippets.zip
Final Comments If anyone has questions about some of this, I don't mind trying to answer them. Just please keep in mind that I can't spend a lot of time trying to offer support for this.
Hope someone will find this somewhat useful! David Voss Web Developer for The Writer Community
I hope this isn't the end for my forum's individuality.
--The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson
Edited by - work mule on 29 May 2001 18:42:37
|
|
|
adamch25
Starting Member
USA
22 Posts |
Posted - 24 June 2001 : 11:25:44
|
I have the same problem...I will take a look at it and see if I can give you a fix.
|
|
|
adamch25
Starting Member
USA
22 Posts |
Posted - 24 June 2001 : 11:32:07
|
Here is your fix...copy and paste this into the very top line of inc_top.asp:
<% dim mLev, strLoginStatus
set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString
if (strAuthType = "nt") then call NTauthenticate() if (ChkAccountReg() = "1") then call NTUser() end if end if
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name") strDBNTFUserName = Request.Form("Name") if strAuthType = "nt" then strDBNTUserName = Session(strCookieURL & "userID") strDBNTFUserName = Session(strCookieURL & "userID") end if
select case Request.Form("Method_Type")
case "login" select case ChkUser2(strDBNTFUserName, Request.Form("Password")) case 1, 2, 3, 4 Call DoCookies(Request.Form("SavePassword")) strLoginStatus = 1 case else strLoginStatus = 0 end select case "logout" Call ClearCookies() Session.Abandon() end select
mLev = cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
%>
Edited by - adamch25 on 24 June 2001 11:33:06
Edited by - adamch25 on 24 June 2001 11:34:08
Edited by - adamch25 on 24 June 2001 11:34:50 |
|
|
Dash
Starting Member
5 Posts |
Posted - 24 June 2001 : 15:37:55
|
quote:
Here is your fix...copy and paste this into the very top line of inc_top.asp:
<% dim mLev, strLoginStatus
set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString
if (strAuthType = "nt") then call NTauthenticate() if (ChkAccountReg() = "1") then call NTUser() end if end if
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name") strDBNTFUserName = Request.Form("Name") if strAuthType = "nt" then strDBNTUserName = Session(strCookieURL & "userID") strDBNTFUserName = Session(strCookieURL & "userID") end if
select case Request.Form("Method_Type")
case "login" select case ChkUser2(strDBNTFUserName, Request.Form("Password")) case 1, 2, 3, 4 Call DoCookies(Request.Form("SavePassword")) strLoginStatus = 1 case else strLoginStatus = 0 end select case "logout" Call ClearCookies() Session.Abandon() end select
mLev = cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
%>
Edited by - adamch25 on 24 June 2001 11:33:06
Edited by - adamch25 on 24 June 2001 11:34:08
Edited by - adamch25 on 24 June 2001 11:34:50
okie
|
|
|
work mule
Senior Member
USA
1358 Posts |
|
|
Topic |
|
|
|