function show_section() { ?> <section id="<?php the_sub_field('id'); ?> " class="Section <?php the_sub_field('class'); ?> "> <?php if (have_rows('article')) { while (have_rows('article')) { the_row(); show_article(); } } ?> </section> <?php }
<?php // meta tags for head section $article_meta_title = !empty($article['seo_title']) ? $article['seo_title'] : $article['title'] . ' - ' . $config['site']['title']; $config['site']['meta_title'] = $article_meta_title; $config['site']['meta']['description'] = !empty($article['seo_desc']) ? $article['seo_desc'] : $article['summary']; $config['site']['meta']['keywords'] = !empty($article['seo_keywords']) ? $article['seo_keywords'] : $config['meta']['keywords']; $config['site']['meta']['author'] = $article['author_name']; // hide or disable comments? $hide_comments = $config['comments']['site_hide'] + $article['comments_hide']; $disable_comments = $config['comments']['site_disable'] + $article['comments_disable']; if (empty($disable_comments)) { $post_errors = isset($_POST['submit_comment']) ? validate_comment($config['comments']['form_protection'], $article) : ''; } // output article echo show_article($article, $config); // output article comments /* $config['comments']['site_hide'] $config['comments']['site_disable'] $config['comments']['form_protection'] $config['comments']['moderate'] $config['comments']['allow_html'] $article['comments_disable'] $article['comments_hide'] */ if (empty($hide_comments)) { echo show_article_comments($article['comments']); } // output comment form
<?php header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600 * 24) . " GMT"); $url = explode("/", $PATH_INFO); $group = $url[1]; $id = $url[2]; $attachment = $url[3]; include "config.inc"; require "{$file_newsportal}"; if (!isset($attachment)) { $attachment = 0; } $message = read_message($id, $attachment, $group); if (!$message) { header("HTTP/1.0 404 Not Found"); echo "The Attachment doesn't exists"; } else { header("Content-type: " . $message->header->content_type[$attachment]); show_article("", $id, $attachment, $message); }
echo '[<a target="' . $frame_post . '" href="' . $file_post . '?type=reply&id=' . $id . '&group=' . urlencode($group) . '">' . $text_article["button_answer"] . '</a>]' . "\n"; } ?> </p> <p> <?php flush(); // Code for the next and previous button, not ready /* $spoolopenmodus=0; $ns=OpenNNTPconnection(); $headers = readOverview($ns,$group,1,$spoolopenmodus); $next = $headers[$message->header->id]; echo "-".$next->subject."-"; echo '[<a href="'.$next->number.'.html">Nächster</a>]'; */ ?> </p> <?php if (!$message) { echo $text_error["article_not_found"]; } else { show_article($group, $id, 0, $message); } ?> <?php include "tail.inc";
echo '<div id="blog_content">'; } // blog content if ($articles !== FALSE) { foreach ($articles as $article) { show_article($cms, $article, false, $allow_edit); } } if (!$only_show_article) { echo '</div>'; echo '<div id="loadmoreajaxloader" style="display:none;"> <center><img src="' . base_url('assets/nocms/images/ajax-loader.gif') . '" /></center></div>'; } } else { if ($article !== FALSE) { show_article($cms, $article, true, $allow_edit); } } // FUNCTIONS =================================================================== function show_article($cms, $article, $single = true, $allow_edit = false) { if ($single) { echo '<h2>' . $article['title'] . '</h2>' . br(); } else { echo anchor($cms['module_path'] . '/blog/index/' . $article['article_url'], '<h2>' . $article['title'] . '</h2>'); } echo '(' . $article['author'] . ', ' . $article['date'] . ')'; echo '<p>' . $article['content'] . '</p>'; foreach ($article['photos'] as $photo) { echo '<a class="photo_' . $article['id'] . '" href="' . base_url() . 'assets/uploads/files/' . $photo['url'] . '">'; echo '<img class="photo_thumbnail" src="' . base_url() . 'assets/uploads/files/' . $photo['url'] . '" />';