Esempio n. 1
0
 /**
  * if global variable $truncate_title is set to a number, the title will be truncated to n number of characters.
  *
  * @return void
  * @author Armando Sosa
  */
 function formatTitle($title)
 {
     global $truncate_title;
     if (!empty($truncate_title)) {
         return word_truncate($title, $truncate_title);
     }
     return $title;
 }
Esempio n. 2
0
$this->layout = 'empty';
global $more, $post;
$more = true;
$singleOrPage = is_single() || is_page();
$title = get_bloginfo('name');
$use_static_front_page = get_option('show_on_front', false) === 'page';
$back_url = get_option('show_on_front', false) === 'page' ? get_permalink(get_option('page_for_posts', false)) : get_bloginfo('url');
?>

<section id="not_found" class="FlanModal opened">
	<div class="inner">
		<a href="<?php 
echo $back_url;
?>
" class="back button"><?php 
echo word_truncate($title, 28);
?>
</a>

		<div id="copy_404">
			<div class="image">
				<img src="<?php 
echo PADPRESS_PLUGIN_URL . "/themes/warp/assets/images/astronaut.png";
?>
" alt="" />				
			</div>
			<p class="copy"><?php 
_e('Apologies, but the page you requested could not be found.', 'padpressed');
?>
</p>
			<a href="<?php 
Esempio n. 3
0
             $flag = 1;
             $different_posters = explode("||", $comments_arr[COM_USER]);
             foreach ($different_posters as $individual_comment) {
                 if ($flag == 1) {
                     $bg = "bgcolor=#F7F6F4";
                     $flag = 0;
                 } else {
                     $bg = "";
                     $flag = 1;
                 }
                 $comment_arr = explode("|", $individual_comment);
                 $comtime = date("d/m/y h:i:s", intval($comment_arr[COM_ID]));
                 $comm_value = stripslashes(strip_tags($comment_arr[COM_TEXT]));
                 $comm_excerpt = word_truncate($comm_value, 75);
                 if ($comment_arr[COM_USER]) {
                     $comment_arr[COM_USER] = word_truncate($comment_arr[COM_USER], 25);
                     $Comments_HTML .= proc_tpl('editnews/editnews/comment_line', array('comment_arr0' => $comment_arr[COM_ID], 'comment_arr1' => $comment_arr[COM_USER], 'comment_arr3' => $comment_arr[COM_IP], 'comm_excerpt' => my_strip_tags($comm_excerpt)));
                 }
                 //if not blank
             }
             $Comments_HTML .= proc_tpl('editnews/editnews/comment_actions');
             break;
         } else {
             $Comments_HTML = proc_tpl('editnews/editnews/nocomments');
             $found_newsid = false;
         }
     }
 }
 if ($found_newsid == false) {
     $Comments_HTML = proc_tpl('editnews/editnews/nocomments');
 }
Esempio n. 4
0
function clbTruncate($match)
{
    return word_truncate($match[2], $match[1]);
}