assign('mp3_button', array( 'URL' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . WFS_DIR . '%2Fadmin%2Fadd_page_on_picture.php&catid=' . $cat_id . '&imgid=' . $img_id . '&backurl=' . $_SERVER['REQUEST_URI'], 'ICON' => WFS_PATH . 'template/add_button.png')); } if (isset($result['sound'])) { if (file_exists($result['sound'])) { if (!empty($result['volume'])) { $wfs_conf[1] = $result['volume']; } $template->assign('wfs', array( 'MP3' => WFS_PATH . 'dewplayer.swf?son=' . strtr($result['sound'] , array(' ' => '%20')), 'VOLUME' => $wfs_conf[1], 'PLAYER_WIDTH' => $wfs_conf[2] - 2, // 2px de moins pour la nouvelle version de dewplayer 'AUTOSTART' => $wfs_conf[3], 'AUTOREPLAY' => $wfs_conf[4])); } else { pwg_query('DELETE FROM ' . WFS_IMG_CAT_TABLE . ' WHERE sound_id = ' . $result['id'] . ';'); pwg_query('DELETE FROM ' . WFS_SOUNDS_TABLE . ' WHERE id = ' . $result['id'] . ';'); } } $template->set_filenames(array('wfs' => dirname(__FILE__) . '/template/wfs_on_picture.tpl')); $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('wfs', true)); ?>