31 agosto 2005 alle 03:15:18 Prima di tutto complimenti e grazie a tutti voi dello staff di aspnuke.it perche avete sviluppato un pacchetto veramente valido.
Sono il webmaster di http://www.cusfirenzerugby.it e la mia idea è di modificare la link top news che ho messo in home page in modo che cliccando sul titolo delle news elencate si acceda al dettaglio della singola notizia e non alla pagina delle news.
Pensando di modificare news-inc.asp (nella porzione di codice originale sottoelencata) ho fatto delle prova ma con scarso risultato. Avete qualche consiglio da darmi?
Grazie Jacopo
' Display the top news list (links to news) ' IN : iTop (int) : number of results wanted ' : iCategory (int) : news' category (table news, field nCategory) ' OUT : - Sub DisplayTopNewsLinks(iTop, iCategory) Dim oCn, oRs, rSQL Dim titreNews, texteNews, dateNews, sCategory, sTitleCat, iLoop
Set oCn = DBConnexion(DB_MAIN)
If iCategory <> "" and iCategory <> 0 Then sCategory = "?cat=" & iCategory rSQL = "SELECT cTitle FROM categories WHERE cID=" & iCategory Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then sTitleCat = " - " & Server.HTMLEncode(oRs(0)) end if oRs.Close Set oRs = Nothing End If
rSQL = "SELECT nID, nDate, nTitle FROM news, versions WHERE nVersion=vID AND nDate < '" & DateTimeToString(Now()) & "' AND nValid=1" If sXMLVersion <> "" Then rSQL = rSQL & " AND vCode='" & sXMLVersion & "'" end if If sCategory <> "" Then rSQL = rSQL & " AND nCategory=" & iCategory end if rSQL = rSQL & " ORDER BY nDate DESC"
Set oRs = DBRecordSet(oCn, rSQL)
CreateTopTable "TopNewsLinks", GetTranslation("LANG_TOP") & " " & iTop & " - " & GetTranslation("LANG_NEWS") & sTitleCat If Not oRs.EOF Then iLoop = 0 While Not oRs.EOF And iLoop < iTop Response.Write "<a href=""" & GLOBAL_SITE_NEWS_PAGE & sCategory & "#news_" & Left(oRs("nID"),8) & """>" & CodeMessage(oRs("nTitle"), False) & "</a> <span class=""small"">" & GetDateLitteralDDMMYYYY(StringToDate(oRs("nDate"))) & "</span><br>" & vbCRLF oRs.MoveNext iLoop = iLoop + 1 WEnd Else Response.Write GetTranslation("LANG_EMPTY_SECTION") End If CreateBottomTable ""
oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing End Sub
grami Principiante
4 Discussioni
06 settembre 2005 alle 19:05:21 Problema risolto: sostituendo nella linea di codice 259 di news-inc.asp "#news_" con "?id="
Log in
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 : 101 Membri : 0
Anna
Iscritti
Utenti: 18940
Ultimo iscritto : glauco Lista iscritti Messaggi privati: 3373Commenti: 2210Immagini: 39Downloads: 144Articoli: 49Pagine: 101Siti web: 558Notizie: 180Sondaggi: 11Preferiti: 5685465Post sui forum: 51195Libro degli ospiti: 4Eventi: 7