diff -rc mandigo-1.34/404.php mandigo-1.33.1/404.php *** mandigo-1.34/404.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/404.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,5 **** . If you don't use

s, adding
between paragraphs will do the trick as well. + If you want to have an image float to the right, simply give it the "alignright" class, + i.e. ... + If you want to center an image, use the "aligncenter" class instead. Note however that text can't be wrapped around centered images, and that such aligned images occupy a full line. This implies that if you want to have more than one picture side by side but *************** *** 290,296 **** Dutch: Ramsy de Vos Finish: Mika Majakorpi French: Michel Bibal, David Sahli ! German: Michael Nickel, Ted Box, Philipp Fischer Greek: Andrew Kontokanis Hebrew: Omry Yadan Hungarian: Horvath Zoltan --- 309,315 ---- Dutch: Ramsy de Vos Finish: Mika Majakorpi French: Michel Bibal, David Sahli ! German: Michael Nickel, Ted Box Greek: Andrew Kontokanis Hebrew: Omry Yadan Hungarian: Horvath Zoltan *************** *** 326,358 **** ** Other Credits "Silk" Iconset by Mark James: http//www.famfamfam.com/lab/icons/silk/ "jQuery" by John Resig: http://www.jquery.com - "jQuery ifixpng plugin" by khurshid: http://jquery.khurshid.com/ifixpng.php - === CHANGELOG ========================================================================== - 1.34 - + the theme now also looks for custom header images in the user's uploaded files. See - the updated section about headers in the README file - + added a registration link to the footer for WordPress MU setups - - removed the option to float all images to the right by default - - removed jquery.dimensions.js since it's now part of the jQuery core library - * grammar fixes: German (de_DE) - * MORE code cleanup: the file structure has changed somewhat, but there's now a set of - functions to move the files for you. Just make sure the theme directory is writable - by the web server prior to uploading this version. See the upgrade notes in the README - * updated jQuery to 1.2.6 - * fixed comment numbers overlapping gravatars (except in Opera) - * fixed comment alternate coloring for when trackbacks are displayed separately - * fixed author comment highlighting, now also checks the commenter's email address - * fixed the sidebars always showing up in single post view - * fixed the jQuery/prototype conflicts: this should fix broken lightboxes and all other - prototype-based plugins - * fixed the animation links showing up in comments even when animations are disabled - * fixed adsense units not working in sidebars when placed on the left - 1.33.1 * added an option to wrap one paragraph at most * moved image control options from misc to posts --- 345,356 ---- ** Other Credits "Silk" Iconset by Mark James: http//www.famfamfam.com/lab/icons/silk/ + "IE5.5+ PNG Alpha Fix" by Angus Turnbull: http://www.twinhelix.com "jQuery" by John Resig: http://www.jquery.com === CHANGELOG ========================================================================== 1.33.1 * added an option to wrap one paragraph at most * moved image control options from misc to posts diff -rc mandigo-1.34/archive.php mandigo-1.33.1/archive.php *** mandigo-1.34/archive.php 2008-06-03 20:47:21.000000000 -0400 --- mandigo-1.33.1/archive.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,23 **** ! < class="pagetitle">>

! < class="pagetitle">>
--- 99,105 ---- *************** *** 111,117 **** // the post title ?> ! < class="posttitle posttitle-archive">> ! < class="posttitle posttitle-archive">> --- 145,151 ---- the_content(__('Read the rest of this entry', 'mandigo') .' »'); // if wp supports tags, and if we chose to display tags after the post ! if (function_exists('the_tags') && get_option('mandigo_tags_after')) the_tags(); ?> *************** *** 180,186 **** else { ?> ! < class="center">>

! < class="center">>

--- 188,201 ---- diff -rc mandigo-1.34/archives.php mandigo-1.33.1/archives.php *** mandigo-1.34/archives.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/archives.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 3,21 **** Template Name: Archives Template */ ! global $mandigo_options, $dirs; get_header(); // heading level for page title (h1, h2, div, ...) ! $tag_post_title_multi = $mandigo_options['heading_level_post_title_multi']; ! $tag_page_title = $mandigo_options['heading_level_page_title']; ?>
--- 3,20 ---- Template Name: Archives Template */ ! global $dirs; get_header(); // heading level for page title (h1, h2, div, ...) ! $tag_pagetitle = get_option('mandigo_tag_pagetitle' ); ?>
*************** *** 25,41 **** } ?> ! < class="posttitle">> ! ! < class="pagetitle">:> ! < class="pagetitle">:>
! < class="pagetitle">:>
--- 24,38 ---- } ?> ! < class="pagetitle">:> ! < class="pagetitle">:>
! < class="pagetitle">:>
*************** *** 44,57 **** --- 41,54 ---- diff -rc mandigo-1.34/attachment.php mandigo-1.33.1/attachment.php *** mandigo-1.34/attachment.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/attachment.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,12 **** ! ! "> --- 33,39 ----
*************** *** 44,50 **** // the attachment name ?> ! < class="pagetitle">post_parent); ?> » >


guid); ?>

--- 44,50 ---- // the attachment name ?> ! < class="pagetitle">post_parent); ?> » >


guid); ?>

*************** *** 123,129 **** else { ?> ! <>> ! <>> --- 132,145 ---- Only in mandigo-1.34: backend diff -rc mandigo-1.34/comments.php mandigo-1.33.1/comments.php *** mandigo-1.34/comments.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/comments.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,5 **** !
%s ! %s %s -
-
%s
', ! ( // first %s, highlight author comment class ! ( ! $mandigo_options['comments_highlight_author'] ! && get_comment_author() == $the_author ! && get_comment_author_email() == $the_author_email ! ) ! ? ' authorcomment' : '' ), ! $id, // second %s, the comment id ! ! ( // 3rd %s, gravatar class ! ( ! !$mandigo_options['comments_no_gravatars'] ! && function_exists('get_avatar') ! && function_exists('get_comment_author_email') ! ) ! ? ' avatar' : '' ! ), ! ( // 4th %s, gravatar ! !$mandigo_options['comments_no_gravatars'] ? ( function_exists('get_avatar') && function_exists('get_comment_author_email') ! ? sprintf( ! ' style="background: url(%s) no-repeat top left;"', ! preg_replace( ! '/.+src=[\'"]([^\'"]+)[\'"].+/', ! '\1', ! get_avatar(get_comment_author_email(), '36') ! ) ! ) : '' ) : '' ), ! ( // 5th %s, animation link ! !$mandigo_options['disable_animations'] // if animations are not disabled ! ? sprintf( ! '', ! $id, ! $id ! ) ! : '' ! ), ! ! sprintf( // 6th %s, the user name __('%s says:', 'mandigo'), get_comment_author_link() ), ! ( // 7th %s, whether the comment is pending moderation or not $comment->comment_approved == '0' ? ''. __('Your comment is awaiting moderation.', 'mandigo') .'
' : '' ), ! $id, // 8th %s, the comment id again ! sprintf( // 9th %s, "which date at what time" __('%s at %s', 'mandigo'), get_comment_date(__('F jS, Y', 'mandigo')), get_comment_time() ), ! ( // 10th %s, the edit comment link, if appropriate function_exists('get_edit_comment_link') && current_user_can('edit_post', $post->ID) ? ' - '. apply_filters( 'edit_comment_link', --- 48,119 ---- foreach ($comments as $comment) { // the comment id $id = get_comment_ID(); ! ! // echo get_avatar( 't0m@gawd.net' , $size = '48', $default = $dirs['www']['images'] .'1x1.gif' ); ! ! // a BIG sprintf, not for the faint of heart $comment_list_item = sprintf(' !
  • ! ! ! %s ! %s !
    %s %s
  • ', ! ( // first %s, whether it's an odd/even comment ! ++$oddcomment%2 ! ? 'alt' : '' ), ! ( // second %s, highlight author comment ! $authorcomments && get_comment_author() == $the_author ! ? ' authorcomment' : '' ! ), ! $id, // 3rd 4th and 5th %s, the comment id ! $id, ! $id, ! ! ( // 6th %s, gravatar ! !get_option('mandigo_disable_comment_gravatars') ? ( function_exists('get_avatar') && function_exists('get_comment_author_email') ! ? get_avatar(get_comment_author_email(), '36') : '' ) : '' ), ! sprintf( // 7th %s, the user name __('%s says:', 'mandigo'), get_comment_author_link() ), ! ( // 8th %s, whether the comment is pending moderation or not $comment->comment_approved == '0' ? ''. __('Your comment is awaiting moderation.', 'mandigo') .'
    ' : '' ), ! $id, // 9th %s, the comment id again ! sprintf( // 10th %s, "which date at what time" __('%s at %s', 'mandigo'), get_comment_date(__('F jS, Y', 'mandigo')), get_comment_time() ), ! ( // 11th %s, the edit comment link, if appropriate function_exists('get_edit_comment_link') && current_user_can('edit_post', $post->ID) ? ' - '. apply_filters( 'edit_comment_link', *************** *** 140,162 **** : '' ), ! // 11th %s, the comment itself ! apply_filters('comment_text', get_comment_text()) ! ); // end of big sprintf, phew! // if this is a trackback if ($comment->comment_type == 'trackback') { ! // and we chose to display them either above or below regular comments ! if ($mandigo_options['trackbacks_position'] == 'above' || $mandigo_options['trackbacks_position'] == 'below') { // put them in a separate list $trackback_list[] = $comment_list_item; } ! // if we chose to display them along other comments ! elseif ($mandigo_options['trackbacks_position'] == 'along') { $comment_list[] = $comment_list_item; } } --- 123,143 ---- : '' ), ! apply_filters('comment_text', get_comment_text()) // 11th %s, the comment itself ); // end of big sprintf, phew! // if this is a trackback if ($comment->comment_type == 'trackback') { ! // and we chose to not display them along regular comments ! if (get_option('mandigo_trackbacks') == 'above' || get_option('mandigo_trackbacks') == 'below') { // put them in a separate list $trackback_list[] = $comment_list_item; } ! // otherwise ! elseif (get_option('mandigo_trackbacks') == 'along') { $comment_list[] = $comment_list_item; } } *************** *** 167,174 **** } // end of foreach loop ! // if we have trackbacks and we chose to display them ABOVE comments ! if ($mandigo_options['trackbacks_position'] == 'above' && $trackback_list) { ?>
    --- 148,155 ---- } // end of foreach loop ! // if we have trackbacks and we chose to display them above comments ! if (get_option('mandigo_trackbacks') == 'above' && $trackback_list) { ?>
    *************** *** 180,189 ****
      --- 161,166 ---- *************** *** 193,203 ****
      --- 170,177 ----
      *************** *** 212,218 **** ! // this is displayed when there are no comments else { // if comments are open (but there are no comments) --- 186,192 ---- ! // this is displayed if there are no comments so far else { // if comments are open (but there are no comments) *************** *** 228,235 **** } } // end of 'whether there are comments or not' condition ! ! // if comments are open if ($post->comment_status == 'open') { ?> --- 202,209 ---- } } // end of 'whether there are comments or not' condition ! ! // if comments are open if ($post->comment_status == 'open') { ?> *************** *** 244,251 **** --- 218,225 ---- *************** *** 261,267 **** --- 235,241 ---- *************** *** 281,287 **** // if HTML tags are allowed in comments ! if ($mandigo_options['comments_allow_markup']) { ?>

      XHTML:

      XHTML:

      --- 14,20 ---- */ ! global $dirs, $wpmu; ?> *************** *** 31,38 **** if ($wpmu) { $current_site = get_current_site(); ?> ! WordPress MU', 'mandigo'); ?> & hosted by site_name ?>
      ! Create a new blog and join in the fun! Mandigo theme by tom ! WordPress MU', 'mandigo'); ?> & hosted by site_name ?>, Mandigo theme by tom.
      .
      queries. seconds.
      .
      queries. seconds. --- 62,80 ---- // WordPress footer wp_footer(); ! // get the expected max-width value for the content column ! if (get_option('mandigo_1024')) { ! if (get_option('mandigo_3columns')) { ! $maxw = 455; ! } ! elseif (get_option('mandigo_nosidebars')) { ! $maxw = 915; ! } ! else { ! $maxw = 685; ! } ! } ! else { } ?> *************** *** 111,117 **** if (/^[56]/.test(jQuery.browser.version)) { jQuery.ifixpng('1x1.gif'); jQuery('body, .png').ifixpng(); - jQuery('.commentlist .avatar').height(36); } jQuery('.entry object, .entry img').load(function() { o = jQuery(this); --- 91,96 ---- *************** *** 127,137 **** }); jQuery('*').each(function() { if (this.style.whiteSpace == 'pre') jQuery(this).css({'white-space':'normal'}); }); jQuery('*').each(function() { if (this.style.whiteSpace == 'pre') jQuery(this).css({'white-space':'normal'}); }); ! jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > ) jQuery(this).text(this.innerHTML.replace(/\/([^\/])/g, '/\n$1')); }); jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > ) jQuery(this).text('link'); }); jQuery('.entry').hide(); ! jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > ) jQuery(this).text(this.innerHTML.replace(/\/([^\/])/g,'/\n$1')); }); jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > ) jQuery(this).text('link'); }); jQuery('.entry').hide(); jQuery('#blogname').after(''+ jQuery('#blogname a').html() +"<\/span>"); jQuery('#blogdesc').after(''+ jQuery('#blogdesc' ).html() +'<\/span>'); jQuery.each(['tl','tr','bl','br'],function() { jQuery('#blogname').after(''+ jQuery('#blogname a').html() +'<\/span>'); --- 169,185 ---- // if we chose to apply a drop shadow to blog name & description ! if (get_option('mandigo_drop_shadow')) { ?> jQuery('#blogname').after(''+ jQuery('#blogname a').html() +"<\/span>"); jQuery('#blogdesc').after(''+ jQuery('#blogdesc' ).html() +'<\/span>'); jQuery.each(['tl','tr','bl','br'],function() { jQuery('#blogname').after(''+ jQuery('#blogname a').html() +'<\/span>'); *************** *** 221,262 **** } ! // if sidebar1 should go to the left ! if ($mandigo_options['sidebar_1_position'] == 'left') { ?> - jQuery('#sidebar1 script[src@=googlesyndication]').remove(); t = jQuery('#sidebar1').clone(); jQuery('#sidebar1').remove(); jQuery('td#content').before(t); - jQuery('#sidebar2 script[src@=googlesyndication]').remove(); t = jQuery('#sidebar2').clone(); jQuery('#sidebar2').remove(); jQuery('td#content').before(t); jQuery('#content').css({verticalAlign:'top'}); window.onLoad = function() { jQuery('#content').css({verticalAlign:'top'}); } jQuery('#header .page_item').hover( --- 189,224 ---- } ! // if sidebar1 should go to the left ! if (get_option('mandigo_sidebar1_left')) { ?> t = jQuery('#sidebar1').clone(); jQuery('#sidebar1').remove(); jQuery('td#content').before(t); t = jQuery('#sidebar2').clone(); jQuery('#sidebar2').remove(); jQuery('td#content').before(t); jQuery('#content').css({verticalAlign:'top'}); window.onLoad = function() { jQuery('#content').css({verticalAlign:'top'}); } jQuery('#header .page_item').hover( *************** *** 265,277 **** ul = jQuery(this).find('ul'); y = a.position().top + a.height(); x = a.position().left; x = a.position().left + a.width() - ul.width(); x = a.position().left; x = a.position().left + a.width() - ul.width(); ! ul.css({left:x, top:y}).show(); }, function() { jQuery(this).find('ul').hide(); } ); ! ! jQuery('#page').css({marginBottom:0}); ! ! ! jQuery('.commentlist li:even').addClass('alt'); ! }); ! // ]]> --> --- 244,256 ---- ! ul.css({left:x, top:y}).slideDown().css({zIndex:999}); }, function() { jQuery(this).find('ul').hide(); } ); ! }); // ]]> --> diff -rc mandigo-1.34/functions.php mandigo-1.33.1/functions.php *** mandigo-1.34/functions.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/functions.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,22 **** "<$tag_sidebar class=\"widgettitle\">", + 'after_title' => "\n", + ) + ); + + // sidebar #2 + register_sidebar( + array( + 'before_title' => "<$tag_sidebar class=\"widgettitle\">", + 'after_title' => "\n", + ) + ); + + // top sidebar + register_sidebar( + array( + 'before_title' => "<$tag_sidebar class=\"widgettitle\">", + 'after_title' => "\n", + 'name' => 'Mandigo Top', + ) + ); + + // bottom sidebar + register_sidebar( + array( + 'before_title' => "<$tag_sidebar class=\"widgettitle\">", + 'after_title' => "\n", + 'name' => 'Mandigo Bottom', + ) + ); + } + + + + + + /* ------------------------------------------------- + SEARCH WIDGET + -------------------------------------------------- */ + // define the widget + function widget_mandigo_search() { + global $tag_sidebar; + ?> +
    1. < class="widgettitle">> + +
    2. + +
    3. < class="widgettitle"> > + +
    4. + +
    5. + < class="widgettitle">> + + + Entries (RSS) + + + !
    6. ! --- 254,930 ---- ! // add the links to the theme options pages, and required files ! add_action('admin_menu', 'add_mandigo_options_page'); ! add_action('admin_menu', 'add_mandigo_inserts_page'); ! add_action('admin_menu', 'add_mandigo_readme_page'); ! add_action('admin_menu', 'add_mandigo_farbtastic_js'); ! add_action('admin_head', 'add_mandigo_options_css'); ! add_action('admin_head', 'add_mandigo_farbtastic_css'); ! ! // the functions that load the theme options and readme pages ! function add_mandigo_options_page() { ! global $dirs; ! add_theme_page( ! 'Theme Options', ! ' Theme Options', ! 'edit_themes', ! basename(__FILE__), ! 'mandigo_options_page' ! ); ! } ! function add_mandigo_inserts_page() { ! global $dirs; ! add_theme_page( ! 'HTML Inserts', ! ' HTML Inserts', ! 'edit_themes', ! 'Inserts', ! 'mandigo_inserts_page' ! ); ! } ! function add_mandigo_readme_page() { ! add_theme_page( ! 'README', ! 'README', ! 'switch_themes', ! 'README', ! 'mandigo_readme_page' ! ); ! } ! function add_mandigo_options_css() { ! global $dirs; ! echo ''; ! } ! ! // these two functions include the required files for the colorpicker to work ! function add_mandigo_farbtastic_js() { ! global $dirs; ! wp_enqueue_script('jquery', $dirs['www']['theme'] .'js/jquery.js'); ! wp_enqueue_script('farbtastic', $dirs['www']['theme'] .'js/farbtastic.js'); ! } ! function add_mandigo_farbtastic_css() { ! global $dirs; ! echo ''; ! } + // a few functions to help us with redundant work + function mandigo_set_var($var, $value) { + update_option('mandigo_'. $var, $value); + } + // this one validate hex color codes + function mandigo_color($value, $default) { + if (!preg_match("/^#/", $value)) + $value = '#'. $value; + if (!preg_match("/^#([0-9A-F]{3}){1,2}$/i", $value)) + $value = $default; + return $value; + } + // this one escapes strings + function mandigo_escape($string) { + $string = str_replace('\\"','"', $string); + $string = str_replace("\\'",''', $string); + return $string; + } + + + + // the BIG page + function mandigo_options_page() { + global $dirs, $schemes; + + $ct = current_theme_info(); + + // process the submitted form if any, prior to displaying the options page + if (isset($_POST['updated'])) { + // build an array of pages to exclude + $exclude[] = ''; + foreach ($_POST as $field => $value) { + if (preg_match("/exclude_(\d+)/", $field, $id)) + $exclude[] = $id[1]; + } + + mandigo_set_var('exclude_pages' ,implode(",",$exclude) ); + mandigo_set_var('bgcolor' ,mandigo_color($_POST['bgcolor'] ,'#44484F')); + mandigo_set_var('posts_bgcolor' ,mandigo_color($_POST['posts_bgcolor'] ,'#FAFAFA')); + mandigo_set_var('posts_bdcolor' ,mandigo_color($_POST['posts_bdcolor'] ,'#EEEEEE')); + mandigo_set_var('sidebars_bgcolor' ,mandigo_color($_POST['sidebars_bgcolor'],'#EEEEEE')); + mandigo_set_var('sidebars_bdcolor' ,mandigo_color($_POST['sidebars_bdcolor'],'#DDDDDD')); + mandigo_set_var('scheme' ,$_POST['scheme'] ); + mandigo_set_var('wp' ,$_POST['wp'] ); + mandigo_set_var('scheme_random' ,$_POST['random'] ); + mandigo_set_var('headoverlay' ,$_POST['headoverlay'] ); + mandigo_set_var('bold_links' ,$_POST['boldlinks'] ); + mandigo_set_var('1024' ,$_POST['wide'] ); + mandigo_set_var('nofloat' ,$_POST['nofloat'] ); + mandigo_set_var('footer_stats' ,$_POST['footstats'] ); + mandigo_set_var('nosidebars' ,($_POST['sidebars'] == 0 ? 1:0)); + mandigo_set_var('3columns' ,($_POST['sidebars'] == 2 ? 1:0)); + mandigo_set_var('sidebar1_left' ,$_POST['sidebar1'] ); + mandigo_set_var('sidebar2_left' ,$_POST['sidebar2'] ); + mandigo_set_var('always_show_sidebars' ,$_POST['alwayssidebars'] ); + mandigo_set_var('em_italics' ,$_POST['em'] ); + mandigo_set_var('stroke' ,$_POST['stroke'] ); + mandigo_set_var('headers_random' ,$_POST['randomheaders'] ); + mandigo_set_var('slim_header' ,$_POST['slimheader'] ); + mandigo_set_var('hide_blogname' ,$_POST['hideblogname'] ); + mandigo_set_var('hide_blogdesc' ,$_POST['hideblogdesc'] ); + mandigo_set_var('noborder' ,$_POST['noborder'] ); + mandigo_set_var('small_title' ,$_POST['smalltitle'] ); + mandigo_set_var('wp_fixed' ,$_POST['wpfixed'] ); + mandigo_set_var('wp_repeat' ,$_POST['wprepeat'] ); + mandigo_set_var('wp_position' ,$_POST['wpposition'] ); + mandigo_set_var('number_comments' ,$_POST['numbercomments'] ); + mandigo_set_var('full_search_results' ,$_POST['fullsearchresults'] ); + mandigo_set_var('drop_shadow' ,$_POST['dropshadow'] ); + mandigo_set_var('author_comments' ,$_POST['authorcomments'] ); + mandigo_set_var('floatright' ,$_POST['floatright'] ); + mandigo_set_var('xhtml_comments' ,$_POST['xhtmlcomments'] ); + mandigo_set_var('nojustify' ,$_POST['nojustify'] ); + mandigo_set_var('title_scheme_index' ,mandigo_escape($_POST['title_scheme_index'] )); + mandigo_set_var('title_scheme_single' ,mandigo_escape($_POST['title_scheme_single'] )); + mandigo_set_var('title_scheme_page' ,mandigo_escape($_POST['title_scheme_page'] )); + mandigo_set_var('title_scheme_category' ,mandigo_escape($_POST['title_scheme_category'])); + mandigo_set_var('title_scheme_date' ,mandigo_escape($_POST['title_scheme_date'] )); + mandigo_set_var('title_scheme_search' ,mandigo_escape($_POST['title_scheme_search'] )); + mandigo_set_var('tag_blogname' ,$_POST['tag_blogname'] ); + mandigo_set_var('tag_blogdesc' ,$_POST['tag_blogdesc'] ); + mandigo_set_var('tag_posttitle_multi' ,$_POST['tag_posttitle_multi'] ); + mandigo_set_var('tag_posttitle_single' ,$_POST['tag_posttitle_single'] ); + mandigo_set_var('tag_pagetitle' ,$_POST['tag_pagetitle'] ); + mandigo_set_var('tag_sidebar' ,$_POST['tag_sidebar'] ); + mandigo_set_var('tags_after' ,$_POST['tags_after'] ); + mandigo_set_var('no_animations' ,$_POST['no_animations'] ); + mandigo_set_var('trackbacks' ,$_POST['trackbacks'] ); + mandigo_set_var('fixes_comments_1' ,$_POST['fixes_comments_1'] ); + mandigo_set_var('fixes_comments_2' ,$_POST['fixes_comments_2'] ); + mandigo_set_var('fixes_whitespace_pre' ,$_POST['fixes_whitespace_pre'] ); + mandigo_set_var('fixes_touch_content' ,$_POST['fixes_touch_content'] ); + mandigo_set_var('collapse_posts' ,$_POST['collapse_posts'] ); + mandigo_set_var('headnav_alignment' ,$_POST['headnav_alignment'] ); + mandigo_set_var('date_format' ,$_POST['date_format'] ); + mandigo_set_var('no_submenus' ,$_POST['no_submenus'] ); + mandigo_set_var('disable_comment_gravatars' ,$_POST['comment_gravatars'] ); + mandigo_set_var('clear_all_paragraphs' ,$_POST['clear_all_paragraphs'] ); + } + + // store some of the options in variables (some = the ones we will use more than once) + $exclude = split(',', get_option('mandigo_exclude_pages')); + $scheme = get_option('mandigo_scheme' ); + $headoverlay = get_option('mandigo_headoverlay' ); + $date_format = get_option('mandigo_date_format' ); + $sidebar1 = get_option('mandigo_sidebar1_left' ); + $sidebar2 = get_option('mandigo_sidebar2_left' ); + $headnav_alignment = get_option('mandigo_headnav_alignment' ); + $wp = get_option('mandigo_wp' ); + $stroke = get_option('mandigo_stroke' ); + $wp_fixed = get_option('mandigo_wp_fixed' ); + $wp_repeat = get_option('mandigo_wp_repeat' ); + $trackbacks = get_option('mandigo_trackbacks' ); + + $tag_blogname = get_option('mandigo_tag_blogname' ); + $tag_blogdesc = get_option('mandigo_tag_blogdesc' ); + $tag_posttitle_multi = get_option('mandigo_tag_posttitle_multi' ); + $tag_posttitle_single = get_option('mandigo_tag_posttitle_single' ); + $tag_pagetitle = get_option('mandigo_tag_pagetitle' ); + $tag_sidebar = get_option('mandigo_tag_sidebar' ); + + // this remote path to the current scheme needs to be reset in some cases + $dirs['www']['scheme'] = $dirs['www']['scheme'] . "$scheme/"; + + // build a list of selectable schemes from the array we built earlier + foreach ($schemes as $i) { + $select_schemes .= sprintf( + '%s  ', + $i, + ( + $scheme == $i + ? 'checked="checked"' + : '' + ), + $dirs['www']['schemes'] . $i, + $i + ); + } + + // browse through the images/patterns/ dir for image files and build a stack of option fields + $patternsdir = opendir($dirs['loc']['patterns']); + $select_patterns = ''; + while (false !== ($i = readdir($patternsdir))) { + if (preg_match("/\.(?:jpe?g|png|gif|bmp)$/i",$i)) + $select_patterns .= sprintf( + '', + $i, + ( + $i == $wp + ? ' selected="selected"' + : '' + ), + $i + ); + } + + // build the list of pages, for the 'pages to be excluded' part + $pages = &get_pages('sort_column=menu_order'); + foreach ($pages as $i) { + if (!$i->post_parent) + $select_pages .= sprintf( + ' %s
      ', + $i->ID, + ( + array_search($i->ID, $exclude) + ? ' checked' + : '' + ), + $i->post_title + ); + } + + // output the beast + echo ' +

      Are you using the latest version? - If you enjoy Mandigo, please consider '. (rand(0,1) ? 'making a donation' : 'making a donation') .'.

      +
      +

      Mandigo Options

      + + +
      + +

      + + + +
      + Color Scheme + '.$select_schemes.' +

      + + I like them all, change schemes randomly!

      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + +
      Background color: + restore default +
      Background pattern: + +
      Attachment : + scroll   + fixed +
      Repeat : + +
      Position : + help +
      + +
      + + + + + + + + + + + + + + + + + +
      Posts background color : restore default
      Posts border color : restore default
      Sidebars background color : restore default
      Sidebars border color : restore default
      +
      +
      + + + +
      + Layout Options + Use the 1024px theme look instead of the default 800px one
      + Show sidebars even in single post view
      + + Columns:

      + +
      + + + + + + + + + +
      First sidebar : + left   + right +
      Second sidebar : + left   + right +
      +
      +
      + + + +
      + Header + Use slim (100px smaller) headers
      + Use random images from the images/headers/ subfolder
      + It is also possible to use a different image on each page (per-page header images). Please consult the README page for more information.

      + +
      + Reduce the size font for the blog name (useful for looong titles)
      + Do not display the blog name
      + Do not display the tagline (blog description)
      + Add a drop shadow to blog name and description

      + Apply a black stroke to blog name and blog description for better readability on lighter header images:

      + off   + on

      + +
      + Disable submenus
      + Navigation position :

      + Apply a translucent black stripe to the header navigation for better readability on light backgrounds:

      + off   + on

      + +
      + '. $select_pages .'
      +
      +
      + + + +
      + Posts + Automatically collapse posts in archives & categories
      + Display tags after the content instead of next to categories (WP2.3+)
      + Align content to the left instead of using justify alignment
      + Display <em> tags as italics

      + +
      +

      + +
      + Clear all paragraphs (wraps text of one paragraph at most)
      + Do not wrap text around images at all
      + Align images to the right (requires text wrapping)
      + Display images without a border

      + +
      +
      + + + +
      + Comments + Highlight comments made by the author of the current post
      + Number comments
      + Display allowed XHTML tags above the comment field
      + Do not display gravatars
      + Display trackbacks:

      +
      +
      + + + +
      + SEO Options + +
      + Customize your title tag. Consult the README page for a list of available variables. + + + + + + + + + + + + + + + + + + + + + + + + + +
      Default (index.php):
      Single posts (single.php):
      Pages (page.php):
      Category Archive (archive.php):
      Date Archive (archive.php):
      Search Results (search.php):

      + +
      + Customize which tags you want to use for the blog name, blog description, posts title, ... This does not affect styles. + + + + + + + + + + + + + + + + + + + + + + + + + +
      Blog name: + +
      Blog description (tagline): + +
      Post title (when showing multiple posts): + +
      Post title (single post view): + +
      Page title (\'Archives\', \'Search Results\'): + +
      Widget title: + +
      +
      +
      + + + +
      + Layout Fixes + You may want to experiment with these settings if you encounter problems with the columns showing up wider than they normally should:
      + Fix elements which use a "white-space: pre" style (prevents lines from being wrapped in IE)
      + Split long urls in users comments at slashes (inserts linebreaks at /\'s)
      + Replace long urls in users comments with "link"
      + Force the browser to re-render the content column
      +
      +
      + + + +
      + Miscellaneous Options + +
      + Disable js animations (also removes show/hide buttons in posts)

      + +
      + Display all links in bold for better readability

      + +
      + Display full search results, not just titles and metadata
      + Display rendering time and SQL statistics in the footer
      +
      + +

      +
      + +
      + + + +
      +

      Version Checker

      + +
      + + + +
      +

      Preview (updated when options are saved)

      + +
      '; + } // end of mandigo_options_page() + + + + function mandigo_set_insert($key, $value) { + update_option('mandigo_inserts_'.$key, str_replace("\\", "", $value)); + } + // the HTML inserts page + function mandigo_inserts_page() { + if (isset($_POST['updated'])) { + mandigo_set_insert('header',$_POST['header']); + mandigo_set_insert('body' ,$_POST['body'] ); + mandigo_set_insert('top' ,$_POST['top'] ); + mandigo_set_insert('footer',$_POST['footer']); + } + + echo ' +
      +

      Mandigo Options

      + +
      + + +

      + +
      + HTML Inserts + +

      The fields on this page allow you to save pieces of code required by third-party plugins and widgets. You can also use them to save Google Maps/Analytics/AdSense javascript snippets, or whatever you want.

      + +

      This way you will never have to edit the source files manually each time you update Mandigo.

      + +

      NO validation is made on the field values, so be careful not to paste invalid code. Also note that backslashes will be stripped.

      + +
      + right before </HEAD> (useful for links to external stylesheets, javascript files. This is also the best place for your css rules):
      +

      + + custom <BODY> tag (useful for onload actions):
      +

      + + right before the content and sidebars area. This differs from the top widget container in that it displays on all pages, and it spans the whole layout width.
      +

      + +
      + before the "Powered by WordPress" credits, still inside the #main div. This differs from the bottom widget container in that it displays on all pages, and it spans the whole layout width.
      + +
      + +

      +
      +
      '; + } + + + // the readme page + function mandigo_readme_page() { + echo '
      '; + echo '
      ';
      + 		echo htmlspecialchars(file_get_contents(TEMPLATEPATH.'/README.txt'));
      + 		echo '
      '; + echo '
      '; + } ?> diff -rc mandigo-1.34/header.php mandigo-1.33.1/header.php *** mandigo-1.34/header.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/header.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 5,22 **** <?php - global $mandigo_options, $mandigo_version, $schemes, $dirs; $title = ''; // get the appropriate title scheme depending on the type of page ! if (is_single()) $title = $mandigo_options['title_scheme_single']; ! elseif (is_page()) $title = $mandigo_options['title_scheme_page']; elseif (is_archive()) { ! if (is_day() || is_month() || is_year()) $title = $mandigo_options['title_scheme_date']; ! else $title = $mandigo_options['title_scheme_category']; } ! elseif (is_search()) $title = $mandigo_options['title_scheme_search']; ! else $title = $mandigo_options['title_scheme_index']; // proceed with tag substitution $title = str_replace( --- 5,21 ---- <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php $title = ''; // get the appropriate title scheme depending on the type of page ! if (is_single()) $title = get_option('mandigo_title_scheme_single'); ! elseif (is_page()) $title = get_option('mandigo_title_scheme_page'); elseif (is_archive()) { ! if (is_day() || is_month() || is_year()) $title = get_option('mandigo_title_scheme_date'); ! else $title = get_option('mandigo_title_scheme_category'); } ! elseif (is_search()) $title = get_option('mandigo_title_scheme_search'); ! else $title = get_option('mandigo_title_scheme_index'); // proceed with tag substitution $title = str_replace( *************** *** 36,145 **** ); // category tag substitution ! if (single_cat_title('',false)) ! $title = str_replace('%category%', single_cat_title('', false), $title); else { $categories = str_replace('%category%', get_the_category_list(', '), $title); $title = preg_replace('/<[^>]+>/', '', $categories); } // date tag substitution ! if (is_day() ) $title = str_replace('%date%', get_the_time(__('l, F jS, Y','mandigo')), $title); ! elseif (is_month()) $title = str_replace('%date%', get_the_time(__('F, Y','mandigo')) , $title); ! elseif (is_year() ) $title = str_replace('%date%', get_the_time('Y') , $title); // output the result echo $title; - ?> ! ID .'.')) { ! $user_header = $file; ! } ! } ! ! // if we didn't find one but the "random headers" option is enabled ! if (!$user_header && $mandigo_options['header_random_image']) { ! shuffle($user_headers); ! $user_header = array_shift($user_headers); ! } ! ! // if we found a header to display at one step or another, ! if ($user_header) { ! // translate its address ! $user_header = str_replace( ! ABSPATH . get_option('upload_path'), ! get_option('fileupload_url'), ! $user_header ! ); ! // and add it to last minuste css rules ! $noheaderimg = 1; ! $lastminutecss[] = sprintf( ! ' #headerimg { background: url(%s) bottom center no-repeat; }', ! $user_header ! ); ! } } ! ! // if we didn't find a custom header in the user's uploaded files ! if (!$noheaderimg) { ! // if there's a .jpg file named after the current post id in the headers/ folder ! if (file_exists($dirs['loc']['headers'] . $post->ID .'.jpg')) { $noheaderimg = 1; $lastminutecss[] = sprintf( ! ' #headerimg { background: url(%s.jpg) bottom center no-repeat; }', ! $dirs['www']['headers'] . $post->ID ); } - - // if we didn't find one but the "random headers" option is enabled - elseif ($mandigo_options['header_random_image']) { - // get a list of images in headers/ - $headersdir = opendir($dirs['loc']['headers']); - while (false !== ($file = readdir($headersdir))) { - if (preg_match('/\.(?:jpe?g|png|gif|bmp)$/i', $file)) - $headers[] = $file; - } - - // if we have found at least one - if (count($headers)) { - $noheaderimg = 1; - $lastminutecss[] = sprintf( - ' #headerimg { background: url(%s) bottom center no-repeat; }', - str_replace( - ' ', - '%20', - $dirs['www']['headers'] . $headers[array_rand($headers, 1)] - ) - ); - } - } } --- 35,105 ---- ); // category tag substitution ! if (single_cat_title('',false)) $title = str_replace('%category%', single_cat_title('',false), $title); else { $categories = str_replace('%category%', get_the_category_list(', '), $title); $title = preg_replace('/<[^>]+>/', '', $categories); } // date tag substitution ! if (is_day() ) $title = str_replace('%date%',get_the_time(__('l, F jS, Y','mandigo')),$title); ! elseif (is_month()) $title = str_replace('%date%',get_the_time(__('F, Y','mandigo')) ,$title); ! elseif (is_year() ) $title = str_replace('%date%',get_the_time('Y') ,$title); // output the result echo $title; ?> ! ID .'.jpg')) { ! $noheaderimg = 1; ! $lastminutecss[] = sprintf( ! " #headerimg { background: url(%s.jpg) bottom center no-repeat; }\n", ! $dirs['www']['headers'] . $post->ID ! ); } ! ! ! ! // if the "random headers" option is enabled ! elseif (get_option('mandigo_headers_random')) { ! // get a list of images in headers/ ! $headersdir = opendir($dirs['loc']['headers']); ! while (false !== ($file = readdir($headersdir))) { ! if (preg_match('/\.(?:jpe?g|png|gif|bmp)$/i', $file)) ! $headers[] = $file; ! } ! ! // if we have found at least one ! if (count($headers)) { $noheaderimg = 1; $lastminutecss[] = sprintf( ! " #headerimg { background: url(%s) bottom center no-repeat; }\n", ! str_replace( ! ' ', ! '%20', ! $dirs['www']['headers'] . $headers[array_rand($headers, 1)] ! ) ); } } *************** *** 151,158 **** --- 111,116 ---- *************** *** 166,172 **** ! jquery.js"> ! --- 140,146 ---- } ! // HTML Inserts: head echo get_option('mandigo_inserts_header'); ?> *************** *** 200,207 **** // heading levels for blog name & description (h1, h2, div, ...) ! $tag_blogname = $mandigo_options['heading_level_blogname']; ! $tag_blogdesc = $mandigo_options['heading_level_blogdesc']; ?>
      --- 158,165 ---- // heading levels for blog name & description (h1, h2, div, ...) ! $tag_blogname = get_option('mandigo_tag_blogname'); ! $tag_blogdesc = get_option('mandigo_tag_blogdesc'); ?>
      *************** *** 210,216 ****
      < class="blogname" id="blogname">> < class="blogname" id="blogname">> < class="blogdesc" id="blogdesc">> < class="blogdesc" id="blogdesc">> tag is the link to the homepage ?> !
      • 'menu_order', ! 'depth' => ($mandigo_options['header_navigation_no_submenus'] ? 1 : 2), 'title_li' => '', ! 'exclude' => implode(',', $mandigo_options['header_navigation_exclude_pages']), ) ); // if you want to add custom static links at the end, use something similar to the following --- 189,204 ---- // the first
      • tag is the link to the homepage ?> !
        • 'menu_order', ! 'depth' => (get_option('mandigo_no_submenus') ? 1 : 2), 'title_li' => '', ! 'exclude' => get_option('mandigo_exclude_pages'), ) ); // if you want to add custom static links at the end, use something similar to the following Only in mandigo-1.33.1/images: attention_catcher.png Only in mandigo-1.33.1/images: farbtastic_marker.png Only in mandigo-1.33.1/images: farbtastic_mask.png Only in mandigo-1.33.1/images: farbtastic_wheel.png diff -rc mandigo-1.34/index.php mandigo-1.33.1/index.php *** mandigo-1.34/index.php 2008-06-03 20:47:22.000000000 -0400 --- mandigo-1.33.1/index.php 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,11 **** --- 49,55 ---- *************** *** 60,66 **** // the post title ?> ! < class="posttitle">> ! < class="posttitle">>
      --- 95,101 ---- the_content(__('Read the rest of this entry', 'mandigo') .' »'); // if wp supports tags, and if we chose to display tags after the post ! if (function_exists('the_tags') && get_option('mandigo_tags_after')) the_tags(); ?>
      *************** *** 129,135 **** else { ?> ! < class="center">>

      ! < class="center">>

      --- 149,162 ---- Only in mandigo-1.33.1/js: farbtastic.js Only in mandigo-1.33.1/js: jquery.dimensions.js diff -rc mandigo-1.34/js/jquery.js mandigo-1.33.1/js/jquery.js *** mandigo-1.34/js/jquery.js 2008-06-03 20:47:21.000000000 -0400 --- mandigo-1.33.1/js/jquery.js 2008-04-28 08:56:54.000000000 -0400 *************** *** 1,32 **** /* ! * jQuery 1.2.6 - New Wave Javascript * * Copyright (c) 2008 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * ! * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ ! * $Rev: 5685 $ */ ! (function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else ! return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else ! return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else ! selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else ! this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else ! return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuer