kaosklub  [ Profile ]

Sort by: Date / Title /

  1. 1 year ago
    That code would go at the end of the header.php (of the template)
    1. <div id="navbarright">
    2. <form action="http://www.kaosklub.com" id="searchform">
    3. <input type="hidden" name="cx" value="partner-pub-8683538658017137:5acdqp-99t9" />
    4. <input type="hidden" name="cof" value="FORID:11" />
    5. <input type="hidden" name="ie" value="ISO-8859-1" />
    6. <input type="text" value="" name="q" size="15" id="searchbox" onfocus="if (this.value == 'Buscar...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Buscar...';}" />
    7. <input type="submit" name="sa" id="searchbutton" value="OK" />
    8. </form>
    9. </div>
    10.  
    11. </div>
    12. <div id="wrap">
    13. <div align="center" id="cse-search-results" align="justify"></div>
    14. <script type="text/javascript">
    15.   var googleSearchIframeName = "cse-search-results";
    16.   var googleSearchFormName = "cse-search-box";
    17.   var googleSearchFrameWidth = 850;
    18.   var googleSearchDomain = "www.google.es";
    19.   var googleSearchPath = "/cse";
    20. </script>
    21. <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1581"></script>
  2. 1 year ago
    Original web not working, here's the code
    1. <?php
    2. /*
    3. Plugin Name: Limit Posts
    4. Plugin URI: http://labitacora.net/comunBlog/limit-post.phps
    5. Description: Limits the displayed text length on the index page entries and generates a link to a page to read the full content if its bigger than the selected maximum length.
    6. Usage: the_content_limit($max_charaters, $more_link)
    7. Version: 1.1
    8. Author: Alfonso Sánchez-Paus Díaz y Julián Simón de Castro
    9. Author URI: http://labitacora.net/
    10. License: GPL
    11. Download URL: http://labitacora.net/comunBlog/limit-post.phps
    12. Make:
    13.     In file index.php
    14.     replace the_content()
    15.     with the_content_limit(1000, "more")
    16. */
    17.  
    18. function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    19.     $content = get_the_content($more_link_text, $stripteaser, $more_file);
    20.     $content = apply_filters('the_content', $content);
    21.     $content = str_replace(']]>', ']]&gt;', $content);
    22.     $content = strip_tags($content);
    23.  
    24.    if (strlen($_GET['p']) > 0) {
    25.       echo "";
    26.       echo $content;
    27.       echo "";
    28.    }
    29.    else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
    30.         $content = substr($content, 0, $espacio);
    31.         $content = $content;
    32.         echo "";
    33.         echo $content;
    34.         echo "...";
    35.         echo "";
    36.    }
    37.    else {
    38.       echo "";
    39.       echo $content;
    40.       echo "";
    41.    }
    42. }
    43.  
    44. ?>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1579"></script>

First / Previous / Next / Last / Page 1 of 1 (2 posteets)