10 giugno 2003 alle 23:22:01 Errore di run-time di Microsoft VB_Script errore "800a01f4'
Variabile non definita: 'bIsAdvanceTheme'
/aspnuke/includes/display-inc.asp, riga 89
Questo è il file incriminato:
<% ' ************************************************************************ ' * ASP-Nuke: Free web portal in ASP * ' ************************************************************************ ' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) * ' * http://www.asp-nuke.com * ' * * ' * This program is free software. You can redistribute it and/or modify * ' * it under the terms of the GNU General Public License as published by * ' * the Free Software Foundation; either version 2 of the License, or * ' * (at your option) any later version. * ' * * ' ************************************************************************ %> <%
' Create the top part of a standard table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' OUT : - Sub CreateBoxTopTable(sTabName, sHeader) Response.Write "<table id=""" & sTabName & """ width=""100%"" align=""center"" border=""0"" cellspacing=""0"" cellpadding=""0"" class=""box"">" & vbCrLf Response.Write " <tr>" & vbCrLf Response.Write " <td width=""8"" height=""22""><img src=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/topleft.gif"" width=""8"" height=""22"" alt="""" border=""0""></td>" & vbCrLf Response.Write " <td background=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/top.gif"" align=""left"" valign=""middle"" height=""22"" class=""boxtitle"">" & vbCrLf IF ExistFile(GLOBAL_SITE_THEMES_PATH & sTheme , "table_bullet.jpg") Then 'IF ExistFiles(GLOBAL_SITE_THEMES_PATH & sTheme & "/" & "table_bullet.jpg") THEN Response.Write " <img src=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/table_bullet.jpg"" align=""absmiddle"" width=20 height=20>" & sHeader & "" & vbCrLf Else Response.Write " " & sHeader & vbCrLf End If Response.Write " </td>" & vbCrLf Response.Write " <td width=""12"" height=""22""><img src=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/topright.gif"" width=""12"" height=""22"" alt="""" border=""0""></td>" & vbCrLf Response.Write " </tr>" & vbCrLf Response.Write " <tr>" & vbCrLf Response.Write " <td background=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/left.gif""></td>" & vbCrLf Response.Write " <td width=""100%"" class=""boxtext"">" & vbCrLf End Sub
' Create Left of table Sub CreateBoxLeftTable If bIsAdvanceTheme Then Response.Write " <tr>" & vbCrLf Response.Write " <td background=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/left.png""></td>" & vbCrLf Response.Write " <td width=""100%"" class=""boxtext"">" & vbCrLf End If End Sub
' Create the bottom part of a box table ' IN : sFooter (string) : footer ' OUT : - Sub CreateBoxBottomTable(sFooter) Response.Write " </td>" & vbCrLf Response.Write " <td background=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/img/right.gif""></td>" & vbCrLf Response.Write " </tr>" & vbCrLf
' Create a box table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' : sText (string) : text in the table ' : sFooter (string) : footer ' OUT : - Sub CreateBoxTable(sTabName, sHeader, sText, sFooter) CreateBoxTopTable sTabName, sHeader Response.Write sText & vbCRLF CreateBoxBottomTable sFooter End Sub
' Create the top part of a standard table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' OUT : - Sub CreateTopTable(sTabName, sHeader) If bIsAdvanceTheme then CreateBoxTopTable sTabName, sHeader Else Response.Write " <table id=""" & sTabName & """ width=""100%"" align=""center"" cellspacing=""0"" cellpadding=""0"" class=""myTable"">" & vbCRLF If sHeader <> "" Then Response.Write " <tr>" & vbCRLF Response.Write " <td class=""myTitle"" width=""100%"">" & sHeader & "</td>" & vbCRLF Response.Write " </tr>" & vbCRLF End If Response.Write " <tr>" & vbCRLF Response.Write " <td width=""100%"" class=""myTD"">" & vbCRLF End if End Sub
' Create the bottom part of a standard table ' IN : sFooter (string) : footer ' OUT : - Sub CreateBottomTable (sFooter) If bIsAdvanceTheme then CreateBoxBottomTable sFooter Else Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF If sFooter <> "" Then Response.Write " <tr>" & vbCRLF Response.Write " <td width=""100%"" align=""center"" class=""myTD""><br><span class=""small"">" & sFooter & "</span></td>" & vbCRLF Response.Write " </tr>" & vbCRLF End If Response.Write " </table>" & vbCRLF Response.Write "<br>" & vbCRLF End If End Sub
' Create a standard table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' : sText (string) : text in the table ' : sFooter (string) : footer ' OUT : - Sub CreateTable(sTabName, sHeader, sText, sFooter) CreateTopTable sTabName, sHeader Response.Write sText & vbCRLF CreateBottomTable sFooter End Sub
' Get number of anonymous visitors connected to the site ' IN : - ' OUT : (int) number of anonymous visitors Function AnonymousVisitors() Dim oRs, rSQL
rSQL = "SELECT Count(*) FROM sessions" Set oRs = DBRecordSet(oCnMain, rSQL) AnonymousVisitors = oRs(0)
Set oRs = Nothing End Function
' Get number of authenticated visitors connected to the site ' IN : - ' OUT : (int) number of authenticated visitors Function AuthentVisitors() Dim oRs, rSQL
rSQL = "SELECT Count(*) FROM sessions WHERE sLogin<>''" Set oRs = DBRecordSet(oCnMain, rSQL) AuthentVisitors = oRs(0)
Set oRs = Nothing End Function
' Display members' page ' IN : - ' OUT : - Sub DisplayShortMembersPage() Dim Rs, rSQL, iLine rSQL = "SELECT sLogin FROM sessions WHERE sLogin <> '' ORDER BY sLogin" Set oRs = DBRecordSet(oCnMain, rSQL)
' Display number of visitors connected to the site ' IN : - ' OUT : - '***** Added by www.tranquillamente.it - Begin Sub DisplayDynamicCounter() If bDisplayDynamicCount Then Dim oCnF, oRs, rSQL CreateTopTable "NbVisitors", GetTranslation("LANG_VISITORS")
'**************************** Begin of comment Response.Write "<BR>" & vbCrLf Response.Write "<iframe src=""onlinemembers.asp"" name=""online"" width=""135"" height=""150"" align=""center"" frameborder=""0"" scrolling=""auto"">" & vbCrLf Response.Write "You will not see this text if your browser supports IFRAME. If you CAN see this, you are in a bad way.</iframe>" & vbCrLf '**************************** End of comment
rSQL = "SELECT Count(*) AS Nb FROM users" Set oRs = DBRecordSet(oCnMain, rSQL) Response.Write Replace(GetTranslation("LANG_ACCOUNTS_INFO"), "%1%", oRs(0)) & vbCRLF
If sPseudo <> "" Then Response.Write " - <a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_MEMBERSLIST_PAGE & """>" & GetTranslation("LANG_TITLE_MEMBERSLIST") & "</a>" & vbCRLF End If
If sPseudo <> "" Then rSQL = "SELECT TOP 1 uLogin FROM users ORDER BY uDate DESC" Set oRs = DBRecordSet(oCnMain, rSQL) If Not oRs.EOF Then Response.Write "<br>" & GetTranslation("LANG_LAST_ACCOUNT") & " : <a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_PROFILE_PAGE & "?id=" & Server.URLEncode(oRs(0)) & """>" & Server.HTMLEncode(oRs(0)) & "</a>" & vbCRLF End if End If
rSQL = "SELECT TOP 1 uLogin FROM users ORDER BY uDate DESC" Set oRs = DBRecordSet(oCnMain, rSQL) If Not oRs.EOF Then Response.Write "<br><span class=""small"">" & GetTranslation("LANG_LAST_ACCOUNT") & " : <a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_PROFILE_PAGE & "?id=" & Server.URLEncode(oRs(0)) & """>" & Server.HTMLEncode(oRs(0)) & "</a><br>" & vbCRLF Response.Write "<a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_MEMBERSLIST_PAGE & """>" & GetTranslation("LANG_TITLE_MEMBERSLIST") & "</a></span>" & vbCRLF
CreateBottomTable ""
End If End Sub
' Display the top last websites added to the directory ' IN : iTop (int) : number of results wanted ' OUT : - Sub DisplayDirectoryLastSites(iTop) If bDisplayLastSites Then Dim oRs, rSQL
rSQL = "SELECT TOP " & iTop & " dID, dTitle, dDate, dURL, vCode FROM directory, versions WHERE dValid=1 AND dVersion=vID ORDER BY dDate DESC, dTitle" Set oRs = DBRecordSet(oCnMain, rSQL)
If Not oRs.EOF Then CreateTopTable "TopDirectory", GetTranslation("LANG_TOP") & " - " & GetTranslation("LANG_SITES") While Not oRs.EOF Response.Write " <span class=""small""><a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_GOTOURL_PAGE & "?url=" & Server.URLEncode(oRs("dURL")) & """ target=""_blank"">" & Server.HTMLEncode(oRs("dTitle")) & "</a> (" & Server.HTMLEncode(oRs("vCode")) & ")</span><br>" & vbCRLF oRs.MoveNext WEnd CreateBottomTable "" End If
Set oRs = Nothing End If End Sub
' Display versions languages available ' IN : - ' OUT : - Sub DisplayVersions() If bDisplayVersions Then Dim oFs, oFolder, oFile, sVersion, sCurrentVersion
Set oFs = Server.CreateObject("Scripting.FileSystemObject")
If oFs.FolderExists(Server.MapPath(GLOBAL_SITE_VERSIONS_PATH)) Then sCurrentVersion = sXMLVersion If sCurrentVersion = "" Then sCurrentVersion = GLOBAL_SITE_DEFAULT_VERSION
Set oFolder = oFs.GetFolder(Server.MapPath(GLOBAL_SITE_VERSIONS_PATH))
Response.Write " <select name=""_SetCurrentVersion"" class=""cell"" onChange=""Java_Script:changeVersion()"">" & vbCRLF For Each oFile In oFolder.Files sVersion = Replace(oFile.Name, ".xml", "") Response.Write " <option value=""" & sVersion & """" If LCase(sVersion) = LCase(sCurrentVersion) Then Response.Write " selected" End If Response.Write ">" & sVersion & "</option>" & vbCRLF Next Response.Write " </select>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</form>" & vbCRLF Response.Write "</table>" & vbCRLF
CreateBottomTable "" End If
Set oFs = Nothing End If End Sub
Sub DisplayNewPrivateMessages(sMyLogin) Dim oRs, rSQL, iNbMessages, iNbOldMessages, bDisplayPopup
bDisplayPopup = False
If sMyLogin <> "" Then
rSQL = "SELECT Count(*) FROM MessagesList WHERE mlTo='" & SQLEncrypt(sMyLogin) & "' AND mlRead=0" Set oRs = DBRecordSet(oCnMain, rSQL) iNbMessages = oRs(0)
If iNbMessages > 0 Then iNbOldMessages = Request.Cookies("NewPrivateMessages")
If iNbOldMessages = "" Then bDisplayPopup = False Else If IsNumeric(iNbOldMessages) Then iNbOldMessages = CInt(iNbOldMessages) If iNbMessages > iNbOldMessages Then bDisplayPopup = False End If End If
If bDisplayPopup And InStr(sURLPage, GLOBAL_SITE_PRIVATE_MESSAGES_PAGE) = 0 Then Response.Write "<script language=""Java_Script"" type=""text/Java_Script"">window.open('" & GLOBAL_SITE_PATH & "newpmessage.asp', 'PrivateMessage', 'width=150, height=60, menubars=off');</script>" End If
function changecolor(which,type,color){ if (type==0){ if (flashlinks[which].style.color!=color) flashlinks[which].style.color=color else flashlinks[which].style.color='' } else if (type==1){ if (flashlinks[which].style.backgroundColor!=color) flashlinks[which].style.backgroundColor=color else flashlinks[which].style.backgroundColor='' } }
if (flashlinks.length==null){ var flashengine='setInterval("changecolor(0,'+flashlinks[0].flashtype+',''+flashlinks[0].flashcolor+'')",'+'350)' eval(flashengine) } else for (i=0;i<flashlinks.length;i++){ var flashengine='setInterval("changecolor('+i+','+flashlinks[i].flashtype+',''+flashlinks[i].flashcolor+'')",'+'350)' eval(flashengine) }
} </script> <% End If
Set oRs = Nothing End If End Sub
Sub Writepicrandom() 'get random pic from database Dim oRs, rSQL rSQL = "SELECT iID,iTitle,iSourceSmall FROM images" Set oRs = DBRecordSet(oCnMain, rSQL)
If NOT (oRs.EOF AND oRs.BOF) then Dim iRnd, iCounter Randomize Timer iRnd=int(rnd()*oRs.RecordCount) For iCounter=1 to iRND oRs.MoveNext Next
Sub WriteMemberTotalPMessage() Dim iPM, oRs, rSQL rSQL = "SELECT Count(*) FROM messageslist WHERE mlRead=False AND mlTo='" & sPseudo & "'" Set oRs = DBRecordSet(oCnMain, rSQL) iPM = oRs(0) If NOT isNull(iPM) AND iPM>0 Then Response.Write " - (" & Server.URLEncode(oRs(0)) & ")" & vbCRLF ELSE Response.Write " - (0 New)<br>" End IF rSQL = "SELECT Count(*) FROM messageslist WHERE mlTo='" & sPseudo & "'" Set oRs = DBRecordSet(oCnMain, rSQL) iPM = oRs(0) if NOT isNull(iPM) AND iPM>0 Then Response.Write " - (" & Server.URLEncode(oRs(0)) & " Read)" & vbCRLF End IF oRs.Close set oRs = Nothing Response.Write "<br>" & vbCRLF End sub
' Display one column, using a table containing a code for each bloc ' IN : tColumnContent (array) : table with index of blocs ' OUT : - Sub DisplayColumn(tColumnContent) Dim X
If IsArray(tColumnContent) Then ' Response.Write tColumnContent(0) & vbCrLf For X = 0 to UBound(tColumnContent) Select Case CInt(tColumnContent(X)) Case 0 : DisplayMenu() Case 1 : DisplayDynamicCounter() Case 2 : DisplayAccountsInfo() Case 3 : DisplaySearch() Case 4 : DisplayFavorites() Case 5 : DisplayDirectoryLastSites GLOBAL_DIRECTORY_TOP Case 6 : DisplayVersions() Case 7 : DisplayWebCounters() Case 8 : DisplayLastPoll() Case Else : DisplayCustomBlock(CInt(tColumnContent(X))-8) End Select Next End If End Sub
Function GetTableAvailableColumns() Dim X, sTemp
For X = 0 To 8 + GLOBAL_CUSTOM_BLOCKS If sTemp = "" Then sTemp = Right("00" & X, 2) Else sTemp = sTemp & "££" & Right("00" & X, 2) End If Next
GetTableAvailableColumns = Split(sTemp, "££") End Function %>
Come si può risolvere? Grazie.
felixcafarelli Eliminato
0 Discussione
10 giugno 2003 alle 23:51:00 Metti un
DIM bIsAdvancedTheme
in cima alla pagina anche se questa costante dovrebbe essere definita (seguendo la logica di aspnuke) nel file configuration-inc.asp (magari controlla lì... scusa sono ancora sotto i fumi dell'alcool). ma questa è la 1.3 non ufficiale o cosa???
giuli Principiante
20 Discussioni
11 giugno 2003 alle 00:22:12 Sto cercando di avere i blocchi con gli angoli smussati dell 1.3 Uno che ne capisce mi ha detto di fare così: Devi modificare la Sub della creazione delle tabelle
11 giugno 2003 alle 11:34:26 E' il display-inc.asp che arriva da un altro sito?
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
11 giugno 2003 alle 22:05:27 Allora un mio consiglio, non mischiare i file di release con un'altra, inoltre la 1.3, non è una release ufficiale, quindi non è detto che poi sia effettivamente questa e se ci sarà una V. 1.3.
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
' Create a box table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' : sText (string) : text in the table ' : sFooter (string) : footer ' OUT : - Sub CreateBoxTable(sTabName, sHeader, sText, sFooter) CreateBoxTopTable sTabName, sHeader Response.Write sText & vbCRLF CreateBoxBottomTable sFooter End Sub
' Create the top part of a standard table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' OUT : - Sub CreateTopTable(sTabName, sHeader) If bIsAdvanceTheme then CreateBoxTopTable sTabName, sHeader Else Response.Write " <table id=""" & sTabName & """ width=""100%"" align=""center"" cellspacing=""0"" cellpadding=""0"" class=""myTable"">" & vbCRLF If sHeader <> "" Then Response.Write " <tr>" & vbCRLF Response.Write " <td class=""myTitle"" width=""100%"">" & sHeader & "</td>" & vbCRLF Response.Write " </tr>" & vbCRLF End If Response.Write " <tr>" & vbCRLF Response.Write " <td width=""100%"" class=""myTD"">" & vbCRLF End if End Sub
' Create the bottom part of a standard table ' IN : sFooter (string) : footer ' OUT : - Sub CreateBottomTable (sFooter) If bIsAdvanceTheme then CreateBoxBottomTable sFooter Else Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF If sFooter <> "" Then Response.Write " <tr>" & vbCRLF Response.Write " <td width=""100%"" align=""center"" class=""myTD""><br><span class=""small"">" & sFooter & "</span></td>" & vbCRLF Response.Write " </tr>" & vbCRLF End If Response.Write " </table>" & vbCRLF Response.Write "<br>" & vbCRLF End If End Sub
' Create a standard table ' IN : sTabName (string) : table's name (can be empty) ' : sHeader (string) : title displayed ' : sText (string) : text in the table ' : sFooter (string) : footer ' OUT : - Sub CreateTable(sTabName, sHeader, sText, sFooter) CreateTopTable sTabName, sHeader Response.Write sText & vbCRLF CreateBottomTable sFooter End Sub
' Get number of anonymous visitors connected to the site ' IN : - ' OUT : (int) number of anonymous visitors Function AnonymousVisitors() Dim oCn, oRs, rSQL
Set oCn = DBConnexion(DB_MAIN) rSQL = "SELECT Count(*) FROM sessions" Set oRs = DBRecordSet(oCn, rSQL) AnonymousVisitors = oRs(0)
oCn.Close Set oCn = Nothing Set oRs = Nothing End Function
' Get number of authenticated visitors connected to the site ' IN : - ' OUT : (int) number of authenticated visitors Function AuthentVisitors() Dim oCn, oRs, rSQL
Set oCn = DBConnexion(DB_MAIN) rSQL = "SELECT Count(*) FROM sessions WHERE sLogin<>''" Set oRs = DBRecordSet(oCn, rSQL) AuthentVisitors = oRs(0)
oCn.Close Set oCn = Nothing Set oRs = Nothing End Function
ho messo nella cartella themes/default la cartella img che contiene le immagini ma mi crea sempre delle tabelle squadrate come se non trovasse le immagini.
11 giugno 2003 alle 23:44:52 Hai dichiarato la variabile GLOBAL_SITE_THEMES_PATH?
Comunque rimango dell'idea che riprendere parti di una versione di AspNuke non ufficiale, è a solo ed unico rischio di chi lo fa, e, non si dovrebbe postare nel forum in cerca di aiuti improbabili, dato che, non è una versione testata dallo staff di AspNuke.
Non prendere ciò per un fatto personale, ma, pensa agli utenti che incominciano un cammino con un prodotto che non conoscono, tirare in ballo una versione che non esiste ufficialmente, genera solo confusione su chi legge i vari post, quindi la richiesta è: se potete evitare richieste del genere, fatelo, lo staff di AspNuke ve ne sarà riconoscente. Ciauzz Dj
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
12 giugno 2003 alle 00:30:58 Non è mia intenzione creare nessun problema ne allo staf ne tantomeno agli utenti. Io ho visto la versione 1.3 e l'unica cosa che mi piace sono questi benedetti angoli tondi, solo questi. Tornando al problema Le mie tabelle sono sempre rettangolari nonostante ci siano delle sub che chiamano le immagini. Non ho dichiarato nessuna variabile perchè non so in che modo e dove farlo.
Poi ragazzi se qualcuno mi aiuta a capire come risolvere il problema ne sono felice, diversamente mi rassegnerò ad avere tabelle squadrate. detto questo anche se la 1.3 diventasse ufficiale domani mattina non mi sognerei mai di cambiarla con la mia x il semplice motivo che è uguale.
12 giugno 2003 alle 09:46:33 ciao giuli, per avere il tuo aspnuke con i box arrotondati so che da qualche parte esiste un mod per ottenerle. Le trovi al link: http://www.borgerret.org/nuke12/downloads.asp?cat=31