HX3 Foren  

  HX3 Foren > Konstruktiv > Software- und Webentwicklung

Software- und Webentwicklung Planung, Programmierung und Administration
UML, JavaScript/DOM, ASP, JSP, PHP, Apache, MySQL, Python, Perl (...)

Antwort
 
Themen-Optionen Ansicht
Alt 03.11.2003, 15:01   #1 (permalink)
50 Beiträge
 
Registriert seit: 04.08.2003
Ort: Hamburg
Beiträge: 99
Rambow eine Nachricht über ICQ schicken
Standard

Code:
Ich brauch ein srrcipt der mir den aus der db aus gelesenen text von mir aus >>hallo :-)<<
und das er mir dann den :-) in ein
:-) macht.

Code:
<?

 &nbsp; $link = mysql_connect('localhost','web14','123456');
 &nbsp; $db &nbsp; = mysql_select_db('usr_web14_1') or die (mysql_error() );
 &nbsp; $sql = "SELECT * from News ORDER BY ts DESC LIMIT 0,4";
 &nbsp; $res = mysql_query($sql);
 &nbsp; 

 &nbsp; ?>
<img src='_images/smilies/grenade.gif'>
<html>
<head>
<title>Farcry-Mod</title>
</head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
 &nbsp;var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 &nbsp; &nbsp;var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 &nbsp; &nbsp;if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
 &nbsp;var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
 &nbsp;var p,i,x; &nbsp;if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
 &nbsp; &nbsp;d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
 &nbsp;if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
 &nbsp;for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
 &nbsp;if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
 &nbsp;var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
 &nbsp; if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
 &nbsp;frame, select, textarea
 &nbsp; { color:#000000; }
 .Bereich, .Feld
 &nbsp; { background-color:#DCE3FF;}
 
-->
</style>
<style type="text/css">
<!--
.textnormal2 {
	font-family: Arial;
	font-size: 11px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #FFFFFF;
	text-decoration: none;
}
.textnormal {
	font-family: Arial;
	font-size: 11px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #FFFFFF;
	text-decoration: none;
}
.menuetext {
	font-family: arial;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #FFFFFF;
	
}

.menuetext:hover {
	color: #548B69;
	}
.test { 
 &nbsp; background-color: #3C5C48;
 &nbsp; background-image: url(_images/backgraund.jpg);
 &nbsp; background-position: 0 0;
 &nbsp; background-repeat: no-repeat;
 &nbsp; &nbsp; }
.bild { 
 &nbsp; &nbsp; &nbsp;border:1px solid #333333;
 &nbsp; &nbsp; }

 .loginfield2
 &nbsp; { background-color:#3C5C48; 
 &nbsp; font-family: Arial;
 &nbsp; font-size: 10px;
 &nbsp; color: #FFFFFF; &nbsp; 
 &nbsp; border:0px solid #333333;
 &nbsp; height: 15px;
 &nbsp; width: 50px; }

 .loginfield
 &nbsp; { background-color:#548B69; 
 &nbsp; font-family: Arial;
 &nbsp; font-size: 10px;
 &nbsp; color: #FFFFFF; &nbsp; 
 &nbsp; border:1px solid #333333;
 &nbsp; height: 15px;
 &nbsp; width: 50px; }
-->
</style>
<body class="test" bgcolor="#3C5C48" LEFTMARGIN=0 topMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
<div style="position:absolute; top:160px; left:175px; ">
<?
 &nbsp; &nbsp;while ($row = mysql_fetch_assoc($res))
 &nbsp; &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 &nbsp;	{
 &nbsp;	?>
<table width="650" border="0" cellpadding="0" cellspacing="0" bgcolor="548B69" width="560" border="0" cellspacing="0" cellpadding="2" style="border-style:solid; border-width:1px; border-color:#000000;">
 &nbsp; &nbsp;
 &nbsp; &nbsp;<img class="bild" src="<?=$row["symbol"];?>">
 &nbsp; &nbsp;<tr bgcolor="3C5C48">
 &nbsp; &nbsp; &nbsp;<td class="menuetext"><?=$row["title"];?><img src="spacer.gif" height="1" width="450" ><a class="menuetext" href="mailto:<?=$row["email"];?>">von:&nbsp;<?=$row["autor"];?></a></td><td class="menuetext"><?=$row["datum"];?></td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp; &nbsp; <tr>
 &nbsp; &nbsp; &nbsp;<td class="textnormal"><?=$row["text"];?></td><td></td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;<td>&nbsp;</td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;<td>&nbsp;</td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp;</table>
<table width="650" border="0" cellpadding="0" cellspacing="0" &nbsp;width="560" border="0" cellspacing="0" cellpadding="2" >
<tr>
<td colspan="3"><img width="560" height="1" src="spacer.gif"</td><td><a href="#" class="menuetext">Bemerkungen</a></td>
</tr>
</table>

<? 
 &nbsp;	}

 &nbsp;?>
</div>

<div style="position:absolute; top:409px; left:0px; ">

<table &nbsp;width="119 border="0" cellpadding="0" cellspacing="0" bgcolor="3C5C48" &nbsp;border="0" cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-color:#000000;">
 &nbsp; &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;<td class="menuetext">Userlogin</td>
 &nbsp; &nbsp; &nbsp;</tr>	
 &nbsp; &nbsp; &nbsp; &nbsp; <tr>
 &nbsp; &nbsp; &nbsp;<td class="textnormal">&nbsp;Username: </td><td><input name="title" class="loginfield" type="text"></td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;<td class="textnormal">&nbsp;Passwort: </td><td><input name="name" class="loginfield" type="password"></td>
 &nbsp; &nbsp; &nbsp;</tr>
 &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp;<tr>
 &nbsp; &nbsp; &nbsp;<td><a class="textnormal2" href="reg.php">&nbsp;Rregistrieren</a> </td><td><input frameborder="0" class="loginfield2" name="login" value="Login" type="submit"</td>
 &nbsp; &nbsp; &nbsp;</tr>
</table>
</div>
<table style="position:absolute; top:104px; left:17px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="index.php" onMouseOver="MM_swapImage('Image1','','_images/menu1_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu1.gif" name="Image1" &nbsp; border="0" id="Image1"></a></td>
</tr>
</table>
<table style="position:absolute; top:125px; left:17px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image2','','_images/menu2_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu2.gif" name="Image2" &nbsp; border="0" id="Image2"></a></td>
</tr>
</table>
<table style="position:absolute; top:146px; left:17px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image3','','_images/menu3_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu3.gif" name="Image3" &nbsp; border="0" id="Image3"></a></td>
</tr>
</table>
<table style="position:absolute; top:167px; left:16px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image4','','_images/menu4_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu4.gif" name="Image4" &nbsp;border="0" id="Image4"></a></td>
</tr>
</table>
<table style="position:absolute; top:188px; left:17px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image5','','_images/menu5_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu5.gif" name="Image5" &nbsp;border="0" id="Image5"></a></td>
</tr>
</table>
<table style="position:absolute; top:209px; left:17px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image6','','_images/menu6_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu6.gif" name="Image6" &nbsp;border="0" id="Image6"></a></td>
</tr>
</table>
<table style="position:absolute; top:92px; left:0px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="_images/menu_left.gif" name="menu_left" &nbsp;border="0" ></a></td>
</tr>
</table>
<table style="position:absolute; top:230px; left:16px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image7','','_images/menu7_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu7.gif" name="Image7" &nbsp;border="0" id="Image7"></a></td>
</tr>
</table>
<table style="position:absolute; top:251px; left:16px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image8','','_images/menu8_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu8.gif" name="Image8" &nbsp;border="0" id="Image8"></a></td>
</tr>
</table>
<table style="position:absolute; top:272px; left:16px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="javascript:;" onMouseOver="MM_swapImage('Image9','','_images/menu9_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu9.gif" name="Image9" &nbsp;border="0" id="Image9"></a></td>
</tr>
</table>
<table style="position:absolute; top:293px; left:16px; ">
<tr>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td><a href="admin_login.html" onMouseOver="MM_swapImage('Image10','','_images/menu10_contra.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_images/menu10.gif" name="Image10" &nbsp;border="0" id="Image10"></a></td>
</tr>
</table>
</body>
</html>
__________________
OFP 4ever.
Rambow ist offline   Mit Zitat antworten
Alt 04.11.2003, 06:45   #2 (permalink)
50 Beiträge100 Beiträge
 
Registriert seit: 19.05.2003
Ort: Rostock
Alter: 40
Beiträge: 114
StefanRHRO eine Nachricht über ICQ schicken
Standard

Mit dem Text aus der Datenbank, wird das wohl nichts werden, dass muss schon Clientseitig passieren, zumindest, das umwandeln, von :-) in [img]smileys/smiley.gif[/img] würde ich sagen, sollen das nur bestimmte Smileys sein oder willst du die auch updaten können?
__________________
http://riedel-st.de
StefanRHRO ist offline   Mit Zitat antworten
Alt 04.11.2003, 14:18   #3 (permalink)
50 Beiträge
 
Registriert seit: 04.08.2003
Ort: Hamburg
Beiträge: 99
Rambow eine Nachricht über ICQ schicken
Standard

nur bestimmte!
__________________
OFP 4ever.
Rambow ist offline   Mit Zitat antworten
Alt 05.11.2003, 22:56   #4 (permalink)
Newbie
 
Registriert seit: 05.11.2003
Ort: Hamburg
Beiträge: 30
m[4]Tze eine Nachricht über ICQ schicken m[4]Tze eine Nachricht über AIM schicken
Standard

das ist doch keine allgemein bildung oder ? *gg*
__________________
OFP 4ever.
m[4]Tze ist offline   Mit Zitat antworten
Alt 06.11.2003, 15:10   #5 (permalink)
50 Beiträge
 
Registriert seit: 04.08.2003
Ort: Hamburg
Beiträge: 99
Rambow eine Nachricht über ICQ schicken
Standard

hää ich denk hier wird einem geholfen meine fresse!
da hätte ich auch in der nase boren können!
__________________
OFP 4ever.
Rambow ist offline   Mit Zitat antworten
Alt 06.11.2003, 19:13   #6 (permalink)
10 Jahre hx3
500 Beiträge1000 Beiträge2.500 Beiträge
 
Benutzerbild von xezon
 
Registriert seit: 31.03.2003
Beiträge: 2.533
Standard

Naja, du solltest dein Problem lieber beschränken. Es kostet viel Zeit den ganzen Kram da durchzuarbeiten!
xezon ist offline   Mit Zitat antworten
Alt 06.11.2003, 21:56   #7 (permalink)
50 Beiträge100 Beiträge
 
Registriert seit: 19.05.2003
Ort: Rostock
Alter: 40
Beiträge: 114
StefanRHRO eine Nachricht über ICQ schicken
Standard

@ Rambow du musst via preg_replace(), den String ":) oder :( usw." in [img]smileys/smiley.gif[/img] umwandeln.

Wenn ich es schaffe schreibe ich dir mal morgen ne Funktion, aber verlasse dich net drauf und versuche es selber.

Lese dir mal das Tutorial über BBCodes durch, da wird genau das beschrieben, wie du dein Problem löst.

P.S. Poste bitte das nächste mal nur den teil des Codes, der deiner Meinung nach relevant ist, mit Html, können wir hier meist nichts anfangen oder brauchen es nicht, wenn es um PHP-Sachen geht ;)

Gruß Stefan
__________________
http://riedel-st.de
StefanRHRO ist offline   Mit Zitat antworten
Alt 07.11.2003, 13:53   #8 (permalink)
50 Beiträge
 
Registriert seit: 04.08.2003
Ort: Hamburg
Beiträge: 99
Rambow eine Nachricht über ICQ schicken
Standard

ok mach ich thx
__________________
OFP 4ever.
Rambow ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus


Kontakt - HX3.de - Archiv - Nach oben

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias



SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119