scipt Mr.GUESTBOOK v1.0

blasco

Nuovo Utente
29 Ott 2003
6
0
0
ho scaricato questo guestbook dal sito...è molto carino ma c'è un problemino........

ho provato a lasciare un messaggio piuttosto lungo e il risultato è stato che il testo non andava mai a capo proseguiva finchè il messaggio stesso non finiva.....

volevo sapere se si poteva fare qualcosa fermandolo ad un certo punto predefinito o se sono io che ho sbagliato qualcosa......Ciao e grazie:dipser: :dipser: :( :eek: :fonzie:
 
Ultima modifica:

jan267

Utente Attivo
6 Mar 2003
1.950
2
38
35
Milano
twitter.com
Ciao,
certamente che si puo` !
Con la funzione Replace, ecco il modo:
Codice:
<%
Dim Messaggio
Messaggio = Request.Form("messaggio")
Messaggio = Replace(Messaggio, vbCrLf, "<br>" & vbCrLf, 1, -1, 1)
%>
Bye :byebye:
 

jan267

Utente Attivo
6 Mar 2003
1.950
2
38
35
Milano
twitter.com
Beh, io lo so meno di te... non avendo il resto del codice mi viene difficile dirtelo... ;)
Posta il code che serve ad inserire il messaggio nel db.

Bye :byebye:
 

blasco

Nuovo Utente
29 Ott 2003
6
0
0
il coduce dovrebbe essere questo:
QUESTO E' RELATIVO AL FILE mrgbook.asp



<%
'#################################################################################
'## Mr. GUESTBOOK v1.0
'## Copyright (C) 2003 - MrWebmaster (www.mrwebmaster.it)
'## Questo script è liberamente utilizzabile, ma sono vietate:
'## 1) la modifica;
'## 2) l'alterazione;
'## 3) la distribuzione a scopo di lucro.
'##
'## E' soprattutto vietata la rimozione dei nostri credits a fondo pagina.
'## Ogni violazione potrà essere perseguita a norma di legge.
'#################################################################################
%>
<!--#include file="config.asp"-->
<%
querysql="select * from GUESTBOOK ORDER BY id DESC"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(path)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open querysql, conn, 3, 3

currentPage = request.queryString ("pag")
If currentPage = "" then
currentPage = "1"
End If

pageSize = ncommenti

Records = rs.RecordCount

if NOT (Records = 0) then
rs.pageSize = pageSize
rs.AbsolutePage = currentPage
End If

pageNext = currentPage + 1
pagePrev = currentPage - 1
Pages = Records \ pageSize
if Records mod pageSize then
Pages = Pages + 1
End If
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><%=titolo%></title>

<style>
A {color:FFFFFF; text-decoration: none}
A:hover {color: FFFFFF; text-decoration: underline}
A.black {color:000000; text-decoration: none}
A.black:hover {color:000000; text-decoration: underline}
.1 {font-family:<%=font%>; font-style:normal; font-size:11px}
.2 {font-family:<%=font%>; font-style:normal; font-size:13px}
</style>

<script language="Javascript">
function openwin(ind,nome) {
var features = 'width=240,height=80,toolbar=no,resizable=no,menubar=no,location=no,status=yes,scrollbars=no';
window.open(ind,nome,features);
}
</script>

</head>

<body bgcolor="<%=bgcolor%>">

<!--#include file="header.asp"-->
<br>
<div align="center">
<table border="0" cellpadding="2" cellspacing="0" width="98%">
<tr><td class="2"><big><%=titolo%></big></td></tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" class="2"><a href="<%=homepageurl%>" class="black"><u>HomePage</u></a> + Guestbook</td>
<td width="50%" align="right" class="2"><a href="scrivi_commento.asp" class="black"><u><b>Lascia il tuo commento!</b></u></a></td>
</table>
</td></tr>
<tr><td><hr></td></tr>
<%
if NOT (CInt(Records) = 0) then 'if there are no records in the database it doesn't go on dysplaying then and only sais that there are no records

Do While (Not rs.EOF) and (currentRecords < pageSize) 'runs through the records and dysplays them
currentRecords = currentRecords + 1 'counts currently dysplayed records
%>

<tr><td bgcolor="#333333" class="1"><font color="#FFFFFF">Commento scritto da: <a href="#" OnClick="openwin('dati_autore.asp?id=<%=rs("id")%>','autore')"><b><u><%=rs("nome")%></u></b></a><br>
Scritto il: <b><%=rs("data")%></b> Ip: <b><%=rs("ip_address")%></b></font></td></tr>
<tr><td bgcolor="#CCCCCC" class="1"><%=rs("commento")%></td></tr>
<tr><td>&nbsp;</td></tr>

<%
rs.MoveNext
Loop
else
response.write ("<tr><td class=2>Non è stato scritto nessun commento nel guestbook!!<br><a href=scrivi_commento.asp?act=write><b><u>SRCRIVI IL TUO COMMENTO!!</u></b></a></td></tr>") & VBCRLF
End If
%>

<tr><td><hr></td></tr>
<tr><td align=center class="2"><b><% if NOT pagePrev < 1 then %><a href="mrgbook.asp?pag=<% = pagePrev %>" class="black"><b><u>&laquo; indietro</u></b></a><% else %>&laquo; indietro<% End If %> | <% While NOT pageNumber = Pages pageNumber = pageNumber + 1 %> <% if CInt (pageNumber) = CInt (currentPage) then %> <font color="#FF0000"><% = pageNumber %></font> | <% else %> <a href="mrgbook.asp?pag=<% = pageNumber %>" class="black"><u><% = pageNumber %></u></a> | <% End If %> <% Wend %> <% if NOT pages < pageNext then %> <a href="mrgbook.asp?pag=<% = pageNext %>" class="black"><u>avanti &raquo;</u></a> <% else %>avanti &raquo;<% End If %> </b></td></tr>
<tr><td height=3></td></tr>
<tr><td align=center class="1">Ci sono <font color="#FF0000"><b><% = Records %></b></font> commenti nel guestbook!</td></tr>
</table>
</div>
<br>
<center>
<div align="center">
<table>
<tr><td class="2"><a href="https://www.mrw.it" target="_blank"><img border="0" src="logo_mrgbook.gif" width="88" height="31" alt="Mr. Webmaster" hspace="4" align="left"></a>
<b>Mr. Guestbook</b> è uno script gratuito realizzato da <a href="https://www.mrw.it" target="_blank" class="black"><u>Mr. Webmaster</u></a><br>
Il portale italiano di risorse gratuite per Webmaster!</td></tr>
</table>
</div>
</center>

</body>
</html>

<%
rs.close
conn.close
%>
 

jan267

Utente Attivo
6 Mar 2003
1.950
2
38
35
Milano
twitter.com
Ho controllato ora io.
Il file e` scrivi_commento.asp e a quanto vedo... c`e` gia` la funzione Replace!
Comunque... metti questa code:
Codice:
sCommento = REPLACE(sCommento, vbCrLf, "<br>" & vbCrLf, 1, -1, 1")
sotto a 'Dim sCommento!

Bye :byebye:
 

blasco

Nuovo Utente
29 Ott 2003
6
0
0
non funziona!!!

il testo va sempre lungo, non va a capo, continua !!!!!

ma il problema non potrebbe stare nel file mrgbook.asp....non è questo che fa visualizzare il mess nel guestbook? boh....ma a te funziona??
 
Discussioni simili
Autore Titolo Forum Risposte Data
M Disabilitare alcune funzione php da scipt PHP 3
A Aiutatemi a creare uno scipt PHP 8
A scipt collegamento file Flash 2
S Scipt gestione utenti [Era: Aiuto!] Discussioni Varie 0
M Guestbook - non funziona dopo upgrade di PHP PHP 5
P Errore Codice Sicurezza Guestbook Supporto Mr.Webmaster 0
felino Guestbook: qual è la soluzione migliore? WordPress 7
Devil-94 Guestbook: messaggi in ajax. Ajax 1
N problemi con il guestbook appena creato Supporto Mr.Webmaster 0
D Riconversione Guestbook PHP 0
L Come posso inviare al mio sito i guestbook,sondagggi,ecc creati su Mr.Webmaster ? Supporto Mr.Webmaster 11
Shyson Guestbook con file singolo o multipli? PHP 167
A Guestbook PHP 11
G Servizio Guestbook Supporto Mr.Webmaster 0
S [GUESTBOOK] Formattazione del testo stampato PHP 1
S AAA Cercasi: Guida completa su Guestbook PHP PHP 1
ste80 Problemuccio con semplice guestbook PHP 4
S vorrei modificare delle cose sul guestbook ... Classic ASP 1
asevenx script per commentare un messaggio lasciato in guestbook PHP 2
F creazione guestbook Classic ASP 0
WpStyle GetSimple: integrazione Guestbook CMS (Content Management System) 1
I salvataggio guestbook Supporto Mr.Webmaster 0
moon Guestbook - problema fastidioso PHP 21
asevenx inserire un guestbook HTML e CSS 24
B Problemi guestbook con immagine captcha Classic ASP 0
N numerazione messaggi in ogni pagina del guestbook PHP 1
V Problemi con un guestbook Discussioni Varie 2
G inserimento smaile guestbook Supporto Mr.Webmaster 0
A sistema di commenti+guestbook+aggiornamento news rss PHP 0
G cancellazione messaggi guestbook Supporto Mr.Webmaster 2
L guestbook Supporto Mr.Webmaster 1
A esportare messassi DB guestbook Supporto Mr.Webmaster 1
A guestbook in ASP Classic ASP 8
L Inserimento faccine sul Guestbook Supporto Mr.Webmaster 4
I Email di nuovi messaggi nel guestbook inseriti Supporto Mr.Webmaster 5
F Captcha nel guestbook Classic ASP 0
E Domanda di sicurezza php guestbook PHP 0
D Problema guestbook Classic ASP 2
M guestbook mr.webmaster Supporto Mr.Webmaster 1
sbobby Codice di lettura nel guestbook!! PHP 14
I Errore sintassi guestbook PHP 1
O Viper Guestbook PHP 0
L Orario Guestbook sballato Supporto Mr.Webmaster 3
P Tutorial guestbook PHP 0
E Creazione Guestbook Con Grafica Personalizzata Altri Annunci 4
D Aiuto con Guestbook "sign me" che trovate in ScriptPHP PHP 4
C Domanda Sul Guestbook Supporto Mr.Webmaster 1
S problemi con il guestbook Supporto Mr.Webmaster 2
M Giochi cell guestbook chat aiuto blog msn suonerie toolbar testi canzoni Presenta il tuo Sito 0
F tutorial guestbook senza mysql (14-06-06) PHP 1

Discussioni simili