Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
$smiley = ":-)";
$smiley_bild = "<img src='bla.jpg'>";
str_replace($smiley,$smiley_bild,$gb_eintrag);
$entry = preg_replace( "=(^|\ |\\n)(http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})=i", "\\1<a href=\"\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)(www\.)([a-zA-Z0-9\.\/\-\_]{1,})=i", "\\1<a href=\"http://\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\](http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\=(.*)\](http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"\\3\\4\" target=\"_blank\">\\2</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\](www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"http://\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\=(.*)\](www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"http://\\3\\4\" target=\"_blank\">\\2</a> ", $entry );
und am besten inner Schleife wo du jedesmal nen anderen smiey abfragst
function bbCode( $entry ) {
$entry = preg_replace("8)", "<img src=\"smile.gif\">", $entry);
$entry = preg_replace( "=(^|\ |\\n)(http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})=i", "\\1<a href=\"\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)(www\.)([a-zA-Z0-9\.\/\-\_]{1,})=i", "\\1<a href=\"http://\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\](http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\=(.*)\](http:\/\/|http:\/\/www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"\\3\\4\" target=\"_blank\">\\2</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\](www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"http://\\2\\3\" target=\"_blank\">\\2\\3</a> ", $entry );
$entry = preg_replace( "=(^|\ |\\n)\[url\=(.*)\](www\.)([a-zA-Z0-9\.\/\-\_]{1,})\[/url\]=i", "\\1<a href=\"http://\\3\\4\" target=\"_blank\">\\2</a> ", $entry );
return $entry;
}
<?php
if (!$connection = @mysql_connect("hostname", "username", "password"))
die(mysql_error());
}
if (!@mysql_select_db("datenbank", $connection)) {
die(mysql_error());
}
$smilies = array();
$sql = @mysql_query("SELECT smilie, picture FROM smilies") or die(mysql_error());
while ($row = mysql_fetch_array($sql)) {
$smilies[$row["smilie"]] = $row["picture"];
}
foreach($smilies as $key => $val) {
$text = str_replace($key, $val, $text);
}
@mysql_free_result($sql);
@mysql_close($connection);
?>
CREATE TABLE `smilies` (
`smilie` VARCHAR( 15 ) NOT NULL ,
`picture` VARCHAR( 200 ) NOT NULL ,
PRIMARY KEY ( `smilie` )
);