// Generate the published date.
 $published_date = date_format(date_create($published_iso_date), $date_format);
 // Get the post category.
 $post_category = str_replace(array("\n", '-'), '', $fcontents[4]);
 // Get the post status.
 $post_status = str_replace(array("\n", '- '), '', $fcontents[5]);
 // Get the post category link.
 $post_category_link = $blog_url . 'category/' . urlencode(trim(strtolower($post_category)));
 // Get the post link.
 $post_link = $blog_url . str_replace(array(FILE_EXT, POSTS_DIR), '', $filename);
 // Get the post image url.
 $image = str_replace(array(FILE_EXT), '', $filename) . '.jpg';
 if (file_exists($image)) {
     $post_image = $blog_url . str_replace(array(FILE_EXT, './'), '', $filename) . '.jpg';
 } else {
     $post_image = get_twitter_profile_img($post_author_twitter);
 }
 // Get the post content
 $file_array = file($filename);
 unset($file_array[0]);
 unset($file_array[1]);
 unset($file_array[2]);
 unset($file_array[3]);
 unset($file_array[4]);
 unset($file_array[5]);
 unset($file_array[6]);
 $post_content = Markdown(implode("", $file_array));
 // Get the site title.
 $page_title = str_replace('# ', '', $fcontents[0]);
 // Generate the page description and author meta.
 $get_page_meta[] = '<meta name="description" content="' . $post_intro . '">';
Exemple #2
0
    public function internalMenu()
    {
        $login_error = LOGIN_ERROR;
        $blog_title = $this->settings->get('blog_title');
        $blog_twitter = $this->settings->get('blog_twitter');
        $blog_email = $this->settings->get('blog_email');
        $blog_title = $this->settings->get('blog_title');
        $meta_description = $this->settings->get('meta_description');
        $intro_title = $this->settings->get('intro_title');
        $intro_text = $this->settings->get('intro_text');
        $header_inject = $this->settings->get('header_inject');
        $footer_inject = $this->settings->get('footer_inject');
        ?>

<div class="dp-panel-wrapper <?php 
        if ($_COOKIE['dp-panel']) {
            echo $_COOKIE['dp-panel'];
        }
        ?>
" id="dp-dropplets">
    <div class="dp-panel">
        <div class="dp-row profile">
            <div class="dp-icon">
                <img src="<?php 
        echo get_twitter_profile_img($blog_twitter);
        ?>
" alt="<?php 
        echo $blog_title;
        ?>
" />
            </div>
            
            <div class="dp-content">
                <span class="title">Welcome Back!</span>
                <a class="dp-button dp-button-dark dp-close  dp-icon-close" href="#dp-dropplets"></a>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-dropplets"></div>
            <div class="dp-content">Publish or Update Posts</div>
            <label class="dp-link" for="postfiles"></label>
            <input style="display: none;" type="file" name="postfiles" id="postfiles" class="postfiles" multiple="multiple" />
        </div>
        
        <form method="POST" action="./dropplets/save.php">
            <div class="dp-row">
                <div class="dp-icon dp-icon-settings"></div>
                <div class="dp-content">Blog Settings</div>                
                <a class="dp-link dp-toggle collapsed" href="#dp-settings"></a>
                <button class="dp-button dp-button-submit" type="submit" name="submit" value="submit">k</button>
            </div>
            
            <div class="dp-sub-panel" id="dp-settings">
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Blog Password</label>
                        <input type="password" name="password" id="password" value="">
                    </div>
                </div>
            </div>
            
            <div class="dp-row">
                <div class="dp-icon dp-icon-profile dp-icon-large"></div>
                <div class="dp-content">Blog Profile</div>                
                <a class="dp-link dp-toggle" href="#dp-profile"></a>
                <button class="dp-button dp-button-submit" type="submit" name="submit" value="submit">k</button>
            </div>
            
            <div class="dp-sub-panel" id="dp-profile">
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Blog Email</label>
                        <input type="text" name="blog_email" id="blog_email" value="<?php 
        echo $blog_email;
        ?>
">
                    </div>
                </div>
                
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Blog Twitter</label>
                        <input type="text" name="blog_twitter" id="blog_twitter" value="<?php 
        echo $blog_twitter;
        ?>
">
                    </div>
                </div>
            </div>
            
            <div class="dp-row">
                <div class="dp-icon dp-icon-text"></div>
                <div class="dp-content">Blog Meta</div>                
                <a class="dp-link dp-toggle" href="#dp-meta-text"></a>
                <button class="dp-button dp-button-submit" type="submit" name="submit" value="submit">k</button>
            </div>
            
            <div class="dp-sub-panel" id="dp-meta-text">
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Blog Title</label>
                        <input type="text" name="blog_title" id="blog_title" value="<?php 
        echo $blog_title;
        ?>
">
                    </div>
                </div>
                
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Blog Description</label>
                        <textarea name="meta_description" id="meta_description" rows="6" placeholder="Add your site description here... just a short sentence that describes what your blog is going to be about."><?php 
        echo $meta_description;
        ?>
</textarea>
                    </div>
                </div>
            </div>
            
            <div class="dp-row">
                <div class="dp-icon dp-icon-text"></div>
                <div class="dp-content">Intro Text</div>                
                <a class="dp-link dp-toggle" href="#dp-intro-text"></a>
                <button class="dp-button dp-button-submit" type="submit" name="submit" value="submit">k</button>
            </div>
            
            <div class="dp-sub-panel" id="dp-intro-text">
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Intro Title</label>
                        <input type="text" name="intro_title" id="intro_title" value="<?php 
        echo $intro_title;
        ?>
">
                    </div>
                </div>
                
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Intro Text</label>
                        <textarea name="intro_text" id="intro_text" rows="12"><?php 
        echo $intro_text;
        ?>
</textarea>
                    </div>
                </div>
            </div>
            
            <div class="dp-row">
                <div class="dp-icon dp-icon-code"></div>
                <div class="dp-content">Code Injection</div>                
                <a class="dp-link dp-toggle" href="#dp-injection"></a>
                <button class="dp-button dp-button-submit" type="submit" name="submit" value="submit">k</button>
            </div>
            
            <div class="dp-sub-panel" id="dp-injection">
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Header Injection</label>
                        <textarea class="dp-code" name="header_inject" id="header_inject" rows="12"><?php 
        echo $header_inject;
        ?>
</textarea>
                    </div>
                </div>
                
                <div class="dp-row dp-editable">
                    <div class="dp-icon dp-icon-edit"></div>
                    
                    <div class="dp-content">
                        <label>Footer Injection</label>
                        <textarea class="dp-code" name="footer_inject" id="footer_inject" rows="12"><?php 
        echo $footer_inject;
        ?>
</textarea>
                    </div>
                </div>
            </div>
        </form>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-large dp-icon-grid"></div>
            <div class="dp-content">Installed Templates</div>        
            <a class="dp-link dp-toggle" href="#dp-templates"></a>
        </div>
        
        <div class="dp-sub-panel" id="dp-templates">
            <div class="dp-row dp-templates">
                <?php 
        get_installed_templates('all');
        ?>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-templates"></div>
            <div class="dp-content">Featured Templates</div>
            <a class="dp-link dp-toggle" href="#dp-featured"></a>
            <span class="dp-number dp-number-dark"><?php 
        count_premium_templates('featured');
        ?>
</span>
        </div>
        
        <div class="dp-sub-panel" id="dp-featured">
            <div class="dp-row dp-templates">
                <?php 
        get_premium_templates('featured');
        ?>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-templates"></div>
            <div class="dp-content">Popular Templates</div>
            <a class="dp-link dp-toggle" href="#dp-popular"></a>        
            <span class="dp-number dp-number-dark"><?php 
        count_premium_templates('popular');
        ?>
</span>
        </div>
        
        <div class="dp-sub-panel" id="dp-popular">
            <div class="dp-row dp-templates">
                <?php 
        get_premium_templates('popular');
        ?>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-templates"></div>
            <div class="dp-content">All Templates</div>
            <a class="dp-link dp-toggle" href="#dp-all"></a>
            <span class="dp-number dp-number-dark"><?php 
        count_premium_templates('all');
        ?>
</span>
        </div>
        
        <div class="dp-sub-panel" id="dp-all">
            <div class="dp-row dp-templates">
                <?php 
        get_premium_templates('all');
        ?>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-large dp-icon-question"></div>
            <div class="dp-content">Need Some Help?</div>
            <a class="dp-link" href="https://github.com/dangerdan/dropplets"></a>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-key"></div>
            <div class="dp-content">Log Out</div>
            <a class="dp-link" href="?action=logout" title="Logout"></a>
        </div>
    </div>
</div>

<div id="dp-uploaded"></div>

<?php 
    }
?>
"><?php 
echo $blog_title;
?>
</a></h1>
            </header>
                
        <?php 
echo $content;
?>

        <footer> 
          <a href="http://twitter.com/<?php 
echo $blog_twitter;
?>
"><img src="<?php 
echo get_twitter_profile_img($blog_twitter);
?>
" alt="profile" /></a>
            Copyright &copy; 2014 <?php 
echo $blog_title;
?>

            <?php 
get_footer();
?>
        </footer>
        
        </div>
    </body>
</html>
Exemple #4
0
 // Get the post author Twitter ID.
 $post_author_twitter = str_replace(array("\n", '- '), '', $fcontents[2]);
 // Get the published date.
 $published_iso_date = str_replace('-', '', $fcontents[3]);
 // Generate the published date.
 $published_date = strftime($date_format, strtotime($published_iso_date));
 // Get the post category.
 $post_category = str_replace(array("\n", '-'), '', $fcontents[4]);
 // Get the post status.
 $post_status = str_replace(array("\n", '- '), '', $fcontents[5]);
 // Get the post category link.
 $post_category_link = $blog_url . 'category/' . urlencode(trim(strtolower($post_category)));
 // Get the post link.
 $post_link = $blog_url . str_replace(array(FILE_EXT, POSTS_DIR), '', $filename);
 // Get the post image url.
 $post_image = get_post_image_url($filename) ?: get_twitter_profile_img($post_author_twitter);
 // Get the post content
 $file_array = array_slice(file($filename), 7);
 $post_content = Markdown(trim(implode("", $file_array)));
 // free memory
 unset($file_array);
 // Get the site title.
 $page_title = trim(str_replace('# ', '', $fcontents[0]));
 // Generate the page description and author meta.
 $get_page_meta[] = '<meta name="description" content="' . $post_intro . '">';
 $get_page_meta[] = '<meta name="author" content="' . $post_author . '">';
 // Generate the Twitter card.
 $get_page_meta[] = '<meta name="twitter:card" content="summary">';
 $get_page_meta[] = '<meta name="twitter:site" content="' . $blog_twitter . '">';
 $get_page_meta[] = '<meta name="twitter:title" content="' . $page_title . '">';
 $get_page_meta[] = '<meta name="twitter:description" content="' . $post_intro . '">';
Exemple #5
0
    /* Otherwise, Get the Toolbar
    /*-----------------------------------------------------------------------------------*/
} else {
    ?>

<div class="dp-panel-wrapper <?php 
    if ($_COOKIE['dp-panel']) {
        echo $_COOKIE['dp-panel'];
    }
    ?>
" id="dp-dropplets">
    <div class="dp-panel">
        <div class="dp-row profile">
            <div class="dp-icon">
                <img src="<?php 
    echo get_twitter_profile_img(BLOG_TWITTER);
    ?>
" alt="<?php 
    echo BLOG_TITLE;
    ?>
" />
            </div>
            
            <div class="dp-content">
                <span class="title">Welcome Back!</span>
                <a class="dp-button dp-button-dark dp-close  dp-icon-close" href="#dp-dropplets"></a>
            </div>
        </div>
        
        <div class="dp-row">
            <div class="dp-icon dp-icon-dropplets"></div>