= 17 ) break; $cnt++; } $metaRobots .= "noimageindex"; $metaCanonical = STP_FULL_URL."articles/"; // -- Get the first published & last modified date ------------------------------- $whichPublishedOn = $whichModifiedOn = ""; $query = "SELECT MIN(ess_published_on), MAX(ess_modified_on) FROM tk_essays WHERE ess_status = 'P'"; $mysql_result = mysqli_query($DBLink, $query); if ( $row = mysqli_fetch_assoc($mysql_result) ) { $whichPublishedOn = $row["MIN(ess_published_on)"]; $whichModifiedOn = $row["MAX(ess_modified_on)"]; } // -- Get 1 image for Twitter card, Pinterest and Facebook... $query = "SELECT * FROM tk_essays "; $query .= "WHERE ess_status = 'P' "; $query .= "ORDER BY ess_published_on DESC, ess_modified_on DESC "; $query .= "LIMIT 1"; $mysql_result = mysqli_query($DBLink, $query); if ( $row = mysqli_fetch_assoc($mysql_result) ) { if ( preg_match_all("/\[ESSAY_(MEDIA|PHOTO) ID=\"(.*)\"( COVER)?\]/smU", $row["ess_content"], $matches, PREG_SET_ORDER) ) { while ( list($foundIdx, $foundTag) = each($matches) ) { list ($tagFull, $tagType, $tagID) = $foundTag; // -- if COVER string is available consider it as a flag... if ( isset($foundTag[3]) ) { switch ($tagType) { case "MEDIA": $query = "SELECT * FROM tk_media"; $query .= " WHERE media_id = '".$tagID."'"; $mysql_result = mysqli_query($DBLink, $query); if ( $row = mysqli_fetch_assoc($mysql_result) ) { // -- FB meta tags... $metaFile = STP_URL_CACHE_ESSAYS.preg_replace ("/.(jpe?g|png)/i", "_w_".STP_SOCIAL_IMG_SIZE.".$1", $row["media_filename"]); $metaOGImage = "\n"; $metaOGImageWidth = "\n"; $metaOGImageHeight = "\n"; $metaPublishedOn = $whichPublishedOn; $metaModifiedOn = $whichModifiedOn; // -- Twitter meta tags... $metaTwitterImage = "\n"; // -- Pinterest image path... $metaFile = STP_URL_CACHE_ESSAYS.preg_replace ("/.(jpe?g|png)/i", "_w_800.$1", $row["media_filename"]); $pathPinterestImage = $metaFile; } break; case "PHOTO": $query = "SELECT * FROM tk_photo"; $query .= " WHERE photo_id = '".$tagID."'"; $mysql_result = mysqli_query($DBLink, $query); if ( $row = mysqli_fetch_assoc($mysql_result) ) { // -- FB meta tags... $metaFile = STP_URL_CACHE_PHOTOS.preg_replace ("/.(jpe?g|png)/i", "_w_".STP_SOCIAL_IMG_SIZE.".$1", $row["photo_filename"]); $metaOGImage = "\n"; $metaOGImageWidth = "\n"; $metaOGImageHeight = "\n"; $metaPublishedOn = $whichPublishedOn; $metaModifiedOn = $whichModifiedOn; // -- Twitter meta tags... $metaTwitterImage = "\n"; // -- Pinterest image path... $metaFile = STP_URL_CACHE_PHOTOS.preg_replace ("/.(jpe?g|png)/i", "_w_800.$1", $row["photo_filename"]); $pathPinterestImage = $metaFile; } break; } } } } } // -- Fancy logo... fancyLogo(); ?> " /> " /> " /> " /> " />

Articles ...

" class="newsfeed_col">
1 ) { if ( $rowCount%2 == 0 ) { ?>
" class="newsfeed_col">

">

- #disqus_thread">commenter

1 ) { if ( $rowCount%2 == 0 ) { ?>
1 ) { if ( $rowCount%2 == 0 ) { ?>