Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

Menù a tendina per forum...risolto

Autore Messaggio
excess

Eliminato
Eliminato
0 Discussione



Profilo - excess
15 gennaio 2004 alle 02:09:32 Profilo - excessInvia un messaggio privato Rispondi quotando
ciao regazz [lo]

ecco come ho risolto il mio problema del menù a tendina per il forum...lo vedete sul mio sito http://www.portalearianese.it

modificate il file default.asp in questo modo

Dim oCn, oRs, rSQL, X, forumdopo, forumprima, iLine
Set oCn = DBConnexion(DB_FORUM)
rSQL = "SELECT SectionID, SectionName, SectionForum, ForumID, ForumName FROM Sections, Forums WHERE SectionForum=ForumID ORDER BY ForumName, SectionName"
Set oRs = DBRecordSet(oCn, rSQL)

Response.Write "<table width=""100%"" cellspacing=""0"" cellpadding=""0"" border=""0"" align=""center"">" & vbCRLF
If GLOBAL_NEWS_LINKS_TOP > 0 and GLOBAL_FORUM_TOP > 0 Then
Response.Write " <tr>" & vbCRLF
Response.Write "<td>"& vbCRLF
Response.Write " <select name=""PostSection"" class=""cell"" onChange=""MM_jumpMenu('parent',this,1)"">" & vbCRLF
Response.Write " <option selected>FORUM</option>" & vbCRLF
forumdopo=""
iLine = 1
While Not oRs.EOF
forumprima= oRs("ForumName")
if forumprima <> forumdopo then
Response.Write " <optgroup label=""" & oRs("ForumName") & """ class=""group" & iLine & """>INFO</option>" & vbCRLF
iLine = ((iLine - 1) Xor 1) + 1
end if
X = oRs("forumID") & "&section=" & oRs("SectionID")
Response.Write " <option value=""forum.asp?forum=" & X & """"
Response.Write ">" & oRs("SectionName") & "</option>" & vbCRLF
forumdopo = oRs("ForumName")
oRs.MoveNext
WEnd
Response.Write " </select>" & vbCRLF
Response.Write "</td>"& vbCRLF
oCn.Close
Set oCn = Nothing
Set oRs = Nothing
Response.Write " </tr>" & vbCRLF
Response.Write " <tr>" & vbCRLF
Response.Write " <td valign=""top"">" & vbCRLF
DisplayTopForum GLOBAL_FORUM_TOP
Response.Write " </td>" & vbCRLF
Response.Write " </tr> <tr>" & vbCRLF
Response.Write " <td valign=""top"" align=""right"">" & vbCRLF
DisplayTopNewsLinks GLOBAL_NEWS_LINKS_TOP, 0
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
ElseIf GLOBAL_NEWS_LINKS_TOP > 0 Then
Response.Write " <tr>" & vbCRLF
Response.Write " <td width=""100%"" valign=""top"">" & vbCRLF
DisplayTopNewsLinks GLOBAL_NEWS_LINKS_TOP, 0
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
ElseIf GLOBAL_FORUM_TOP > 0 Then
Response.Write " <tr>" & vbCRLF
Response.Write "<td>"& vbCRLF
Response.Write " <select name=""PostSection"" class=""cell"" onChange=""MM_jumpMenu('parent',this,1)"">" & vbCRLF
Response.Write " <option selected>FORUM</option>" & vbCRLF
forumdopo=""
iLine = 1
While Not oRs.EOF
forumprima= oRs("ForumName")
if forumprima <> forumdopo then
Response.Write " <optgroup label=""" & oRs("ForumName") & """ class=""group" & iLine & """>INFO</option>" & vbCRLF
iLine = ((iLine - 1) Xor 1) + 1
end if
X = oRs("forumID") & "&section=" & oRs("SectionID")
Response.Write " <option value=""forum.asp?forum=" & X & """"
Response.Write ">" & oRs("SectionName") & "</option>" & vbCRLF
forumdopo = oRs("ForumName")
oRs.MoveNext
WEnd
Response.Write " </select>" & vbCRLF
Response.Write "</td>"& vbCRLF
oCn.Close
Set oCn = Nothing
Set oRs = Nothing
Response.Write " </tr>" & vbCRLF
Response.Write " <tr>" & vbCRLF
Response.Write " <td width=""100%"" valign=""top"" align=""right"">" & vbCRLF
DisplayTopForum GLOBAL_FORUM_TOP
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
End If
Response.Write "</table>" & vbCRLF



poi nel file default.css aggiungete queste righe

optgroup.group1
{
background: #84BD63;
color: #000000
}

optgroup.group2
{
background: #7DB55C;
color: #000000
}

optgroup.group1 option
{
background: #84BD63;
color: #000000
}

optgroup.group2 option
{
background: #7DB55C;
color: #000000
}


cambiate i colori a seconda del tema del vostro sito ovviamente e il gioco è fatto
:) [feu]

ciauz [lo] [lo] [lo]

ps nonnina ops annina (mi son sbagliato a confondere :p) quando arriva la chat nuova (?)

Log in

Login
Password
Memorizza i tuoi dati:

Cerca

 

Sostieni AspNuke

Un piccolo gesto per aiutarci a mantenere AspNuke.it online

Promo

MusicWebItalia.it
Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.

Visitatori

Visitatori Correnti : 245
Membri : 0 offline Anna

Iscritti

 Utenti: 18940
Ultimo iscritto : glauco
Lista iscritti
Messaggi privati: 3373 Commenti: 2210 Immagini: 39 Downloads: 144 Articoli: 49 Pagine: 101 Siti web: 558 Notizie: 180 Sondaggi: 11 Preferiti: 5685035 Post sui forum: 51195 Libro degli ospiti: 4 Eventi: 7

Versioni

Temi