Help
Ask questions about how to do or fix things in Arrowchat
User avatar
Mad
Customer
 
Posts: 1
Joined: 01 Mar 2011, 22:29

 

by Mad 04 Mar 2011, 07:23

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 ;)
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 04 Mar 2011, 08:36

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.
User avatar
Staff Bot
ArrowChat Team
 
Posts: 8996
Joined: 07 Nov 2012, 13:41

 

by Staff Bot 07 Nov 2012, 12:40

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.