function new_get_posts() { $num = 0; $link = mysql_connection(); mysqli_select_db($link, "test"); $result = mysqli_query($link, "SELECT id FROM content WHERE type = 'post'"); while ($row = mysqli_fetch_object($result)) { $ID = $row->id; $num = $num + 1; if ($num % 2 != 0) { if (has_thumbnail($ID)) { echo '<div class="parallax-window" data-parallax="scroll" data-bleed="50" data-speed="0.1" data-image-src="' . get_thumbnail_link($ID) . '"></div>' . "\n"; } echo '<section id="post-' . $ID . '" class="post bright">' . "\n" . '<article>' . "\n" . '<h2><a href="' . get_post_link($ID) . '">' . get_post_title($ID) . '</a></h2>' . "\n" . '<p>' . get_post_preview($ID) . '<p>' . "\n" . '</article>' . "\n" . '</section>' . "\n"; } else { if (has_thumbnail($ID)) { echo '<div class="parallax-window" data-parallax="scroll" data-bleed="50" data-speed="0.1" data-image-src="' . get_thumbnail_link($row->id) . '"></div>' . "\n"; } echo '<section id="post-' . $ID . '" class="post dark">' . "\n" . '<article>' . "\n" . '<h2><a href="' . get_post_link($ID) . '">' . get_post_title($ID) . '</a></h2>' . "\n" . '<p>' . get_post_preview($ID) . '<p>' . "\n" . '</article>' . "\n" . '</section>' . "\n"; } } }
$O2 .= '<div class="mbd-layout-post-title">' . "\n"; $O2 .= '<h2>Lorem ipsum</h2>' . "\n"; $O2 .= '</div>' . "\n"; } $O2 .= '<div class="mbd-layout-post-content">' . "\n"; $O2 .= 'CONTENT' . "\n"; $O2 .= '</div>' . "\n"; $O2 .= '<div class="mbd-layout-post-meta">' . "\n"; $O2 .= '<img src="http://localhost/b2-net-cms-alpha/B2-NET-CMS/content/themes/material/img/meta-image.jpg" class="mbd-layout-post-meta-image"/>' . "\n"; $O2 .= '<p class="mbd-layout-post-meta-autor">The Meta</p>' . "\n"; $O2 .= '<p class="mbd-layout-post-meta-date">2 days ago</p>' . "\n"; $O2 .= '</div>' . "\n"; $O2 .= '</div>' . "\n"; //////////////////////////////////////////////////////////////////////////// $O3 = '<div class="mbd-layout-col mbd-layout-col-5-8 mbd-layout-post matchheight">' . "\n"; if (has_thumbnail($ID)) { $O3 .= '<div class="mbd-layout-post-image-title" style="background-image: url(' . get_thumbnail_link($ID) . ');">' . "\n"; $O3 .= '<h2>Lorem ipsum</h2>' . "\n"; $O3 .= '</div>' . "\n"; } else { $O3 .= '<div class="mbd-layout-post-title">' . "\n"; $O3 .= '<h2>Lorem ipsum</h2>' . "\n"; $O3 .= '</div>' . "\n"; } $O3 .= '<div class="mbd-layout-post-content">' . "\n"; $O3 .= 'CONTENT' . "\n"; $O3 .= '</div>' . "\n"; $O3 .= '<div class="mbd-layout-post-meta">' . "\n"; $O3 .= '<img src="http://localhost/b2-net-cms-alpha/B2-NET-CMS/content/themes/material/img/meta-image.jpg" class="mbd-layout-post-meta-image"/>' . "\n"; $O3 .= '<p class="mbd-layout-post-meta-autor">The Meta</p>' . "\n"; $O3 .= '<p class="mbd-layout-post-meta-date">2 days ago</p>' . "\n";