function flagShowBanner($xml, $width, $height, $wmode = '') { require_once dirname(__FILE__) . '/class.swfobject.php'; require_once dirname(dirname(__FILE__)) . '/admin/banner.functions.php'; $flag_options = get_option('flag_options'); $galleryPath = trim($flag_options['galleryPath'], '/'); $xml = sanitize_flagname($xml); $playlistPath = $galleryPath . '/playlists/banner/' . $xml . '.xml'; $playlist_data = get_b_playlist_data(ABSPATH . $playlistPath); $skin = sanitize_flagname($playlist_data['skin']); $items = $playlist_data['items']; $skinpath = str_replace("\\", "/", WP_PLUGIN_DIR) . '/flagallery-skins/' . $skin; include_once $skinpath . '/' . $skin . '.php'; if (isset($flag_options['license_key'])) { $lkey = $flag_options['license_key']; } else { $lkey = ''; } $isCrawler = isset($_SERVER['HTTP_USER_AGENT']) ? flagGetUserNow($_SERVER['HTTP_USER_AGENT']) : false; $args = array('xml' => $xml, 'skin' => $skin, 'items' => $items, 'width' => $width, 'height' => $height, 'wmode' => $wmode, 'lkey' => $lkey, 'crawler' => $isCrawler); $out = apply_filters('flagShowBannerSkin', $args); // Replace doubled spaces with single ones (ignored in HTML any way) // Remove single and multiline comments, tabs and newline chars //$out = preg_replace('@(\s){2,}@', '\1', $out); //$out = preg_replace( // '@(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|((?<!:)//.*)|[\t\r\n]@i', // '', // $out //); return $out; }
<?php $flag_options = get_option('flag_options'); $siteurl = get_option('siteurl'); $isCrawler = flagGetUserNow($_SERVER['HTTP_USER_AGENT']); // check if is a crowler ?> <style type="text/css"> <?php if (!$isCrawler) { ?> #<?php echo $skinID; ?> _jq { display: none; } <?php } ?> div#<?php echo $skinID; ?> _jq { position: relative; width: <?php echo $width; if (strpos($width, '%') === false) { echo 'px'; } ?> ; height: <?php
<?php if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } global $wpdb, $post; $xml = array(); $flag_options = get_option('flag_options'); $siteurl = site_url(); $c = array(); $isCrawler = isset($_SERVER['HTTP_USER_AGENT']) ? flagGetUserNow($_SERVER['HTTP_USER_AGENT']) : false; extract($altColors); $bg = $wmode == 'window' ? '#' . $Background : 'transparent'; $xml['alt'] = '<style type="text/css" scoped="scoped">'; if (!$isCrawler) { $xml['alt'] .= '@import url("' . plugins_url('/admin/css/flagallery_nocrawler.css', dirname(__FILE__)) . '");'; } $xml['alt'] .= '@import url("' . plugins_url('/admin/css/flagallery_noflash.css', dirname(__FILE__)) . '");'; if ($isCrawler) { $xml['alt'] .= '.flag_alternate .flagCatMeta h4 { padding: 4px 10px; margin: 7px 0; border: none; font: 14px Tahoma; text-decoration: none; background:#292929 none; color: #ffffff; }'; $xml['alt'] .= '.flag_alternate .flagCatMeta p { font-size: 12px; }'; } if ($BarsBG) { $bgBar = $wmode == 'window' ? '#' . $BarsBG : 'transparent'; if (!$isCrawler) { $xml['alt'] .= "#fancybox-title-over .title { color: #{$TitleColor}; }"; $xml['alt'] .= "#fancybox-title-over .descr { color: #{$DescrColor}; }"; $xml['alt'] .= ".flag_alternate .flagcatlinks { background-color: #{$BarsBG}; }"; $xml['alt'] .= ".flag_alternate .flagcatlinks a.flagcat, span.flag_pic_counters { color: #{$CatColor}; background-color: #{$CatBGColor}; }"; $xml['alt'] .= ".flag_alternate .flagcatlinks a.active, .flag_alternate .flagcatlinks a.flagcat:hover { color: #{$CatColorOver}; background-color: #{$CatBGColorOver}; }"; }