Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Emotikony
Louner
post
Post #1





Grupa: Zarejestrowani
Postów: 99
Pomógł: 5
Dołączył: 20.06.2005
Skąd: Bielsk Podlaski

Ostrzeżenie: (0%)
-----


Witam
Chciałbtm się zapytać, czy istnieje jakiś gotowy skrypt który konwertuje odpowiednie znaki na emotikony? Nie mam jeszcze tyle doświadczenia w programowaniu, żeby napisać własny. Szukałem takowego na stronach:

http://php.skryptoteka.pl/
na hasła: emoty, emotikony, konwerter znaków

http://www.webinside.pl/skrypty
na hasła: emoty, emotikony, emotki

http://www.wirtuals.net/

http://www.megaskrypty.com/index.php?cat=3

http://www.hotscripts.pl/index.php

http://php.resourceindex.com/search/index.cgi


Wszystko okazało się płonne. Czy ktoś mógłby mi pomóc ? (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

Ten post edytował Louner 26.07.2005, 20:33:41
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Louner
post
Post #2





Grupa: Zarejestrowani
Postów: 99
Pomógł: 5
Dołączył: 20.06.2005
Skąd: Bielsk Podlaski

Ostrzeżenie: (0%)
-----


Ok, dziękuję. (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) Już wątpiłem, że ktoś mi pomoże (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Udało się, zrozumiałem i jest świetnie (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Dziękuję (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

edit:
Niestety nie działa tam gdzie powinno (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) Używam takiego skryptu:

  1. <?php
  2. $text = str_replace(&#092;":)\", \"<img src=\"forum/images/smiles/icon_smile.gif\">\", $text);
  3. $text = str_replace(&#092;";)\", \"<img src=\"forum/images/smiles/icon_wink.gif\">\", $text); 
  4. $text = str_replace(&#092;":P\", \"<img src=\"forum/images/smiles/icon_razz.gif\">\", $text); 
  5. $text = str_replace(&#092;"X)\", \"<img src=\"forum/images/smiles/icon_twisted.gif\">\", $text); 
  6. $text = str_replace(&#092;":D\", \"<img src=\"forum/images/smiles/icon_biggrin.gif\">\", $text); 
  7. $text = str_replace(&#092;":(\", \"<img src=\"forum/images/smiles/icon_sad.gif\">\", $text);
  8. $text = str_replace(&#092;"->\", \"<img src=\"forum/images/smiles/icon_arrow.gif\">\", $text);
  9. $text = str_replace(&#092;";(\", \"<img src=\"forum/images/smiles/icon_cry.gif\">\", $text); 
  10.  
  11. $dzial = '8';
  12.  
  13. $sql=&#092;"SELECT p.post_id, pt.post_id, pt.post_text, pt.bbcode_uid, t.topic_id, t.to
    p
  14. c_title, t.topic_first_post_id, t.forum_id, t.topic_replies, u.user_id, 
  15.  
  16. u.username, u.user_posts, u.user_rank
  17.  FROM &#092;".TOPICS_TABLE.\" t, \".USERS_TABLE.\" u, \".POSTS_TABLE.\" p, \".POSTS_TEXT_TABLE.\" pt
  18.  WHERE t.forum_id = $dzial
  19.  AND t.topic_poster = u.user_id
  20.  AND t.topic_first_post_id = pt.post_id
  21.  AND t.topic_first_post_id = p.post_id
  22.  ORDER BY pt.post_id DESC&#092;";
  23.  $query=mysql_query($sql);
  24.  while(
  25.  $result=mysql_fetch_assoc($query))
  26.  {
  27.  $text = $result['post_text'];
  28.  $text = bbcode_strip($text, $result['bbcode_uid']);
  29.  $link = append_sid('viewtopic.' . $phpEx . '?t=' . $result['topic_id']);
  30.  if (strlen($text) > 1000){
  31.  $text = substr($text, 0, 1000).'...[space][space] <a href=\"forum/'.$link.'\" class=\"wiecej\">Wiecej</a>';}
  32.  $text = str_replace('
  33.  ', '<br>', $text);
  34.  $author = ' ';
  35.  echo '<div style=\"text-align:justify; background:#FCFCFC; border: solid #CACACA 1px; padding:5px; margi
    n:5px; font-size:10pt\"><b><a 
  36.  
  37. href=\"forum/'.$link.'\" class=\"tytul_newsa\">'.$result['topic_title'].'</a></b><hr width=\"90%\" align\"center\"><span 
  38.  
  39. class=\"news\">'.$text.'</span><div align=\"right\"><br /><span class=\"autor\">'.$author.' :: </span><a href=\"forum/'.$link.'\" 
  40.  
  41. class=\"autor\">Komentarzy: <span class=\"autor_red\">'.$result['topic_replies'].'</span></a></div></div>';
  42.  }
  43.  ?>


Może gdzieś popełniłem błąd?

Ten post edytował Louner 27.07.2005, 12:07:52
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: 6.10.2025 - 14:08