05 maggio 2005 alle 10:25:28 Ciao a tutti, volevo chiedere se qualcuno riuscirebbe a creare un mod funzionante per grabbare le news del punto informatico?
scartabellando sul sito del PI ho trovato il codice. ma non avendo abbastanza conoscenza chiderai aiuto.
<% '######################################################################## '# Cattura le ultime notizie da www.punto-informatico.it # '# ===================================================== # '# # '# Copyright (c) 2002 by Andrea Iacurto (andrea@cicci.it) # '# http://www.cicci.it # '# # '# 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. # '########################################################################
Function GetLastPIInfo() on error resume next Dim objXMLHttp, url Set objXMLHttp = server.CreateObject("Microsoft.XMLHTTP") If Isobject(objXMLHttp) Then url = "http://punto-informatico.it/fader/uo.txt" objXMLHttp.Open "GET", url, False objXMLHttp.Send a = objXMLHttp.responseText a = split(a,chr(10)) If Ubound(a) > 1 Then For i = 0 to Ubound(a) If i mod 2 = 0 Then Response.Write "<a href='" & a(i+1) & "' target='_blank'>" & a(i) & "</a><br>" End If Next Else Response.Write "Servizio momentaneamente non disponibile." End If Set objXMLHttp = nothing End If End Function
05 maggio 2005 alle 11:04:32 Un esempio di pagina funzionante è questa:
<% '######################################################################## '# Cattura le ultime notizie da www.punto-informatico.it # '# ===================================================== # '# # '# Copyright (c) 2002 by Andrea Iacurto (andrea@cicci.it) # '# http://www.cicci.it # '# # '# 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. # '######################################################################## %> <!-- #include file='includes/includes-inc.asp' --> <!-- #include file='includes/toppage-inc.asp' --> <% Function GetLastPIInfo() 'on error resume next Dim objXMLHttp, url, a, i, j
Set objXMLHttp = server.CreateObject("Microsoft.XMLHTTP")
If Isobject(objXMLHttp) Then url = "http://punto-informatico.it/fader/uo.txt" objXMLHttp.Open "GET", url, False objXMLHttp.Send a = objXMLHttp.responseText a = split(a,chr(10)) If Ubound(a) > 0 Then CreateTopTable "PI", "Notizie di 'Punto Informatico'" j=1 For i = 0 to (Ubound(a)-1) If i mod 2 = 0 Then response.Write "<tr class=""tableline" & (1 + (j mod 2)) & """><td>" & vbCrlf Response.Write "<a href='" & a(i+1) & "' target='_blank'>" & a(i) & "</a><br>" response.Write "</td></tr>" & vbCrlf j=j+1 End If Next CreateBottomTable "" Else Response.Write "Servizio momentaneamente non disponibile." End If Set objXMLHttp = nothing End If End Function
A partire da qui puoi sbizzarrirti con lapersonalizzazione o creare un blocco laterale
--------------- Frank Zalabard(sviluppo@aspnuke.it)
pmattera
Utente
54 Discussioni
06 maggio 2005 alle 11:10:12 sto provando a applicare il tutorial "Creare un Nuovo Blocco con Aspnuke 2.0" ma c'e' qualche cosa che non mi quadra della descrizione...
2. "Modifica Traduzioni" Da Pannello di controllo / "modifica Traduzioni" aggiungiamo queste tre nuove Traduzioni come segue: Nome: LANG_BLOCK_DISPLAY_X Descrizione: Displayascoltalaradio (nome della routine di visualizzazione del blocco, con eventuali parametri.) Conferma Traduzione;
ok sono nella sezione Modifica traduzioni
qualcuno di dice dove trovo "Descrizione" ? da me c'e' ci sono solo i campi Nome e "Traduzione" ma nessun campo Descrizione...