1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...

This feature does not change anything for those not using the constant and this feature is also quite in-flux. We need to test this with some applications and bridges and there may be other locations able to benefit from it.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10008 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-08-17 14:45:14 +00:00
parent fe01a43d45
commit f7009291e2
5 changed files with 41 additions and 17 deletions

View File

@@ -112,12 +112,14 @@ function generate_smilies($mode, $forum_id)
if (sizeof($smilies))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
foreach ($smilies as $row)
{
$template->assign_block_vars('smiley', array(
'SMILEY_CODE' => $row['code'],
'A_SMILEY_CODE' => addslashes($row['code']),
'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
'SMILEY_IMG' => $root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
'SMILEY_WIDTH' => $row['smiley_width'],
'SMILEY_HEIGHT' => $row['smiley_height'],
'SMILEY_DESC' => $row['emotion'])