pLugin dışı kodlar | hepsini toplayalım - Google Fan Webmaster Forum
Google Fan Webmaster Forum  
herşeyi sana yazdım

Geri git   Google Fan Webmaster Forum > Genel Programlama > WordPress
KEY
Kayıt ol Articles Sosyal Gruplar Forumları Okundu Kabul Et

WordPress R10 Wordpress Sevenler Kategorisi

Like Tree6Beğeniler

Cevapla
 
LinkBack Seçenekler
  1  
Alt 07-12-2008, 01:04:49
 
Standart pLugin dışı kodlar | hepsini toplayalım

// 09.09.09 18.20 en kısa sürede yep yeni kodlar burada olacak.

Son Eklenen Konular
PHP- Kodu:
<?php wp_get_archives('type=postbypost&limit=15'); ?>
Kategoriler
PHP- Kodu:
<?php wp_list_cats(); ?>
Yorumlar
PHP- Kodu:
<?php
    
global $wpdb;
    
$sql "SELECT DISTINCT ID, post_title, post_password, comment_ID,
    comment_post_ID, comment_author, comment_date_gmt, comment_approved,
    comment_type,comment_author_url,
    SUBSTRING(comment_content,1,30) AS com_excerpt
    FROM 
$wpdb->comments
    LEFT OUTER JOIN 
$wpdb->posts ON ($wpdb->comments.comment_post_ID =
    
$wpdb->posts.ID)
    WHERE comment_approved = '1' AND comment_type = '' AND
    post_password = ''
    ORDER BY comment_date_gmt DESC
    LIMIT 10"
;
    
$comments $wpdb->get_results($sql);
    
$output $pre_HTML;
    
$output .= "\n<ul>";
    foreach (
$comments as $comment) {
    
$output .= "\n<li>".strip_tags($comment->comment_author)
    .
":" "<a href=\"" get_permalink($comment->ID) .
    
"#comment-" $comment->comment_ID "\" title=\"on " .
    
$comment->post_title "\">" strip_tags($comment->com_excerpt)
    .
"</a></li>";
    }
    
$output .= "\n</ul>";
    
$output .= $post_HTML;
    echo 
$output;?>
Etiketler (Tag Cloud)
PHP- Kodu:
<?php wp_tag_cloud('smallest=8&largest=20'); ?>
Bağlantılar
PHP- Kodu:
<?php get_links_list(); ?>
Aylık Arşiv
PHP- Kodu:
<?php wp_get_archives('type=monthly'); ?>
Yıllık Arşiv
PHP- Kodu:
<?php wp_get_archives('type=yearly'); ?>
Sayfalar
PHP- Kodu:
<?php wp_list_pages('title_li=<h2>Son Sayfalar</h2>'); ?>
Değişen Etiket Bulutu
PHP- Kodu:
<?php wp_tag_cloud('smallest=11&largest=25&unit=px&number=50&format=flat&orderby=count&order=RAND'); ?>
Benzer Yazılar
PHP- Kodu:
<?php
$this_post 
$post;
$category get_the_category(); $category $category[0]; $category $category->cat_ID;
$posts get_posts('numberposts=4&offset=0&orderby=post_date&order=DESC&category='.$category);
$count 0;
foreach ( 
$posts as $post ) {
if ( 
$post->ID == $this_post->ID || $count == 5) {
unset(
$posts[$count]);
}else{
$count ++;
}
}
?>
<?php 
if ( $posts ) : ?>
<ul>
<?php function getWords($text$limit) {
$array explode(" "$text$limit +1);
if(
count($array) > $limit) {
unset(
$array[$limit]);
}
return 
implode(" "$array); }
?>
<?php 
foreach ( $posts as $post ) : ?>
<?php $mycontent 
strip_tags($post->post_content);
$excerpt getWords($mycontent15);
$a_title $excerpt "..."?>
<li><a href="<?php the_permalink(); ?>" title="<?php echo $a_title ?>">
<?php if ( get_the_title() ) { the_title(); } else { echo "Untitle"; } ?></a>
<?php endforeach // $posts as $post ?>
</ul>
<?php endif // $posts ?>
<?php
$post 
$this_post;
unset(
$this_post);
?>
****************
Yazı Gösterim Sayfasında Önceki ve Sonraki Yazıya Bağlantı İçin
single.php'de bul
PHP- Kodu:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
altına yapıştır.
PHP- Kodu:
        <div class="navigation">
            <div class="alignleft"><?php previous_post_link('&laquo; %link'?></div>
            <div class="alignright"><?php next_post_link('%link &raquo;'?></div>
        </div>
bunlarıda css'e ekle.(css renklerinizi kendinize göre ayarlayabilirsiniz.
PHP- Kodu:
.navigation {
    
width500px;
    
height20px;
    
margin-bottom10px;
    
font-size9px;
    
font-weightbold;
    
color#FFFFFF;
}
.
navigation a {
    
color#FFFFFF;
}
.
navigation .alignleft {
    
floatleft;
}
.
navigation .alignright {
    
floatright;

********************
Özel alan kullanımı
bu kodlar temanızda özel alan kullanarak yazı,mp3,resim kullanımını sağlıyor.
örneğin bi' müzik siteniz var ve her seferinde media player kodlarını kullanmaktan bıktınız.Buna çözüm sağlıyor.
PHP- Kodu:
<?php $key "muzik";  
$getir get_post_meta($post->ID$keytrue); 
if(
$getir != "") { ?> 
<object id="mediaPlayer"   
width="320"   
height="300"  
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"   
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"   
standby="Microsoft Windows Media Player bilesenleri yukleniyor.."  
type="application/x-oleobject">   
<param name="FileName" VALUE="<?php echo $getir?>">   
<param name="ShowControls" value="1">  
<param name="AutoStart" value="0">  
<param name="ShowDisplay" value="False">  
<param name="AutoRewind" value="0">  
<param name="PlayCount" value="3">  
<param name="ShowStatusBar" value="1">  
<param name="ShowGotoBar" value="0">  
<param name="AutoSize" value="0">  
<param name="EnableContextMenu" value="false">  
<param name="BorderStyle" VALUE="1">  
<param name="DisplayForeColor" VALUE="0">  
<param name="DisplayBackColor" VALUE="0">  
<embed type="application/x-mplayer2"   
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"   
filename="<?php echo $getir?>"   
src="<?php echo $getir?>"   
name="mediaPlayer"   
autostart=0  
showcontrols=1  
showdisplay=False  
showgotobar=0  
enablecontextmenu=false  
showstatusbar=1  
autosize="0"   
width="320" height="300">   
</embed>   
</object> 
<?php ?>
üstteki kodları alıp,temanızın index.php dosyasındaki <?php the_content('Yazının tamamını okuyun &raquo;'); ?> kodunun altına yapıştırıyoruz ve olay tamam.O kadar çok kodu her seferinde eklemiyeceksiniz artık.
Eklemek nasıl olacak?

Görünüm nasıl olacak?
Default temadaki görünümü..

******************
En Çok Yorum Alan Yazılar.
PHP- Kodu:
<strong>En Çok İlgi Çeken Yazılar:</strong>
<ul id="moostick">
<?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 $topten) {
$postid $topten->ID;
$title $topten->post_title;
$commentcount $topten->comment_count
if (
$commentcount != 0) { ?>
<li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"><?php echo $title ?> &raquo; <span><?php echo $commentcount?> yorum aldı.</span></a></li>
<?php } } ?> 
</ul>
Sayfaları rakamlı olarak gösterme
Eklentiyi buradan indiriyoruz.
Daha sonra siteye attıktan sonra etkinleştiriyoruz ve alttaki kodu istediğimiz bi' yere koyuyoruz.
PHP- Kodu:
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
Görünüm

/Son Güncelleme: 12.12.2008 23:03
teknohaberci, amathus, MysqLv1 ve 3 kişi yazınızı beğenmiş.
__________________
askerde...

Konu Tias tarafından (09-09-2009 Saat 18:23:46 ) değiştirilmiştir..
Alıntı ile Cevapla
  2  
Alt 07-12-2008, 01:52:30
 
Standart

Kod:
<?php wp_list_cats(); ?>
bu bende çalışmadı bi türlü.sidebara ekledim ama kategoriler yazı halinde görünüyor.Çerçevesiz felan.Benmi yanlış yapıyorum.
Alıntı ile Cevapla
  3  
Alt 07-12-2008, 02:03:02
 
Standart

Alıntı:
ekolforum Nickli Üyeden Alıntı Mesajı göster
Kod:
<?php wp_list_cats(); ?>
bu bende çalışmadı bi türlü.sidebara ekledim ama kategoriler yazı halinde görünüyor.Çerçevesiz felan.Benmi yanlış yapıyorum.
<h3>kategoriler</h3>
<ul>
<?php wp_list_cats(); ?>
</ul>

böyle dene bi'de
__________________
askerde...
Alıntı ile Cevapla
  4  
Alt 07-12-2008, 02:12:13
 
Standart

codex.wordpress bakarsanız eğer
PHP- Kodu:
<?php wp_list_cats(); ?>
kodunun yanında deprecated yazar. Yani wordpress 2.1 sistemiyle gelmiştir.

bu kodun yerine:
PHP- Kodu:
<?php wp_list_categories(); ?>
kullanmanızı tavsiye ederim. Wordpress 2.5 sürümü ile gelmiştir.
__________________
En azından düşmanım ol!
Alıntı ile Cevapla
  5  
Alt 07-12-2008, 02:16:21
 
Standart

kategoriler

  • Amatör
  • Araçlar
  • Fragman
  • Haber
  • Kazalar
  • Komik
  • Müzik
  • Oyun
  • Sinema
  • Spor

Kategoriler aynı bu büyüklükte bu yazı fontunda görünüyor.Neyse senin konuyu dağıtmıyim ben.Teşekkürler.
Alıntı ile Cevapla
  6  
Alt 07-12-2008, 02:23:57
 
Standart

Alıntı:
ekolforum Nickli Üyeden Alıntı Mesajı göster
kategoriler
  • Amatör
  • Araçlar
  • Fragman
  • Haber
  • Kazalar
  • Komik
  • Müzik
  • Oyun
  • Sinema
  • Spor
Kategoriler aynı bu büyüklükte bu yazı fontunda görünüyor.Neyse senin konuyu dağıtmıyim ben.Teşekkürler.
bu konuda bunun için zaten.herkes sorsunki işe yarasın konu
css'den ayar çekeceksin şimdide.büyük ihtimal kafamdaki gibidir.
css'de en alta ekle
PHP- Kodu:
#sidebar {
floatright;
color#84878E;
}
#sidebar ul li a:link, .sidebar-box ul li a:visited, .sidebar-box ul li a:active {
color#373434; 

#sidebar ul li {
color#373434;
margin5px 3px 3px 5px
}
#sidebar ul {
list-style-imageurl(images/bullet.gif); 

bu resmide images'e at.bi dene bakalım nasıl olcak
__________________
askerde...
Alıntı ile Cevapla
  7  
Alt 07-12-2008, 02:34:39
 
Standart

Malesef
Burdan
Alıntı ile Cevapla
  8  
Alt 07-12-2008, 10:11:23
 
Standart

kategoriler
  • Amatör
  • Araçlar
  • Fragman
  • Haber
  • Kazalar
  • Komik
  • Müzik
  • Oyun
  • Sinema
  • Spor
Peki buradaki Kategoriler yazısını tamamen kaldırabilir miyiz? Gerisi aynı kalsın.
__________________
Be the change you want to see in the world.
Alıntı ile Cevapla
  9  
Alt 07-12-2008, 11:52:22
 
Standart

değişken etiket bulutu

Kod:
<?php wp_tag_cloud('smallest=11&largest=25&unit=px&number=50&format=flat&orderby=count&order=RAND'); ?>


benzer yazılar

Kod:
<?php
$this_post = $post;
$category = get_the_category(); $category = $category[0]; $category = $category->cat_ID;
$posts = get_posts('numberposts=4&offset=0&orderby=post_date&order=DESC&category='.$category);
$count = 0;
foreach ( $posts as $post ) {
if ( $post->ID == $this_post->ID || $count == 5) {
unset($posts[$count]);
}else{
$count ++;
}
}
?>
<?php if ( $posts ) : ?>
<ul>
<?php function getWords($text, $limit) {
$array = explode(" ", $text, $limit +1);
if(count($array) > $limit) {
unset($array[$limit]);
}
return implode(" ", $array); }
?>
<?php foreach ( $posts as $post ) : ?>
<?php $mycontent = strip_tags($post->post_content);
$excerpt = getWords($mycontent, 15);
$a_title = $excerpt . "..."; ?>
<li><a href="<?php the_permalink(); ?>" title="<?php echo $a_title ?>">
<?php if ( get_the_title() ) { the_title(); } else { echo "Untitle"; } ?></a>
<?php endforeach // $posts as $post ?>
</ul>
<?php endif // $posts ?>
<?php
$post = $this_post;
unset($this_post);
?>
Alıntı ile Cevapla
  10  
Alt 07-12-2008, 16:35:51
 
Standart

Teşekkürler ilk mesaja ekledim.
__________________
askerde...
Alıntı ile Cevapla
Cevapla


Bookmarks

Seçenekler

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Açık



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 21:17:06.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

“İnsanların en hayırlısı, insanlara faydalı olandır”. H.Ş

Hosting by Radore Hosting

İçerik sağlayacı paylaşım sitelerinden biri olan R10.net WebMaster Forum Adresimizde 5651 Sayılı Kanun’un 8. Maddesine ve T.C.K’nın 125. Maddesine göre TÜM ÜYELERİMİZ yaptıkları paylaşımlardan sorumludur. R10.net hakkında yapılacak tüm hukuksal Şikayetler adresi ile iletişime geçilmesi halinde ilgili kanunlar ve yönetmelikler çerçevesinde en geç 1 (Bir) Hafta içerisinde R10.net yönetimi olarak tarafımızdan gereken işlemler yapılacak ve Avukatlarımız size dönüş yapacaktır.
ARGUS_OK

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252