page dosyası mevcut,

Alıntı
<?php get_header(); ?>

<?php
$aOptions = SofaRooster::initOptions( false );
$downloads = $aOptions[ 'downloads' ];
$nodownloads = $aOptions[ 'nodownloads' ];
$share = $aOptions[ 'share' ];
$page_tag = $aOptions[ 'page' ];
?>

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

<div id="main-content" class="panel">
<div class="label"><span><?php echo ( strlen( $page_tag ) > 0 ) ? stripslashes( $page_tag ) : "PAGE"; ?><?php edit_post_link( 'EDIT', ' | ', '' ); ?></span></div>

<div class="panel-content">
<h1><?php the_title(); ?></h1>
<div class="portfolio-info">
<!--
<strong class="client-info"><span>Client</span>: Yahoo Networks</strong>
<a href="http://example.com" class="external-link">Visit online</a>
-->
&nbsp;
</div>
<?php the_content(); ?>
<!-- <?php trackback_rdf(); ?> -->


<!-- share -->
<div class="socialbookmarking">
<h2 class="socdwnld"><?php echo ( strlen( $share ) > 0 ) ? stripslashes( $share ) : "Social poster"; ?></h2>
<?php
// share entry
$arr_share = array();
$arr_share[ 'delicious' ] = "http://delicious.com/post?url=";
$arr_share[ 'digg' ] = "http://digg.com/submit?url=";
$arr_share[ 'reddit' ] = "http://reddit.com/submit?url=";
$arr_share[ 'technorati' ] = "http://www.technorati.com/faves?add=";
$arr_share[ 'facebook' ] = "http://www.facebook.com/share.php?u=";
$arr_share[ 'twitter' ] = "http://twitter.com/home?status=";
$arr_share[ 'google' ] = "http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=";
$arr_share[ 'yahoo' ] = "http://myweb2.search.yahoo.com/myresults/bookmarklet?u=";
$arr_share[ 'wikio' ] = "http://www.wikio.es/vote?url=";
$arr_share[ 'blinklist' ] = "http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url=";
$arr_share[ 'simpy' ] = "http://www.simpy.com/simpy/LinkAdd.do?href=";
$arr_share[ 'spurl' ] = "http://www.spurl.net/spurl.php?url=";

foreach( $arr_share as $k => $v ) {
$img_src_s = get_bloginfo( 'template_directory' ) . '/images/' . $k . '.png';
$pos_guide = $v . get_permalink( $post->ID );
echo '<a href="' . $pos_guide . '" title="Share on ' . $k . '"><img src="' . $img_src_s . '" alt="' . $k . '" />&nbsp;</a>';
}
?>

</div>
<!-- end share -->

<!-- DOCUMENT DOWNLOAD STARTS -->
<?php
// check if there are any docs for download
$content = get_the_content();
$attached_files = array();
$attached_extensions = array();
$attached_string = array();
$arr_exclude = array( 'zip', 'rar', 'doc', 'docx', 'xls', 'xlsx', 'pdf', 'uha' );
// matches
preg_match_all( '|<a.*?href=[\'"](.*?)[\'"].*?>(.*?)<.*?a>|i', $content, $match_extension );
// 1 - path to file
// 2 - file string
if( $match_extension[ 1 ] ) {
$c = 0;
while( $c < count( $match_extension[ 1 ] ) ) {
$bits = explode( '.', $match_extension[ 1 ][ $c ] );
$exte = $bits[ count( $bits ) - 1 ];
if( in_array( $bits[ count( $bits ) - 1 ], $arr_exclude ) && strlen( $bits[ count( $bits ) - 1 ] ) > 2 && strlen( $bits[ count( $bits ) - 1 ] ) < 5 ) {
array_push( $attached_files, $match_extension[ 1 ][ $c ] );
array_push( $attached_extensions, $bits[ count( $bits ) - 1 ] );
array_push( $attached_string, $match_extension[ 2 ][ $c ] );
$content = preg_replace( '|<a.*?href=[\'"](' . $match_extension[ 1 ][ $c ] . ')[\'"].*?>(' . $match_extension[ 2 ][ $c ] . ')<.*?a>|i', '', $content );
}
$c ++;
}
}
$l = count( $attached_files );
if( $l > 0 ) {
?>
<div class="documentList">
<h2 class="socdwnld"><?php echo ( strlen( $downloads ) > 0 ) ? stripslashes( $downloads ) : "Downloads"; ?></h2>
<ul class="doclist">
<?php
$i = 0;
while( $i < $l ) {
echo '<li class="' . $attached_extensions[ $i ] . '"><a href="' . $attached_files[ $i ] . '">' . $attached_string[ $i ] . '.' . $attached_extensions[ $i ] . '</a></li>';
$i++;
}
?>
</ul>
</div>
<?php
} else {
?>
<div class="documentList">
<h2 class="socdwnld"><?php echo ( strlen( $downloads ) > 0 ) ? stripslashes( $downloads ) : "Downloads"; ?></h2>
<ul class="doclist">
<li><?php echo ( strlen( $nodownloads ) > 0 ) ? stripslashes( $nodownloads ) : "No documents for download."; ?></li>
</ul>
</div>
<?php
}
?>
<!-- DOCUMENT DOWNLOAD ENDS -->

</div>
</div>

<?php endwhile; else: ?>
<div id="main-content" class="panel">
<div class="label"><span>ERROR!</span></div>

<div class="panel-content">
<h1>404 or else?</h1>
<div class="portfolio-info">
<!--
<strong class="client-info"><span>Client</span>: Yahoo Networks</strong>
<a href="http://example.com" class="external-link">Visit online</a>
-->
&nbsp;
</div>
<p>
No content matching request criteria.
</p>

</div>
</div>
<?php endif; ?>

</div>

<?php include( TEMPLATEPATH . "/sidebar_page.php" ); ?>
<?php get_footer(); ?>