15 ottobre 2005 alle 16:23:59 sarà questo il forum giusto? comunque chiedo uguale... nel mio sito in html che voglio trasferire su aspnuke, esavo una conquer chat, che è in asp, e mi trovavo bene come faccio ad inserirla nel nuovo portale? creo una nuova pagina e nella parte dove dice "inserisci qui il tuo codice" metto tutta la sezione in asp della pagina defautl (che riguarda il login) della conquer chat? ma se chiedo l'anteprima nel browser mi dice che è impossibile trovare i vari includes... non capisco...
carlostefano Esperto
296 Discussioni
15 ottobre 2005 alle 16:30:20 che dici, problema di percorsi? posta il codice, così vediamo...
sorema Utente
69 Discussioni
15 ottobre 2005 alle 18:00:40 allora il codice del file default.asp della chat che ho modificato è questo: <!-- #include file='includes/includes-inc.asp' --> <% sTitlePage = "nome pagina" %> <!-- #include file='includes/toppage-inc.asp' --> <% createtoptable "tabella","Nome pagina" %> <!-- #include file='includes/includes-inc.asp' --> <% sTitlePage = "nome pagina" %> <!-- #include file='includes/toppage-inc.asp' --> <% createtoptable "tabella","Nome pagina" %> <%
' ' $Id: default.asp,v 1.1.1.1 2003/03/09 22:45:57 peter Exp $ ' ' This page is the main entrace for ConquerChat. It shows a list of currently ' logged in chatusers and makes it possible to log in by entering your user- ' name in the appropriate field. ' ' @author Peter Theill peter@theill.com '
Option Explicit
Response.Buffer = True
%> <!-- #include file="inc.common.asp" --> <%
' many users does not read the included README.TXT file before trying to ' set up this chat -- in order to help them a bit we check if we have the ' required objects properly initialised On Error Resume Next If (NOT IsObject(conquerChatUsers) OR NOT IsObject(conquerChatRooms)) Then Response.Redirect("errorInSetup.asp") Response.End End If
Dim userId
' do not show login screen if a valid session exists If (loggedOn()) Then Response.Redirect "frames.asp" Response.End End If
Dim mode, errorMessage mode = Request("mode")
If (mode = "userLogin") Then
Dim userName userName = Server.HTMLEncode(Request("username"))
If (countUsers() >= USERS) Then errorMessage = getMsg("error.maximum_users_reached") ElseIf (Len(userName) = 0) Then errorMessage = getMsg("error.missing_username") ElseIf (Len(userName) > MAX_USERNAME_LENGTH) Then errorMessage = getMsg("error.username_length_exceeded", MAX_USERNAME_LENGTH) ElseIf (userExists(userName)) Then errorMessage = getMsg("error.username_in_use") ElseIf (NOT isValidUsername(userName)) Then errorMessage = getMsg("error.invalid_username") ElseIf (isUserNameBlocked(userName)) Then errorMessage = getMsg("error.username_blocked") Else
Dim p Set p = New Person p.id = -1 p.name = userName p.roomId = 0 p.ipAddress = Request.ServerVariables("REMOTE_ADDR")
' we have a new chat user thus we need to create a new ' id for him/her Set p = addUser(p)
' tell all other users about this new user Call addMessage( _ p.id, _ "-1", _ "<span class=LoggedIn><img src='images/new.gif' height=9 width=9> " & getMsg("user.logged_on", p.name, Now()) & "</span><br>" _ )
Session("user") = p.data
' redirect to new frame window and create a new user login Response.Redirect("frames.asp") Response.End
End If
End If ' > If (mode = "userLogin") Then
' make sure we don't show any inactive users for new chat users kickInactiveUsers()
If (conquerChatRooms.Count = 0) Then setupRooms() End If
function init() { // set focus on 'username' field f = document.frmLogin; if (typeof f != 'undefined' && typeof f.username != 'undefined') { f.username.select(); f.username.focus(); } }
</td> </tr> <tr> <td style="font-size: 10px; font-weight: lighter; text-align: justify;color: #666666; padding: 8px" bgcolor="#FFFFFF"> [This is the development version of ConquerChat -- you are able to log on to test the features of it but errors might occur since I'm working directly on this one. This chat may not show the exact downloadable source either since I might be in the progress of developing additional features. If you're interested in getting the free ASP source code for this chat, visit the <a href="http://www.theill.com/asp/conquerchat.asp" style="font-weight: bolder">ConquerChat section</a> where you're able to download all versions. If you are hosting this chat on your own server you're free to remove this notice.]</td> </tr> </table>
<!-- Copyright(c) 2003, The Theill Web Site --> <_div style="position: absolute; bottom: 4px; right: 4px; padding: 4px; border: 3px dashed #bbbbbb;"><a href="http://www.theill.com/" target="_top"><img border="0" src="http://www.theill.com/images/ani_theillcom_scroll.gif" alt="Provided for free by The Theill Web Site"></a></_div>
i files della chat si trovano in una cartella chiamata conquerchat e quelli di aspnuke nella root. ho anche provato cambiando il percorso per cercare i files include, pensando fosse quello, da <!-- #include file='includes/includes-inc.asp' --> e simili, a <!-- #include file='http://www.nomemiosito/includes/includes-inc.asp' --> ma o sbaglio a scrivere il percorso( probabile) o non è quella la soluzione: comunque l'errore che mi da è che non li trova, i vari includes. grazie!
carlostefano Esperto
296 Discussioni
15 ottobre 2005 alle 18:07:45 tu hai inserito i percorsi come se il file in questione si trovasse nella root, ma se nella root non è, quei percorsi non sono validi.. usa al posto di "include file = " usa "include virtual =/" e dopo backslash ci metti il resto del percorso così come l'avevi messo tu, quindi ad esempio
15 ottobre 2005 alle 18:49:57 nada, mi scrive che non posso metterci il backslash davanti: Active Server Pages error 'ASP 0130'
Invalid File attribute
/conquerchat/default.asp, line 5
File attribute '/includes/toppage-inc.asp' cannot start with forward slash or back slash. i files includes si trovano in una cartella omonima, nella root quindi il percorso, mi pare dovrebbe esser questo. piuttosto...i file della chat, default compreso, dovrebbero stare altrove o possono stare nella cartella loro?
carlostefano Esperto
296 Discussioni
15 ottobre 2005 alle 18:53:18 perchè File?? avevo scritto di mettere include virtual, te capi? certo che il percorso di include file non può iniziare con backslash...
sorema Utente
69 Discussioni
15 ottobre 2005 alle 18:59:55 che scema, scusami! però fatta la modifica su tutti gli includes..mi scrive adesso questo Active Server Pages error 'ASP 0128'
Missing File or Virtual attribute
/conquerchat/default.asp, line 252
The Include file name must be specified using either the File or Virtual attribute. ma nella linea 252 non c'è niente che riguardi conquerchat/default.asp..ci sono gli altri includes della pagina di aspnuke! che vuol dire?
sorema Utente
69 Discussioni
15 ottobre 2005 alle 19:01:07 per intenderci, la riga 252 è questa %><!-- #include virtual='/includes/bottompage-inc.asp' --><!-- #include vitual='/includes/clearitall-inc.asp' -->
(sta tutto sulla stessa fila ovviamente)
carlostefano Esperto
296 Discussioni
15 ottobre 2005 alle 19:06:38 /conquerchat/default.asp è il file in cui si è verificato l'errore... è quello che contiene il codice di cui stiamo parlando, giusto? prova a metterlo su righe distinte, così:
15 ottobre 2005 alle 19:18:57 1- conquerchat/default.asp è il file di cui stiamo parlando e quello che da l'errore. 2- anche mettendolo come hai detto tu, l'errore si sposta di due righe... e scrive questo Active Server Pages error 'ASP 0128'
Missing File or Virtual attribute
/conquerchat/default.asp, line 254
The Include file name must be specified using either the File or Virtual attribute. gli manco un file... ti riposto il codice completo, forse ti aiuta...
' ' $Id: default.asp,v 1.1.1.1 2003/03/09 22:45:57 peter Exp $ ' ' This page is the main entrace for ConquerChat. It shows a list of currently ' logged in chatusers and makes it possible to log in by entering your user- ' name in the appropriate field. ' ' @author Peter Theill peter@theill.com '
Option Explicit
Response.Buffer = True
%> <!-- #include file="inc.common.asp" --> <%
' many users does not read the included README.TXT file before trying to ' set up this chat -- in order to help them a bit we check if we have the ' required objects properly initialised On Error Resume Next If (NOT IsObject(conquerChatUsers) OR NOT IsObject(conquerChatRooms)) Then Response.Redirect("errorInSetup.asp") Response.End End If
Dim userId
' do not show login screen if a valid session exists If (loggedOn()) Then Response.Redirect "frames.asp" Response.End End If
Dim mode, errorMessage mode = Request("mode")
If (mode = "userLogin") Then
Dim userName userName = Server.HTMLEncode(Request("username"))
If (countUsers() >= USERS) Then errorMessage = getMsg("error.maximum_users_reached") ElseIf (Len(userName) = 0) Then errorMessage = getMsg("error.missing_username") ElseIf (Len(userName) > MAX_USERNAME_LENGTH) Then errorMessage = getMsg("error.username_length_exceeded", MAX_USERNAME_LENGTH) ElseIf (userExists(userName)) Then errorMessage = getMsg("error.username_in_use") ElseIf (NOT isValidUsername(userName)) Then errorMessage = getMsg("error.invalid_username") ElseIf (isUserNameBlocked(userName)) Then errorMessage = getMsg("error.username_blocked") Else
Dim p Set p = New Person p.id = -1 p.name = userName p.roomId = 0 p.ipAddress = Request.ServerVariables("REMOTE_ADDR")
' we have a new chat user thus we need to create a new ' id for him/her Set p = addUser(p)
' tell all other users about this new user Call addMessage( _ p.id, _ "-1", _ "<span class=LoggedIn><img src='images/new.gif' height=9 width=9> " & getMsg("user.logged_on", p.name, Now()) & "</span><br>" _ )
Session("user") = p.data
' redirect to new frame window and create a new user login Response.Redirect("frames.asp") Response.End
End If
End If ' > If (mode = "userLogin") Then
' make sure we don't show any inactive users for new chat users kickInactiveUsers()
If (conquerChatRooms.Count = 0) Then setupRooms() End If
function init() { // set focus on 'username' field f = document.frmLogin; if (typeof f != 'undefined' && typeof f.username != 'undefined') { f.username.select(); f.username.focus(); } }
</td> </tr> <tr> <td style="font-size: 10px; font-weight: lighter; text-align: justify;color: #666666; padding: 8px" bgcolor="#FFFFFF"> [This is the development version of ConquerChat -- you are able to log on to test the features of it but errors might occur since I'm working directly on this one. This chat may not show the exact downloadable source either since I might be in the progress of developing additional features. If you're interested in getting the free ASP source code for this chat, visit the <a href="http://www.theill.com/asp/conquerchat.asp" style="font-weight: bolder">ConquerChat section</a> where you're able to download all versions. If you are hosting this chat on your own server you're free to remove this notice.]</td> </tr> </table>
<!-- Copyright(c) 2003, The Theill Web Site --> <_div style="position: absolute; bottom: 4px; right: 4px; padding: 4px; border: 3px dashed #bbbbbb;"><a href="http://www.theill.com/" target="_top"><img border="0" src="http://www.theill.com/images/ani_theillcom_scroll.gif" alt="Provided for free by The Theill Web Site"></a></_div>