makeArticleLink($shortcode); $imageRetArray = $func->getScreenResolutionFromUA(); $x = $imageRetArray["xImage"]; $y = $imageRetArray["yImage"]; $fontsize = $imageRetArray["fontsize"]; $picQuality = $imageRetArray["picQuality"]; $table = $config->sql_tablename_publish_de(); $table_img = $config->sql_tablename_pictures(); $shortcode_passkey = $config->shortcode_passkey(); $pdo = $conn->prepareQuery(); $picpath = $config->picture_storepath(); $stmt = $pdo->prepare("SELECT * FROM $table WHERE p_shortcode=:shortcode LIMIT 1"); $stmt->bindValue(':shortcode', $shortcode, PDO::PARAM_STR); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); // video: $video_youtube_uri = $rows[0]["p_videolink"]; $SSDTube->identify($video_youtube_uri); $EmbeddedVideo = $SSDTube->embed; $tumbnailVideoImg = $SSDTube->thumbnail; $VideoAuthor = $SSDTube->author; $video_duration = $func->getDuration(); $video_title = $SSDTube->title; $video_description = $SSDTube->description; $video_width = $SSDTube->width; $video_height = $SSDTube->height; $video_youtube_embed = $SSDTube->youtube_embed; $youtube_watch = $SSDTube->youtube_watch; $tmp_http_yt_video = $func->ogTagsYoutubeVideo($video_youtube_uri); // category $category_id = $rows[0]["p_category"]; $catg_array = $config->array_category(); $category = $catg_array[$category_id]; $slidercontent = json_decode($rows[0]["p_slidercontent"], true); $pic_link = $rows[0]["p_picture1"]; //;$slidercontent[array_rand($slidercontent)]; $pic_link = str_ireplace("fimg.funcloud.com/share/", "fimg.funcloud.com/original/", $pic_link); $pic_link = $func->cachePicture($pic_link); // cache Cloned Pictures $headline = $rows[0]["p_headline"]; // $func->removeAccents($rows[0]["p_headline"]); $article = $rows[0]["p_articletext"]; $picture_desc = $rows[0]["p_description"]; //$func->removeAccents($rows[0]["p_description"]); $headline_social = $func->clear_description($headline); //$article = str_ireplace("http://cdn.heftig.co", "https://cdn.heftig.co", $func->removeAccents($article)); $sentences = array(); $sentences = preg_split("/[!?.] /", $func->stripHtml($article), -1, PREG_SPLIT_NO_EMPTY); $plista_time = time() - 24*60*60; $text_plista = $func->removeAccents($func->stripHtml($sentences[0])); for($i=2; $i<=count($sentences); $i++){ if (strlen($sentences[$i])>1){ $sentences_content .= $sentences[$i].". "; } } $monate = array(1=>"Januar", 2=>"Februar", 3=>"März", 4=>"April", 5=>"Mai", 6=>"Juni", 7=>"Juli", 8=>"August", 9=>"September", 10=>"Oktober", 11=>"November", 12=>"Dezember"); list($pre_date,) = explode(" ",$rows[0]["p_timestamp"]); $monat = date("n",strtotime($pre_date)); $date_month = $monate[$monat]; $date_day = date("j", strtotime($pre_date)); $date_year = date("Y", strtotime($pre_date)); $tagcode = <<
  • Fun
  • Krass
  • Unglaublich
  • Viral
  • $picture_desc
  • LIST; // related content //$RelatedMoreContent = $func->GetNewRelatedContent($picture_desc." | ".$headline." | ".$article); // copyright $copyYear = 2012; $curYear = date('Y'); $year = $copyYear . (($copyYear != $curYear) ? '-' . $curYear : ''); $copy = "©$year BuzzerStar.com - M.Sc. Sebastian Enger. All Rights Reserved."; $VideoContentString =<< $EmbeddedVideo

    $video_title

    $video_description END; if (stripos($video_youtube_uri,'http') == false) { $VideoContentString = ""; } $plista_time = time() - 24*60*60; $PlistaWerbungString =<< END; $FirstloadWerbungString =<<

    END; $sliderHTMLContent = ""; /// Hier den Slider aufbauen: Start: $slidercontent = json_decode($rows[0]["p_slidercontent"], true); $sliderHTMLContent .= << END; } // if (array_key_exists($i,$sliderExplode)){ } // for ($i=0;$i<=count($sliderExplode);$i++){ $sliderHTMLContent .= << END; //echo "Count Slidercontent: " . count($slidercontent); if (count($slidercontent)<=1){ $sliderHTMLContent = ""; } /// Hier den Slider aufbauen: ENDE $ReturnHtmlString .=<<
    $picture_desc
    $picture_desc
    $picture_desc

    $article

    $PlistaWerbungString

    $VideoContentString
    $sliderHTMLContent
    Erzähl es deinen Freunden:

    (Klick eines der bunten Icons unter diesem Text
    zum teilen mit deinen Freunden auf Facebook,
    Twitter oder WhatsApp!)



    Tags dieser News $tagcode
    "Hackers - Heroes of the Computer Revolution!"

    $copy

    END; $ReturnContentArray = array("keywords"=>"$keyword_meta, $category, news, neuigkeiten, bild, heftig, cool","articletext"=>$article, "headline"=>$headline, "returncontent" =>$ReturnHtmlString, "video_yt_beautify_ssl" => $tmp_http_yt_video, "category" => $category, "headline" =>$headline,"image"=>$pic_link); return $ReturnContentArray; } public function StartpageGenerateNews($page){ $PageNext = $page + 1; $ReturnHtmlString = ""; $conn = new Connection(); $config = new Config(); $func = new Functions(); $pdo = $conn->prepareQuery(); $table = $config->sql_tablename_publish_de(); $table_img = $config->sql_tablename_pictures(); $shortcode_passkey = $config->shortcode_passkey(); $pdo = $conn->prepareQuery(); $picpath = $config->picture_storepath(); $maxPageCount = $config->index_max_results(); $imageRetArray = $func->getScreenResolutionFromUA(); $x = $imageRetArray["xImage"]; $y = $imageRetArray["yImage"]; $fontsize = $imageRetArray["fontsize"]; $picQuality = $imageRetArray["picQuality"]; $page = $func->stripHtml($_REQUEST['p']); //$extraContent = $func->getExtraContent(); $plista_time = time() - 24*60*60; if (!is_numeric($page) || !isset($page) || empty($page) || strlen($page) <= 0 ){ $page = 0; } $monate = array(1=>"Januar", 2=>"Februar", 3=>"März", 4=>"April", 5=>"Mai", 6=>"Juni", 7=>"Juli", 8=>"August", 9=>"September", 10=>"Oktober", 11=>"November", 12=>"Dezember"); $plista_time = time() - 24*60*60; $PlistaWerbungString =<<
    END; $entrys = rand(1,($config->max_results_in_database()-$maxPageCount)); $from = ( $maxPageCount * $page ); // $stmt = $pdo->prepare("SELECT DISTINCT * FROM $table WHERE id>0 ORDER BY RAND() DESC LIMIT $from, $maxPageCount;"); $stmt = $pdo->prepare("SELECT DISTINCT * FROM $table WHERE id>0 ORDER BY RAND() DESC LIMIT $entrys, $maxPageCount;"); $stmt->execute(); //$from = ( $maxPageCount * $page ); //$stmt = $pdo->prepare("SELECT * FROM $table WHERE id>0 ORDER BY p_timestamp DESC LIMIT $from, $maxPageCount;"); //$stmt->execute(); $ReturnHtmlString .=<<

    Die coolsten News auf BuzzerStar

      END; $row_count = 0; $all_row_count = 0; while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { $row_count++; $all_row_count++; /* echo "Original: ". $rows["p_headline"]." ---> ".mb_detect_encoding($rows["p_headline"])."-
      "; echo "Manipulated: ". $func->removeAccents($rows["p_headline"])." ---> ".mb_detect_encoding($func->removeAccents($rows["p_headline"]))."-

      "; */ $headline = $rows["p_headline"];//$func->removeAccents($rows["p_headline"]); $timestamp = $rows["p_timestamp"]; // $article = $func->removeAccents(); $author = "Facebook/BuzzerStar"; // $backlink = $rows["p_sourcelink"]; $shortcode = $rows["p_shortcode"]; /* $slidercontent = json_decode($rows[0]["p_slidercontent"], true); $pic_link = $slidercontent[array_rand($slidercontent)]; $pic_link = str_ireplace("http", "https", $pic_link); */ $pic_link = $rows["p_picture1"]; //str_ireplace("http", "https", $rows["p_picture1"]); $pic_link = $func->cachePicture($pic_link); // cache cloned Picture $category_id = $rows["p_category"]; $pic_descr = $rows["p_description"]; //$func->removeAccents($rows["p_description"]); $catg_array = $config->array_category(); $category = $catg_array[$category_id]; $categoryLink = $func->buildCategoryLink($category_id); $linkingcode = "https://www.buzzerstar.com/p/fun/".$func->makeArticleLink($shortcode); $linkingcode_twittr = "https://www.buzzerstar.com/p/fun/show.php?a=$shortcode"; list($pre_date,) = explode(" ",$timestamp); $monat = date("n",strtotime($pre_date)); $date_month = $monate[$monat]; $date_day = date("j", strtotime($pre_date)); $date_year = date("Y", strtotime($pre_date)); $article = str_ireplace("http://cdn.heftig.co", "https://cdn.heftig.co", $func->removeAccents($rows["p_articletext"])); $sentences = array(); $sentences = preg_split("/[!?.] /", $func->stripHtml($article), -1, PREG_SPLIT_NO_EMPTY); $text_plista = $func->removeAccents($func->stripHtml($sentences[0])); $imageFiller =<<$pic_descr$pic_descr FIN; $ReturnHtmlString .=<<
      END; /*Anweisung muss vor Hautpanweisung $ReturnHtmlString .=<< 1){ $ReturnHtmlString .=<<
      END; } if ( $row_count > 1){ $row_count = 0; } } // while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { $copyYear = 2012; $curYear = date('Y'); $year = $copyYear . (($copyYear != $curYear) ? '-' . $curYear : ''); $copy = "©$year BuzzerStar.com - M.Sc. Sebastian Enger. All Rights Reserved."; $ReturnHtmlString .=<<
    Auf der Open Source Plattform Sourceforge und Google Code haben wir weitere Programme und Tools hinterlegt, die wir während der Entwicklung von BuzzerStar kreiert haben. Ihr könnt sie kostenfrei herunterladen, die Lizenzen entsprechen dem GNU Lesser General Public License. Diese Tools zusammen garantieren kurze Zugriffszeiten, realisieren Responsive Images bzw. Adaptive Images und Webdesign.

    "Hackers - Heroes of the Computer Revolution!"

    $copy

    END; $stmt = null; // doing this is mandatory for connection to get closed $pdo = null; return $ReturnHtmlString; } // public function StartpageGenerateNews($page){ public function StartpageGenerateHeader($show_headline){ $func = new Functions(); $config = new Config(); $LinkableCatgID = $config->category_to_show(); $category_content = ""; $category_content_mobile = ""; $headline_content = ""; if ($show_headline==1){ $headline_content .=<<Humorvolles, Witziges, Verrücktes und kostenlose Spiele aus aller Welt. Teile es mit deinen Freunden! END; } $category_content_mobile .=<<
  •       
  • END; $category_content .=<< END; foreach ($LinkableCatgID as $keyCatg ){ $linkableCodeCatg = $func->buildCategoryLink($keyCatg); $catgName = $func->categoryIDtoName($keyCatg); $category_content_mobile .=<<
  •       
  • END; $category_content .=<< END; } $mystring = <<
    $headline_content
    EOT; return $mystring; } } ?>