Page 1 of 1

smiley not showing (fix)

PostPosted: 04 Mar 2011, 07:23
by Mad
hello, im new here, and i dont know if its a bug in the new version,or i did a mistake by changing the source.anyway if someone has the same problem read this:
problem:
i sent a message with a smiley,but the receiver couldnt see the smiley.after a look in the database i saw the smiley is replaced with a html img tag,and the theme id was inserted instead of the folder name.
example:
Code: Select all
<img class="arrowchat_smiley" height="16" width="16" src="/chatbar/themes/1/images/smilies/smiley-lol.gif" alt=":D">

but it should be
Code: Select all
<img class="arrowchat_smiley" height="16" width="16" src="/chatbar/themes/new_facebook_full/images/smilies/smiley-lol.gif" alt=":D">

i changed following to get it working:
i changed the data_core.php to fetch the theme folder name and replaced a bit code in the functions send.
so if u need the fix to, here is the complete solution:
open includes/data_core.php
replace
Code: Select all
$sql = "SELECT theme, status, popout, hash_id, hide_bar, is_admin, play_sound, window_open, chatroom_window, chatroom_stay, chatroom_block_chats, only_names, unfocus_chat, focus_chat, apps_bookmarks, apps_other
      FROM arrowchat_status
      WHERE userid = '".mysql_real_escape_string($userid)."'";

with:
Code: Select all
$sql = "SELECT arrowchat_themes.folder, arrowchat_status.theme, arrowchat_status.status, arrowchat_status.popout, arrowchat_status.hash_id, arrowchat_status.hide_bar, arrowchat_status.is_admin, arrowchat_status.play_sound, arrowchat_status.window_open, arrowchat_status.chatroom_window, arrowchat_status.chatroom_stay, arrowchat_status.chatroom_block_chats, arrowchat_status.only_names, arrowchat_status.unfocus_chat, arrowchat_status.focus_chat, arrowchat_status.apps_bookmarks, arrowchat_status.apps_other
      FROM arrowchat_status LEFT JOIN arrowchat_themes ON arrowchat_status.theme = arrowchat_themes.id
      WHERE arrowchat_status.userid = '".mysql_real_escape_string($userid)."'";

replace:
Code: Select all
$theme    = $user_settings['theme'];

with:
Code: Select all
{
        $theme    = $user_settings['theme'];
        $themename = $user_settings['folder'];
        }

save the file!
open includes/functions_send.php
replace
Code: Select all
global $theme;

with
Code: Select all
global $themename;

replace:
Code: Select all
src="'.$base_url.'themes/'.$theme.'/images/smilies/'.$result.'.gif"

with:
Code: Select all
src="'.$base_url.'themes/'.$themename.'/images/smilies/'.$result.'.gif"


thats it! upload the 2 changed files and it works!
remember to backup your files ok ;)

Re: smiley not showing (fix)

PostPosted: 04 Mar 2011, 08:36
by Jason
Woah, that's a lot of changes for that! I'll take a look into this issue and see if I can find out why the ID came up.

Topic Closed

PostPosted: 07 Nov 2012, 12:40
by Staff Bot
This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.