Пример #1
0
				<div class="xt-share-albums-list">
					<h3 class="xt-share-album-title">
						<span class="xt-r"><?php 
        echo get_the_album_sharecount();
        ?>
个分享</span><a href="<?php 
        echo get_the_album_url();
        ?>
"><?php 
        echo wp_trim_words(get_the_album_title(), 10);
        ?>
</a>
					</h3>
					<ul>
						<li><a href="<?php 
        echo get_the_album_url();
        ?>
">
							<?php 
        echo !empty($_picurls[1]) ? '<img src="' . $_picurls[1] . '"/>' : '';
        ?>
							<?php 
        echo !empty($_picurls[2]) ? '<img src="' . $_picurls[2] . '"/>' : '';
        ?>
							<?php 
        echo !empty($_picurls[3]) ? '<img src="' . $_picurls[3] . '"/>' : '';
        ?>
						</a></li>
						<div class="clearfix"></div>
					</ul>
				</div>
Пример #2
0
function _xt_sitemap_build_album($type = '')
{
    global $wpdb;
    $albums = $wpdb->get_results('SELECT id,create_date FROM ' . XT_TABLE_ALBUM . ' ORDER BY id DESC LIMIT ' . XT_SITEMAP_ALBUM_LIMIT);
    if ($type == 'baidu') {
    } else {
        $xml_begin = '<?xml version="1.0" encoding="utf-8"?><urlset>';
        $xml_indexs = '';
        if (!empty($albums)) {
            foreach ($albums as $album) {
                $xml_indexs .= '<url>';
                $xml_indexs .= '<loc>' . get_the_album_url($album->id) . '</loc>';
                $xml_indexs .= '<lastmod>' . date('Y-m-d', strtotime($album->create_date)) . '</lastmod>';
                $xml_indexs .= '<changefreq>' . XT_SITEMAP_ALBUM_CHANGEFREQ . '</changefreq>';
                $xml_indexs .= '<priority>' . XT_SITEMAP_ALBUM_PRIORITY . '</priority>';
                $xml_indexs .= '</url>';
            }
        }
        $xml_end = '</urlset>';
        return $xml_begin . $xml_indexs . $xml_end;
    }
}
Пример #3
0
function get_the_album_template_small($user_id = 0, $delClass = '', $isUser = false, $count = 9)
{
    $_title = get_the_album_title();
    $_url = get_the_album_url();
    ?>

    <div class="span3 xt-share xt-share-album xt-share-album-small">
        <div class="thumbnail">
            <div class="caption clearfix"><h5><a class="text-gray pull-left" href="<?php 
    echo $_url;
    ?>
" title="<?php 
    echo $_title;
    ?>
" target="_blank"><?php 
    echo wp_trim_words($_title, 8);
    ?>
</a><span class="pull-right muted">共<?php 
    the_album_sharecount();
    ?>
个分享</span></h5></div>
            <?php 
    $_picurls = get_the_album_picurls_small();
    ?>
            <a href="<?php 
    echo $_url;
    ?>
" title="<?php 
    echo $_title;
    ?>
" target="_blank" class="xt-album-link clearfix">
                <?php 
    $_count = 0;
    foreach ($_picurls as $_pic) {
        if (!empty($_pic)) {
            echo '<span class="xt-small"><img src="' . $_pic . '"/></span>';
        } else {
            echo '<span class="xt-small"></span>';
        }
        $_count++;
        if ($_count == $count) {
            break;
        }
    }
    ?>
            </a>
            <?php 
    if ($user_id) {
        the_delete_template(get_the_album_id(), 2, $user_id, $delClass);
    }
    ?>
            <?php 
    if ($isUser) {
        ?>
                <p class="muted">来自:<a class="X_Nick" data-value="<?php 
        echo get_the_album_userid();
        ?>
" href="<?php 
        xt_the_user_url(get_the_album_userid());
        ?>
" target="_blank"><?php 
        the_album_username();
        ?>
</a></p>
            <?php 
    }
    ?>
        </div>
    </div>
    <?php 
}