AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Jul 31, 2007, 01:17   #1
Младенец
 
Join Date: Jul 2007
Location: Yerevan
Posts: 8
Rep Power: 0
Reputation: 10
Smaileri anbavararutyun)

Pivet vsem, senc problem ka, petqa vor kataryal dzevov lucvi, mi qani exanak ka, bayc edqan el chi harmarvum gorcis. " :=): :lb: :gd: " ev ayln, sovorakan dzevov preobrazavat en linum grafika (or. <img src="e4.gif">) petqa vor @ndamen@ 1 hat smail preobrazavat @lni, or. ete ":=): :lg: kam :lb: :gd:" senc toxer grelu depqum menak arachin@ pr. lini isk mnacac@ sovorakan texti nman mna.
Робинзое_Крузо is offline   Reply With Quote Quote selected
Old Jul 31, 2007, 04:43   #2
Дикообраз-безобраз
 
AvDav's Avatar
 
Join Date: Jul 2004
Location: У самого синего моря
Posts: 2,618
Rep Power: 5
Reputation: 82
Send a message via ICQ to AvDav
de parsery nenc pti gres vor menak 1 smile convert ani image-i, pseudo-code:

Code:
function put_smile(s) {
 bool is_smile = false;
 switch(s) {
  case "=)": echo "<img src="e1.gif">"; is_smile = true; break;
  case "lg": echo "<img src="e2.gif">"; is_smile = true; break;
  case "kam": echo "<img src="e3.gif">"; is_smile = true; break;
  case "lb": echo "<img src="e4.gif">"; is_smile = true; break;
  case "gd": echo "<img src="e5.gif">"; is_smile = true; break;
 }
 return is_smile;
}

function parse(txt) {
 string s;
 bool got = false;
 for(i = 0; i < size(txt); ++i) {
  if(!got && txt[i] == ':') {
    while(i < size(txt) && txt[i] != ':') s.append(txt[i++]);
    if(put_smile(s)) {got = true; continue;}
  }
  echo txt[i];
 }
}
__________________
Deutschland, Deutschland über alles
Über alles in der Welt,

Wenn es stets zu Schutz und Trutze
Brüderlich zusammenhält,

Von der Maas bis an die Memel,
Von der Etsch bis an den Belt.

AvDav is offline   Reply With Quote Quote selected
Old Aug 8, 2007, 03:24   #3
Младенец
 
Join Date: Jul 2007
Location: Yerevan
Posts: 8
Rep Power: 0
Reputation: 10
Mersi, bajc chi hamapatasxanum, ed chei uzum, ed mas@ "preg_replace - int $limit"-ov em arel bajc eli poxelu em, indz verchnakan masna petq.
Робинзое_Крузо is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:42.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link