예제 #1
0
	.ait-yt-video{
		display:inline-block;
		margin:0 20px 20px 0;
		width:310px;
	}
	.wrap .ait-yt-video-title{
		font-size:18px;
	}
</style>

<h1>Videos</h1>

<?php 
$url = 'http://gdata.youtube.com/feeds/base/users/AitThemes/uploads';
$cacheTime = defined('AIT_DEVELOPMENT') && AIT_DEVELOPMENT ? 5 : 1 * 24 * 60 * 60;
$videos = aitCachedRemoteRequest('ait-videos', $url, $cacheTime);
if ($videos !== false) {
    foreach ($videos->entry as $video) {
        $id = substr($video->id, -11);
        ?>
<div class="ait-yt-video">
	<h2 class="ait-yt-video-title"><a href="http://youtu.be/<?php 
        echo $id;
        ?>
?hd=1" target="_blank" title="Open video on YouTube"><?php 
        echo $video->title;
        ?>
</a></h2>
	<iframe width="310" height="240" src="http://www.youtube.com/embed/<?php 
        echo $id;
        ?>
예제 #2
0
function aitLatestThemeWidget()
{
    $url = 'http://www.ait-themes.com/json-export.php?ref=' . urlencode($_SERVER['SERVER_NAME']) . '&t=' . THEME_CODE_NAME . '&from=dashboard';
    $cacheTime = defined('AIT_DEVELOPMENT') && AIT_DEVELOPMENT ? 5 : 1 * 24 * 60 * 60;
    $themes = aitCachedRemoteRequest('ait-themes', $url, $cacheTime);
    if ($themes !== false and !empty($themes)) {
        $latest = reset($themes);
        if ($latest->codeName == THEME_CODE_NAME or !$latest->inThemeBox) {
            $latest = next($themes);
        }
        if ($latest->inThemeBox) {
            ?>
		<div style="text-align:center;">
			<a href="<?php 
            echo $latest->url;
            ?>
" target="_blank">
				<img src="<?php 
            echo $latest->preview;
            ?>
" style="max-width:100%">
			</a>
		</div>
		<?php 
        }
        ?>

	<?php 
    }
}
예제 #3
0
	.ait-themes .themes .preview			{ display: none; }
	.ait-themes .themes a:hover .preview	{ display: block; position: absolute; left: 50px; bottom: 50px; padding: 5px; border: 1px solid #DFDFDF; background: #FFFFFF; -moz-box-shadow: 0px 2px 5px rgba(0,0,0,0.3); -webkit-box-shadow: 0px 2px 5px rgba(0,0,0,0.3); box-shadow: 0px 2px 5px rgba(0,0,0,0.3);}

	h2#sorry-title		{text-align: center; margin:2em 0em 1em 0em; font-weight: normal;}
	p#sorry-subtitle	{text-align: center; margin:0em 0em 2em 0em;}
	.ait-themes .themes a:hover .preview	{position: absolute; left: 0px; top: 75px;}
</style>
<?php 
if (isset($aitDisableForum) and $aitDisableForum) {
    ?>
<h2 id="sorry-title"><strong>We're sorry,</strong> support is available for our <strong>Premium Wordpress Theme only.</strong></h2>
<p id="sorry-subtitle">Please have a look at our recent themes below.</p>
<?php 
    $url = 'http://www.ait-themes.com/json-export.php?ref=' . urlencode($_SERVER['SERVER_NAME']) . '&from=dashboard';
    $cacheTime = defined('AIT_DEVELOPMENT') && AIT_DEVELOPMENT ? 5 : 1 * 24 * 60 * 60;
    $themes = aitCachedRemoteRequest('ait-themes', $url, $cacheTime);
    if ($themes !== false) {
        ?>
<div class="ait-themes">
<ul class="themes">
<?php 
        foreach ($themes as $theme) {
            ?>
	<?php 
            if ($theme->inThemeBox) {
                ?>
	<li>
		<a href="<?php 
                echo $theme->url;
                ?>
" target="_blank">