function mydesign($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $users = get_users(); ?> <li id="comment-<?php echo comment_id(); ?> " class="compost"> <?php // ユーザーIDを引っ張る foreach ($users as $user) { //echo $user->display_name.'<br />'; //echo get_comment_author(); if ($user->display_name == get_comment_author()) { break; } } ?> <span class="trick_rounded-img icon_image" style="background: url(<?php echo ps_get_user_profile_image_src($user->ID, 'standard'); ?> ) no-repeat center center; width: 50px; height: 50px;></span> <span class="trick_thumbnail_Image"> <?php ps_user_profile_image($user->ID, 'thumbnail'); ?> </span> <?php ?> <div class="commentarea"> <?php //改行表示 $commentstr = '<p>' . get_comment_text() . '</p>'; $commentstr = preg_replace("/\n/", "<br />", $commentstr); echo $commentstr; //comment_text(); ?> </div> <p class="cominfo"> <?php comment_date(); ?> <?php comment_time(); ?> | <?php comment_author_link(); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'reply_text' => '返信', 'before' => ' | ', 'after' => ''))); ?> </p> </li> <?php }
/******************************** シングル(post)テンプレート ********************************/ // 投稿データがあるか調べる if (have_posts()) { // あった場合グローバル$postからthe_postでこのpostに指定される?←ココ謎 the_post(); ?> <div class="postTitle"> <span class="trick_rounded-img post_authorimage" style="background: url(<?php echo ps_get_user_profile_image_src(get_the_author_meta('ID'), 'standard'); ?> ) no-repeat center center; width: 60px; height: 60px;></span> <span class="trick_thumbnail_Image"> <?php ps_user_profile_image($post->post_author, 'standard'); ?> </span> <h2><?php the_title(); ?> </h2> </div> <!-- メイン記事部分 --> <div class="post"> <?php //echo 'コンテンツ表示<br />'; the_content(); // ↓これでも表示は可能だけど画像の横に文字が回り込んだりして改行がされない //echo $post->post_content;
case 0: echo 'border-color:#0F6;'; break; case 1: echo 'border-color:yellow;'; break; case 2: echo 'border-color:red";'; break; default: break; } ?> "> <span class="trick_thumbnail_Image"><?php ps_user_profile_image($value->keys, 'thumbnail'); ?> </span> </span> <?php $strarray = explode('.', $value->ave); ?> <p><img src="<?php bloginfo('template_directory'); ?> /img/on_star.gif" alt="star" /><strong <?php switch ($i) { case 0:
?> <div class="new_gallery_authorbox"> <p class="authorName"><a href="<?php echo get_home_url() . '/gallery?user='******'big'); ?> </span> </span> <div class="authorImages"> <?php $posts = query_posts('posts_per_page=-1&offset=0&post_type=attachment&post_status=inherit&author=' . $user->ID); if (empty($posts)) { echo '<p class="notimage">投稿がありません</p>'; } else { foreach ($posts as $post) { // キャプションに写真と入力されていた場合のみ表示 if ($post->post_excerpt) { $strarray = explode(',', $post->post_excerpt); // 写真以外のキャプションはとっぱらう
while (have_posts()) { the_post(); ?> <div class="postTitle"> <?php /* ps_user_profile_imageのプラグイン画像サイズが指定されたサイズより小さい場合表示されなくなる */ ?> <span class="trick_rounded-img post_authorimage" style="background: url(<?php echo ps_get_user_profile_image_src(get_the_author_meta('ID'), 'standard'); ?> ) no-repeat center center; width: 60px; height: 60px;></span> <span class="trick_thumbnail_Image"> <?php ps_user_profile_image(get_the_author_meta('ID'), 'standard'); ?> </span> <h2> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> </h2> </div> <!-- メイン記事部分 --> <div class="post">
<!-- コンテンツ --> <div id="Topcontent"> <div id="TopFeed"> <img class="newimg" src="<?php bloginfo('template_url'); ?> /img/newimg.png" alt="new" /> <h2 class="newposts">新着記事</h2> <?php $posts = get_posts('numberposts=7&order=desc'); foreach ($posts as $post) { ?> <div class="feed"> <div class="yu-za"> <?php ps_user_profile_image($post->post_author, 'thumbnail'); ?> </div> <div class="feed_title"> 記事「<a href="<?php the_permalink(); ?> " id="post-<?php the_ID(); ?> "><?php the_title(); ?> </a>」 が作成されました。 </div>