Exemplo n.º 1
0
    $description_tag = 'Topic from ' . $site_name . ': ' . $description;
    $url .= $forum . "/" . $threadid . "/7/";
    $page_title = $site_name . ': ' . $title;
    $meta_tags = '
	<meta name="description" content="' . $description_tag . '"/>
	<meta property="og:title" content="' . $page_title . '"/>
	<meta property="og:site_name" content="' . $productname . '"/>
	<meta property="og:url" content="' . $url . '"/>
	<meta property="og:image" content="' . $image . '"/>
	<meta property="og:description" content="' . $description_tag . '"/>
	<meta property="og:locale" content="' . $locale . '"/>';
    if (!$lang_was_set) {
        $lang = substr($locale, 0, 2);
    }
    if ($locale) {
        $ds->addInterestsLanguage($identity, $locale);
    }
    // that will effect for new users that came first time through a link to an article of setting the language filter to that language only
    if ($isbot) {
        require_once 'd4_data_service.php';
        $d4s = new D4DataService($conf['d4dsn'], $conf['d4dbname'], $conf['d4dbpassword'], array(PDO::ATTR_PERSISTENT => false));
        $forums = $ds->loadForumsForTopic($threadid);
        foreach ((array) $forums as $fs) {
            $f = $fs['forum'];
            $comments = $d4s->getAllCommentsForThread($f, $url);
            $comments_html .= '<ul class="bot_comments">';
            foreach ((array) $comments as $post) {
                $comments_html .= '
				<li>' . $post['author_name'] . ':' . $post['message'] . '</li>';
            }
            $comments_html .= '