Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

Forum
  NUOVI SVILUPPI
      PROPOSTE
         COMMENTI PER TUTTI

COMMENTI PER TUTTI

Autore Messaggio
russena

Utente
Utente
64 Discussioni



Profilo - russena
03 febbraio 2005 alle 20:46:24 Profilo - russenaInvia un messaggio privato Rispondi quotando
BLOCCO ULTIMI COMMENTI PER TUTTI
Spesso i Commenti lasciati dai Visitatori si rivelano una vera e propria miniera di indicazioni nella difficile e continua operazione di fidelizzazione degli utenti.
Ma sono anche un utilissimo strumento di informazione per gli altri visitatori che, attraverso tali messaggi, possono facilmente e celermente essere indirizzati alle pagine pi? interessanti del sito

per la versione 1.2 lo trovi al seguente link:
http://www.stzone.it/downloads.asp?id=24

Qualcuno per caso ha implementato lo stesso mod per la nuova versione di aspnuke?
---------------
Sebastiano Basile
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
03 febbraio 2005 alle 22:45:06 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
Non è necessaria nessuna modifica al file, basta inserirlo nella cartella principale del portale, root o cartella che contiene i files di aspnuke.
L'unica differenza nell'installazione è dovuta al menù, che, nella nuova versione è il file menuitems.xml, e, che va modificato così:
<element>
<text>Commenti</text>
<link type="instruction">GLOBAL_SITE_PATH & "cmms.asp"</link>
<target></target>
<bullet></bullet>
<role></role>
<flag type="instruction">GLOBAL_NEWS_TOP</flag>
</element>

Inserisci, nella posizione che ritieni opportuna, il contenuto di [cit], tra un tag </element> di chiusura e uno di apertura <element>.
Semplice, o no?
Ciauzz DJ
---------------
A lavare la testa ai somari, ci si rimette l'acqua e il sapone!

http://aspnuke208.somee.com/Default.asp

russena

Utente
Utente
64 Discussioni



Profilo - russena
04 febbraio 2005 alle 10:48:45 Profilo - russenaInvia un messaggio privato Rispondi quotando
mi da il seguente errore:
ErroreSQL -2147217900: [MySQL][ODBC 3.51 Driver][mysqld-4.0.22-standard]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '15 cID, cAuthor, cDate, cType, cItem, cText FROM comments ORDER
SQL : SELECT TOP 15 cID, cAuthor, cDate, cType, cItem, cText FROM comments ORDER BY cDate DESC


Microsoft VB Script runtime error '800a01a8'

Object required: 'DBRecordSet(...)'

/public/portale/cmms.asp, line 40


il file è installato al seguente indirizzo:
http://www.avolesi.it/public/portale/cmms.asp

dovbe sbaglio?
---------------
Sebastiano Basile
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
04 febbraio 2005 alle 18:29:57 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
E' normale, dato che il file asp è ottimizzato per DB Access, con MySql non si può usare il parametro TOP.
Ciauzz DJ
---------------
A lavare la testa ai somari, ci si rimette l'acqua e il sapone!

http://aspnuke208.somee.com/Default.asp

russena

Utente
Utente
64 Discussioni



Profilo - russena
04 febbraio 2005 alle 18:41:26 Profilo - russenaInvia un messaggio privato Rispondi quotando
Avevo pensato a cio'. Quindi devo dedurre, dalla tua risposta, che devo rinunciarci?
Per noi era molto importante.

Grazie cmq
---------------
Sebastiano Basile
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
04 febbraio 2005 alle 19:00:00 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
Va solo modificata la query.
---------------
A lavare la testa ai somari, ci si rimette l'acqua e il sapone!

http://aspnuke208.somee.com/Default.asp

russena

Utente
Utente
64 Discussioni



Profilo - russena
04 febbraio 2005 alle 19:08:59 Profilo - russenaInvia un messaggio privato Rispondi quotando
DJ IO NON RIESCO SE NON CHIEDO TROPPO POTRESTI AITARMI TU?
SALUTI E ANCORA GRAZIE MILLE
---------------
Sebastiano Basile
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
04 febbraio 2005 alle 19:55:23 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
Io l'ho modificata nel modo più semplice, il test in locale ha funzionato, solo che, non avendo molti commenti, non so se tutte le funzioni sono ok.
Inserisco in un CIT tutto il file, dato che usi MySql, e, ci sono delle correzioni alle Maiuscole/Minuscole dei nomi delle tabelle, che ti darebbero sicuramente dei problemi:

<%
' ************************************************************************
' * ASP-Nuke: Free web portal in ASP *
' ************************************************************************
' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) *
' * http://www.asp-nuke.com *
' * Re-Design by E. Libertini (c) 2005 (infoz@searchwarezz.net) *
' * 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. *
' * *
' ************************************************************************
' -------------------------------------------
' Autore: Settimio TRINCHERA
' Email: webmaster@stzone.it
' Sito: http://www.stzone.it
' Data: 07/10/2003
' -------------------------------------------
%>
<!-- #include file='includes/includes-inc.asp' -->
<!-- #include file='includes/comments-inc.asp' -->
<%

Dim iPage
iPage = Request.QueryString("page")
If iPage <> "" And IsNumeric(iPage) Then iPage = CInt(iPage)
If iPage <= 0 Then iPage = 1

' Display comments by page (max per page : GLOBAL_COMMENTS_PAGE)
' IN : iPage (int) : page wanted
' OUT : -
Sub DisplayPageComments(iPage)
Dim oCn, oRs, oRs2, rSQL, rSQL2, iLine, X
Dim sAuthor, sType, sUrl

Set oCn = DBConnexion(DB_MAIN)

rSQL = "SELECT cID, cAuthor, cDate, cType, cItem, cText FROM comments ORDER BY cDate DESC"
Set oRs = DBRecordSet(oCn, rSQL)
oRs.PageSize = GLOBAL_COMMENTS_PAGE
If oRs.RecordCount <> - 1 Then
oRs.AbsolutePage = iPage
Else
For X = 1 To (iPage-1)*GLOBAL_COMMENTS_PAGE
oRs.MoveNext
Next
End If

If Not oRs.EOF Then
CreateTopTable "Comments", ""
Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF
Response.Write " <tr class=""tablelinemain"">" & vbCRLF
Response.Write " <td width=""80"">" & GetTranslation("LANG_AUTHOR") & "</td>" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_TEXT") & "</td>" & vbCRLF
Response.Write " <td width=""80"" align=""center"">" & GetTranslation("LANG_DATE") & "</td>" &

vbCRLF
Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_ARTICLE_PAGE") &

"</td>" & vbCRLF
Response.Write " </tr>" & vbCRLF

iLine = 1
While Not oRs.EOF
sAuthor = oRs("cAuthor")
If sAuthor = "" Then
sAuthor = GetTranslation("LANG_ANONYM")
Else
sAuthor = Server.HTMLEncode(sAuthor)
End If
Select Case oRs("cType")
Case CATEGORY_TYPE_NEWS :
sType = GetTranslation("LANG_NEWS")
sUrl = "news.asp"
Case CATEGORY_TYPE_DOWNLOADS :
sType = GetTranslation("LANG_DOWNLOADS")
sUrl = "download.asp"
Case CATEGORY_TYPE_DIRECTORY :
sType = GetTranslation("LANG_DIRECTORY")
sUrl = "directory.asp"
Case CATEGORY_TYPE_IMAGES :
sType = GetTranslation("LANG_IMAGES")
sUrl = "images.asp"
Case CATEGORY_TYPE_ARTICLES :
sType = GetTranslation("LANG_ARTICLES")
sUrl = "articles.asp"
End Select
Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td>" & sAuthor & "</td>" & vbCRLF
Response.Write " <td><a href=""" & GLOBAL_SITE_PATH & sUrl & "?id=" & oRs("cItem") &

""">" & vbCRLF
Response.Write CodeMessageEx(oRs("cText"), 40, False, True) & vbCRLF
Response.Write " </a></td>" & vbCRLF
Response.Write " <td align=""center"">" & GetDateDDMMYY(StringToDate(oRs("cDate"))) &

"</td>" & vbCRLF
Response.Write " <td align=""center"">"
Response.Write sType
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF

iLine = 1 + ((iLine-1) XOR 1)
oRs.MoveNext
WEnd
Response.Write "</table>" & vbCRLF
CreateBottomTable ""
End If

oCn.Close
Set oCn = Nothing
Set oRs = Nothing
End Sub


' Display a navigation's bar
' IN : iCurrentPage (int) : current page
' OUT : -
Sub DisplayCommentsNavigation(iCurrentPage)
Dim oCn, oRs, rSQL, rSQL2, iNum, iFound, iNbPages, X

Set oCn = DBConnexion(DB_MAIN)

rSQL = "SELECT Count(*) FROM comments"
Set oRs = DBRecordSet(oCn, rSQL)
iNum = oRs(0)

If iCurrentPage > 1 Then rSQL2 = " WHERE cID NOT IN (SELECT TOP " & (iCurrentPage-1)*GLOBAL_COMMENTS_PAGE

& " c2.cID FROM comments c2 ORDER BY c2.cDate DESC)"
rSQL = "SELECT Count(cID) FROM comments " & rSQL2
Set oRs = DBRecordSet(oCn, rSQL)
iFound = oRs(0)
If iFound > GLOBAL_COMMENTS_PAGE Then iFound = GLOBAL_COMMENTS_PAGE

oCn.Close
Set oRs = Nothing
Set oCn = Nothing

CreateTopTable "CommentsNavigate", GetTranslation("LANG_SEARCH") & " - " & GetTranslation("LANG_COMMENT")
iNbPages = iNumGLOBAL_COMMENTS_PAGE
If iNum mod GLOBAL_COMMENTS_PAGE <> 0 Then iNbPages = iNbPages + 1
If iNbPages > 1 Then
If iCurrentPage > 1 Then Response.Write "  <a href=""" & sURLPage & "?page=" &

iCurrentPage-1 & "&id=13" & """><<</a>" & vbCRLF
For X = 1 To iNbPages
If X <> iCurrentPage Then
Response.Write "  <a href=""" & sURLPage & "?page=" & X & "&id=13" &

""">" & X & "</a>" & vbCRLF
Else
Response.Write " <b>" & X & "</b>" & vbCRLF
End If
Next
If iCurrentPage <> iNbPages Then Response.Write "  <a href=""" & sURLPage & "?page=" &

iCurrentPage+1 & "&id=13" & """>>></a>" & vbCRLF
End If
Response.Write "<div align=""center"" class=""small"">" &

Replace(Replace(GetTranslation("LANG_SEARCH_TOTAL"), "%1%", iFound), "%2%", iNum) & "</div>" & vbCRLF
CreateBottomTable ""
End Sub

sTitlePage = GetTranslation("LANG_COMMENTS")
DoComments()
%>
<!-- #include file='includes/toppage-inc.asp' -->
<%
CreateTopTable "", GetTranslation("LANG_COMMENTS")

DisplayPageComments iPage
DisplayCommentsNavigation iPage

CreateBottomTable ""

DisplayCommentsPage()

%>

<!-- #include file='includes/bottompage-inc.asp' -->
<!-- #include file='includes/clearitall-inc.asp' -->

Se la modifica funziona..... ricordati di passare nel mio portale.... ed esegui una "donazione".
Ciauzz Dj
---------------
A lavare la testa ai somari, ci si rimette l'acqua e il sapone!

http://aspnuke208.somee.com/Default.asp

russena

Utente
Utente
64 Discussioni



Profilo - russena
04 febbraio 2005 alle 19:55:37 Profilo - russenaInvia un messaggio privato Rispondi quotando
Da incompetente ho eliminato top da select top.
Adesso vedo i commenti ma c'è qualcosa ancora da sistemare
http://www.avolesi.it/public/portale/cmms.asp
---------------
Sebastiano Basile
russena

Utente
Utente
64 Discussioni



Profilo - russena
04 febbraio 2005 alle 20:13:56 Profilo - russenaInvia un messaggio privato Rispondi quotando
Dj Grazie per il tuo impegno. Passerò dal tuo sito.
Ho incollato la tua citazione sostituendo il contenuto del file ma mi da un errore di sintassi alla linea 56.
Microsoft VB Script compilation error '800a03ea'

Syntax error

/public/portale/cmms.asp, line 56
Response.Write " <td width=""80"" align=""center"">" & GetTranslation("LANG_DATE") & "</td>" &
----------------------------------------------------------------------------------------------^

---------------
Sebastiano Basile
 1  2  >>

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 : 117
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: 425 Notizie: 180 Sondaggi: 11 Preferiti: 202713 Post sui forum: 51195 Libro degli ospiti: 4 Eventi: 7

Versioni

Temi