https://www.icyphoenix.com/viewtopic.php?f=35&t=6720
-----------------------------------
dinoyoco
Sun 29 Nov, 2009 12:31

Smilies Problem
-----------------------------------
After the last 2 updates (1.3.0.53a and 1.3.0.53a RC3), I had the same problem with smilies. See attached image:

 [img]http://www.icyphoenix.com/files/images/25/smilies.jpg[/img] 

The problem is the variable "$ _SERVER [ 'HTTP_HOST']", returns nothing. This occurs in both the server and local (php 5.2.0 and 5.3.0). To fix this I change that variable with "$board_config [ 'server_name']".

Open "includes\functions_post.php" and search:
[code]
					'SMILEY_IMG' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $rowset[$i]['smile_url'],[/code]

Replace:
[code]$_SERVER['HTTP_HOST'][/code]

By
[code]$board_config['server_name'][/code]

Repeat this change in the following lines
function generate_smilies_row()
[code]
				'URL' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $row['smile_url'],[/code]

function generate_smilies_row_simple()
[code]
				'URL' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $row['smile_url'],[/code]

Open "includes/album_mod/album_functions.php":
[code]
					'SMILEY_IMG' => 'http://' . $_SERVER['HTTP_HOST'] . $board_config['script_path'] . $board_config['smilies_path'] . '/' . $smile_url,[/code]

I do not understand why this happens now, I hope this will help others.

Bye


-----------------------------------
spydie
Sun 29 Nov, 2009 14:00

Re: Smilies Problem
-----------------------------------
thanks for the head up 

had the same problem on one of the sites


-----------------------------------
novice programmer
Sun 29 Nov, 2009 21:57

Re: Smilies Problem
-----------------------------------
it looks like $_SERVER['HTTP_HOST'] could be deprecated as of PHP 5 series if it returns nothing...


-----------------------------------
Mighty Gorgon
Sun 29 Nov, 2009 23:52

Re: Smilies Problem
-----------------------------------
Thanks for sharing, I will try to improve that code.


-----------------------------------
spydie
Sun 29 Nov, 2009 23:55

Re: Smilies Problem
-----------------------------------
i just tried that in the problem site. 

thing is it looks like theres an / misssing in the path

example: it should be : www.yoursite.com/images/smileys

but it comes out this way www.yoursite.comimages/smileys


