smilies are playing with me

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

12 replies · 638 views · started 16 years ago · 1 min read

3 participants
pretend Developer · 107 posts #1

the smilies are visible in my phone wml mode but in xhtml phone it doesnt but in xhtml if i visit from pc it the smilies are visible example the code is visible not the smile when i am visiting my site from mobile but when i visit from my pc the smilies are visible i am going mad to solve this also tried copying the smilies functions from wml to xhtml and made a comparison on parse pm function parse other pm function and also get smilies function the codes in both i mean wml and xhtml c both functions are seem to be same but still the problem exists

Nice Effects

pretend Developer · 107 posts #3

is it some thing to dow tih the core functions or what?

Added after 5 minutes:

but the same smile is visible in wml but it doesnt in xhtml whats the problem?

Nice Effects

something else Fellow · 2,296 posts #4

if you can see the image on 1 browser and not another it suggests you are missing alt="something" on your xhtml core (pc browser is excepting this a valid html without it)

pretend Developer · 107 posts #5

but i did make a comparison with the functions of wml and xhtml almost the smilies and parse pm those are same i dont find any alt on this

Nice Effects

animal1982 Junior · 24 posts #7

post ur function getsmilies in core xhtml

pretend Developer · 107 posts #8
///////////////////////////////////////////////Get the smilies

function getsmilies($text)
{
  $sql = "SELECT * FROM ibwf_smilies";
  $smilies = mysql_query($sql);
  while($smilie=mysql_fetch_array($smilies))
  {
    $scode = $smilie[1];
    $spath = $smilie[2];
    $text = str_replace($scode,"<img src=\"$spath\" alt=\"$scode\"/>",$text);
  }
  return $text;
}

and you see

 $text = str_replace($scode,"<img src=\"$spath\" alt=\"$scode\"/>",$text);

the alt is specified

it is already posted mate and i have made comparison with my wml core and the xhtml core this is my xhtml cores get smilie and it still doesnt show

Nice Effects

animal1982 Junior · 24 posts #9

theres no problem with that code m8...pm me ur addy

something else Fellow · 2,296 posts #10

Have you protected your images against hotlinking? as some phones dont support refferer

animal1982 Junior · 24 posts #11

i was thinking it sumat to do with ur phone...

pretend Developer · 107 posts #12

not a solution yet

Nice Effects

something else Fellow · 2,296 posts #13

looks like its a host problem ...here is the only fix i know of ... but will cause warning messages while on pc

function getsmilies($text)
{
$sql = "SELECT * FROM ibwf_smilies";
$smilies = mysql_query($sql);
while($smilie=mysql_fetch_array($smilies))
{
$scode = $smilie[1];
$spath = $smilie[2];
$text = str_replace($scode,"<img src=\"http://%20@sitename.com/$spath\" alt=\"$scode\"/>",$text);
}
return $text;
}

By adding full address with %20@ at the start of it ..... but it will cause warnings about going to a page with a username on it whilst on pc

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close