makeArticleLink($shortcode); $imageRetArray = $func->getScreenResolutionFromUA(); $x = $imageRetArray["xImage"]; $y = $imageRetArray["yImage"]; $fontsize = $imageRetArray["fontsize"]; $picQuality = $imageRetArray["picQuality"]; $isGoogleBot = $ip->isValidGoogleCrawler(); $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 = $slidercontent[array_rand($slidercontent)]; $pic_link = str_ireplace("http", "https", $pic_link); $headline = $func->removeAccents($rows[0]["p_headlineraw"]); $article = $rows[0]["p_articletext"]; $picture_desc = $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 = <<
  • Heftig.co
  • 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."; if ( $isGoogleBot != 1 ){ $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 .=<<

    $text_plista.


    $PlistaWerbungString

    $article


    $sliderHTMLContent
    $PlistaWerbungString
    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

    $FirstloadWerbungString

    Noch mehr coole Artikel

      $RelatedMoreContent
    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(); $ip = new IP(); $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"]; $isGoogleBot = $ip->isValidGoogleCrawler(); $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"); if ( $isGoogleBot != 1 ){ $plista_time = time() - 24*60*60; $PlistaWerbungString =<<
    END; } $from = ( $maxPageCount * $page ); $stmt = $pdo->prepare("SELECT * FROM $table WHERE id>0 ORDER BY RAND() DESC LIMIT $from, $maxPageCount;"); $stmt->execute(); $ReturnHtmlString .=<<

    Die coolsten News auf BuzzerStar

    $PlistaWerbungString

      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 = $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 = str_ireplace("http", "https", $rows["p_picture1"]); $category_id = $rows["p_category"]; $pic_descr = $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 .=<<

    Coole Artikel auf BuzzerStar schreiben und gratis Guthaben und Gutscheinkarten absahnen
    Coole Bilder: Gleich News und Artikel auf BuzzerStar.com schreiben, Gutscheinkarten für Amazon, Valve Steam, Playstation Plus Card, Zalando oder Apple iTunes absahnen!
    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; } } ?>