Exemplo n.º 1
0
		<h2 class="h3"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
		<p class="date"><?php 
        the_date();
        ?>
</p>
		
		<?php 
        $content = get_the_content();
        $custom_excerpt = strip_tags($content, '<a>');
        $truncated_excerpt = tokenTruncate($custom_excerpt, 600);
        $trimmed_excerpt = rtrim($truncated_excerpt);
        echo '<p>' . $trimmed_excerpt;
        ?>
&hellip;<a href="<?php 
        the_permalink();
        ?>
">read more</a></p>

		
		</section>
		
		<?php 
    }
} else {
    /* no posts found */
function plankton_eventall_excerpt()
{
    global $post;
    global $image;
    global $the_link;
    $postid = get_the_ID();
    $buy_now = get_field('buy_tickets_url', $postid);
    ?>
	<h2 class="u-pt+"><a href="<?php 
    echo $the_link;
    ?>
"><?php 
    the_title();
    ?>
</a></h2>

	<h5 class="heading-font uppercase u-mb0"><?php 
    echo get_field('price', $postid);
    echo ' / ' . get_field('time', $postid);
    ?>
</h5>

	<div class="hex-container hex-date">

		<?php 
    // grab the date amd time
    if (get_field('end_date', $postid)) {
        $end_date = DateTime::createFromFormat('Ymd', get_field('end_date', $postid));
        $date = DateTime::createFromFormat('Ymd', get_field('date', $postid));
        echo '<p>' . $date->format('j M') . ' - ' . $end_date->format('j M');
    } else {
        if (get_field('date', $postid)) {
            $date = DateTime::createFromFormat('Ymd', get_field('date', $postid));
            echo '<p class="aligncenter alpha u-pl0" style="position: relative; z-index: 99;">' . $date->format('j') . '<br>' . $date->format('M') . '</p>';
        }
    }
    ?>

		<svg class="hex-border" viewBox="0 0 35 29" xmlns="http://www.w3.org/2000/svg">

			<g>
			  <path d="M1 7.708v13.417l11.62 6.708 11.62-6.708V7.708L12.62 1 1 7.708z" stroke="RGB(74, 73, 82)" stroke-width=".371" fill="#fff"/>
			</g>

		</svg>



	</div>





	<p class="excerpt">

	<?php 
    echo tokenTruncate(get_the_content(), 250);
    ?>
&hellip;

	</p>

	<p>
	<a class="button" href="<?php 
    echo $the_link;
    ?>
">Read More ></a>
	<a class="button--primary" href="<?php 
    echo $buy_now;
    ?>
">Buy Now</a>
</p>



	</section><!--
<?php 
}
Exemplo n.º 3
0
}
$text = '';
// affiche le resultat de la recherche
$resultat = $this->PageList($tags, $type, $nb, $tri, $template, $class, $lienedit);
if ($resultat) {
    $nb_total = count($resultat);
    foreach ($resultat as $page) {
        $element[$page['tag']]['tagnames'] = '';
        $element[$page['tag']]['tagbadges'] = '';
        $element[$page['tag']]['body'] = $page['body'];
        $element[$page['tag']]['owner'] = $page['owner'];
        $element[$page['tag']]['user'] = $page['user'];
        $element[$page['tag']]['time'] = $page['time'];
        $element[$page['tag']]['title'] = get_title_from_body($page);
        $element[$page['tag']]['image'] = get_image_from_body($page);
        $element[$page['tag']]['desc'] = tokenTruncate(strip_tags($this->Format($page['body'])), $nbcartrunc);
        $pagetags = $this->GetAllTriplesValues($page['tag'], 'http://outils-reseaux.org/_vocabulary/tag', '', '');
        foreach ($pagetags as $tag) {
            $element[$page['tag']]['tagnames'] .= sanitizeEntity($tag['value']) . ' ';
            $element[$page['tag']]['tagbadges'] .= '<span class="tag-label label label-primary">' . $tag['value'] . '</span>&nbsp;';
        }
    }
    $squel->set(array('elements' => $element));
    $text .= $squel->analyser();
} else {
    $nb_total = 0;
}
$output .= '<div class="alert alert-info">' . "\n";
if ($nb_total > 1) {
    $output .= 'Un total de ' . $nb_total . ' pages ont &eacute;t&eacute; trouv&eacute;es';
} elseif ($nb_total == 1) {
                <h2 class="short_blurb">Date</h2>
                <h2 class="backed_ammount"></h2>
               
            </div>
            
        	<?php 
    while ($sel_inviteHistory = mysql_fetch_array($qrySelHistory)) {
        ?>
				<ul id="search_ul_rec">
    		         <div class="prctname">
                   
                        <h6><?php 
        if ($sel_inviteHistory['mailAddress'] < 20) {
            echo $sel_inviteHistory['mailAddress'];
        } else {
            $newMail = tokenTruncate($sel_inviteHistory['mailAddress'], 20);
            echo $newMail;
        }
        ?>
</h6>
                        </div>
                   
                    
                   <div class="prctname">
                        <h6><?php 
        echo date("m-d-Y H:i:s", $sel_inviteHistory['createdDate']);
        ?>
</h6>
                        
                    
                    <div class="clear"></div>
Exemplo n.º 5
0
function getLimitedToken($string, $your_desired_width)
{
    if (strlen($string) > $your_desired_width) {
        return tokenTruncate($string, $your_desired_width) . '...';
    } else {
        return $string;
    }
}
Exemplo n.º 6
0
            if ($type == 'WatchEvent') {
                $copy = 'I ' . $item->payload->action . ' watching ' . $repo;
            } else {
                if ($type == 'FollowEvent') {
                    $copy = 'I started following <a href="' . $item->payload->target->html_url . '">' . $item->payload->target->login . '</a>';
                } else {
                    if ($type == 'PullRequestReviewCommentEvent') {
                        $copy = 'I commented on a pull request on ' . $repo;
                        $commits = array(tokenTruncate($item->payload->comment->body, 200));
                    } else {
                        if ($type == 'PullRequestEvent') {
                            $copy = 'Pull request event on ' . $repo;
                        } else {
                            if ($type == 'IssueCommentEvent') {
                                $copy = 'I commented on an issue at ' . $repo;
                                $commits = array(tokenTruncate($item->payload->comment->body, 200));
                            } else {
                                continue;
                            }
                        }
                    }
                }
            }
        }
    }
    $node = array('id' => $item->id, 'title' => $copy, 'image' => $defaultImage, 'copy' => NULL, 'type_pretty' => 'GitHub', 'type' => 'github', 'link_copy' => 'View repo', 'link' => 'https://github.com/' . $repo, 'icon' => NULL, 'meta' => NULL, 'feed' => $commits, 'epoch' => strtotime($item->created_at), 'profile_url' => $profileUrl);
    array_push($data, $node);
}
if (isset($_GET['raw']) && $_GET['raw'] == '1') {
    echo json_encode($info);
} else {
Exemplo n.º 7
0
    $sql = "select mn_note_path,mn_note_title,mn_note_uploaded_by,mn_note_created_date from mn_note where mn_note_id={$note_id} limit 0,1";
    $data = $objDB->select($sql);
    if ($data && !empty($data)) {
        $note_title = $data[0]['mn_note_title'];
        $name = $data[0]['mn_note_path'];
        $filePath = 'notes/pdf/' . $name;
        if (file_exists($filePath)) {
            include 'libs/class.pdf2text.php';
            $pdfObj = new PDF2Text();
            $pdfObj->setFilename($filePath);
            $pdfObj->setFilename;
            $pdfObj->decodePDF();
            $pdfContent = $pdfObj->output();
            $total_char = strlen($pdfContent);
            $fourty_percent_char = $total_char * 40 / 100;
            $pdfContent = tokenTruncate($pdfContent, $fourty_percent_char) . "<span>…More</span>";
        }
    } else {
        header("Location:index.php?p=browesnotes&err=file_not_found");
    }
}
if ($pdfContent != "") {
    $table = 'mn_user';
    $key = 'mn_user_id';
    $value = 'mn_user_display_name';
    $orderby = 'mn_user_type ASC';
    $where = " AND mn_user_type='P' ";
    $users = $objDB->getDataArray($table, $key, $value, $orderby, $where);
    ?>
    <style>
        p{