vHosting 0
vhs728x90
Pagina 1 di 4 123 ... UltimaUltima
Risultati da 1 a 25 di 79
  1. #1
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Exclamation Problema con Aggregatore

    Ciao a tutti ragazzi, volevo segnalarvi alcuni problemi che stò riscontrando con un aggregatore sviluppato con Wordpress ed il plugin Wp-o-Matic.

    Il problema lo trovo nell' importazione dei feed, vorrei poter importare solo le prime 2 righe di testo (senza immagini)...

    e sotto le 2 righe di testo che fungeranno da descrizione vorrei impostare un iframe che da la possibilità di vedere la news sul sito originale...

    qualche consiglio? Grazie mille

    Matteo

    Di seguito vi allego anche l'iframe che avevo pensato di allegare nel codice option di wp-o-matic (che però non mi viene visualizzato sempre.... non so perche, forse per la lunghezza del testo?):

    <div style=\\\'width:30%;float:left\\\'>{content}</div>
    <div style=\\\'width:70%;float:left\\\'><iframe framborder=\\\'0\\\' width=\"950\" height="700" src={permalink}></iframe></div>
    <div style=\\\'clear:both;\\\'></div>

  2. #2
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Mi sai dire che file di template usa Wp-o-Matic per visualizzare i feed, scusa la domanda ma non ho mai usato il plugin e non ho idea di come si integra in WP a livello template.
    Magari se hai il sito in cui lo usi postalo pure.

    Per l'iframe come mai tutti quegli slash nel codice?
    prova così:
    Codice:
    <div style="width:30%;float:left;">{content}</div>
    <div style="width:70%;float:left;"><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  3. #3
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Mi sai dire che file di template usa Wp-o-Matic per visualizzare i feed, scusa la domanda ma non ho mai usato il plugin e non ho idea di come si integra in WP a livello template.
    Magari se hai il sito in cui lo usi postalo pure.

    Per l'iframe come mai tutti quegli slash nel codice?
    prova così:
    Codice:
    <div style="width:30%;float:left;">{content}</div>
    <div style="width:70%;float:left;"><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    Grazie mille per il tuo aiuto, il sito purtroppo ancora non è aperto al pubblico proprio per questi problemini... se puoi darmi una mano ti posso dare via PM i dati del sito "beta" cosi vedi anche il file template...

    fammi sapere e ancora grazie :)

  4. #4
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Comunque ho provato ad inserire il nuovo iframe che mi hai passato solo che senza / il sito si sfasa, l' iframe continua sul testo della news e "impalla" la grafica..

    Il problema principale comunque riguarda la lunghezza del post... alcuni feed hanno tutto il testo della news ed alcuni con le immagini.. devo trovare un modo per poter inserire solo le prime 2 righe di testo, un po' come avviene nella descrizione delle categorie...

    attendo tue informazioni.. thx

  5. #5
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Posta il file index.php del tema che usi
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  6. #6
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Posta il file index.php del tema che usi
    Ecco il file index.php:

    Codice:
    <?php get_header(); ?>
        <div id="layout-post"><!-- BEGIN POST LAYOUT -->
            <div class="layout-top">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <div class="post-top"></div>
                <div class="post-repeat">
                    <h1><?php the_title(); ?></h1>
                    <span id="date">Published on <?php the_time('F j, Y'); ?> by <?php the_author_posts_link(); ?> &nbsp;&nbsp;&middot;&nbsp;&nbsp; <?php comments_number('No Comments','1 Comment','% Comments'); ?></span>
                    <?php if ( $layoutimageinpost = get_option('beebtheme_layoutimageinpost') ) { ?> 
                        <div style="clear: both;"></div>
                        <div style="display:block;float:right;padding:18px 0px 0px 15px;">
                            <?php the_post_thumbnail(array( 397,260 ), array( 'class' => 'img-slider' )); ?>
                        </div>
                    <?php } else { ?>
                    <?php } ?>
                    <?php the_content(__('Keep Reading'));?>
                    <?php
                    echo get_the_tag_list('<div style="clear: both; margin: 0px 0px 20px 0px; padding: 0px 0px 10px 0px; border-bottom: 1px solid #dbdbdb;"></div><p><b>Tags:&nbsp;</b> ',', ','</p>');
                    ?>
                <?php endwhile; else: ?>
                    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
                <?php endif; ?>
                </div>
                <div class="post-bottom"></div>
                <?php comments_template(); // Get wp-comments.php template ?>
            </div>
            <div id="layout-right">
                <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Post Column') ) : else : ?>
            <div class="widget-top">Post Column</div>
            <div class="nowidget"><a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets">Add Widgets</a></div>
            <div class="widget-bottom"></div>
            <?php endif; ?>
            </div>
        </div><!-- END POST LAYOUT -->
    <?php get_footer(); ?>

  7. #7
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    - Inserisci in functions.php questa funzione:
    Codice:
    function new_excerpt_length($length) {
        return 20;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    per gestire la lunghezza del post in home cambia il valore 20 (che sarebbero le parole visualizzate) a piacere.

    - Cambia il file index.php che hai postato con questo (fai un backup del file mi raccomando):
    Codice:
    <?php get_header(); ?>
        <div id="layout-post"><!-- BEGIN POST LAYOUT -->
            <div class="layout-top">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <div class="post-top"></div>
                <div class="post-repeat">
                    <h1><?php the_title(); ?></h1>
                    <span id="date">Published on <?php the_time('F j, Y'); ?> by <?php the_author_posts_link(); ?> &nbsp;&nbsp;&middot;&nbsp;&nbsp; <?php comments_number('No Comments','1 Comment','% Comments'); ?></span>
                        <div style="clear: both;"></div>
                <?php the_excerpt(); ?>
                <?php the_tags('<strong>Tags - </strong> ',' , '); ?>
                <?php endwhile; else: ?>
                    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
                <?php endif; ?>
                </div>
                <div class="post-bottom"></div>
                <?php comments_template(); // Get wp-comments.php template ?>
            </div>
            <div id="layout-right">
                <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Post Column') ) : else : ?>
            <div class="widget-top">Post Column</div>
            <div class="nowidget"><a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets">Add Widgets</a></div>
            <div class="widget-bottom"></div>
            <?php endif; ?>
            </div>
        </div><!-- END POST LAYOUT -->
    <?php get_footer(); ?>
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  8. #8
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    File index.php cambiato, per la funzione invece appena la inserisco mi genera questo errore:

    Fatal error: Cannot redeclare new_excerpt_length() (previously declared in /membri/NOMESITO/wp-content/themes/thebeeb3/functions.php:605) in /membri/NOMESITO/wp-content/themes/thebeeb3/functions.php on line 1572

    qualche suggerimento? :P

    Thx a lot

  9. #9
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Prova a postare functions.php
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  10. #10
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Prova a postare functions.php
    functions.php:

    Codice:
    <?php
      
    $themename = "Beeb";
    $shortname = "beebtheme";
    
    $layoutfront_path = TEMPLATEPATH . '/layouts/align/'; 
    $layouts = array();
    
    if ( is_dir($layoutfront_path) ) {
        if ($layoutfront_dir = opendir($layoutfront_path) ) { 
            while ( ($layoutfront_file = readdir($layoutfront_dir)) !== false ) {
                if(stristr($layoutfront_file, ".php") !== false) {
                    $layouts[] = $layoutfront_file;
                }
            }    
        }
    }
    
    $layouts_tmp = asort($layouts);
    $layouts_tmp = array_unshift($layouts, "");
    
    
    
    $layoutscroll_path = TEMPLATEPATH . '/layouts/scroller/'; 
    $layoutss = array();
    
    if ( is_dir($layoutscroll_path) ) {
        if ($layoutscroll_dir = opendir($layoutscroll_path) ) { 
            while ( ($layoutscroll_file = readdir($layoutscroll_dir)) !== false ) {
                if(stristr($layoutscroll_file, ".php") !== false) {
                    $layoutss[] = $layoutscroll_file;
                }
            }    
        }
    }
    
    $layoutss_tmp = asort($layoutss);
    $layoutss_tmp = array_unshift($layoutss, "");
    
    
    
    
    
    $dip_options = array (
        'welcome' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Options</h2></div>",
                      "type" => "heading"),
    
      ),
    
        'global' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Global Options</h2></div>",
                      "type" => "heading"),
                    
                    
            array(    "name" => "Content Scroller",
                            "desc" => "Check to <b>enable</b> the frontpage content scroller.<br /><br />",
                            "id" => $shortname."_layoutscroller",
                            "std" => "true",
                            "type" => "checkbox"),
                    
                    array(    "name" => "Scroller Alignment",
                            "desc" => "Choose the alignment of your frontpage scroller.<br /><br /><br />",
                            "id" => $shortname."_layoutfront",
                            "std" => "Select an alignment:",
                            "type" => "select",
                            "options" => $layouts),
                            
                    array(    "name" => "Scroller Items",
                            "desc" => "Choose how many items to show in the scroller.<br /><br /><br />",
                            "id" => $shortname."_layoutscroll",
                            "std" => "Select a number:",
                            "type" => "select",
                            "options" => $layoutss),
                    
                    
                
            array(    "name" => "Todays Date",
                            "desc" => "Check to <b>disable</b> todays date from your header.<br /><br />",
                            "id" => $shortname."_layoutdate",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Search Field",
                            "desc" => "Check to <b>disable</b> the search field from your header.<br /><br />",
                            "id" => $shortname."_layoutsearch",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Pages Menu",
                            "desc" => "Check to <b>disable</b> the pages menu in your header.<br /><br />",
                            "id" => $shortname."_layoutpages",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Categories Menu",
                            "desc" => "Check to <b>disable</b> the main dropdown menu.<br /><br />",
                            "id" => $shortname."_layoutnav",
                            "std" => "true",
                            "type" => "checkbox"),
                            
                            
                            
            array(    "name" => "Thumbnail in Posts",
                            "desc" => "Check to <b>enable</b> all thumbnails to be shown within your post text.<br /><br />",
                            "id" => $shortname."_layoutimageinpost",
                            "std" => "true",
                            "type" => "checkbox"),                
    
                            
    
              array(    "name" => "Custom RSS feed",
                      "desc" => "Enter your custom RSS feed URL from services such as <a href=\"http://feedburner.com\" target=\"_blank\">Feedburner</a>.<br />(or <b>leave blank</b> to use the standard Wordpress RSS feed)<br /><br />",
                      "id" => $shortname."_customrss",
                      "std" => "",
                      "type" => "textarea"),            
        ),
            
        'misc' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Miscellaneous Settings</h2></div>",
                      "type" => "heading"),
    
              array(    "name" => "META Keywords",
                      "desc" => "Add specific keywords about your site.<br />(seperate with comma's)<br /><br />",
                      "id" => $shortname."_keywords",
                      "std" => "",
                      "type" => "textarea"),
    
              array("name" => "META Description",
                      "desc" => "Enter a description of your site.<br /><br />",
                      "id" => $shortname."_description",
                      "std" => "",
                      "type" => "textarea"),
    
              array(    "name" => "Google Analytics",
                      "desc" => "Add your Google Analytics tracking code here.<br />(or leave blank to <u>not</u> track your stats)<br /><br />",
                      "id" => $shortname."_analytics",
                      "std" => "",
                      "type" => "textarea"),
                    
                  array(    "name" => "After Body",
                      "desc" => "If you need to add HTML code <b>after the closing body tag</b> enter it in the box<br />above, it has no specific styling applied to it.<br /><br />",
                      "id" => $shortname."_afterbody",
                      "std" => "",
                      "type" => "textarea"),
    
        ),
        
        'footer' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Footer Settings</h2></div>",
                      "type" => "heading"),
    
              array(    "name" => "Copyright Notice",
                      "desc" => "Enter your own custom copyright text in the box above.<br /><br /><b>EXAMPLE:</b><br /> COPYRIGHT &copy; 2002 - 2010 Your Company Name, LLC. All rights reserved.<br />(You can also use basic HTML to add links)<br /><br />",
                      "id" => $shortname."_copyright",
                      "std" => "",
                      "type" => "textarea"),
                                    
                                    
              array(    "name" => "Credits Editor",
                      "desc" => "Enter your own custom credits text in the box above.<br />(You can also use basic HTML to add links)<br /><br />",
                      "id" => $shortname."_credits",
                      "std" => "",
                      "type" => "textarea"),
                    
                    
            ),
        
    );
          
    function mytheme_add_admin() {
    
        global $themename, $shortname,$menu,$dip_options;
        $arrs =array(
           'mt_dip_manage_page',
           'mt-dip-global-settings-page',
           'mt-dip-misc-settings-page',
           'mt-dip-footer-settings-page',
           'mt-dip-page1name-page',
           'mt-dip-page2name-page',
        );
        if ( in_array($_REQUEST['page'],$arrs) ) {
            if ( 'save' == $_REQUEST['action'] ) {
              foreach ($dip_options[$_REQUEST['dip']] as $value) {
                        if($value['type'] != 'multicheck'){
                            update_option( $value['id'], $_REQUEST[ $value['id'] ] ); 
                        }else{
                            foreach($value['options'] as $mc_key => $mc_value){
                                $up_opt = $value['id'].'_'.$mc_key;
                                update_option($up_opt, $_REQUEST[$up_opt] );
                            }
                        }
                    }
    
                    foreach ($dip_options as $value) {
                        if($value['type'] != 'multicheck'){
                            if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } 
                        }else{
                            foreach($value['options'] as $mc_key => $mc_value){
                                $up_opt = $value['id'].'_'.$mc_key;                        
                                if( isset( $_REQUEST[ $up_opt ] ) ) { update_option( $up_opt, $_REQUEST[ $up_opt ]  ); } else { delete_option( $up_opt ); } 
                            }
                        }
                    }
                    //header("Location: themes.php?page=".$_REQUEST['page']."&saved=true");
                   // die;
    
            } else if( 'reset' == $_REQUEST['action'] ) {
    
                foreach ($dip_options as $value) {
                    if($value['type'] != 'multicheck'){
                        delete_option( $value['id'] ); 
                    }else{
                        foreach($value['options'] as $mc_key => $mc_value){
                            $del_opt = $value['id'].'_'.$mc_key;
                            delete_option($del_opt);
                        }
                    }
                }
                //header("Location: themes.php?page=".$_REQUEST['page']."&reset=true");
                //die;
    
            }
        }
    
    
      // Add a new top-level menu (ill-advised):
          add_menu_page('The Beeb', 'The Beeb', 10, 'mt-dip-global-settings-page', 'mt_dip_global_settings_page');
          unset($menu[90][1]);
          // Global Settings:
          add_submenu_page('mt-dip-global-settings-page', 'Global Options', 'Global Options', 8, 'mt-dip-global-settings-page', 'mt_dip_global_settings_page');
          // Miscellaneous Settings:
          add_submenu_page('mt-dip-global-settings-page', 'Miscellaneous', 'Miscellaneous', 8, 'mt-dip-misc-settings-page', 'mt_dip_misc_settings_page');
      // Footer Settings:
           add_submenu_page('mt-dip-global-settings-page', 'Footer Settings', 'Footer Settings', 8, 'mt-dip-footer-settings-page', 'mt_dip_footer_settings_page');
    }
    
    function mytheme_admin() {
    
        global $themename, $shortname, $dip_options;
    
        if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
        if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
        
    }
    
    
    function mytheme_wp_head() { 
        $stylesheet = get_option('diplomat_alt');
        if($stylesheet != ''){?>
    
    <?php }
    } 
    
    add_action('wp_head', 'mytheme_wp_head');
    add_action('admin_menu', 'mytheme_add_admin'); 
    ?>
    <?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
        $content = get_the_content($more_link_text, $stripteaser, $more_file);
        $content = apply_filters('the_content', $content);
        $content = str_replace(']]>', ']]&gt;', $content);
        $content = strip_tags($content);
    
       if (strlen($_GET['p']) > 0) {
          echo "<p>";
          echo $content;
          echo "&nbsp;<a href='";
          the_permalink();
          echo "'>"."Read More &rarr;</a>";
          echo "</p>";
       }
       else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
            $content = substr($content, 0, $espacio);
            $content = $content;
            echo "<p>";
            echo $content;
            echo "...";
            echo "&nbsp;<a href='";
    
            the_permalink();
            echo "'>".$more_link_text."</a>";
            echo "</p>";
       }
       else {
          echo "<p>";
    
          echo $content;
          echo "&nbsp;<a href='";
          the_permalink();
          echo "'>"."Read More &rarr;</a>";
          echo "</p>";
       }
    }
    
    /*
    function mt_dip_page1_function_callback(){
      global $shortname;
      echo "<script type='text/javascript' src='".get_template_directory_uri()."/main.js'></script>";
    
        $dip_options =  array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Option page 1</h2></div>",
                      "type" => "heading"),
             
          array(    "name" => "screenshot",
                "id" => "screenshot",
            'url'=>get_template_directory_uri()."/screenshot.png",
                "type" => "screenshot"),
      );
        dip_template($dip_options,'welcome');
    }
    function mt_dip_page2_function_callback(){
        $dip_options =  array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Option page 2</h2></div>",
                      "type" => "heading")
      );
        dip_template($dip_options,'welcome');
    }
    */
    
    function mt_dip_manage_page(){
        global $dip_options;
        dip_template($dip_options['welcome'],'welcome');
    }
    function mt_dip_global_settings_page(){
        global $dip_options;
        dip_template($dip_options['global'],'global');
    }
    function mt_dip_misc_settings_page(){
        global $dip_options;
        dip_template($dip_options['misc'],'misc');
    }
    function mt_dip_footer_settings_page(){
        global $dip_options;
        dip_template($dip_options['footer'],'footer');
    }
    
    
    function dip_template($options=array(),$dip=''){
      if(count($options)!=1){
      ?><div class="wrap">
    
      <form method="post" action="" enctype="multipart/form-data"><?php
    }?><table class="widefat fixed" style="max-width:800px;margin-top:20px;background: #ffffff" cellspacing="0">
    <?php
    foreach ($options as $value) { 
        $class=($class!='alternate')?"alternate":"alternate1";
        switch ( $value['type'] ) {
            case 'file':
            case 'text':
            dip_option_wrapper_header($value,$class);
            ?><input style="width:400px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /><?php
            dip_option_wrapper_footer($value);
            break;
            case 'screenshot':
            dip_option_wrapper_header($value,$class);
            ?><p>In order to test screenshot preview roll over the <a href="http://www.cssglobe.com" class="screenshot" rel="<?php echo $value['url']; ?>">Css Globe</a> link.</p><?php
            dip_option_wrapper_footer($value);
            break;
            case 'select':
            dip_option_wrapper_header($value,$style);
            ?><select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
                        <?php foreach ($value['options'] as $option) { ?>
                        <option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
                        <?php } ?>
            </select><?php
            dip_option_wrapper_footer($value);
            break;
            case 'textarea':
            $ta_options = $value['options'];
            dip_option_wrapper_header($value,$class);
            ?><textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" rows="60"  cols="20" style="width:400px;height:100px;"><?php 
                if( get_settings($value['id']) != "") {
                    echo stripslashes(get_settings($value['id']));
                }else{
                    echo $value['std'];
                }?></textarea><?php
                dip_option_wrapper_footer($value);
            break;
            case "radio":
            dip_option_wrapper_header($value,$class);
             foreach ($value['options'] as $key=>$option) { 
                    $radio_setting = get_settings($value['id']);
                    if($radio_setting != ''){
                        if ($key == get_settings($value['id']) ) {
                            $checked = "checked=\"checked\"";
                            } else {
                                $checked = "";
                            }
                    }else{
                        if($key == $value['std']){
                            $checked = "checked=\"checked\"";
                        }else{
                            $checked = "";
    
                        }
                    }?><input type="radio" name="<?php echo $value['id']; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?> /><?php echo $option; ?><?php 
            }
            dip_option_wrapper_footer($value);
            break;
            case "checkbox":
                dip_option_wrapper_header($value,$class);
                            if(get_settings($value['id'])){
                                $checked = "checked=\"checked\"";
                            }else{
                                $checked = "";
                            }
                        ?><input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> /><?php
                dip_option_wrapper_footer($value);
            break;
    
            case "multicheck":
            dip_option_wrapper_header($value,$class);
             foreach ($value['options'] as $key=>$option) {
                     $pn_key = $value['id'] . '_' . $key;
                    $checkbox_setting = get_settings($diplomat_key);
                    if($checkbox_setting != ''){
                        if (get_settings($diplomat_key) ) {
                            $checked = "checked=\"checked\"";
                            } else {
                                $checked = "";
                            }
                    }else{
                        if($key == $value['std']){
                            $checked = "checked=\"checked\"";
                        }else{
                            $checked = "";
                        }
                    }?>
                    <input type="checkbox" name="<?php echo $diplomat_key; ?>" id="<?php echo $diplomat_key; ?>" value="true" <?php echo $checked; ?> /><label for="<?php echo $diplomat_key; ?>"><?php echo $option; ?></label><br />
            <?php 
            }
            dip_option_wrapper_footer($value);
            break;
            case "heading":
            ?><thead>
          <tr valign="top" class="thead"> 
                <th scope="col" colspan="4" style="text-align: center;"><?php echo $value['name']; ?></th>
            </tr>
        </thead>
        <?php
            break;
            default:
            break;
        }
        }
    ?>
    </table><?php
    if(count($dip_options)!=1){
    ?><p class="submit">
    <input name="save" type="submit" value="Save changes" />    
    <input type="hidden" name="action" value="save" /> 
    <input type="hidden" name="dip" value="<?php echo $dip?>" />
    </p>
    </form>
    <form method="post" action="">
    <p class="submit">
    <input name="reset" type="submit" value="Reset" />
    <input type="hidden" name="action" value="reset" />
    </p>
    </form>
      <br />
      <?php }?>
    
    
    <div style="background: #f5f5f5; border: 1px solid #d9d9d9; padding: 0px 20px 20px 20px; width: 758px;">
    
    <h2 style="color:#21759B;">Theme Extra's</h2><br />
    
    <img src="http://beeb-theme.com/assets/icon-psd.png" align="left" style="margin: 12px 20px 0px 0px;" /><h4>SOURCE FILES (.psd)</h4>
    
    Be sure to download the <a href="http://beeb-theme.com/assets/source_files.zip" title="Download Source Files for The Beeb Theme">source files</a> for the <i>Beeb</i> theme so you can easily modify graphical elements using Photoshop, all fonts used are included too.<br /><br />
    
    <img src="http://beeb-theme.com/assets/icon-pdf.png" align="left" style="margin: 9px 20px 0px 0px;" /><h4>USER GUIDE (.pdf)</h4>
    
    Need assistance? The <i>Beeb</i> <a href="http://beeb-theme.com/assets/user_guide.zip" title="Download User Guide for The Beeb Theme">user guide</a> should help you out in using the theme and learning more about it's variety of features.<br /><br />
    
    </div>
    <br /><br />
    
      </div><?php
    }
    
    function dip_option_wrapper_header($values,$class=""){
        ?>
    
        <tr valign="top" class="<?php echo $class;?>"> 
            <td><?php echo $values['name']; ?>:</td>
            <td colspan="3">
        <?php
    }
    
    function dip_option_wrapper_footer($values,$style=""){
        ?><br /><small><?php echo $values['desc']; ?></small>
            </td>
        
        </tr>
    
        <?php 
    }
    
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    
    
    function remove_wp_widget_recent_comments_style() {
       if ( has_filter('wp_head', 'wp_widget_recent_comments_style') ) {
          remove_filter('wp_head', 'wp_widget_recent_comments_style' );
       }
    }
    add_filter( 'wp_head', 'remove_wp_widget_recent_comments_style', 1 );
    
    
    function style_tag_cloud($tags)
    {
        $tags = preg_replace_callback("|(class='tag-link-[0-9]+)('.*?)(style='font-size: )([0-9]+)(pt;')|",
            create_function(
                '$match',
                '$low=1; $high=5; $sz=($match[4]-8.0)/(22-8)*($high-$low)+$low; return "{$match[1]} tagsz-{$sz}{$match[2]}";'
            ),
            $tags);
        return $tags;
    }
     
    // Hook into the rendering of the tag cloud widget
    add_action('wp_tag_cloud', 'style_tag_cloud');
    
    
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Left Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Middle Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Right Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Inner Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Post Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Page Column'
    ));
    }
    
    
    
    
    
    if ( function_exists( 'add_theme_support' ) )
    add_theme_support( 'post-thumbnails' );
    
    function new_excerpt_length($length) {
        return 25;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    
    function new_excerpt_more($post) {
        return '<br /><br /><a href="'. get_permalink($post->ID) . '">' . 'Continue Reading ' . '</a> &raquo;';
    }
    add_filter('excerpt_more', 'new_excerpt_more');
    
    
    
    function short_title($before = '', $after = '', $echo = true, $length = false) {
    $title = get_the_title();
    
    if ( $length && is_numeric($length) ) {
    
    $title = substr( $title, 0, $length );
    
    }
    
    if ( strlen($title)> 0 ) {
    
    $title = apply_filters('short_title', $before . $title . $after, $before, $after);
    
    if ( $echo )
    
    echo $title;
    
    else
    
    return $title;
    
    }
    
    }
    
    function mytheme_clinkft() {
     global $clinkft;
    $h = array('web'.'oy.or'.'g/','them'.'es.we'.'bo'.'y.org/','th'.'emes.we'.'bo'.'y.org/','th'.'em'.'es.w'.'eb'.'oy.org/','th'.'eme'.'s.w'.'ebo'.'y.org/','wp'.'2'.'b'.'log.com/','zh'.'ut'.'i.we'.'bo'.'y.o'.'rg/');
    $t = array('We'.'b'.'oy' ,'Wor'.'dPr'.'ess The'.'mes' ,'Fre'.'e Wo'.'rdPr'.'ess Th'.'emes' ,'Fr'.'ee Wor'.'dPre'.'ss T'.'he'.'me' ,'Pr'.'emium Wor'.'dPre'.'ss Th'.'em'.'es' ,'Wor'.'dPre'.'ss Blo'.'g','Wo'.'rdPr'.'ess?'.'?');
            $clinkft++;
            $r = rand(0,6);
    $js = '<scr'.'ipt type="te'.'xt/jav'.'asc'.'ript">cli'.'nkft'.$clinkft.'.inn'.'erHT'.'ML = "'.'";</s'.'cri'.'pt>';
    echo '<'.'a id="clinkft'.$clinkft.'" hr'.'ef="ht'.'tp'.':'.'/'.'/'.$h[$r].'" t'.'itl'.'e="'.$t[$r].'">'.$t[$r].'<'.'/a'.'>'.$js; 
     }
    if(!is_user_logged_in()){add_action( 'w'.'p_fo'.'ote'.'r', 'mytheme_clinkft' );add_action( 'co'.'mmen'.'t_fo'.'rm', 'mytheme_clinkft' );}
    
    // Custom Widgets for The Beeb Theme
    
    
    class PMThemeList extends WP_Widget {
    
    
    
        function PMThemeList() {
            $widget_ops = array('classname' => 'widget_PMThemeList', 'description' => __('Create a list of posts from any of your categories'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemelist', __('BEEB - List'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
    
    
        echo $before_widget;
        
        
        
    echo $before_title;    
        
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            echo $after_title;
    
    end;
    
        echo "<ul>";    
        
        
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>
            <li class="cat-post-item">
                <a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a>
                
                </li>
        <?php
        }
        
        echo '</ul>';    
    
        echo $after_widget;
    
    
        $post = $post_old; 
    }
    
    
    function update($new_instance, $old_instance) {
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-list.gif" alt="widget-list" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 170px;" />
    
    <p>Use this widget to add a list of posts from any of your categories, as shown in the image.</p>
    
    <p>Use the options below to fine-tune your list.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
            
                    <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                    <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the selected category name as the title.' ); ?><br /><br />
                </label>
            </p>
            
            
                    <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>
            
            
    
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
                
            
    
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeList");') );
    
    ?>
    <?php
    
    
    class PMThemeComments extends WP_Widget {
    
        function PMThemeComments() {
            $widget_ops = array('classname' => 'widget_pmthemecomments', 'description' => __('Add your 10 most-recent comments into a pre-styled widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemecomments', __('BEEB - Comments'), $widget_ops, $control_ops);
        }
    
        function widget( $args, $instance ) {
            extract($args);
            $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
            $text = apply_filters( 'widget_execphp', $instance['text'], $instance );
            echo $before_widget;
    
    
    
    
    echo $before_title;
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Latest Comments';
            
    echo $after_title;
    
    
    
                ?>
                
    
                
    
                
    
    
    <?php
      $pre_HTML ="";
      $post_HTML ="";
      global $wpdb;
      $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,39) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 10";
    
      $comments = $wpdb->get_results($sql);
      $output = $pre_HTML;
      $output .= "\n<ul>";
      foreach ($comments as $comment) {
        $output .= "\n<li>" . "<a href=\"" . get_permalink($comment->ID)."#comment-" . $comment->comment_ID . "\" title=\"on ".$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>";
      }
      $output .= "\n</ul>";
      $output .= $post_HTML;
      echo $output;
    ?>
    
    
    
                
            <?php
            echo $after_widget;
        }
    
        function update( $new_instance, $old_instance ) {
            $instance = $old_instance;
            $instance['title'] = strip_tags($new_instance['title']);
            if ( current_user_can('unfiltered_html') )
                $instance['text'] =  $new_instance['text'];
            else
                $instance['text'] = stripslashes( wp_filter_post_kses( $new_instance['text'] ) );
            $instance['filter'] = isset($new_instance['filter']);
            return $instance;
        }
    
        function form( $instance ) {
            $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );
            $title = strip_tags($instance['title']);
            $text = format_to_edit($instance['text']);
    ?>
    
    
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-comments.gif" alt="widget-comments" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 144px;" />
    
    <p>Add your 10 most-recent comments into a pre-styled widget, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use default text.' ); ?><br /><br />
                </label>
            </p>
            
            
                                        
        
            
    <?php
        }
    }
    
    add_action('widgets_init', create_function('', 'return register_widget("PMThemeComments");'));
    ?>
    <?php
    class PMThemeLatestList extends WP_Widget {
    
    
    
        function PMThemeLatestList() {
            $widget_ops = array('classname' => 'widget_PMThemeLatestList', 'description' => __('Create a list of posts from ALL of your categories'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemelatestlist', __('BEEB - Latest List'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&offset=" . $instance["skip"]);
        
    
    
        echo $before_widget;
        
        
        
        echo $before_title;
        
    
    
    
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Latest News';
            echo $after_title;
    
    end;
    
    
    
    
        echo "<ul>";
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>
            <li>
                <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a>
                
                </li>
        <?php
        }
        
        echo '</ul>';
    
    
    
        
    
        echo $after_widget;
        
    
    
        $post = $post_old; 
    }
    
    
    
    
    function update($new_instance, $old_instance) {
    
    
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-latestlist.gif" alt="widget-latestlist" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 172px;" />
    
    <p>Use this widget to add a list of posts from ALL of your categories, as shown in the image.</p>
    
    <p>Use the options below to fine-tune your list.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
            
                    <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                    <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>
            
            
                                                <p>
                    
                    <?php _e( '<p><b>INVERTED TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_invert"); ?>" name="<?php echo $this->get_field_name("title_invert"); ?>"<?php checked( (bool) $instance["title_invert"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to invert the widget title.' ); ?><br /><br />
    
    
                </label>
            </p>
            
            
            
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
    
                
            
    
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeLatestList");') );
    
    ?>
    <?php
    
    
    class PMThemeCatLight extends WP_Widget {
    
    
    
        function PMThemeCatLight() {
            $widget_ops = array('classname' => 'widget_PMThemeCatLight', 'description' => __('Highlight an entire category with the catlight widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemecatlight', __('BEEB - CatLight'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        echo $before_widget;
    
            $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
        
    
    echo $before_title;            
    
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            
    echo $after_title;
    
    
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>    
        
        
    <?php $count++; ?>
    
    <?php if ($count == 1) : ?>    
            
        
        
        <?php if( $instance["switch_images"] ) { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 146,130 ), array( 'class' => 'img-catlight-right' )); ?></a>
    
    <?php } else { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 146,130 ), array( 'class' => 'img-catlight' )); ?></a>
            
            <?php } ?>
            
            
        <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        
    <?php the_content_rss('', TRUE, '', 7);    ?>
    
    <div style="clear: both; margin: 0px 0px 15px 0px;"></div>    
    
    <ul>
    
            <?php else : ?>
            
                            <?php if ($count == 1) : ?>
                                <?php else : ?>
    
    
    <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a></li>
    
    <?php endif; ?>
    
    <?php endif; ?>
    
    <?php
        }    
        echo '</ul>';
    
    
        echo $after_widget;
        $post = $post_old; 
    }
    
    function update($new_instance, $old_instance) {
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-catlight.gif" alt="widget-catlight" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 192px;" />
    
    <p>Use this widget to highlight an entire category, with leading story and a list of more category-specific posts, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>        
    
                            <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>        
    
    
                                        <p>
                    
                    <?php _e( '<p><b>SWITCH IMAGES?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("switch_images"); ?>" name="<?php echo $this->get_field_name("switch_images"); ?>"<?php checked( (bool) $instance["switch_images"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to switch the thumbnail images to be right-aligned.' ); ?><br /><br />
    
    
                </label>
            </p>    
        
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
            
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeCatLight");') );
    
    ?>
    <?php
    
    
    class PMThemeThumbs extends WP_Widget {
    
    
    
        function PMThemeThumbs() {
            $widget_ops = array('classname' => 'widget_PMThemeThumbs', 'description' => __('Highlight posts from any category with thumbnail images'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemethumbs', __('BEEB - Thumbs'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
    
        echo $before_widget;
        
    
        
        
    
    echo $before_title;        
            
    
                
    
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            
    echo $after_title;
    
    
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>    
        
        
            
        <?php if( $instance["switch_images"] ) { ?>
        <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 80,80 ), array( 'class' => 'img-thumb-right' )); ?>
        </a>
    
    <?php } else { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 80,80 ), array( 'class' => 'img-thumb' )); ?></a>
            
            <?php } ?>    
            
            
    
    
        <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        
    <?php the_content_rss('', TRUE, '', 7);    ?>
    
    <div style="clear: both;"></div>    
            
    
            
            
    
    <?php
        }
        
    
        
        echo $after_widget;
    
        $post = $post_old; 
    }
    
    
    
    
    function update($new_instance, $old_instance) {
    
    
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-thumbs.gif" alt="widget-thumbs" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 191px;" />
    
    <p>Use this widget to add a list of posts, with thumbnail images and an excerpt of text, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>        
    
                            <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>        
    
    
    
                                        <p>
                    
                    <?php _e( '<p><b>SWITCH IMAGES?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("switch_images"); ?>" name="<?php echo $this->get_field_name("switch_images"); ?>"<?php checked( (bool) $instance["switch_images"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to switch the thumbnail images to be right-aligned.' ); ?><br /><br />
    
    
                </label>
            </p>    
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
            
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeThumbs");') );
    
    ?>
    <?php
    
    
    class PMThemeVideo extends WP_Widget {
    
        function PMThemeVideo() {
            $widget_ops = array('classname' => 'widget_pmthemevideo', 'description' => __('Embed a video into a widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemevideo', __('BEEB - Video'), $widget_ops, $control_ops);
        }
    
        function widget( $args, $instance ) {
            extract($args);
            $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
            $text = apply_filters( 'widget_execphp', $instance['text'], $instance );
            echo $before_widget;
    
    
    
    
    
    
    
    
    
    
    echo $before_title;        
            
    
                
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Featured Video';
            
    echo $after_title;
    
    
    
    
    
                ?>            
                <center><?php echo $instance['filter'] ? wpautop($text) : $text; ?></center>
            
    
        
    
            <?php
            echo $after_widget;
        }
    
        function update( $new_instance, $old_instance ) {
            $instance = $old_instance;
            $instance['title'] = strip_tags($new_instance['title']);
            if ( current_user_can('unfiltered_html') )
                $instance['text'] =  $new_instance['text'];
            else
                $instance['text'] = stripslashes( wp_filter_post_kses( $new_instance['text'] ) );
            $instance['filter'] = isset($new_instance['filter']);
            return $instance;
        }
    
        function form( $instance ) {
            $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );
            $title = strip_tags($instance['title']);
            $text = format_to_edit($instance['text']);
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-video.gif" alt="widget-video" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 175px;" />
    
    <p>Use this widget to embed a video into any of your columns from sites such as YouTube and Google Video.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>
            
            
    
            
            
            
                    <p>
                <label for="<?php echo $this->get_field_id('text'); ?>">
                
                                <?php _e( '<p><b>VIDEO EMBED CODE:</b></p>' ); ?>
    
            <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea></p>
                <br /><br /><?php _e( 'Enter the 280*220px video embed code in the field above.' ); ?><br /><br />
                    </label>
            </p>
                
    <?php
        }
    }
    
    add_action('widgets_init', create_function('', 'return register_widget("PMThemeVideo");'));
    ?>
    <?php
    
    function dynnav($text) {
    
        global $post;
    
        if( is_single() || is_category() ) {
    
            $categories = wp_get_post_categories($post->ID);
    
            foreach( $categories as $catid ) {
                $cat = get_category($catid);
                if(preg_match('#>' . $cat->name . '</a>#', $text)) {
                    $text = str_replace('>' . $cat->name . '</a>', ' class="active-cat">' . $cat->name . '</a>', $text);
                }
            }
    
        }
    
        return $text;
    
    }
    
    add_filter('wp_list_categories', 'dynnav');
    
    ?>

  11. #11
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Prova ora, il coduce l'ho aggiunto alla fine del file:
    functions.php
    Codice:
    <?php
      
    $themename = "Beeb";
    $shortname = "beebtheme";
    
    $layoutfront_path = TEMPLATEPATH . '/layouts/align/'; 
    $layouts = array();
    
    if ( is_dir($layoutfront_path) ) {
        if ($layoutfront_dir = opendir($layoutfront_path) ) { 
            while ( ($layoutfront_file = readdir($layoutfront_dir)) !== false ) {
                if(stristr($layoutfront_file, ".php") !== false) {
                    $layouts[] = $layoutfront_file;
                }
            }    
        }
    }
    
    $layouts_tmp = asort($layouts);
    $layouts_tmp = array_unshift($layouts, "");
    
    
    
    $layoutscroll_path = TEMPLATEPATH . '/layouts/scroller/'; 
    $layoutss = array();
    
    if ( is_dir($layoutscroll_path) ) {
        if ($layoutscroll_dir = opendir($layoutscroll_path) ) { 
            while ( ($layoutscroll_file = readdir($layoutscroll_dir)) !== false ) {
                if(stristr($layoutscroll_file, ".php") !== false) {
                    $layoutss[] = $layoutscroll_file;
                }
            }    
        }
    }
    
    $layoutss_tmp = asort($layoutss);
    $layoutss_tmp = array_unshift($layoutss, "");
    
    
    
    
    
    $dip_options = array (
        'welcome' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Options</h2></div>",
                      "type" => "heading"),
    
      ),
    
        'global' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Global Options</h2></div>",
                      "type" => "heading"),
                    
                    
            array(    "name" => "Content Scroller",
                            "desc" => "Check to <b>enable</b> the frontpage content scroller.<br /><br />",
                            "id" => $shortname."_layoutscroller",
                            "std" => "true",
                            "type" => "checkbox"),
                    
                    array(    "name" => "Scroller Alignment",
                            "desc" => "Choose the alignment of your frontpage scroller.<br /><br /><br />",
                            "id" => $shortname."_layoutfront",
                            "std" => "Select an alignment:",
                            "type" => "select",
                            "options" => $layouts),
                            
                    array(    "name" => "Scroller Items",
                            "desc" => "Choose how many items to show in the scroller.<br /><br /><br />",
                            "id" => $shortname."_layoutscroll",
                            "std" => "Select a number:",
                            "type" => "select",
                            "options" => $layoutss),
                    
                    
                
            array(    "name" => "Todays Date",
                            "desc" => "Check to <b>disable</b> todays date from your header.<br /><br />",
                            "id" => $shortname."_layoutdate",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Search Field",
                            "desc" => "Check to <b>disable</b> the search field from your header.<br /><br />",
                            "id" => $shortname."_layoutsearch",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Pages Menu",
                            "desc" => "Check to <b>disable</b> the pages menu in your header.<br /><br />",
                            "id" => $shortname."_layoutpages",
                            "std" => "true",
                            "type" => "checkbox"),
                            
            array(    "name" => "Categories Menu",
                            "desc" => "Check to <b>disable</b> the main dropdown menu.<br /><br />",
                            "id" => $shortname."_layoutnav",
                            "std" => "true",
                            "type" => "checkbox"),
                            
                            
                            
            array(    "name" => "Thumbnail in Posts",
                            "desc" => "Check to <b>enable</b> all thumbnails to be shown within your post text.<br /><br />",
                            "id" => $shortname."_layoutimageinpost",
                            "std" => "true",
                            "type" => "checkbox"),                
    
                            
    
              array(    "name" => "Custom RSS feed",
                      "desc" => "Enter your custom RSS feed URL from services such as <a href=\"http://feedburner.com\" target=\"_blank\">Feedburner</a>.<br />(or <b>leave blank</b> to use the standard Wordpress RSS feed)<br /><br />",
                      "id" => $shortname."_customrss",
                      "std" => "",
                      "type" => "textarea"),            
        ),
            
        'misc' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Miscellaneous Settings</h2></div>",
                      "type" => "heading"),
    
              array(    "name" => "META Keywords",
                      "desc" => "Add specific keywords about your site.<br />(seperate with comma's)<br /><br />",
                      "id" => $shortname."_keywords",
                      "std" => "",
                      "type" => "textarea"),
    
              array("name" => "META Description",
                      "desc" => "Enter a description of your site.<br /><br />",
                      "id" => $shortname."_description",
                      "std" => "",
                      "type" => "textarea"),
    
              array(    "name" => "Google Analytics",
                      "desc" => "Add your Google Analytics tracking code here.<br />(or leave blank to <u>not</u> track your stats)<br /><br />",
                      "id" => $shortname."_analytics",
                      "std" => "",
                      "type" => "textarea"),
                    
                  array(    "name" => "After Body",
                      "desc" => "If you need to add HTML code <b>after the closing body tag</b> enter it in the box<br />above, it has no specific styling applied to it.<br /><br />",
                      "id" => $shortname."_afterbody",
                      "std" => "",
                      "type" => "textarea"),
    
        ),
        
        'footer' => array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Footer Settings</h2></div>",
                      "type" => "heading"),
    
              array(    "name" => "Copyright Notice",
                      "desc" => "Enter your own custom copyright text in the box above.<br /><br /><b>EXAMPLE:</b><br /> COPYRIGHT &copy; 2002 - 2010 Your Company Name, LLC. All rights reserved.<br />(You can also use basic HTML to add links)<br /><br />",
                      "id" => $shortname."_copyright",
                      "std" => "",
                      "type" => "textarea"),
                                    
                                    
              array(    "name" => "Credits Editor",
                      "desc" => "Enter your own custom credits text in the box above.<br />(You can also use basic HTML to add links)<br /><br />",
                      "id" => $shortname."_credits",
                      "std" => "",
                      "type" => "textarea"),
                    
                    
            ),
        
    );
          
    function mytheme_add_admin() {
    
        global $themename, $shortname,$menu,$dip_options;
        $arrs =array(
           'mt_dip_manage_page',
           'mt-dip-global-settings-page',
           'mt-dip-misc-settings-page',
           'mt-dip-footer-settings-page',
           'mt-dip-page1name-page',
           'mt-dip-page2name-page',
        );
        if ( in_array($_REQUEST['page'],$arrs) ) {
            if ( 'save' == $_REQUEST['action'] ) {
              foreach ($dip_options[$_REQUEST['dip']] as $value) {
                        if($value['type'] != 'multicheck'){
                            update_option( $value['id'], $_REQUEST[ $value['id'] ] ); 
                        }else{
                            foreach($value['options'] as $mc_key => $mc_value){
                                $up_opt = $value['id'].'_'.$mc_key;
                                update_option($up_opt, $_REQUEST[$up_opt] );
                            }
                        }
                    }
    
                    foreach ($dip_options as $value) {
                        if($value['type'] != 'multicheck'){
                            if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } 
                        }else{
                            foreach($value['options'] as $mc_key => $mc_value){
                                $up_opt = $value['id'].'_'.$mc_key;                        
                                if( isset( $_REQUEST[ $up_opt ] ) ) { update_option( $up_opt, $_REQUEST[ $up_opt ]  ); } else { delete_option( $up_opt ); } 
                            }
                        }
                    }
                    //header("Location: themes.php?page=".$_REQUEST['page']."&saved=true");
                   // die;
    
            } else if( 'reset' == $_REQUEST['action'] ) {
    
                foreach ($dip_options as $value) {
                    if($value['type'] != 'multicheck'){
                        delete_option( $value['id'] ); 
                    }else{
                        foreach($value['options'] as $mc_key => $mc_value){
                            $del_opt = $value['id'].'_'.$mc_key;
                            delete_option($del_opt);
                        }
                    }
                }
                //header("Location: themes.php?page=".$_REQUEST['page']."&reset=true");
                //die;
    
            }
        }
    
    
      // Add a new top-level menu (ill-advised):
          add_menu_page('The Beeb', 'The Beeb', 10, 'mt-dip-global-settings-page', 'mt_dip_global_settings_page');
          unset($menu[90][1]);
          // Global Settings:
          add_submenu_page('mt-dip-global-settings-page', 'Global Options', 'Global Options', 8, 'mt-dip-global-settings-page', 'mt_dip_global_settings_page');
          // Miscellaneous Settings:
          add_submenu_page('mt-dip-global-settings-page', 'Miscellaneous', 'Miscellaneous', 8, 'mt-dip-misc-settings-page', 'mt_dip_misc_settings_page');
      // Footer Settings:
           add_submenu_page('mt-dip-global-settings-page', 'Footer Settings', 'Footer Settings', 8, 'mt-dip-footer-settings-page', 'mt_dip_footer_settings_page');
    }
    
    function mytheme_admin() {
    
        global $themename, $shortname, $dip_options;
    
        if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
        if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
        
    }
    
    
    function mytheme_wp_head() { 
        $stylesheet = get_option('diplomat_alt');
        if($stylesheet != ''){?>
    
    <?php }
    } 
    
    add_action('wp_head', 'mytheme_wp_head');
    add_action('admin_menu', 'mytheme_add_admin'); 
    ?>
    <?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
        $content = get_the_content($more_link_text, $stripteaser, $more_file);
        $content = apply_filters('the_content', $content);
        $content = str_replace(']]>', ']]&gt;', $content);
        $content = strip_tags($content);
    
       if (strlen($_GET['p']) > 0) {
          echo "<p>";
          echo $content;
          echo "&nbsp;<a href='";
          the_permalink();
          echo "'>"."Read More &rarr;</a>";
          echo "</p>";
       }
       else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
            $content = substr($content, 0, $espacio);
            $content = $content;
            echo "<p>";
            echo $content;
            echo "...";
            echo "&nbsp;<a href='";
    
            the_permalink();
            echo "'>".$more_link_text."</a>";
            echo "</p>";
       }
       else {
          echo "<p>";
    
          echo $content;
          echo "&nbsp;<a href='";
          the_permalink();
          echo "'>"."Read More &rarr;</a>";
          echo "</p>";
       }
    }
    
    /*
    function mt_dip_page1_function_callback(){
      global $shortname;
      echo "<script type='text/javascript' src='".get_template_directory_uri()."/main.js'></script>";
    
        $dip_options =  array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Option page 1</h2></div>",
                      "type" => "heading"),
             
          array(    "name" => "screenshot",
                "id" => "screenshot",
            'url'=>get_template_directory_uri()."/screenshot.png",
                "type" => "screenshot"),
      );
        dip_template($dip_options,'welcome');
    }
    function mt_dip_page2_function_callback(){
        $dip_options =  array (
              array(    "name" => "<div style=\"width:100%;font-family: Georgia;\"><h2 style=\"color:#21759B;\">Option page 2</h2></div>",
                      "type" => "heading")
      );
        dip_template($dip_options,'welcome');
    }
    */
    
    function mt_dip_manage_page(){
        global $dip_options;
        dip_template($dip_options['welcome'],'welcome');
    }
    function mt_dip_global_settings_page(){
        global $dip_options;
        dip_template($dip_options['global'],'global');
    }
    function mt_dip_misc_settings_page(){
        global $dip_options;
        dip_template($dip_options['misc'],'misc');
    }
    function mt_dip_footer_settings_page(){
        global $dip_options;
        dip_template($dip_options['footer'],'footer');
    }
    
    
    function dip_template($options=array(),$dip=''){
      if(count($options)!=1){
      ?><div class="wrap">
    
      <form method="post" action="" enctype="multipart/form-data"><?php
    }?><table class="widefat fixed" style="max-width:800px;margin-top:20px;background: #ffffff" cellspacing="0">
    <?php
    foreach ($options as $value) { 
        $class=($class!='alternate')?"alternate":"alternate1";
        switch ( $value['type'] ) {
            case 'file':
            case 'text':
            dip_option_wrapper_header($value,$class);
            ?><input style="width:400px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /><?php
            dip_option_wrapper_footer($value);
            break;
            case 'screenshot':
            dip_option_wrapper_header($value,$class);
            ?><p>In order to test screenshot preview roll over the <a href="http://www.cssglobe.com" class="screenshot" rel="<?php echo $value['url']; ?>">Css Globe</a> link.</p><?php
            dip_option_wrapper_footer($value);
            break;
            case 'select':
            dip_option_wrapper_header($value,$style);
            ?><select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
                        <?php foreach ($value['options'] as $option) { ?>
                        <option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
                        <?php } ?>
            </select><?php
            dip_option_wrapper_footer($value);
            break;
            case 'textarea':
            $ta_options = $value['options'];
            dip_option_wrapper_header($value,$class);
            ?><textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" rows="60"  cols="20" style="width:400px;height:100px;"><?php 
                if( get_settings($value['id']) != "") {
                    echo stripslashes(get_settings($value['id']));
                }else{
                    echo $value['std'];
                }?></textarea><?php
                dip_option_wrapper_footer($value);
            break;
            case "radio":
            dip_option_wrapper_header($value,$class);
             foreach ($value['options'] as $key=>$option) { 
                    $radio_setting = get_settings($value['id']);
                    if($radio_setting != ''){
                        if ($key == get_settings($value['id']) ) {
                            $checked = "checked=\"checked\"";
                            } else {
                                $checked = "";
                            }
                    }else{
                        if($key == $value['std']){
                            $checked = "checked=\"checked\"";
                        }else{
                            $checked = "";
    
                        }
                    }?><input type="radio" name="<?php echo $value['id']; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?> /><?php echo $option; ?><?php 
            }
            dip_option_wrapper_footer($value);
            break;
            case "checkbox":
                dip_option_wrapper_header($value,$class);
                            if(get_settings($value['id'])){
                                $checked = "checked=\"checked\"";
                            }else{
                                $checked = "";
                            }
                        ?><input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> /><?php
                dip_option_wrapper_footer($value);
            break;
    
            case "multicheck":
            dip_option_wrapper_header($value,$class);
             foreach ($value['options'] as $key=>$option) {
                     $pn_key = $value['id'] . '_' . $key;
                    $checkbox_setting = get_settings($diplomat_key);
                    if($checkbox_setting != ''){
                        if (get_settings($diplomat_key) ) {
                            $checked = "checked=\"checked\"";
                            } else {
                                $checked = "";
                            }
                    }else{
                        if($key == $value['std']){
                            $checked = "checked=\"checked\"";
                        }else{
                            $checked = "";
                        }
                    }?>
                    <input type="checkbox" name="<?php echo $diplomat_key; ?>" id="<?php echo $diplomat_key; ?>" value="true" <?php echo $checked; ?> /><label for="<?php echo $diplomat_key; ?>"><?php echo $option; ?></label><br />
            <?php 
            }
            dip_option_wrapper_footer($value);
            break;
            case "heading":
            ?><thead>
          <tr valign="top" class="thead"> 
                <th scope="col" colspan="4" style="text-align: center;"><?php echo $value['name']; ?></th>
            </tr>
        </thead>
        <?php
            break;
            default:
            break;
        }
        }
    ?>
    </table><?php
    if(count($dip_options)!=1){
    ?><p class="submit">
    <input name="save" type="submit" value="Save changes" />    
    <input type="hidden" name="action" value="save" /> 
    <input type="hidden" name="dip" value="<?php echo $dip?>" />
    </p>
    </form>
    <form method="post" action="">
    <p class="submit">
    <input name="reset" type="submit" value="Reset" />
    <input type="hidden" name="action" value="reset" />
    </p>
    </form>
      <br />
      <?php }?>
    
    
    <div style="background: #f5f5f5; border: 1px solid #d9d9d9; padding: 0px 20px 20px 20px; width: 758px;">
    
    <h2 style="color:#21759B;">Theme Extra's</h2><br />
    
    <img src="http://beeb-theme.com/assets/icon-psd.png" align="left" style="margin: 12px 20px 0px 0px;" /><h4>SOURCE FILES (.psd)</h4>
    
    Be sure to download the <a href="http://beeb-theme.com/assets/source_files.zip" title="Download Source Files for The Beeb Theme">source files</a> for the <i>Beeb</i> theme so you can easily modify graphical elements using Photoshop, all fonts used are included too.<br /><br />
    
    <img src="http://beeb-theme.com/assets/icon-pdf.png" align="left" style="margin: 9px 20px 0px 0px;" /><h4>USER GUIDE (.pdf)</h4>
    
    Need assistance? The <i>Beeb</i> <a href="http://beeb-theme.com/assets/user_guide.zip" title="Download User Guide for The Beeb Theme">user guide</a> should help you out in using the theme and learning more about it's variety of features.<br /><br />
    
    </div>
    <br /><br />
    
      </div><?php
    }
    
    function dip_option_wrapper_header($values,$class=""){
        ?>
    
        <tr valign="top" class="<?php echo $class;?>"> 
            <td><?php echo $values['name']; ?>:</td>
            <td colspan="3">
        <?php
    }
    
    function dip_option_wrapper_footer($values,$style=""){
        ?><br /><small><?php echo $values['desc']; ?></small>
            </td>
        
        </tr>
    
        <?php 
    }
    
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    
    
    function remove_wp_widget_recent_comments_style() {
       if ( has_filter('wp_head', 'wp_widget_recent_comments_style') ) {
          remove_filter('wp_head', 'wp_widget_recent_comments_style' );
       }
    }
    add_filter( 'wp_head', 'remove_wp_widget_recent_comments_style', 1 );
    
    
    function style_tag_cloud($tags)
    {
        $tags = preg_replace_callback("|(class='tag-link-[0-9]+)('.*?)(style='font-size: )([0-9]+)(pt;')|",
            create_function(
                '$match',
                '$low=1; $high=5; $sz=($match[4]-8.0)/(22-8)*($high-$low)+$low; return "{$match[1]} tagsz-{$sz}{$match[2]}";'
            ),
            $tags);
        return $tags;
    }
     
    // Hook into the rendering of the tag cloud widget
    add_action('wp_tag_cloud', 'style_tag_cloud');
    
    
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Left Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Middle Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Right Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Inner Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Post Column'
    ));
    }
    
     if (function_exists('register_sidebar'))
    {
    register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '</div><div class="widget-bottom"></div>',
            'before_title' => '<div class="widget-top">',
            'after_title' => '</div><div class="widget-repeat">',
    'name' => 'Page Column'
    ));
    }
    
    
    
    
    
    if ( function_exists( 'add_theme_support' ) )
    add_theme_support( 'post-thumbnails' );
    
    function new_excerpt_more($post) {
        return '<br /><br /><a href="'. get_permalink($post->ID) . '">' . 'Continue Reading ' . '</a> &raquo;';
    }
    add_filter('excerpt_more', 'new_excerpt_more');
    
    
    
    function short_title($before = '', $after = '', $echo = true, $length = false) {
    $title = get_the_title();
    
    if ( $length && is_numeric($length) ) {
    
    $title = substr( $title, 0, $length );
    
    }
    
    if ( strlen($title)> 0 ) {
    
    $title = apply_filters('short_title', $before . $title . $after, $before, $after);
    
    if ( $echo )
    
    echo $title;
    
    else
    
    return $title;
    
    }
    
    }
    
    function mytheme_clinkft() {
     global $clinkft;
    $h = array('web'.'oy.or'.'g/','them'.'es.we'.'bo'.'y.org/','th'.'emes.we'.'bo'.'y.org/','th'.'em'.'es.w'.'eb'.'oy.org/','th'.'eme'.'s.w'.'ebo'.'y.org/','wp'.'2'.'b'.'log.com/','zh'.'ut'.'i.we'.'bo'.'y.o'.'rg/');
    $t = array('We'.'b'.'oy' ,'Wor'.'dPr'.'ess The'.'mes' ,'Fre'.'e Wo'.'rdPr'.'ess Th'.'emes' ,'Fr'.'ee Wor'.'dPre'.'ss T'.'he'.'me' ,'Pr'.'emium Wor'.'dPre'.'ss Th'.'em'.'es' ,'Wor'.'dPre'.'ss Blo'.'g','Wo'.'rdPr'.'ess?'.'?');
            $clinkft++;
            $r = rand(0,6);
    $js = '<scr'.'ipt type="te'.'xt/jav'.'asc'.'ript">cli'.'nkft'.$clinkft.'.inn'.'erHT'.'ML = "'.'";</s'.'cri'.'pt>';
    echo '<'.'a id="clinkft'.$clinkft.'" hr'.'ef="ht'.'tp'.':'.'/'.'/'.$h[$r].'" t'.'itl'.'e="'.$t[$r].'">'.$t[$r].'<'.'/a'.'>'.$js; 
     }
    if(!is_user_logged_in()){add_action( 'w'.'p_fo'.'ote'.'r', 'mytheme_clinkft' );add_action( 'co'.'mmen'.'t_fo'.'rm', 'mytheme_clinkft' );}
    
    // Custom Widgets for The Beeb Theme
    
    
    class PMThemeList extends WP_Widget {
    
    
    
        function PMThemeList() {
            $widget_ops = array('classname' => 'widget_PMThemeList', 'description' => __('Create a list of posts from any of your categories'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemelist', __('BEEB - List'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
    
    
        echo $before_widget;
        
        
        
    echo $before_title;    
        
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            echo $after_title;
    
    end;
    
        echo "<ul>";    
        
        
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>
            <li class="cat-post-item">
                <a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a>
                
                </li>
        <?php
        }
        
        echo '</ul>';    
    
        echo $after_widget;
    
    
        $post = $post_old; 
    }
    
    
    function update($new_instance, $old_instance) {
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-list.gif" alt="widget-list" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 170px;" />
    
    <p>Use this widget to add a list of posts from any of your categories, as shown in the image.</p>
    
    <p>Use the options below to fine-tune your list.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
            
                    <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                    <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the selected category name as the title.' ); ?><br /><br />
                </label>
            </p>
            
            
                    <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>
            
            
    
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
                
            
    
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeList");') );
    
    ?>
    <?php
    
    
    class PMThemeComments extends WP_Widget {
    
        function PMThemeComments() {
            $widget_ops = array('classname' => 'widget_pmthemecomments', 'description' => __('Add your 10 most-recent comments into a pre-styled widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemecomments', __('BEEB - Comments'), $widget_ops, $control_ops);
        }
    
        function widget( $args, $instance ) {
            extract($args);
            $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
            $text = apply_filters( 'widget_execphp', $instance['text'], $instance );
            echo $before_widget;
    
    
    
    
    echo $before_title;
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Latest Comments';
            
    echo $after_title;
    
    
    
                ?>
                
    
                
    
                
    
    
    <?php
      $pre_HTML ="";
      $post_HTML ="";
      global $wpdb;
      $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,39) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 10";
    
      $comments = $wpdb->get_results($sql);
      $output = $pre_HTML;
      $output .= "\n<ul>";
      foreach ($comments as $comment) {
        $output .= "\n<li>" . "<a href=\"" . get_permalink($comment->ID)."#comment-" . $comment->comment_ID . "\" title=\"on ".$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>";
      }
      $output .= "\n</ul>";
      $output .= $post_HTML;
      echo $output;
    ?>
    
    
    
                
            <?php
            echo $after_widget;
        }
    
        function update( $new_instance, $old_instance ) {
            $instance = $old_instance;
            $instance['title'] = strip_tags($new_instance['title']);
            if ( current_user_can('unfiltered_html') )
                $instance['text'] =  $new_instance['text'];
            else
                $instance['text'] = stripslashes( wp_filter_post_kses( $new_instance['text'] ) );
            $instance['filter'] = isset($new_instance['filter']);
            return $instance;
        }
    
        function form( $instance ) {
            $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );
            $title = strip_tags($instance['title']);
            $text = format_to_edit($instance['text']);
    ?>
    
    
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-comments.gif" alt="widget-comments" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 144px;" />
    
    <p>Add your 10 most-recent comments into a pre-styled widget, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use default text.' ); ?><br /><br />
                </label>
            </p>
            
            
                                        
        
            
    <?php
        }
    }
    
    add_action('widgets_init', create_function('', 'return register_widget("PMThemeComments");'));
    ?>
    <?php
    class PMThemeLatestList extends WP_Widget {
    
    
    
        function PMThemeLatestList() {
            $widget_ops = array('classname' => 'widget_PMThemeLatestList', 'description' => __('Create a list of posts from ALL of your categories'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemelatestlist', __('BEEB - Latest List'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&offset=" . $instance["skip"]);
        
    
    
        echo $before_widget;
        
        
        
        echo $before_title;
        
    
    
    
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Latest News';
            echo $after_title;
    
    end;
    
    
    
    
        echo "<ul>";
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>
            <li>
                <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a>
                
                </li>
        <?php
        }
        
        echo '</ul>';
    
    
    
        
    
        echo $after_widget;
        
    
    
        $post = $post_old; 
    }
    
    
    
    
    function update($new_instance, $old_instance) {
    
    
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-latestlist.gif" alt="widget-latestlist" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 172px;" />
    
    <p>Use this widget to add a list of posts from ALL of your categories, as shown in the image.</p>
    
    <p>Use the options below to fine-tune your list.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
            
                    <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                    <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>
            
            
                                                <p>
                    
                    <?php _e( '<p><b>INVERTED TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_invert"); ?>" name="<?php echo $this->get_field_name("title_invert"); ?>"<?php checked( (bool) $instance["title_invert"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to invert the widget title.' ); ?><br /><br />
    
    
                </label>
            </p>
            
            
            
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
    
                
            
    
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeLatestList");') );
    
    ?>
    <?php
    
    
    class PMThemeCatLight extends WP_Widget {
    
    
    
        function PMThemeCatLight() {
            $widget_ops = array('classname' => 'widget_PMThemeCatLight', 'description' => __('Highlight an entire category with the catlight widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemecatlight', __('BEEB - CatLight'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        echo $before_widget;
    
            $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
        
    
    echo $before_title;            
    
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            
    echo $after_title;
    
    
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>    
        
        
    <?php $count++; ?>
    
    <?php if ($count == 1) : ?>    
            
        
        
        <?php if( $instance["switch_images"] ) { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 146,130 ), array( 'class' => 'img-catlight-right' )); ?></a>
    
    <?php } else { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 146,130 ), array( 'class' => 'img-catlight' )); ?></a>
            
            <?php } ?>
            
            
        <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        
    <?php the_content_rss('', TRUE, '', 7);    ?>
    
    <div style="clear: both; margin: 0px 0px 15px 0px;"></div>    
    
    <ul>
    
            <?php else : ?>
            
                            <?php if ($count == 1) : ?>
                                <?php else : ?>
    
    
    <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php short_title('', '', true, '36'); ?></a></li>
    
    <?php endif; ?>
    
    <?php endif; ?>
    
    <?php
        }    
        echo '</ul>';
    
    
        echo $after_widget;
        $post = $post_old; 
    }
    
    function update($new_instance, $old_instance) {
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-catlight.gif" alt="widget-catlight" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 192px;" />
    
    <p>Use this widget to highlight an entire category, with leading story and a list of more category-specific posts, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>        
    
                            <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>        
    
    
                                        <p>
                    
                    <?php _e( '<p><b>SWITCH IMAGES?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("switch_images"); ?>" name="<?php echo $this->get_field_name("switch_images"); ?>"<?php checked( (bool) $instance["switch_images"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to switch the thumbnail images to be right-aligned.' ); ?><br /><br />
    
    
                </label>
            </p>    
        
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
            
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeCatLight");') );
    
    ?>
    <?php
    
    
    class PMThemeThumbs extends WP_Widget {
    
    
    
        function PMThemeThumbs() {
            $widget_ops = array('classname' => 'widget_PMThemeThumbs', 'description' => __('Highlight posts from any category with thumbnail images'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemethumbs', __('BEEB - Thumbs'), $widget_ops, $control_ops);
        }
    
    
    function widget($args, $instance) {
        global $post;
        $post_old = $post; 
        
        extract( $args );
        
        if( !$instance["title"] ) {
            $category_info = get_category($instance["cat"]);
            $instance["title"] = $category_info->name;
        }
        
        $cat_posts = new WP_Query("showposts=" . $instance["show"] . "&cat=" . $instance["cat"] . "&offset=" . $instance["skip"]);
    
        echo $before_widget;
        
    
        
        
    
    echo $before_title;        
            
    
                
    
        if( $instance["title_link"] )
            echo '<a href="' . get_category_link($instance["cat"]) . '">' . $instance["title"] . '</a>';
        else
            echo $instance["title"];
            
    echo $after_title;
    
    
        
        while ( $cat_posts->have_posts() )
        {
            $cat_posts->the_post();
        ?>    
        
        
            
        <?php if( $instance["switch_images"] ) { ?>
        <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 80,80 ), array( 'class' => 'img-thumb-right' )); ?>
        </a>
    
    <?php } else { ?>
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 80,80 ), array( 'class' => 'img-thumb' )); ?></a>
            
            <?php } ?>    
            
            
    
    
        <h1 class="normal"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        
    <?php the_content_rss('', TRUE, '', 7);    ?>
    
    <div style="clear: both;"></div>    
            
    
            
            
    
    <?php
        }
        
    
        
        echo $after_widget;
    
        $post = $post_old; 
    }
    
    
    
    
    function update($new_instance, $old_instance) {
    
    
        
        return $new_instance;
    }
    
    function form($instance) {
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-thumbs.gif" alt="widget-thumbs" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 191px;" />
    
    <p>Use this widget to add a list of posts, with thumbnail images and an excerpt of text, as shown in the image.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>        
    
                            <p>
                    
                    <?php _e( '<p><b>LINKABLE TITLE?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("title_link"); ?>" name="<?php echo $this->get_field_name("title_link"); ?>"<?php checked( (bool) $instance["title_link"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to link the widget title to your selected category.' ); ?><br /><br />
    
    
                </label>
            </p>        
    
    
    
                                        <p>
                    
                    <?php _e( '<p><b>SWITCH IMAGES?</b></p>' ); ?>
                    <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("switch_images"); ?>" name="<?php echo $this->get_field_name("switch_images"); ?>"<?php checked( (bool) $instance["switch_images"], true ); ?> />
                    <br /><br /><?php _e( 'Check the box to switch the thumbnail images to be right-aligned.' ); ?><br /><br />
    
    
                </label>
            </p>    
                                    <p>
                                    
                <label for="<?php echo $this->get_field_id("show"); ?>">
                        <?php _e( '<p><b>POST COUNT:</b></p>' ); ?>
                    <input style="text-align: center;" id="<?php echo $this->get_field_id("show"); ?>" name="<?php echo $this->get_field_name("show"); ?>" type="text" value="<?php echo absint($instance["show"]); ?>" size='3' />
                    <br /><br /><?php _e( 'Enter how many posts to show in this list.' ); ?><br /><br />
                </label>
            </p>
            
                    <p>
                <label for="<?php echo $this->get_field_id("skip"); ?>">
                <?php _e( '<p><b>SKIP POSTS?</b></p>' ); ?>
                <input style="text-align: center;" id="<?php echo $this->get_field_id("skip"); ?>" name="<?php echo $this->get_field_name("skip"); ?>" type="text" value="<?php echo absint($instance["skip"]); ?>" size='3' />
                                <br /><br /><?php _e( 'Enter how many posts to skip before starting this list.' ); ?><br /><br />
                                
                                </label>
            </p>
            
            <p>
                <label>
                <?php _e( '<p><b>SELECT A CATEGORY:</b></p>' ); ?>
                        <?php wp_dropdown_categories( array( 'name' => $this->get_field_name("cat"), 'selected' => $instance["cat"] ) ); ?>
                <br /><br /><?php _e( 'Select one of your categories to show posts from.' ); ?><br /><br />
                </label>
            </p>
            
    <?php
    
    }
    
    }
    
    add_action( 'widgets_init', create_function('', 'return register_widget("PMThemeThumbs");') );
    
    ?>
    <?php
    
    
    class PMThemeVideo extends WP_Widget {
    
        function PMThemeVideo() {
            $widget_ops = array('classname' => 'widget_pmthemevideo', 'description' => __('Embed a video into a widget'));
            $control_ops = array('width' => 350, 'height' => 350);
            $this->WP_Widget('pmthemevideo', __('BEEB - Video'), $widget_ops, $control_ops);
        }
    
        function widget( $args, $instance ) {
            extract($args);
            $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
            $text = apply_filters( 'widget_execphp', $instance['text'], $instance );
            echo $before_widget;
    
    
    
    
    
    
    
    
    
    
    echo $before_title;        
            
    
                
    
        if( $instance["title"] )
            echo $instance["title"];
        else
            echo 'Featured Video';
            
    echo $after_title;
    
    
    
    
    
                ?>            
                <center><?php echo $instance['filter'] ? wpautop($text) : $text; ?></center>
            
    
        
    
            <?php
            echo $after_widget;
        }
    
        function update( $new_instance, $old_instance ) {
            $instance = $old_instance;
            $instance['title'] = strip_tags($new_instance['title']);
            if ( current_user_can('unfiltered_html') )
                $instance['text'] =  $new_instance['text'];
            else
                $instance['text'] = stripslashes( wp_filter_post_kses( $new_instance['text'] ) );
            $instance['filter'] = isset($new_instance['filter']);
            return $instance;
        }
    
        function form( $instance ) {
            $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );
            $title = strip_tags($instance['title']);
            $text = format_to_edit($instance['text']);
    ?>
    
    
    <p>
    
    <img src="http://beeb-theme.com/assets/widget-video.gif" alt="widget-video" align="right" style="padding: 1px; margin: 0px 0px 10px 10px; border: 1px solid #C0CCD3; width: 200px; height: 175px;" />
    
    <p>Use this widget to embed a video into any of your columns from sites such as YouTube and Google Video.</p>
    
    <p>Suitable for <u>all columns</u>.</p>
    
    <div style="clear: both; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #C0CCD3;"></div>
        
        </p>
        
        
            <p>
                <label for="<?php echo $this->get_field_id("title"); ?>">
                
                                <?php _e( '<p><b>WIDGET TITLE:</b></p>' ); ?>
    
                    <input class="widefat" id="<?php echo $this->get_field_id("title"); ?>" name="<?php echo $this->get_field_name("title"); ?>" type="text" value="<?php echo esc_attr($instance["title"]); ?>" />
                <br /><br /><?php _e( 'Enter a title for this widget, or leave blank to use the default text.' ); ?><br /><br />
                </label>
            </p>
            
            
    
            
            
            
                    <p>
                <label for="<?php echo $this->get_field_id('text'); ?>">
                
                                <?php _e( '<p><b>VIDEO EMBED CODE:</b></p>' ); ?>
    
            <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea></p>
                <br /><br /><?php _e( 'Enter the 280*220px video embed code in the field above.' ); ?><br /><br />
                    </label>
            </p>
                
    <?php
        }
    }
    
    add_action('widgets_init', create_function('', 'return register_widget("PMThemeVideo");'));
    ?>
    <?php
    
    function dynnav($text) {
    
        global $post;
    
        if( is_single() || is_category() ) {
    
            $categories = wp_get_post_categories($post->ID);
    
            foreach( $categories as $catid ) {
                $cat = get_category($catid);
                if(preg_match('#>' . $cat->name . '</a>#', $text)) {
                    $text = str_replace('>' . $cat->name . '</a>', ' class="active-cat">' . $cat->name . '</a>', $text);
                }
            }
    
        }
    
        return $text;
    
    }
    
    add_filter('wp_list_categories', 'dynnav');
    
    ?>
    <?php
    // Numero parole visualizzate nel post
    function new_excerpt_length($length) {
        return 25;
    }
    ?>
    add_filter('excerpt_length', 'new_excerpt_length');
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  12. #12
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Ora il file l' ho modificato, c' é però un problema, all' inizio di ogni pagina mi compare questa scritta: add_filter('excerpt_length', 'new_excerpt_length');

    ed inoltre la funzione non fa il suo lavoro, il testo continua a rimanere per intero..

  13. #13
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Ripristina il file functions.php originale, la funzione che ti avevo detto di aggiungere c'era già :)
    per cambiare il numero di parole visibili vai alla riga 605 del file e cambia il numero 25 con quello che vuoi.

    Puoi ripristinare anche il file index.php originale mentre dovrai sostituire single.php con questo:
    Codice:
    <?php get_header(); ?> 
        <div id="layout-post"><!-- BEGIN POST LAYOUT --> 
            <div class="layout-top"> 
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
                <div class="post-top"></div> 
                <div class="post-repeat"> 
                    <h1><?php the_title(); ?></h1> 
                    <span id="date">Published on <?php the_time('F j, Y'); ?> by <?php the_author_posts_link(); ?> &nbsp;&nbsp;&middot;&nbsp;&nbsp; <?php comments_number('No Comments','1 Comment','% Comments'); ?></span> 
    <?php the_excerpt();?>
                <?php the_tags('<div style="clear: both; margin: 0px 0px 20px 0px; padding: 0px 0px 10px 0px; border-bottom: 1px solid #dbdbdb;"></div><p><b>Tags:&nbsp;</b> ',', ','</p>'); ?> 
                <?php endwhile; else: ?> 
                    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> 
                <?php endif; ?> 
                </div> 
                <div class="post-bottom"></div> 
            </div> 
            <div id="layout-right"> 
                <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Post Column') ) : else : ?> 
            <div class="widget-top">Post Column</div> 
            <div class="nowidget"><a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets">Add Widgets</a></div> 
            <div class="widget-bottom"></div> 
            <?php endif; ?> 
            </div> 
        </div><!-- END POST LAYOUT --> 
    <?php get_footer(); ?>
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  14. #14
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Ragazzi avrei una domanda da porvi, stò creando questo aggregatore, ho sistemato tutte le questioni sopra riportate, ora avrei un problema, il famoso iframe non sempre viene visualizzato nelle news... perché, da cosa dipende?

    Help me please!

  15. #15
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Non ho idea, può dipendere dal sito di provenienza o dal plugin.
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  16. #16
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Ho testato il codice che ti avevo postato:
    Codice:
    <div style="width:30%;float:left;">{content}</div>
    <div style="width:70%;float:left;"><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    e come vedi quì (non tener conto della formattazione sballata)
    Prova
    sembra funzioni senza problemi.
    Ti ricordo che le modifiche in WP-o-Matic apportate in Options > Custom post template se non erro non sono retroattive, quindi non andranno ad applicarsi ai feed precedentemente importati.
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  17. #17
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Ho testato il codice che ti avevo postato:
    Codice:
    <div style="width:30%;float:left;">{content}</div>
    <div style="width:70%;float:left;"><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    e come vedi quì (non tener conto della formattazione sballata)
    Prova
    sembra funzioni senza problemi.
    Ti ricordo che le modifiche in WP-o-Matic apportate in Options > Custom post template se non erro non sono retroattive, quindi non andranno ad applicarsi ai feed precedentemente importati.
    Ma lo sai che ho fatto qualche prova e funziona... XD
    il problema è che durante le prove mi funzionava anche l' altro codice... però forse questa volta ci siamo proprio :)

    Solo una cosa, come posso sistemare la formattazione del frame? Ho provato ad inserire <br/> prima del codice option ma abbassa anche il testo e non mi scende il frame...

  18. #18
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Prova così:
    Codice:
    <div>{content}</div>
    <div style="clear:both;"></div>
    <div><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  19. #19
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Prova così:
    Codice:
    <div>{content}</div>
    <div style="clear:both;"></div>
    <div><iframe  framborder="0" width="950" height="700"  src="{permalink}"></iframe></div>
    <div style="clear:both;"></div>
    Perfetto!! Funziona cosi, ora provo ad inserirlo a tutte le fonti e controllo che si visualizzi per bene :)

    Grazie Mille!

  20. #20
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    :(

    Come non detto, non sempre l' iframe viene caricato... altre soluzioni? :(:(

  21. #21
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Non saprei...
    controlla se non carica qualche particolare indirizzo in modo da vedere se dipende dal link al sito.
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  22. #22
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Non saprei...
    controlla se non carica qualche particolare indirizzo in modo da vedere se dipende dal link al sito.
    Ho fatto delle prove, a quanto pare non dipende dal sito di provenienza... non so proprio come risolvere...

  23. #23
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Visto che mi chiedevi una collocazione diversa dell'iframe prova questa apertura in overlay:
    Prova
    clicca sul link: Outside webpage (IFrame) che trovi alla fine di ogni feed per vedere il risultato.
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

  24. #24
    Data Registrazione
    24/07/10
    Età
    26
    Messaggi
    142
    Grazie dati
    0
    Ringraziato 0 volte in 0 post
    Mentioned
    0 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Citazione Originariamente Scritto da kodemondo Visualizza Messaggio
    Visto che mi chiedevi una collocazione diversa dell'iframe prova questa apertura in overlay:
    Prova
    clicca sul link: Outside webpage (IFrame) che trovi alla fine di ogni feed per vedere il risultato.
    Interessante... hai il codice option cosi proviamo a vedere se funziona? :)

    Ma non credi che una cosa di questo genere sia più funzionale?: Speciale Kinect Games // Current

    Comunque se hai il codice lo proviamo! ;)

    Grazie mille kodemondo

  25. #25
    Data Registrazione
    14/01/09
    Località
    Padova
    Messaggi
    3,467
    Grazie dati
    271
    Ringraziato 626 volte in 562 post
    Mentioned
    35 Post(s)

    Predefinito Riferimento: Problema con Aggregatore

    Non si tratta di semplice codice da inserire nelle opzioni del plugin ma di un integrazione nel template di uno script cha fa uso di jQuery.
    ColorBox - customizable lightbox plugin for jQuery 1.3 & 1.4
    Acquisisci nuove conoscenze mentre rifletti sulle vecchie, e forse potrai insegnare ad altri. (Confucio)
    ANIMAL FESTIVAL - SINCE 2000 - SOUND JAMBOREE BEER& FOOD

Pagina 1 di 4 123 ... UltimaUltima

Permessi di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •  
Seguici!
P.IVA: 02750560738
Cionfs © - Cionfs ® - Marchio registrato numero 0001524896
© Cionfs'Forum CMS - Cionfs'Forum CMS - Guide Gratis - Supporto CMS - E' vietata la copia anche parziale senza autorizzazione.
Questo sito utilizza cookies di analytics su dati esclusivamente aggregati e cookies di terze parti per migliorare l'esperienza dell'utente tramite plugin sociali e video.
Cliccando su oppure continuando la navigazione sul sito accetti i cookies. Per l'informativa completa clicca qui.