Diagnos adlı üyeden alıntı: mesajı görüntüle
Bu kısımlar Footerda sanırım Onuda atabilirmisin ayrıca bBu random post Plugin olarak mı ?
buyur arkadaşım footer kodu
Alıntı
</div>

<?php wp_reset_query(); ?>
<?php $showgallery1 = get_settings ( "cp_showpostgallery" );
$showgallery2 = get_settings ( "cp_showarchivegallery" );
if ( (is_home()) || (is_search() && $showheadline2 != "no") || (is_archive() && $showgallery2 != "no") || (is_single() && $showgallery1 != "no") ) { ?>

<div id="gallery" class="clearfloat">

<div id="random">
<h3>Random Posts</h3>

<?php $width = get_settings ( "cp_thumbWidth_Gallery" );
$height = get_settings ( "cp_thumbHeight_Gallery" );
if ( $width == 0 ) { $width = 80; }
if ( $height == 0 ) { $height = 80; }
$status = get_settings ( "cp_thumbAuto" );
?>

<?php $randompost = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY RAND() LIMIT 12");

foreach ($randompost as $post) {
$ID = $post->ID;
$postid = get_post($post->ID);
$title = $postid->post_title;
$values = $wpdb->get_var("SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $ID AND meta_key = 'Image' ");
?>

<?php if ( $status != "first" ) { ?>

<?php
if (isset($values)) {
?>
<a href="<?php echo get_permalink($postid); ?>" rel="bookmark" title="Permanent Link to <?php echo $title; ?>"><img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
echo $values; ?>&amp;w=<?php echo $width; ?>&amp;h=<?php echo $height; ?>&amp;zc=1&amp;q=100"
alt="<?php echo $title; ?>" class="left" width="<?php echo $width; ?>px" height="<?php echo $height; ?>px" /></a>
<?php } ?>

<?php } else { ?>

<?php $id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern = '!<img.*?src="(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$image_src = $matches['1'][0]; ?>

<a href="<?php echo get_permalink($postid); ?>" rel="bookmark" title="Permanent Link to <?php echo $title; ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php if($image_src != '') { echo $image_src; } ?>&amp;w=<?php echo $width; ?>&amp;h=<?php echo $height; ?>&amp;zc=1&amp;q=100"
alt="<?php echo $title; ?>" class="left" width="<?php echo $width; ?>px" height="<?php echo $height; ?>px" /></a>

<?php } ?>

<?php } ?>
<div class="more" style="margin-top:-10px;padding-right:15px;font-weight:bold;float:right;"><a href="javascript:location.reload()" target="_self">(refresh random posts)</a></div>

</div>

<div id="video">

<?php $ar_video = get_settings( "ar_video" );
if( $ar_video == 0 ) { $ar_video = $cp_categories[0]->cat_ID; }
query_posts( 'showposts=1&cat=' . $ar_video ); ?>

<a href="<?php echo get_category_link($ar_video);?>"><h3 class="cat_title">Latest Video Post</h3></a>

<?php while (have_posts()) : the_post(); ?>

<?php $video = get_post_meta($post->ID, 'Video', $single=true); ?>

<div style="height:187px;width:281px;">
<?php if($video !== '') { ?>

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/mediaplayer/swfobject.js"></script>

<div id="footplayer"><div style="border:1px solid #ececec;padding:10px;">Adobe Flash Plugin is required to see this video. Click <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" style="text-decoration:underline;">here</a> to download the latest version of Adobe Flash Player Plugin.</div></div>
<script type="text/javascript">
var s0 = new SWFObject('<?php bloginfo('template_url'); ?>/mediaplayer/mediaplayer.swf','mpl','281','187','8');
s0.addParam('allowscriptaccess','always');
s0.addParam('allowfullscreen','true');
s0.addVariable('height','187');
s0.addVariable('width','281');
s0.addVariable('file','<?php echo $video; ?>');
s0.addVariable('image','<?php echo get_option('home'); ?>/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>');
s0.write('footplayer');
</script>
</script>
<?php } ?>
</div>
<div class="more" style="margin-top:5px;font-weight:bold;"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>


<?php endwhile; ?>


</div>

</div>

</div>
<?php } ?>

<div id="front-popular" class="clearfloat">

<div id="recentpost" class="clearfloat">
<?php /* Widgetized sidebar, if you have the plugin installed. */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(5) ) : ?>
<?php endif; ?></div>

<div id="mostcommented" class="clearfloat">
<h3>Most Commented</h3>
<ul><?php $result = $wpdb->get_results("
SELECT comment_count,ID,post_title
FROM $wpdb->posts
ORDER BY comment_count DESC
LIMIT 0 , 5");

foreach ($result as $topfive) {
$postid = $topfive->ID;
$title = $topfive->post_title;
$commentcount = $topfive->comment_count;
if ($commentcount != 0) { ?><li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"><?php echo $title ?></a></li><?php } } ?>
</ul>
<?php /* Widgetized sidebar, if you have the plugin installed. */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(6) ) : ?>
<?php endif; ?>
</div>

<div id="recent_comments" class="clearfloat">
<?php if (function_exists('akpc_most_popular')): ?>
<h3>Most Popular</h3>
<ul>
<?php akpc_most_popular($limit = 5, $before = '<li>', $after = '</li>'); ?>
</ul>
<?php endif; ?>
<?php /* Widgetized sidebar, if you have the plugin installed. */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(7) ) : ?>
<?php endif; ?>
</div>
</div>

<div id="footer"> <?php wp_footer(); ?> Powered by WordPress | <?php if ( is_user_logged_in() ) { ?> <?php wp_register('', ''); ?> | <?php } ?> <?php wp_loginout(); ?> | <a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> | <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a> | <a href="http://www.4gdestek.com/sitemap.xml" target="_blank">Arthemia Premium</a> theme by M chael J ubel H utgalung<!-- onlinewebstat.coms --><p><span id="wobsbn"><script type="text/javascript">var wozone="10800",wouser="4gdestek", wobanner=11;</script><script type="text/javascript" src="http://sayac.onlinewebstat.com/c.js"></script></span></p><noscript><p><img src="http://sayac1.onlinewebstat.com/analiz.php3?user=4gdestek" alt="" /></p></noscript><!-- onlinewebstat.coms -->

<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->

</div>

<?php
$cp_analytics = get_settings( "cp_analytics" );
if( $cp_analytics != "" ) {
?>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>



<?php } ?>


</body>
</html>