array_category(); $category = $catg_array[$CategoryID]; $CurrentLink = "https://blog.onetopp.com/trends/$category"; $breadcrumb =<<
  • Home
  •   >  
  • $category
  • END; $GoogleWerbungString =<< END; //$GoogleWerbungString = ""; $arrayCategoryHeaderText = $texts->categoryTexte(); $categoryHeaderFullText = $arrayCategoryHeaderText[$CategoryID]; $categoryHeaderText =<<

    $category News

    $categoryHeaderFullText

    $GoogleWerbungString

    END; $ReturnHtmlString .= $categoryHeaderText; $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 id>0 AND p_isonline=1 AND p_category=:p_category ORDER BY p_timestamp DESC LIMIT $from, $maxPageCount;"); $stmt = $pdo->prepare("SELECT * FROM $table WHERE id>0 AND p_isonline=1 AND p_category=:p_category ORDER BY p_timestamp DESC LIMIT 150;"); $stmt->bindValue(':p_category', $CategoryID, PDO::PARAM_INT); $stmt->execute(); $myRowCount = $stmt->rowCount(); $whileCount = 0; while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { if ($whileCount==0){ $ReturnHtmlString .=<< END; } $whileCount++; $headline = $rows["p_headline"]; $article = $rows["p_articletext"]; $author = $rows["p_authorname"]; $backlink = $rows["p_backlink"]; $shortcode = $rows["p_shortcode"]; $category_id = $rows["p_category"]; $picture_desc = $rows["p_picture_1_description"]; $linkingcode_twittr = "https://blog.onetopp.com/show.php?a=$shortcode"; $linkingcode = "https://blog.onetopp.com/".$func->makeArticleLink($shortcode); //$sentences = $func->text_to_sentences($article); $re = '/# Split sentences on whitespace between them. (?<= # Begin positive lookbehind. [.!?] # Either an end of sentence punct, | [.!?][\'"] # or end of sentence punct and quote. ) # End positive lookbehind. (?isMobile() && !$detect->isTablet()){ // desktop $AdditionalDesktopContent =<<

    $headline

    $small_sentences

    [Read Trend Report]
    END; } else { // mobile oder tablet $AdditionalDesktopContent = ""; } //array('image'=>"https://cdn.onetopp.com/image/$shortcode.png"), //https://blog.onetopp.com/i.php?s=$shortcode $ReturnHtmlString .=<<
    $AdditionalDesktopContent $headline
    END; $categoryHeaderText = ""; $AdvertsContentHTML = ""; if ($whileCount>=4){ $whileCount = 0; $ReturnHtmlString .=<< END; } } // while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { $PlistaWerbungString = ""; $ReturnHtmlString .= $PlistaWerbungString; $ReturnContentArray = array("keywords"=>"$keyword_meta, $category, news, neuigkeiten, bild, heftig, cool","returncontent" =>$ReturnHtmlString, "category" => $category, "robots"=>"INDEX,FOLLOW,ALL", "breadcrumb" =>$breadcrumb); return $ReturnContentArray; } public function DetailpageGenerateContentV3($shortcode){ $ReturnHtmlString = ""; $func = new Functions(); $conn = new Connection(); $config = new Config(); $SSDTube = new SSDTube(); $detect = new Mobile_Detect; //$ip = new IP(); //$deviceTypeMobile = $detect->isMobile(); //$deviceTypeTablet = $detect->isTablet(); $linkingcode_twittr = "https://blog.onetopp.com/show.php?a=$shortcode"; $linkingcode = "https://blog.onetopp.com/".$func->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_tags = $SSDTube->tags; $video_width = $SSDTube->width; $video_height = $SSDTube->height; $video_youtube_embed = $SSDTube->youtube_embed; $youtube_watch = $SSDTube->youtube_watch; $yt_amazon = $SSDTube->yt_amazon; $tmp_http_yt_video = $func->ogTagsYoutubeVideo($video_youtube_uri); //http://img.youtube.com/vi/udgFSH2_Ia8/0.jpg // category $category_id = $rows[0]["p_category"]; $catg_array = $config->array_category(); $category = $catg_array[$category_id]; $headline = $rows[0]["p_headline"]; $article = $rows[0]["p_articletext"]; $picture_desc = $rows[0]["p_picture_1_description"]; $headline_social = $func->clear_description($headline); $headline_breadcr = strtoupper($headline); $breadcrumb =<<
  • Home
  •   >  
  • $category
  •   >  
  • $headline_breadcr
  • END; $header_sentences = ""; //$sentences = preg_split($re, $rows[0]["p_articletext"], -1, PREG_SPLIT_NO_EMPTY); $sentences = $func->text_to_sentences($article); $keywords_list = ""; $keyword_meta = ""; $list = explode(";",$rows[0]["p_tags"]); $AddStringContent = "Share this article on Instagram, Facebook, Twitter and Pinterest: "; foreach ($list as $entry23) { if (strlen($entry23)>1 && !empty($entry23)){ $keywords_list .= "$entry23 ; "; $keyword_meta .= "$entry23, "; $AddStringContent .= "$entry23, "; }//if (strlen($entry23)>1){ } for ($i=0;$i<2;$i++) { $header_sentences .= " ".$sentences[$i]; } $header_sentences .= ""; //echo count($sentences) ." : Anzahl sätze"; $t_count = 0; $t_sub_count_notnull = 0; $tmp_article = ""; $AddHeadlineString = ""; $monate = array(1=>"January", 2=>"February", 3=>"March", 4=>"April", 5=>"May", 6=>"June", 7=>"July", 8=>"August", 9=>"September", 10=>"October", 11=>"November", 12=>"December"); 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)); $GoogleWerbungString =<< END; //$GoogleWerbungString = ""; $AmazonMoreContentDE = ""; array_push($list, $headline); $list = array_merge($list, $yt_amazon); array_push($list, "Tools"); array_push($list, "Software"); array_push($list, "books"); array_push($list, "electronics"); array_push($list, "Handys"); array_push($list, "Samsung Galaxy"); array_push($list, "Apple iPhone"); array_push($list, "iPad"); array_push($list, "Macbook"); array_push($list, "Elektronik"); array_push($list, "Playstation"); array_push($list, "Games"); array_push($list, "Bücher"); foreach ($list as $searchAmazon) { $AmazonMoreContentDE = $func->getAmazonContent($searchAmazon); //print "search: $searchAmazon and lenght content: " . strlen($AmazonMoreContentDE); if (strlen($AmazonMoreContentDE)>=323){ break; } } $PlistaWerbungString = ""; // related content //$RelatedMoreContentDE = $func->GetNewRelatedContent($keywords_list." ; ".$headline); //$RelatedMoreContentEN = $func->getDeepLinkContent();// from BuzzerStar.NET English //$PlistaWerbungString = ""; //https://cdn.onetopp.com/image/$shortcode.png //https://blog.onetopp.com/i.php?s=$shortcode $ReturnHtmlString .=<<

    $picture_desc

    $GoogleWerbungString

    $AddStringContent