Real Tibia Letters for Gesior ACC News

Discussion in 'Web-development' started by ragal, Aug 6, 2009.

  1. Kofels

    Kofels New Member

    Joined:
    Nov 11, 2008
    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Oh, I am really sorry :*
     
  2. CvB

    CvB ots.tibia-stat.org

    Joined:
    Jun 14, 2007
    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    I steel can't add this to my website ; /
     
  3. fewdox

    fewdox New Member

    Joined:
    Jan 9, 2010
    Messages:
    244
    Likes Received:
    3
    Best Answers:
    0
  4. fewdox

    fewdox New Member

    Joined:
    Jan 9, 2010
    Messages:
    244
    Likes Received:
    3
    Best Answers:
    0
    ops ..!!!!
    PHP:
    1. <font face="martel" font size="you size here" font color="you color here"> texthere </font>
    you can get the full list of colors html here
    Tabela de Cores - Web

    sorry for double post .. i forget the = in codes .. :p
     
  5. vpaan

    vpaan Member

    Joined:
    May 30, 2010
    Messages:
    145
    Likes Received:
    8
    Best Answers:
    0
    And when the user doesn't have the font installed...? :rolleyes:
     
  6. xmp3

    xmp3 New Member

    Joined:
    Jul 3, 2010
    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    PHP:
    1.  
    2. function changeFirstLetter($string,$path='',$ext='.gif',$checkIfFileExists=false)
    3.         {
    4.             $tpl = "<img src='{path}' alt='' title=''/>";
    5.             if(is_string($string) && strlen($string)>0)
    6.             {
    7.                 $string = ucfirst($string);
    8.                 $ASCII  = ord($string[0]);
    9.                 //if($ASCII > 0x40 && $ASCII < 0x5A)
    10.                 if(preg_match('/^[A-Z]{1}/',$string))
    11.                 {
    12.                     $path   = $path.$ASCII.$ext;
    13.                     if(file_exists($path) || !$checkIfFileExists)
    14.                     {
    15.                         $string = str_replace($string[0],$tpl,$string);
    16.                         $string = str_replace('{path}',$path,$string);
    17.                     }
    18.                 }
    19.             }          
    20.             return $string;
    21.         }
    22.  
    usage

    changeFirstLetter('hello tibia','path/to/img','.jpg');


    about the colors I recommend you to use

    PHP:
    1. <p style="color:red;"></p>
    or
    PHP:
    1. <p style="color:RGB(255,0,0);"></p>
    instead of font tag which is very old and does not exists in XHTML.
     
  7. Bacheer

    Bacheer New Member

    Joined:
    Jun 18, 2009
    Messages:
    246
    Likes Received:
    0
    Best Answers:
    0
    In what .php i put that?:O
     
  8. Floris

    Floris Member

    Joined:
    Apr 17, 2008
    Messages:
    204
    Likes Received:
    8
    Best Answers:
    0
    How to add this in Modern AAC?
     
  9. Dankoo

    Dankoo Well-Known Member

    Joined:
    Sep 4, 2010
    Messages:
    1,006
    Likes Received:
    28
    Best Answers:
    0
  10. zakius

    zakius Enter the Ninja!

    Joined:
    Apr 30, 2009
    Messages:
    2,635
    Likes Received:
    63
    Best Answers:
    0
    @up: nope, its attached to post so it hosted on otland
     
  11. hans henrik

    hans henrik Member

    Joined:
    Jun 5, 2007
    Messages:
    242
    Likes Received:
    1
    Best Answers:
    0
    this is cool, thanks dude!
    PHP:
    1.  
    2. function TibiaFirstLetter($str){
    3. $tmp=$str[0];
    4. $tmp='<img alt="'.$tmp.'" src="letters/'.strtoupper($tmp).'.gif" />';
    5. $str=substr($str,1);
    6. $str=$tmp.$str;
    7. return $str;
    8. }
    9.  
    PHP:
    1.  
    2. function TibiaAllLetter($str){
    3. $ret='';
    4. $str=str_split($str,1);
    5. foreach($str as $chr){
    6. if(stripos($chr,'abcdefghijklmnopqrstuvwxyz')===false){
    7. $ret.=$chr
    8. } else {
    9. $ret.='<img alt="'.$chr.'" src="letters/'.strtoupper($chr).'.gif" />';
    10. }
    11. }
    12. return $ret;
    13. }
    14.  
    i guess :p
     

Share This Page

Loading...