WP
    ~
Advanced Hosters -

Apple_Macintosh
: 08.12.2005
: 3208
Contest (: 2)
# : 15, 2010 5:38 pm
WP ? .. 1000 10 Read More...

, .
, ? !!!

pixel
: 10.08.2008
: 626
Contest (: 2)
# : 15, 2010 8:03 pm
-



http://blog.portal.kharkov.ua/2008/05/25/auto_moreadvert/
http://wordpress.org/extend/plugins/wp-limit-posts-automatically/
http://labitacora.net/comunBlog/limit-post.phps

sydoow
V.I.P.
: 29.06.2007
: 8215
# : 18, 2010 9:10 am
Apple_Macintosh, WP, textKit .

blam
: 13.03.2008
: 240
# : 18, 2010 10:25 am
:
:
add_filter( 'wp_insert_post_data', 'formatting_post' ) );

function formatting_post ($data){
$data['post_content'] = preg_replace('~^(.{1000,})\s~', '\\1<!--more-->' $data['post_content'] );
return $data;
}


functions.php
ps. , as is )


V.I.P.
: 07.12.2005
: 2171
# : 18, 2010 10:40 am
index.php, archive.php search.php the_content:

<?php the_content_limit(1000, " ..."); ?> (1000 - )


functions.php :

function the_content_limit($max_char, $more_link_text = '( &rarr;)', $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) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "<p>";
echo $content;
echo "&nbsp;<a href='";
the_permalink();
echo "'>"." &raquo;</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 "'>"." &raquo;</a>";
echo "</p>";
}
}

Apple_Macintosh
: 08.12.2005
: 3208
Contest (: 2)
# : 18, 2010 11:01 am
, Drinks or Beer
sydoow,
, ? !!!


V.I.P.
: 07.12.2005
: 2171
# : 18, 2010 11:05 am
Apple_Macintosh, Drinks or Beer
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Apple_Macintosh
: 08.12.2005
: 3208
Contest (: 2)
# : 18, 2010 11:07 am
, 2 , )
, ? !!!
    ~