diff options
author | the_systech <the_systech@users.sourceforge.net> | 2001-08-28 19:26:52 +0000 |
---|---|---|
committer | the_systech <the_systech@users.sourceforge.net> | 2001-08-28 19:26:52 +0000 |
commit | 063c6204068fa7d1bddfe67359a68458bbe11680 (patch) | |
tree | ca4e2ad29960a9a6e5ad11caeaea2c5adbfae930 /phpBB/admin/admin_smilies.php | |
parent | fac05e46a99fdec9a6453792e0220d7f635b303c (diff) | |
download | forums-063c6204068fa7d1bddfe67359a68458bbe11680.tar forums-063c6204068fa7d1bddfe67359a68458bbe11680.tar.gz forums-063c6204068fa7d1bddfe67359a68458bbe11680.tar.bz2 forums-063c6204068fa7d1bddfe67359a68458bbe11680.tar.xz forums-063c6204068fa7d1bddfe67359a68458bbe11680.zip |
Change smiley select code in admin... Uses javascript in Template (good/bad?)
git-svn-id: file:///svn/phpbb/trunk@938 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_smilies.php')
-rw-r--r-- | phpBB/admin/admin_smilies.php | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php index 2f71d143b7..769e9ce315 100644 --- a/phpBB/admin/admin_smilies.php +++ b/phpBB/admin/admin_smilies.php @@ -34,6 +34,17 @@ require('pagestart.inc'); // Check to see what mode we should operate in. // $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode']; +// +// Read a listing of uploaded smilies for use in the add or edit smliey code... +// +$dir = opendir($phpbb_root_path . $board_config['smilies_path']); +while($file = readdir($dir)) +{ + if($file != '.' && $file != '..') + { + $smiley_images[] = $file; + } +} switch($mode) { // @@ -98,8 +109,18 @@ switch($mode) "SMILEY_ID_VAL" => $smile_data['smilies_id'], "SMILEY_URL_VAL" => $smile_data['smile_url'], "SMILEY_EMOTION" => $smile_data['emoticon'], - "S_HIDDEN_VAR" => "save") + "S_HIDDEN_VAR" => "save", + "S_SMILEY_BASEDIR" => $phpbb_root_path . '/' . $board_config['smilies_path']) ); + for( $i = 0; $i < count($smiley_images); $i++ ) + { + $smiley_selected = ($smiley_images[$i] == $smile_data['smile_url']) ? "SELECTED" : ""; + $template->assign_block_vars("smile_images", array( + "FILENAME" => $smiley_images[$i], + "SELECTED" => $smiley_selected) + ); + } + // // Spit out the edit form. // @@ -120,10 +141,19 @@ switch($mode) "L_SMILEY_CODE_LBL" => $lang['smiley_code'], "L_SMILEY_URL_LBL" => $lang['smiley_url'], "L_SMILEY_EMOTION_LBL" => $lang['smiley_emot'], + "SMILEY_URL_VAL" => $smiley_images[0], "L_SUBMIT" => $lang['Submit_changes'], "L_RESET" => $lang['Reset_changes'], - "S_HIDDEN_VAR" => "savenew") + "S_HIDDEN_VAR" => "savenew", + "S_SMILEY_BASEDIR" => $phpbb_root_path . '/' . $board_config['smilies_path']) ); + for( $i = 0; $i < count($smiley_images); $i++ ) + { + $template->assign_block_vars("smile_images", array( + "FILENAME" => $smiley_images[$i]) + ); + } + // // Spit out the add form. // @@ -268,4 +298,4 @@ switch($mode) // include('page_footer_admin.'.$phpEx); -?>
\ No newline at end of file +?> |