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);
$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.";
$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 (count($slidercontent)>1){ show slider - else not
for ($i=0;$i<=count($slidercontent);$i++){
if (strlen($slidercontent[$i]) > 4){
$pic_link_1 = $slidercontent[$i];//;str_ireplace("http", "https", $slidercontent[$i]);
$sliderHTMLContent .= <<
$picture_desc
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 .=<<
$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
$date_day. $date_month $date_year
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;
$from = ( $maxPageCount * $page );
$stmt = $pdo->prepare("SELECT * FROM $table WHERE id>0 ORDER BY RAND() DESC LIMIT $from, $maxPageCount;");
$stmt->execute();
$ReturnHtmlString .=<<
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 .=<<Beliebtesten News
END;
$category_content .=<<Beliebtesten News
END;
foreach ($LinkableCatgID as $keyCatg ){
$linkableCodeCatg = $func->buildCategoryLink($keyCatg);
$catgName = $func->categoryIDtoName($keyCatg);
$category_content_mobile .=<<$catgName
END;
$category_content .=<<$catgName
END;
}
$mystring = <<