* Graham * Inu This is a complete page code
It now takes the contents of the post up to the first </div>
You can still use the blog on the page from the building tool just be careful of the other lines
disable any other description meta tag the new tag is inserted by {_$$meta|}
<!DOCTYPE html>
<html>
<head>
  {_$$meta|}
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
  <title>x</title>
</head>
<body>
    <div data-xtcontainer="container" class="xt_container"><xt:code><!--parser:xtscript-->
    # </xt:code>
  var $blog=<xt:blog tzone="0" format="Y-m-d" display="1" show_time="0" entries_per_page="3" comments_per_page="20" comments_sort="-1" entries_sort="-1" display_limit="0" display_symbol="" version="2" t_back_to_posts="" t_comments="" t_comments_empty="" t_post_a_comment="" t_name="" t_comment="" t_post="" t_tags="" t_search="" t_created="" t_showing_tagged_posts="" t_no_entries_found="" t_no_search_results_found="" t_show_all_comments="" t_see_parent_thread="" t_show_all_replies="" t_show_replies="" t_reply="" t_posting_as="" t_comments_login_required="" t_login="" t_signup="" t_confirm_email="" t_report_spam="" />
    # <xt:code>
      var $start_post_content = call strpos $haystack=$blog;$needle=xt_blog_content xt_text normal
      if $start_post_content >0
      var $start_post_content =($start_post_content+32)
      var $end_post_content = call strpos $haystack=$blog;$needle=</div>;$offset=$start_post_content
      var $post_content = call substr $val=$blog;$start=$start_post_content;$length=($end_post_content-$start_post_content)
      var $cleaned_post_content=call strip_tags $val=$post_content
      var $meta=<meta name="description" content="$cleaned_post_content" />
      endif

    print $blog
    del $blog
assign $dump=call dump_vars
assign $dump=call trim $val=$dump ; $charlist={{<pre>
Array/ }}
assign $dump=call trim $val=$dump ; $charlist=( )
assign $dump=call htmlspecialchars $val=$dump
assign $dump=call nl2br $val=$dump
print $dump<br/>
    <!--/parser:xtscript--></xt:code>
    </div>
</body>
</html>

Copy code
2015-03-26 06:11 (edited 2015-03-26 14:55 by Graham ) · (0)

Online: Guests: 1