コード例 #1
0
ファイル: plugin.php プロジェクト: acrox999/bludit-plugins
 function __construct()
 {
     parent::__construct();
     global $Url;
     // Disable the plugin IF ...
     $this->disable = false;
     if (!$this->getDbField('enablePosts') && $Url->whereAmI() == 'post') {
         $this->disable = true;
     } elseif (!$this->getDbField('enablePages') && $Url->whereAmI() == 'page') {
         $this->disable = true;
     } elseif (!$this->getDbField('enableDefaultHomePage') && $Url->whereAmI() == 'page') {
         global $Site;
         if (Text::isNotEmpty($Site->homePage())) {
             $this->disable = true;
         }
     } elseif ($Url->whereAmI() != 'post' && $Url->whereAmI() != 'page') {
         $this->disable = true;
     }
 }
コード例 #2
0
ファイル: home.php プロジェクト: acrox999/lingonberry
</a></h2>
					<div class="post-meta">

						<span class="post-date"><a href="<?php 
    echo $Post->permalink();
    ?>
" title="<?php 
    echo $Post->date();
    ?>
"><?php 
    echo $Post->date();
    ?>
</a></span>
						<span class="date-sep"> / </span>
						<span class="post-author"><?php 
    if (Text::isNotEmpty($Post->user('firstName')) || Text::isNotEmpty($Post->user('lastName'))) {
        echo $Post->user('firstName') . ' ' . $Post->user('lastName');
    } else {
        echo $Post->user('username');
    }
    ?>
</span>
												
					</div>
				</div>
				
				<div class="post-content">
					<?php 
    echo $Post->content(false);
    ?>
					
コード例 #3
0
ファイル: post.php プロジェクト: BogusCurry/bludit
echo $Post->title();
?>
</a></h2>
			<p><?php 
echo $Post->description();
?>
</p>
		</div>
		<div class="meta">
	                <?php 
// Get the user who created the post.
$User = $Post->user();
// Default author is the username.
$author = $User->username();
// If the user complete the first name or last name this will be the author.
if (Text::isNotEmpty($User->firstName()) || Text::isNotEmpty($User->lastName())) {
    $author = $User->firstName() . ' ' . $User->lastName();
}
?>
			<time class="published" datetime="2015-11-01"><?php 
echo $Post->date();
?>
</time>
			<div class="author"><span class="name"><?php 
echo $author;
?>
</span><img src="<?php 
echo $User->profilePicture();
?>
" alt=""></div>
		</div>
コード例 #4
0
ファイル: post.php プロジェクト: clstrfcuk/bludit-themes
 -->            <?php 
echo $Post->title();
?>
<!--             </a>
 -->        </h1>

            <!-- Post date and author -->
            <div class="post-meta">
                <span class="date"><?php 
echo $Post->date();
?>
</span>
                <span class="author">
                    <?php 
echo $Language->get('Posted By') . ' ';
if (Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName())) {
    echo $Post->authorFirstName() . ' ' . $Post->authorLastName();
} else {
    echo $Post->username();
}
?>
                </span>
            </div>

        </header>

        <!-- Post content -->
        <div class="post-content">
            <?php 
echo $Post->content();
?>
コード例 #5
0
ファイル: 71.pages.php プロジェクト: vorons/bludit
    $dbPages->cliMode();
}
// Build specific page.
if ($Url->whereAmI() === 'page' && $Url->notFound() === false) {
    $Page = buildPage($Url->slug());
    // The page doesn't exist.
    if ($Page === false) {
        $Url->setNotFound(true);
        unset($Page);
    } elseif (!$Page->published()) {
        $Url->setNotFound(true);
        unset($Page);
    }
}
// Homepage
if ($Url->whereAmI() === 'home' && $Url->notFound() === false) {
    // The user defined as homepage a particular page.
    if (Text::isNotEmpty($Site->homepage())) {
        $Url->setWhereAmI('page');
        $Page = buildPage($Site->homepage());
        if ($Page === false) {
            $Url->setWhereAmI('home');
        }
    }
}
if ($Url->notFound()) {
    $Url->setWhereAmI('page');
    $Page = new Page('error');
}
// Build all pages
$pages = buildAllPages();
コード例 #6
0
ファイル: post.php プロジェクト: vorons/bludit
?>
</h4>

			<!-- Social networks
			-->
			<?php 
if (Text::isNotEmpty($User->twitter())) {
    echo '<div class="social"><a href="' . $User->twitter() . '">Twitter</a></div>';
}
if (Text::isNotEmpty($User->facebook())) {
    echo '<div class="social"><a href="' . $User->facebook() . '">Facebook</a></div>';
}
if (Text::isNotEmpty($User->googleplus())) {
    echo '<div class="social"><a href="' . $User->googleplus() . '">Google+</a></div>';
}
if (Text::isNotEmpty($User->instagram())) {
    echo '<div class="social"><a href="' . $User->instagram() . '">Instagram</a></div>';
}
?>
		</div>
	</div>

	<!-- Post content
	-->
	<div class="col-md-9 col-md-pull-3">

		<!-- Load plugins
		- Hook: Post Begin
		-->
		<?php 
Theme::plugins('pageBegin');
コード例 #7
0
ファイル: post.php プロジェクト: acrox999/bludit
	<!-- Post's header -->
	<header>
		<div class="title">
			<h1><a href="<?php 
echo $Post->permalink();
?>
"><?php 
echo $Post->title();
?>
</a></h1>
			<div class="info"><span><i class="fa fa-clock-o"></i> <?php 
echo $Post->date();
?>
</span><span><i class="fa fa-user"></i> <?php 
echo Text::isNotEmpty($Post->user('firstName')) ? $Post->user('firstName') : $Post->user('username');
?>
</span></div>
		</div>
	</header>

	<div class="cover-image">
	<!-- Cover Image -->
	<?php 
if ($Post->coverImage()) {
    echo '<img src="' . $Post->coverImage() . '" alt="Cover Image">';
}
?>
	</div>

	<!-- Post's content, the first part if has pagebrake -->
コード例 #8
0
ファイル: 70.pages.php プロジェクト: CryssDOTnet/bludit
// Search for changes on pages by the user.
if ($Site->cliMode()) {
    $dbPages->regenerateCli();
}
// Filter by page, then build it
if ($Url->whereAmI() === 'page' && $Url->notFound() === false) {
    $Page = build_page($Url->slug());
    if ($Page === false) {
        $Url->setNotFound(true);
        unset($Page);
    } elseif (!$Page->published()) {
        $Url->setNotFound(true);
        unset($Page);
    }
}
// Default homepage
if ($Url->notFound() === false) {
    if (Text::isNotEmpty($Site->homepage()) && $Url->whereAmI() === 'home') {
        $Url->setWhereAmI('page');
        $Page = build_page($Site->homepage());
        if ($Page === false) {
            $Url->setWhereAmI('home');
        }
    }
}
if ($Url->notFound()) {
    $Url->setWhereAmI('page');
    $Page = new Page('error');
}
// Build all pages
build_all_pages();
コード例 #9
0
ファイル: index.php プロジェクト: clstrfcuk/bludit-themes
		</div>
	</div>

	<!-- Introduction -->
	<div class="intro">
		<div class="container">
			<div class="units-row">
			    <div class="unit-10">
			    	<img class="img-intro" src="<?php 
echo HTML_PATH_THEME . 'img/avatar.png';
?>
" alt="">
			    </div>
			    <div class="unit-90">
			    	<p class="p-intro"><?php 
echo Text::isNotEmpty($Site->description()) ? $Site->description() : 'Welcome to the machine';
?>
</p>
			    </div>
			</div>
		</div>
	</div>

	<!-- Content -->
	<div class="content">
		<div class="container">
	        <?php 
if ($Url->whereAmI() == 'home' || $Url->whereAmI() == 'tag') {
    include PATH_THEME_PHP . 'home.php';
} elseif ($Url->whereAmI() == 'post') {
    include PATH_THEME_PHP . 'post.php';