function peergroupdisplay($resobject, $filtext)
{
    global $mpllresults;
    global $llpaging;
    global $entries_per_page;
    global $offset;
    global $total_pages;
    if ($resobject) {
        $mpllresults = '';
        $llpaging = '';
        // present results in table
        if (mysql_num_rows($resobject) > 0) {
            while ($row = mysql_fetch_object($resobject)) {
                $datepost = $row->dcdate;
                $postdate = date("l jS \\of F Y h:i:s A", $datepost);
                $limit = 100;
                //  add functions to see if image or video can be extract from post?
                //images extraction
                $contentb = $row->content;
                $matchesimg[2] = '';
                str_img_src($contentb);
                //  video extraction
                //videoembed ($row->link);
                //  if either then add html code below blog summary below
                $cleanhtml = html_entity_decode($contentb);
                $cleantags = strip_tags($cleanhtml);
                $summary = $cleantags;
                if (strlen($summary) > $limit) {
                    $summary = substr($summary, 0, strrpos(substr($summary, 0, $limit), ' ')) . '...';
                    //echo $summary;
                }
                //$llresults .= "<div class=\"type\"><a href=\"".$currurl."?metext=1&lifestyleid=$lifestylelid&feedid=$row->id\"><img src=\"/lifestylelinking/images/rssicon.gif\"><a></div>";
                $mpllresults .= "<div class=\"stream\">";
                $mpllresults .= "<div class=\"imgbox\"><img src=\"/lifestylelinking/images/profpic.gif\"></div>";
                $mpllresults .= "<div class=\"btitle\"> ";
                $mpllresults .= "<div class=\"author\"><a href=\"" . $row->blogurl . "\"><b>" . $row->author . "</b></a></div><br />";
                //<img src=\"/lifestylelinking/images/upchartsmall.gif\" >- <a href=\"".$currurl."?metext=2&lifestyleid=$lifestylelid&feedid=$row->id\"><img src=\"/lifestylelinking/images/charticonsmall.gif\"></a></div>";
                $mpllresults .= "<a href=\"" . $row->link . "\"><b>" . $row->title . "</b></a> </div>";
                if ($matchesimg[2]) {
                    $jpgstring = '.jpg';
                    $pos = stristr($matchesimg[2], $jpgstring);
                    //echo $pos;
                    if ($pos === false) {
                        $mpllresults .= "<div class=\"bimg\"><img src=\"/lifestylelinking/images/blogimg.gif\"> </div> ";
                    } else {
                        $mpllresults .= "<div class=\"bimg\"> ";
                        $mpllresults .= "<a href=\"" . $row->link . "\"><img src=\"" . $matchesimg[2] . "\"  width=\"75\" height=\"75\" ></a></div>";
                    }
                }
                // closes if
                $mpllresults .= "<div class=\"bsum\"> ";
                $mpllresults .= "<div font-size=\"80%\" font-family=\"Verdana, sans-serif\" >{$summary}  <a href=\"" . $row->link . "\">more</a> </div> ";
                $mpllresults .= "<div style=\"font-size:75%\" ><b>{$postdate}</b></div><br /><br /></div>";
                // if video (just youtube for now)
                //if ($ytcode)  {
                //$llresults .= '<object width=\"100\" height=\"100\"><param name="movie" value="'.$ytcode.'"></param><embed src="'.$ytcode.'" type="application/x-shockwave-flash" width="100" height="100"></embed></object>';
                //}
                $mpllresults .= "</div>";
            }
            // closes while loop
        }
        $llpaging .= "<div class=\"mepaging\" >";
        for ($page = 1; $page <= $total_pages; $page++) {
            if ($page == $page_number) {
                // This is the current page. Don't make it a link.
                $llpaging .= "{$page} ";
            } else {
                // This is not the current page. Make it a link.
                $llpaging .= " <a href=\"" . $currurl . "?lifestyleid={$lifestylelid}&page_number={$page}&filtext={$filtext}\">{$page}</a> ";
            }
        }
        $llpaging .= "</div>";
    } else {
        $mpllresults .= "No posts could be presented.";
    }
}
예제 #2
0
파일: share.php 프로젝트: 2bj/zero
<?php

$post_item = array('id' => get_the_ID(), 'link' => get_the_permalink(), 'title' => strip_tags($title) . '. ' . LOGO, 'image' => SHARE);
$post_image = wp_get_attachment_image_src(get_post_thumbnail_id(), '960x', true);
if (strstr($post_image[0], 'images/media/default')) {
    $post_image = str_img_src(get_the_content());
} else {
    $post_image = $post_image[0];
}
if ($post_image) {
    $post_item['image'] = $post_image;
}
?>

<div class="share" data-url="<?php 
echo $post_item['link'];
?>
" data-twitter="<?php 
echo TWITTER ? 'yep' : '';
?>
" data-facebook="<?php 
echo get_theme_mod('zero_og_fb_like') ? 'yep' : '';
?>
" data-vkontakte="<?php 
echo get_theme_mod('zero_og_vk_like') ? 'yep' : '';
?>
">
  <div class="share__caller">
    <div class="share__count"></div>
    <div class="share__heart">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve"><path fill-rule="evenodd" clip-rule="evenodd" fill="#e1e1e1" d="M12.526,11.856c-1.079,1.111-3.205,2.872-3.474,3.148c-0.274-0.277-2.441-2.037-3.541-3.148c-1.293-1.307-2.513-2.653-2.513-4.501c0-1.849,1.483-3.347,3.313-3.347c1.14,0,2.146,0.582,2.741,1.468c0.585-0.886,1.571-1.468,2.69-1.468c1.795,0,3.25,1.499,3.25,3.347C14.992,9.204,13.796,10.549,12.526,11.856z"/>
function inpostresults($lifestylelid, $lifestylesubid)
{
    //Function Output's variables with no html markup
    global $resulttotals;
    global $resulttotalspage;
    global $page;
    global $total_pages;
    global $page_number;
    //global $lifestyleid;
    //global $llresults;
    global $streamstyle;
    global $llpaging;
    if ($resulttotals) {
        $streamstyle = array();
        $llpaging = '';
        // present results in table
        if (mysql_num_rows($resulttotalspage) > 0) {
            while ($row = mysql_fetch_object($resulttotalspage)) {
                $datepost = $row->dcdate;
                $postdate = date("l jS \\of F Y h:i:s A", $datepost);
                $limit = 100;
                //  add functions to see if image or video can be extract from post?
                //images extraction
                $contentb = $row->content;
                $matchesimgi = '';
                $matchesimgi = str_img_src($contentb);
                if ($matchesimgi) {
                    $jpgstring = '.jpg';
                    $pos = stristr($matchesimgi, $jpgstring);
                    //echo $pos;
                    if ($pos === false) {
                        $blogimg = makeurla('display/images/blogimg.gif');
                    } else {
                        $blogimg = $matchesimgi;
                    }
                }
                // closes if
                //  video extraction
                //videoembed ($row->link);
                $cleanhtml = html_entity_decode($row->content);
                $cleantags = strip_tags($cleanhtml);
                $summary = $cleantags;
                if (strlen($summary) > $limit) {
                    $summary = substr($summary, 0, strrpos(substr($summary, 0, $limit), ' ')) . '...';
                }
                $streamstyle[$row->drid][strblogurl] = $row->blogurl;
                $streamstyle[$row->drid][strauth] = $row->author;
                $streamstyle[$row->drid][strtitle] = $row->title;
                $streamstyle[$row->drid][strturl] = $row->link;
                $streamstyle[$row->drid][inimag] = $blogimg;
                $streamstyle[$row->drid][strsumm] = $summary;
                $streamstyle[$row->drid][strdate] = $postdate;
            }
            // closes while loop
        }
        for ($page = 1; $page <= $total_pages; $page++) {
            if ($page == $page_number) {
                // This is the current page. Don't make it a link.
                $llpaging .= "{$page} ";
            } else {
                // This is not the current page. Make it a link.
                $llpaging .= "<a href=\"" . makeurla('index.php') . "?lifestyleid=" . $lifestylelid . "&page_number=" . $page . "\">" . $page . "</a>";
            }
        }
    } else {
        $llresults .= "No posts could be presented.";
    }
    //  print_r($streamstyle);
    return $streamstyle;
}
예제 #4
0
파일: mosaic_item.php 프로젝트: 2bj/zero
<?php

$mosaic_data = array('permalink' => get_the_permalink(), 'title' => get_the_title());
$size = 'l';
if ($i == 1) {
    $size = 'xxl';
}
if ($i % 6 == 0) {
    $size = 'xl';
}
$cover = wp_get_attachment_image_src(get_post_thumbnail_id(), '960x', true);
if (strstr($cover[0], 'images/media/default')) {
    $cover = str_img_src(get_the_content());
} else {
    $cover = $cover[0];
}
$mosaic_data['img_src'] = $cover;
?>
<div class="mosaic__item <?php 
echo 'mosaic__item--' . $size;
?>
">
  <a href="<?php 
echo $mosaic_data['permalink'];
?>
" title="<?php 
echo strip_tags($mosaic_data['title']);
?>
" style="background-image: url(<?php 
echo $mosaic_data['img_src'];
?>