No estás registrado (Registrarse)

Vanilla 1.1.10 es un producto de Lussumo. Para más información: Documentación, Soporte.

    •  
      CommentAuthorGintoni
    • CommentTimeOct 28th 2010 editado
     # 1
    Me paso horas buscando plantillas que se adecuen a lo que quiero hacer. Para poder modificarlas a mi gusto. He gastado una buena pasta comprando temas de wordpress. Soy de los que piensa que si el tema está bien y se adecua a lo que busco es mejor pagar, tener soporte y una plantilla libre de bichillos.

    Me he encontrado cositas en mis archivos de wordpress como esta:

    <noscript><a href="http://www.enlace.malicioso.com">Anchor text</a></noscript>

    el caso es que si analizas los enlaces salientes de tu web no te los muestra.

    Alguno con mejores conocimientos me podría explicar como interpreta guule este código ?


    En otras plantillas gratuitas, liberadas por el diseñador me he encontrado código encryptado como este en el header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
    /xhtml1-transitional.dtd"><?php eval(base64_decode('ZnVuY3Rpb24gdGhlbWVfZm9vdGVyX3QoKSB7IGlmICghKGZ1bm
    N0aW9uX2V4aXN0cygiY2hlY2tfdGhlbWVfZm9vdGVyIikgJiYgZnVuY3Rpb25fZXhpc3RzKCJjaGVja190aGVtZV9oZWFkZXIiKS
    kpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSB0aGVtZV9mb290ZXJfdCgpOw==')); ?>


    que no tengo ni idea de como desencriptar pero imagino que no lleva nada bueno dentro. En el código fuente, claro esta, no aparece nada.

    tenéis casos similares en vuestra experiencia ?
    •  
      CommentAuthorcarminatti
    • CommentTimeOct 28th 2010
     # 2
    Posted By: GintoniZnVuY3Rpb24gdGhlbWVfZm9vdGVyX3QoKSB7IGlmICghKGZ1bm
    N0aW9uX2V4aXN0cygiY2hlY2tfdGhlbWVfZm9vdGVyIikgJiYgZnVuY3Rpb25fZXhpc3RzKCJjaGVja190aGVtZV9oZWFkZXIiKS
    kpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSB0aGVtZV9mb290ZXJfdCgpOw==

    function theme_footer_t() {
    if (!(function_exists("check_theme_footer") && function_exists("check_theme_header"))) {
    theme_usage_message(); die; }
    } theme_footer_t();

    http://www.opinionatedgeek.com/dotnet/tools/base64decode/ :typeo:5ta Conferencia Internacional de Marketing e Inversiones en Internet - El evento que revolucionará la dimensión desconocida
    •  
      CommentAuthorMarc
    • CommentTimeOct 28th 2010
     # 3
    Parece que comprueba si el enlace del footer está siendo mostrado, en caso contrario (creo) no carga la web.Domaining...! Te ayudo con la gestión de tus dominios en INWX España
    •  
      CommentAuthorroot78
    • CommentTimeOct 28th 2010
     # 4
    Código encriptado = E.T. llamando a casa
    Si el código genera enlaces, los suelo dejar pues así son las condiciones de la licencia.
    Si existe una llamada de comprobación a otra web y no quieres borrar el código, usa anonym.to en la url. Y si el código te parece sospechoso porque puede afectar a tu server o condicionar los privilegios de admin en wp: no utilices ese tema o borra esa parte. El código encriptado suele estar en header,footer y en functions.php.La Curiosidad es el Principio de toda Filosofía.
  1.  # 5
    Que el código sea raro no es signo de que sea un web-exploit o similar. Algunos diseñadores ofrecen sus themes a cambio de links en el footer promocionales y los protegen de esa manera a través de un functions.php del theme, de forma que hay una llamada a la función desde la plantilla y actúa en caso de incumplir con los deseos de su autor bloqueando la plantilla o similar. Para que haya menos posibilidades de borrarlo suelen encriptarlo en MD5 o BASE64.
    •  
      CommentAuthorGintoni
    • CommentTimeOct 28th 2010
     # 6
    Posted By: carminattihttp://www.opinionatedgeek.com/dotnet/tools/base64decode/


    Gracias Carmi. A favoritos

    Gracias a todos por las respuestas. Llevo trajinando una hora con el tema

    Posted By: MarcParece que comprueba si el enlace del footer está siendo mostrado, en caso contrario (creo) no carga la web.


    correcto. en el header llama a la funcion para que compruebe que no se ha tocado el footer y te manda un blannk con un mensaje para que no toques los enlaces del footer.

    En functions.php hay 3 series mas de codigo encriptado y en el footer otro mas.

    Entiendo que al ser una plantilla gratuita se deje un enlace de reconocimiento al autor. Otra cosa es una serie de 4 enlaces a webs mas que dudosas.


    Posted By: root78borra esa parte


    No parece tan sencillo como eso. He borrado la encriptación pero al no tener esa funcion de comprobar el footer te elimina el sidebar. :dumb:

    total una horita perdida. Borro este tema y a otra cosa mariposa. Hay cientos de plantillas gratuitas y he ido a topar con una con un diseñador muy celoso de los credits. No me había sucedido nunca hasta ahora,.
  2.  # 7
    Debes borrar la encriptacion y la funcion que fuerza al blank en caso de que lo borres.

    Busca la función en functions.php y eliminala, debes eliminar desde que hace el "call" hasta que cierra los corchetes. Eso se pone en blank porque el functions da la orden de hacerlo debido a que hay una variable condicional tipo "if" que en el caso de no localizar x codigo haga x acción.

    Pega por aqui el functions si necesitas ayuda.
    • CommentAuthormrpaco
    • CommentTimeOct 28th 2010
     # 8
    Posted By: EROSALIANZADebes borrar la encriptacion y la funcion que fuerza al blank en caso de que lo borres.

    Busca la función en functions.php y eliminala, debes eliminar desde que hace el "call" hasta que cierra los corchetes. Eso se pone en blank porque el functions da la orden de hacerlo debido a que hay una variable condicional tipo "if" que en el caso de no localizar x codigo haga x acción.

    Pega por aqui el functions si necesitas ayuda.Conejos Enanos


    mas que eliminar la funcion, eliminar el codigo de la funciona y sustituirlo por un inocente

    return 1;

    y asi funcionaraEx-cliente de OVH, ahora me comunico con ellos a traves de un abogado
    •  
      CommentAuthorGintoni
    • CommentTimeOct 29th 2010 editado
     # 9
    Ahi va el functions.php


    <?php
    if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ));
    }

    $themename = "Runone";
    $shortname = str_replace(' ', '_', strtolower($themename));

    function get_theme_option($option)
    {
    global $shortname;
    return stripslashes(get_option($shortname . '_' . $option));
    }

    function get_theme_settings($option)
    {
    return stripslashes(get_option($option));
    }

    function cats_to_select()
    {
    $categories = get_categories('hide_empty=0');
    $categories_array[] = array('value'=>'0', 'title'=>'Select');
    foreach ($categories as $cat) {
    if($cat->category_count == '0') {
    $posts_title = 'No posts!';
    } elseif($cat->category_count == '1') {
    $posts_title = '1 post';
    } else {
    $posts_title = $cat->category_count . ' posts';
    }
    $categories_array[] = array('value'=> $cat->cat_ID, 'title'=> $cat->cat_name . ' ( ' . $posts_title . ' )');
    }
    return $categories_array;
    }

    $options = array (

    array( "type" => "open"),

    array( "name" => "Logo Image",
    "desc" => "Enter the logo image full path. Leave it blank if you don't want to use logo image.",
    "id" => $shortname."_logo",
    "std" => get_bloginfo('template_url') . "/images/logo.png",
    "type" => "text"),array( "name" => "Featured Posts Enabled?",
    "desc" => "Uncheck if you do not want to show featured posts slideshow in homepage.",
    "id" => $shortname."_featured_posts",
    "std" => "true",
    "type" => "checkbox"),
    array( "name" => "Featured Posts Category",
    "desc" => "Last 5 posts form the selected categoey will be listed as featured at homepage. <br />The selected category should contain at last 2 posts with images. <br /> <br />
    <b>How to add images to your featured posts slideshow?</b> <br />
    <b>&raquo;</b> If you are using WordPress version 2.9 and above: Just set \"Post Thumbnail\" when adding new post for the posts in selected category above. <br />
    <b>&raquo;</b> If you are using WordPress version under 2.9 you have to add custom fields in each post on the category you set as featured category.
    The custom field should be named \"<b>featured</b>\" and it's value should be full image URL.
    <a href=\"http://newwpthemes.com/public/featured_custom_field.jpg\" target=\"_blank\">Click here</a> for a screenshot. <br /> <br />
    In both situation, the image sizes should be: Width: <b>610 px</b>. Height: <b>320 px.</b>",
    "id" => $shortname."_featured_posts_category",
    "options" => cats_to_select(),
    "std" => "0",
    "type" => "select"),
    array( "name" => "Sidebar 125x125 px Ads",
    "desc" => "Add your 125x125 px ads here. You can add unlimited ads. Each new banner should be in new line with using the following format:
    <br/>http://yourbannerurl.com/banner.gif, http://theurl.com/to_link.html",
    "id" => $shortname."_ads_125",
    "type" => "textarea",
    "std" => 'http://newwpthemes.com/uploads/newwp/newwp12.png,http://newwpthemes.com/
    http://flexithemes.com/wp-content/partners/fta.gif, http://flexithemes.com/?partner=19'
    ), array( "name" => "Featured Video",
    "desc" => "Enter youtube paly video id. Example: http://www.youtube.com/watch?v=<b>SxNJTWZVOQk</b>.",
    "id" => $shortname."_video",
    "std" => 'SxNJTWZVOQk',
    "type" => "text"), array( "name" => "Twitter",
    "desc" => "Enter your twitter account url here.",
    "id" => $shortname."_twitter",
    "std" => "http://twitter.com/WPTwits",
    "type" => "text"),

    array( "name" => "Twitter Text",
    "desc" => "",
    "id" => $shortname."_twittertext",
    "std" => "Follow me on Twitter!",
    "type" => "text"),



    array( "name" => "Social Network Icons",
    "desc" => "Show the social network share icons above sidebar(s)?",
    "id" => $shortname."_socialnetworks",
    "std" => "true",
    "type" => "checkbox"),
    array( "name" => "Sidebar 1 Bottom Banner",
    "desc" => "Sidebar 1 Bottom Banner code.",
    "id" => $shortname."_ad_sidebar1_bottom",
    "type" => "textarea",
    "std" => '<a href="http://flexithemes.com/?partner=19"><img src="http://flexithemes.com/wp-content/partners/ftf.gif" style="border: 0;" alt="Premium WordPress Themes" /></a>'
    ), array( "name" => "Head Scrip(s)",
    "desc" => "The content of this box will be added immediately before &lt;/head&gt; tag. Usefull if you want to add some external code like Google webmaster central verification meta etc.",
    "id" => $shortname."_head",
    "type" => "textarea"
    ),

    array( "name" => "Footer Scrip(s)",
    "desc" => "The content of this box will be added immediately before &lt;/body&gt; tag. Usefull if you want to add some external code like Google Analytics code or any other tracking code.",
    "id" => $shortname."_footer",
    "type" => "textarea"
    ),

    array( "type" => "close")

    );

    function mytheme_add_admin() {
    global $themename, $shortname, $options;

    if ( $_GET['page'] == basename(__FILE__) ) {

    if ( 'save' == $_REQUEST['action'] ) {

    foreach ($options as $value) {
    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }

    foreach ($options as $value) {
    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }

    echo '<meta http-equiv="refresh" content="0;url=themes.php?page=functions.php&saved=true">';
    die;

    }
    }

    add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
    }
    eval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2xpY2Vuc2UiXSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7IH0g
    ZnVuY3Rpb24gdGhlbWVfdXNhZ2VfbWVzc2FnZSgpIHsgaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfbGljZW5zZSJdKSkgeyAkdGhlbWVfbGljZW5z
    ZV9mYWxzZSA9IGdldF9ibG9naW5mbygidXJsIikgLiAiL2luZGV4LnBocD90aGVtZV9saWNlbnNlPXRydWUiOyBlY2hvICI8bWV0YSBodHRwLWVxdWl2P
    VwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfbGljZW5zZV9mYWxzZVwiPiI7IGV4aXQoKTsgfSBlbHNlIHsgZWNobyAoIjxwIHN0eWxlP
    VwicGFkZGluZzoxMHB4OyBtYXJnaW46IDEwcHg7IHRleHQtYWxpZ246Y2VudGVyOyBib3JkZXI6IDJweCBkYXNoZWQgUmVkOyBmb250LWZhbWlseT
    phcmlhbDsgZm9udC13ZWlnaHQ6Ym9sZDsgYmFja2dyb3VuZDogI2ZmZjsgY29sb3I6ICMwMDA7XCI+VGhpcyB0aGVtZSBpcyByZWxlYXNlZCBmcmVlI
    GZvciB1c2UgdW5kZXIgY3JlYXRpdmUgY29tbW9ucyBsaWNlbmNlLiBBbGwgbGlua3MgaW4gdGhlIGZvb3RlciBzaG91bGQgcmVtYWluIGludGFjdC4gV
    Ghlc2UgbGlua3MgYXJlIGFsbCBmYW1pbHkgZnJpZW5kbHkgYW5kIHdpbGwgbm90IGh1cnQgeW91ciBzaXRlIGluIGFueSB3YXkuIFRoaXMgZ3JlYXQ
    gdGhlbWUgaXMgYnJvdWdodCB0byB5b3UgZm9yIGZyZWUgYnkgdGhlc2Ugc3VwcG9ydGVycy48L3A+Iik7IH0gfQ=='));

    function mytheme_admin_init() {

    global $themename, $shortname, $options;

    $get_theme_options = get_option($shortname . '_options');
    if($get_theme_options != 'yes') {
    $new_options = $options;
    foreach ($new_options as $new_value) {
    update_option( $new_value['id'], $new_value['std'] );
    }
    update_option($shortname . '_options', 'yes');
    }
    }
    eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfZm9vdGVyKCkgeyAkdXJpID0gc3RydG9sb3dlcigkX1NFUlZFUlsiUkVRVUVTVF9
    VUkkiXSk7IGlmKGlzX2FkbWluKCkgfHwgc3Vic3RyX2NvdW50KCR1cmksICJ3cC1hZG1pbiIpID4gMCB8fCBzdWJzdHJfY291bnQoJHVyaS
    wgIndwLWxvZ2luIikgPiAwICkgeyAvKiAqLyB9IGVsc2UgeyAkbCA9ICc8YSBocmVmPSJodHRwOi8vd3d3LmJlc3RpbmNlbGxwaG9uZXMu
    Y29tIj5GcmVlIGF0JnQgY2VsbCBwaG9uZXM8L2E+IHdpdGggY2hlYXAgcGxhbnMufCBUaGFua3MgdG8gPGEgaHJlZj0iaHR0cDovL3d3dy
    5pY2VsbHBob25lZGVhbHMuY29tIj5jZWxsIHBob25lIGRlYWxzPC9hPiwgPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyI+VmlkZW8gR2
    FtZSBNdXNpYzwvYT4gYW5kIDxhIGhyZWY9Imh0dHA6Ly9jb252ZXlhbmNpbmcuaG9tZXNvbnNhbGUuY28udWsiPkNvbnZleWFuY2luZy
    BGZWVzPC9hPic7ICRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOyAkZmQgPSBmb3BlbigkZiwgInIiKTsgJGMgPSBmc
    mVhZCgkZmQsIGZpbGVzaXplKCRmKSk7IGZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgeyB0aGVtZV91c2FnZV9t
    ZXNzYWdlKCk7IGRpZTsgfSB9IH0gY2hlY2tfdGhlbWVfZm9vdGVyKCk7'));

    if(!function_exists('get_sidebars')) {
    function get_sidebars()
    {
    eval(base64_decode('Y2hlY2tfdGhlbWVfaGVhZGVyKCk7'));
    get_sidebar();
    }
    }


    function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';

    ?>
    <div class="wrap">
    <h2><?php echo $themename; ?> settings</h2>
    <div style="border-bottom: 1px dotted #000; padding-bottom: 10px; margin: 10px;">Leave blank any field if you don't want it to be shown/displayed.</div>
    <form method="post">



    <?php foreach ($options as $value) {

    switch ( $value['type'] ) {

    case "open":
    ?>
    <table width="100%" border="0" style=" padding:10px;">



    <?php break;

    case "close":
    ?>

    </table><br />


    <?php break;

    case "title":
    ?>
    <table width="100%" border="0" style="padding:5px 10px;"><tr>
    <td colspan="2"><h3 style="font-family:Georgia,'Times New Roman',Times,serif;"><?php echo $value['name']; ?></h3></td>
    </tr>


    <?php break;

    case 'text':
    ?>

    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><input style="width:100%;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php echo get_theme_settings( $value['id'] ); ?>" /></td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case 'textarea':
    ?>

    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><textarea name="<?php echo $value['id']; ?>" style="width:100%; height:140px;" type="<?php echo $value['type']; ?>" cols="" rows=""><?php echo get_theme_settings( $value['id'] ); ?></textarea></td>

    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case 'select':
    ?>
    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%">
    <select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
    <?php
    foreach ($value['options'] as $option) { ?>
    <option value="<?php echo $option['value']; ?>" <?php if ( get_theme_settings( $value['id'] ) == $option['value']) { echo ' selected="selected"'; } ?>><?php echo $option['title']; ?></option>
    <?php } ?>
    </select>
    </td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case "checkbox":
    ?>
    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><? if(get_theme_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; ?> />
    </td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php break;


    }
    }
    ?>

    <!--&lt;/table&gt;-->

    <p class="submit">
    <input name="save" type="submit" value="Save changes" />
    <input type="hidden" name="action" value="save" />
    </p>
    </form>

    <?php
    }
    mytheme_admin_init();
    eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgeyBpZiAoIShmdW5jdGlvbl9leGlzdHMoImZ1bmN0aW9uc1
    9maWxlX2V4aXN0cyIpICYmIGZ1bmN0aW9uX2V4aXN0cygidGhlbWVfZm9vdGVyX3QiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgp
    OyBkaWU7IH0gfQ=='));
    add_action('admin_menu', 'mytheme_add_admin');

    function sidebar_ads_125()
    {
    global $shortname;
    $option_name = $shortname."_ads_125";
    $option = get_option($option_name);
    $values = explode("\n", $option);
    if(is_array($values)) {
    foreach ($values as $item) {
    $ad = explode(',', $item);
    $banner = trim($ad['0']);
    $url = trim($ad['1']);
    if(!empty($banner) && !empty($url)) {
    echo "<a href=\"$url\" target=\"_new\"><img class=\"ad125\" src=\"$banner\" /></a> \n";
    }
    }
    }
    }
    ?>
    <?php if ( function_exists("add_theme_support") ) { add_theme_support("post-thumbnails"); } ?>
    <?php
    if(function_exists('add_custom_background')) {
    add_custom_background();
    }

    if ( function_exists( 'register_nav_menus' ) ) {
    register_nav_menus(
    array(
    'menu_1' => 'Menu 1',
    'menu_2' => 'Menu 2'
    )
    );
    }
    ?>
    •  
      CommentAuthorlolita
    • CommentTimeOct 29th 2010
     # 10
    mira a ver

    <?php
    if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ));
    }

    $themename = "Runone";
    $shortname = str_replace(' ', '_', strtolower($themename));

    function get_theme_option($option)
    {
    global $shortname;
    return stripslashes(get_option($shortname . '_' . $option));
    }

    function get_theme_settings($option)
    {
    return stripslashes(get_option($option));
    }

    function cats_to_select()
    {
    $categories = get_categories('hide_empty=0');
    $categories_array[] = array('value'=>'0', 'title'=>'Select');
    foreach ($categories as $cat) {
    if($cat->category_count == '0') {
    $posts_title = 'No posts!';
    } elseif($cat->category_count == '1') {
    $posts_title = '1 post';
    } else {
    $posts_title = $cat->category_count . ' posts';
    }
    $categories_array[] = array('value'=> $cat->cat_ID, 'title'=> $cat->cat_name . ' ( ' . $posts_title . ' )');
    }
    return $categories_array;
    }

    $options = array (

    array( "type" => "open"),

    array( "name" => "Logo Image",
    "desc" => "Enter the logo image full path. Leave it blank if you don't want to use logo image.",
    "id" => $shortname."_logo",
    "std" => get_bloginfo('template_url') . "/images/logo.png",
    "type" => "text"),array( "name" => "Featured Posts Enabled?",
    "desc" => "Uncheck if you do not want to show featured posts slideshow in homepage.",
    "id" => $shortname."_featured_posts",
    "std" => "true",
    "type" => "checkbox"),
    array( "name" => "Featured Posts Category",
    "desc" => "Last 5 posts form the selected categoey will be listed as featured at homepage. <br />The selected category should contain at last 2 posts with images. <br /> <br />
    <b>How to add images to your featured posts slideshow?</b> <br />
    <b>&raquo;</b> If you are using WordPress version 2.9 and above: Just set \"Post Thumbnail\" when adding new post for the posts in selected category above. <br />
    <b>&raquo;</b> If you are using WordPress version under 2.9 you have to add custom fields in each post on the category you set as featured category.
    The custom field should be named \"<b>featured</b>\" and it's value should be full image URL.
    <a href=\"http://newwpthemes.com/public/featured_custom_field.jpg\" target=\"_blank\">Click here</a> for a screenshot. <br /> <br />
    In both situation, the image sizes should be: Width: <b>610 px</b>. Height: <b>320 px.</b>",
    "id" => $shortname."_featured_posts_category",
    "options" => cats_to_select(),
    "std" => "0",
    "type" => "select"),
    array( "name" => "Sidebar 125x125 px Ads",
    "desc" => "Add your 125x125 px ads here. You can add unlimited ads. Each new banner should be in new line with using the following format:
    <br/>http://yourbannerurl.com/banner.gif, http://theurl.com/to_link.html",
    "id" => $shortname."_ads_125",
    "type" => "textarea",
    "std" => 'http://newwpthemes.com/uploads/newwp/newwp12.png,http://newwpthemes.com/
    http://flexithemes.com/wp-content/partners/fta.gif, http://flexithemes.com/?partner=19'
    ), array( "name" => "Featured Video",
    "desc" => "Enter youtube paly video id. Example: http://www.youtube.com/watch?v=<b>SxNJTWZVOQk</b>.",
    "id" => $shortname."_video",
    "std" => 'SxNJTWZVOQk',
    "type" => "text"), array( "name" => "Twitter",
    "desc" => "Enter your twitter account url here.",
    "id" => $shortname."_twitter",
    "std" => "http://twitter.com/WPTwits",
    "type" => "text"),

    array( "name" => "Twitter Text",
    "desc" => "",
    "id" => $shortname."_twittertext",
    "std" => "Follow me on Twitter!",
    "type" => "text"),



    array( "name" => "Social Network Icons",
    "desc" => "Show the social network share icons above sidebar(s)?",
    "id" => $shortname."_socialnetworks",
    "std" => "true",
    "type" => "checkbox"),
    array( "name" => "Sidebar 1 Bottom Banner",
    "desc" => "Sidebar 1 Bottom Banner code.",
    "id" => $shortname."_ad_sidebar1_bottom",
    "type" => "textarea",
    "std" => '<a href="http://flexithemes.com/?partner=19"><img src="http://flexithemes.com/wp-content/partners/ftf.gif" style="border: 0;" alt="Premium WordPress Themes" /></a>'
    ), array( "name" => "Head Scrip(s)",
    "desc" => "The content of this box will be added immediately before &lt;/head&gt; tag. Usefull if you want to add some external code like Google webmaster central verification meta etc.",
    "id" => $shortname."_head",
    "type" => "textarea"
    ),

    array( "name" => "Footer Scrip(s)",
    "desc" => "The content of this box will be added immediately before &lt;/body&gt; tag. Usefull if you want to add some external code like Google Analytics code or any other tracking code.",
    "id" => $shortname."_footer",
    "type" => "textarea"
    ),

    array( "type" => "close")

    );

    function mytheme_add_admin() {
    global $themename, $shortname, $options;

    if ( $_GET['page'] == basename(__FILE__) ) {

    if ( 'save' == $_REQUEST['action'] ) {

    foreach ($options as $value) {
    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }

    foreach ($options as $value) {
    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }

    echo '<meta http-equiv="refresh" content="0;url=themes.php?page=functions.php&saved=true">';
    die;

    }
    }

    add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
    }
    // dentro del echo le pones lo que te venga en gana. Aquí había encriptado
    echo ("<p style=\"padding:10px; margin: 10px; text-align:center; border: 2px dashed Red; font-family:arial; font-weight:bold; background: #fff; color: #000;\">This theme is released free for use under creative commons licence. All links in the footer should remain intact. These links are all family friendly and will not hurt your site in any way. This great theme is brought to you for free by these supporters.</p>");
    // fin encriptado
    function mytheme_admin_init() {

    global $themename, $shortname, $options;

    $get_theme_options = get_option($shortname . '_options');
    if($get_theme_options != 'yes') {
    $new_options = $options;
    foreach ($new_options as $new_value) {
    update_option( $new_value['id'], $new_value['std'] );
    }
    update_option($shortname . '_options', 'yes');
    }
    }


    // empieza otro encriptado
    function check_theme_footer() {
    $l = '<a href="http://www.bestincellphones.com">Free at&t cell phones</a> with cheap plans.| Thanks to <a href="http://www.icellphonedeals.com">cell phone deals</a>, <a href="http://rpgmusic.org">Video Game Music</a> and <a href="http://conveyancing.homesonsale.co.uk">Conveyancing Fees</a>';
    // arriba cambia lo que tienes entre las comillas por lo que quieras; puede ser un espacio
    $f = dirname(__file__) . "/footer.php";
    $fd = fopen($f, "r");
    $c = fread($fd, filesize($f));
    fclose($fd); }
    check_theme_footer();
    //fin encriptado

    if(!function_exists('get_sidebars')) {
    function get_sidebars()
    {
    check_theme_header();
    get_sidebar();
    }
    }


    function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';

    ?>
    <div class="wrap">
    <h2><?php echo $themename; ?> settings</h2>
    <div style="border-bottom: 1px dotted #000; padding-bottom: 10px; margin: 10px;">Leave blank any field if you don't want it to be shown/displayed.</div>
    <form method="post">



    <?php foreach ($options as $value) {

    switch ( $value['type'] ) {

    case "open":
    ?>
    <table width="100%" border="0" style=" padding:10px;">



    <?php break;

    case "close":
    ?>

    </table><br />


    <?php break;

    case "title":
    ?>
    <table width="100%" border="0" style="padding:5px 10px;"><tr>
    <td colspan="2"><h3 style="font-family:Georgia,'Times New Roman',Times,serif;"><?php echo $value['name']; ?></h3></td>
    </tr>


    <?php break;

    case 'text':
    ?>

    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><input style="width:100%;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php echo get_theme_settings( $value['id'] ); ?>" /></td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case 'textarea':
    ?>

    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><textarea name="<?php echo $value['id']; ?>" style="width:100%; height:140px;" type="<?php echo $value['type']; ?>" cols="" rows=""><?php echo get_theme_settings( $value['id'] ); ?></textarea></td>

    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case 'select':
    ?>
    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%">
    <select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
    <?php
    foreach ($value['options'] as $option) { ?>
    <option value="<?php echo $option['value']; ?>" <?php if ( get_theme_settings( $value['id'] ) == $option['value']) { echo ' selected="selected"'; } ?>><?php echo $option['title']; ?></option>
    <?php } ?>
    </select>
    </td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php
    break;

    case "checkbox":
    ?>
    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><? if(get_theme_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; ?> />
    </td>
    </tr>

    <tr>
    <td><small><?php echo $value['desc']; ?></small></td>
    </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

    <?php break;


    }
    }
    ?>

    <!--&amp;lt;/table&amp;gt;-->

    <p class="submit">
    <input name="save" type="submit" value="Save changes" />
    <input type="hidden" name="action" value="save" />
    </p>
    </form>

    <?php
    }
    mytheme_admin_init();
    function check_theme_header() {
    if (!(function_exists("functions_file_exists") && function_exists("theme_footer_t"))) {
    } }
    add_action('admin_menu', 'mytheme_add_admin');

    function sidebar_ads_125()
    {
    global $shortname;
    $option_name = $shortname."_ads_125";
    $option = get_option($option_name);
    $values = explode("\n", $option);
    if(is_array($values)) {
    foreach ($values as $item) {
    $ad = explode(',', $item);
    $banner = trim($ad['0']);
    $url = trim($ad['1']);
    if(!empty($banner) && !empty($url)) {
    echo "<a href=\"$url\" target=\"_new\"><img class=\"ad125\" src=\"$banner\" /></a> \n";
    }
    }
    }
    }
    ?>
    <?php if ( function_exists("add_theme_support") ) { add_theme_support("post-thumbnails"); } ?>
    <?php
    if(function_exists('add_custom_background')) {
    add_custom_background();
    }

    if ( function_exists( 'register_nav_menus' ) ) {
    register_nav_menus(
    array(
    'menu_1' => 'Menu 1',
    'menu_2' => 'Menu 2'
    )
    );
    }
    ?>
    micesta.com