Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] emoty w komentarzach, zielony
Sadu2
post
Post #1





Grupa: Zarejestrowani
Postów: 229
Pomógł: 13
Dołączył: 31.05.2007

Ostrzeżenie: (10%)
X----


Witam,
Mam oto taki kod:

  1. <?php
  2. function smilies($string)
  3.  {
  4.  
  5. $string = str_replace(":)", "<img src="gfx/emoty/smile.gif" alt=":)" />", $string);
  6. $string = str_replace(":(", "<img src="gfx/emoty/sad.gif" alt=":(" />", $string);
  7. $string = str_replace(";)", "<img src="gfx/emoty/wink.gif" alt=";)" />", $string);
  8. $string = str_replace(":D", "<img src="gfx/emoty/grin.gif" alt=":D" />", $string);
  9. $string = str_replace(":p", "<img src="gfx/emoty/pfft.gif" alt=":p" />", $string);
  10. $string = str_replace(":|", "<img src="gfx/emoty/frown.gif" alt=":|" />", $string);
  11. $string = str_replace(":o", "<img src="gfx/emoty/shock.gif" alt=":o" />", $string);
  12. $string = str_replace(":c", "<img src="gfx/emoty/cool.gif" alt=":c" />", $string);
  13. $string = str_replace(":@", "<img src="gfx/emoty/angry.gif" alt=":@" />", $string);
  14.  
  15. return $string;
  16.  }
  17. ?>


Zabardzo nieznam sie na php :( ale chciałbym aby wyświetlały mi sie emoty w komentarzach. Czy tak funkcja jest dobra? W którym miejscu mam ją umieścić aby działała? Dopiero sie ucze i prosze o wyrozumialość.

Pozdrawiam

Ten post edytował Sadu2 3.08.2007, 10:59:59
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Sadu2
post
Post #2





Grupa: Zarejestrowani
Postów: 229
Pomógł: 13
Dołączył: 31.05.2007

Ostrzeżenie: (10%)
X----


aaa juz kumam (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) dzięki wielkie, działa super.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.12.2025 - 08:46