seekXL Snapr. Version: 2.0 Author: Tim Zylinski Author URI: http://www.zyblog.de Copyright 2008 Tim Zylinski (email : websitecontact [a t ] zylinski DOT de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ if (!class_exists("SeekXLSnapr")) { class SeekXLSnapr { var $adminOptionsName = "SeekXLSnaprAdminOptions"; function SeekXLSnapr() { } function init() { $this->getAdminOptions(); } function getAdminOptions() { $seekXLSnaprAdminOptions = array('show_all' => 'true', 'thumbnail_size' => 'M', 'use_logo_key' => 'false', 'logo_key' => ''); $devOptions = get_option($this->adminOptionsName); if (!empty($devOptions)) { foreach ($devOptions as $key => $option) $seekXLSnaprAdminOptions[$key] = $option; } update_option($this->adminOptionsName, $seekXLSnaprAdminOptions); return $seekXLSnaprAdminOptions; } function addHeaderCode() { $devOptions = get_option($this->adminOptionsName); echo '' . "\n"; if($devOptions['use_logo_key'] == "true") { echo ""; } if ($devOptions['show_all'] == 'true') { echo ""; echo ""; } else { echo ""; } if (function_exists('wp_enqueue_script')) { wp_enqueue_script('seekxl_snapr', get_bloginfo('wpurl') . '/wp-content/plugins/seekxl-snapr/js/bubble-min.js'); } } function insertSeekXLSnaprClass($content = '') { $devOptions = get_option($this->adminOptionsName); $thumbnail_size = $devOptions['thumbnail_size']; if ($devOptions['show_all'] == 'true'){ if (function_exists('str_ireplace')) { $content = str_ireplace('href="http://','class="seekxlsnapr'.$thumbnail_size.'" href="http://',$content); $content = str_ireplace('class="seekxlsnapr'.$thumbnail_size.'" href="' . get_settings("siteurl"),'href="' . get_settings("siteurl"),$content); } else { $content = str_replace('href="http://','class="seekxlsnapr'.$thumbnail_size.'" href="http://',$content); $content = str_replace('class="seekxlsnapr'.$thumbnail_size.'" href="' . get_settings("siteurl"),'href="' . get_settings("siteurl"),$content); } } return $content; } function printAdminPage() { $devOptions = $this->getAdminOptions(); if (isset($_POST['update_seekXLSnaprSettings'])) { if (isset($_POST['seekXLSnaprShowAll'])) { $devOptions['show_all'] = $_POST['seekXLSnaprShowAll']; } if (isset($_POST['seekXLSnaprUseLogo'])) { $devOptions['use_logo_key'] = $_POST['seekXLSnaprUseLogo']; } if (isset($_POST['seekXLSnaprThumbnailSize'])) { $devOptions['thumbnail_size'] = $_POST['seekXLSnaprThumbnailSize']; } if (isset($_POST['seekXLSnaprLogoKey'])) { $devOptions['logo_key'] = $_POST['seekXLSnaprLogoKey']; } update_option($this->adminOptionsName, $devOptions); ?>

">

readme.txt","SeekXLSnapr"); ?>

    



register and fill in your logo key below.","SeekXLSnapr"); ?>