Пример #1
0
/**
 * Tags related to navigation links: previous post, next post, etc.
 */
function is_home()
{
    global $WPGLOBAL;
    $prismic = $WPGLOBAL['prismic'];
    $page = single_post();
    $homeId = $prismic->get_api()->bookmark('home');
    return $page->getId() == $homeId;
}
Пример #2
0
function the_wio_attributes()
{
    global $WPGLOBAL, $loop;
    $bloghome = isset($WPGLOBAL['bloghome']) ? $WPGLOBAL['bloghome'] : NULL;
    $currentPost = $loop->current_post();
    $page = single_post();
    $doc = $page ? $page : ($currentPost ? $currentPost : $bloghome);
    if (!$doc) {
        return;
    }
    echo 'data-wio-id="' . $doc->getId() . '"';
}
Пример #3
0
    $last_login = $row['last_login'];
    //getting the number of user post
    $user_posts = "select * from posts where user_id='{$user_id}'";
    $run_posts = mysqli_query($con, $user_posts);
    $posts = mysqli_num_rows($run_posts);
    //getting the number of unread messages
    $sel_msg = "select * from messages where receiver='{$user_id}' AND status='unread' ORDER by 1 DESC";
    $run_msg = mysqli_query($con, $sel_msg);
    $count_msg = mysqli_num_rows($run_msg);
    echo "\n\t\t\t\t\t\t<center><img src='user/user_images/{$user_image}' width='200' height='200'/></center>\n\t\t\t\t\t\t<div id='user_mention'>\n\t\t\t\t\t\t<p><strong>Name:</strong> {$user_name}</p>\n\t\t\t\t\t\t<p><strong>Country:</strong> {$user_country}</p>\n\t\t\t\t\t\t<p><strong>Last Login:</strong> {$last_login}</p>\n\t\t\t\t\t\t<p><strong>Member Since:</strong> {$register_date}</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p><a href='my_messages.php'>Messages ({$count_msg})</a></p>\n\t\t\t\t\t\t<p><a href='my_posts.php'>My Posts ({$posts})</a></p>\n\t\t\t\t\t\t<p><a href='edit_profile.php'>Edit My Account</a></p>\n\t\t\t\t\t\t<p><a href='logout.php'>Logout</a></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t";
    ?>
					</div>
				</div>
				<!--user timeline ends-->
				<!--Content timeline starts-->
				<div id="content_timeline"> 
						<?php 
    single_post();
    ?>
				</div>
				<!--Content timeline ends-->
			</div>
			<!--Content area ends-->
		
	</div>
	<!--Container ends-->

</body>
</html>
<?php 
}
Пример #4
0
single_post('post_heading');
?>
</h1>
                            <i>Posted on <a href=""><?php 
single_post('time');
?>
</a> by <a href=""><?php 
single_post('author');
?>
</a></i>
                            <img class="col-xs-5" src="<?php 
single_post('image');
?>
" alt="Blog Title"/>
                            <p style="text-align:justify"><?php 
single_post('post_detail');
?>
</p>
                            <hr>
                            <a style="color: #000" href="">
                                <span style="/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#f2f9fe+0,f2f9fe+32,f2f9fe+32,f2f9fe+32,f2f9fe+32,f2f9fe+32,f2f9fe+47,f2f9fe+48,f2f9fe+48,f2f9fe+48,d6f0fd+100 */
background: rgb(242,249,254); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(242,249,254,1) 0%, rgba(242,249,254,1) 32%, rgba(242,249,254,1) 32%, rgba(242,249,254,1) 32%, rgba(242,249,254,1) 32%, rgba(242,249,254,1) 32%, rgba(242,249,254,1) 47%, rgba(242,249,254,1) 48%, rgba(242,249,254,1) 48%, rgba(242,249,254,1) 48%, rgba(214,240,253,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(242,249,254,1)), color-stop(32%,rgba(242,249,254,1)), color-stop(32%,rgba(242,249,254,1)), color-stop(32%,rgba(242,249,254,1)), color-stop(32%,rgba(242,249,254,1)), color-stop(32%,rgba(242,249,254,1)), color-stop(47%,rgba(242,249,254,1)), color-stop(48%,rgba(242,249,254,1)), color-stop(48%,rgba(242,249,254,1)), color-stop(48%,rgba(242,249,254,1)), color-stop(100%,rgba(214,240,253,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(242,249,254,1) 0%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 47%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(214,240,253,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(242,249,254,1) 0%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 47%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(214,240,253,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(242,249,254,1) 0%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 47%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(214,240,253,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(242,249,254,1) 0%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 32%,rgba(242,249,254,1) 47%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(242,249,254,1) 48%,rgba(214,240,253,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f9fe', endColorstr='#d6f0fd',GradientType=0 ); /* IE6-9 */
; padding: 10px 30px 5px;">
                                    <i style="" class="fa fa-thumbs-up">
Пример #5
0
?>

</head>

<body class="">

    <div id="right-panel">

        <?php 
get_sidebar();
?>

    </div>

    <div id="main" <?php 
echo the_wio_attributes();
?>
>

        <a id="menu-hamburger" href="#right-panel"></a>

        <div id="page-content">

            <?php 
echo single_post()->asHtml();
?>

        </div>

<?php 
get_footer();
Пример #6
0
<?php

/**
 * CricBD post view API for Apps
 * @author Shahriar
 * @version 1.0.1
*/
header('Content-Type: application/json;');
//
if (isset($_POST['api_key'])) {
    $var = sql_data('forum_user', "api_key='" . $_POST['api_key'] . "'");
    if ($var) {
        //
        if (isset($_POST['post_id'])) {
            $postId = (int) $_POST['post_id'];
            $chk = single_post($postId);
            $uid = (int) $var['uid'];
            if ($chk) {
                $json = array();
                $json['message'] = "Posts found!";
                $json['success'] = 1;
                $json['data'] = json_decode($chk, true);
                $arr = json_decode($json['data'][0]['post_like']);
                if (in_array($uid, $arr)) {
                    $json['data'][0]['liked'] = 1;
                } else {
                    $json['data'][0]['liked'] = 0;
                }
                $json['data'][0]['post_like'] = count($arr);
                $com = post_comment($postId);
                $json['data'][0]['comments'] = json_decode($com, true);
Пример #7
0
function single_post_title($prefix = '', $display = true)
{
    global $WPGLOBAL;
    $prismic = $WPGLOBAL['prismic'];
    if (!single_post()) {
        return;
    }
    $result = $prefix . single_post()->getText(single_post()->getType() . '.title');
    if ($display) {
        echo htmlentities($result);
    } else {
        return $result;
    }
}
function single_post_title($prefix = '', $display = true)
{
    global $WPGLOBAL;
    $prismic = $WPGLOBAL['prismic'];
    if (!single_post()) {
        return;
    }
    return $prefix . single_post()->getText(single_post()->getType() . '.title');
}