TinyPortal

Development => International => Turkish => Topic started by: sarba126 on March 29, 2006, 07:59:02 PM

Title: Blok yazılımcıkları (Block Snippets)
Post by: sarba126 on March 29, 2006, 07:59:02 PM
Blok yazılımcıkları içindekiler Block Code Snippets Index (http://www.tinyportal.net/index.php?topic=4983.0)
A
Anket (http://www.tinyportal.net/index.php?topic=3777.msg164987#msg164987)
Arcade    Åžampiyonlar (http://www.tinyportal.net/index.php?topic=3777.msg39128#msg39128)
B
BJK Store (http://www.tinyportal.net/index.php?topic=3777.msg155464#msg155464)
BJK Maçları (http://www.tinyportal.net/index.php?topic=3777.msg155464#msg155464)
C
Ç
D
E
F
Futbol Haberleri (http://www.tinyportal.net/index.php?topic=3777.msg34871#msg34871)
G
Günün En Aktif Üyeleri (http://www.tinyportal.net/index.php?topic=3777.msg164983#msg164983)
H
Hava Durumu (http://www.tinyportal.net/index.php?topic=3777.msg31332#msg31332)
Hava Durumu (http://www.tinyportal.net/index.php?topic=3777.msg32024#msg32024)
I
Ä°
J
K
Kayan Yazı (http://www.tinyportal.net/index.php?topic=3777.msg159112#msg159112)
Kayan Yazı (http://www.tinyportal.net/index.php?topic=6642.msg54522#msg54522)
L
M
N
O
Ototmatik Meta Tag (modifikasyon) (http://www.tinyportal.net/index.php?topic=3777.msg96937#msg96937)
Ö
P
R
Resim Görüntüleyici (http://www.tinyportal.net/index.php?topic=3777.msg165348#msg165348)
Rasgele Konu (http://www.tinyportal.net/index.php?topic=3777.msg96789#msg96789)
S
SaÄŸ TuÅŸ Engeli (http://www.tinyportal.net/index.php?topic=3777.msg94771#msg94771)
Saat (http://www.tinyportal.net/index.php?topic=3777.msg34560#msg34560)
Saat takvim (http://www.tinyportal.net/index.php?topic=3777.msg35178#msg35178)
Son Dakika (http://www.tinyportal.net/index.php?topic=3777.msg47534#msg47534)
Son  Haftada En Çok Mesaj Gönderenler (http://www.tinyportal.net/index.php?topic=3777.msg100562#msg100562)
Sohbet Odasında Bulunanlar (x7chat) (http://www.tinyportal.net/index.php?topic=3777.msg73285#msg73285)
Åž
Şu an ve bugün online kullanıcılar (http://www.tinyportal.net/index.php?topic=3777.msg94653#msg94653)
Şans Oyunları Script'i (http://www.tinyportal.net/index.php?topic=3777.msg31332#msg31332)
Son Konular (http://www.tinyportal.net/index.php?topic=3777.msg165940#msg165940)
T
Tags Modu Kullananlar için Son tagları çekme. (http://www.tinyportal.net/index.php/topic,3777.msg234012.html#msg234012)
Tüm Konular Fihristi (http://www.tinyportal.net/index.php?topic=3777.msg100349#msg100349)
Top 10 Karma (http://www.tinyportal.net/index.php?topic=3777.msg164984#msg164984)
U
Ü
Üyeler İçin Favori Linkler (http://www.tinyportal.net/index.php?topic=3777.msg164985#msg164985)
V
Y
Z
Ziyaretçilere Sayfa Gösterim Limiti (http://www.tinyportal.net/index.php?topic=3777.msg164986#msg164986)


Elimizdeki güzel scripleri paylaşırsak portallarımız daha güzel hale gelir.. Ben 2 tane ekleyeyim..

Şans Oyunları Script'i

<script language="JavaScript" type="text/javascript" src="http://webmasterim.com/sans_oyunlari/sans_oyunlari.php?t_g=160&t_r_1=DCDCDC&t_r_2=476C8E&y_g=verdana&y_b=1&y_r_1=000000&y_r_2=ffffff"></script>


Hava Durumu

<center><table>
  <tr>
    <td>Ankara</td>
    <td>Ä°stanbul</td>
  </tr>
  <tr>
    <td><img src="http://www.showhaber.net/web/images/ankara.gif" border="0" alt="ANKARA" /></td>
    <td><img src="http://www.showhaber.net/web/images/istanbul.gif" border="0" alt="Ä°STANBUL" /></td>
  </tr>
  <tr>
    <td>Antalya</td>
    <td>Ä°zmir</td>
  </tr>
  <tr>
    <td><img src="http://www.showhaber.net/web/images/antalya.gif" border="0" alt="ANTALYA" /></td>
    <td><img src="http://www.showhaber.net/web/images/izmir.gif" border="0" alt="Ä°ZMÄ°R" /></td>
  </tr>
</table></center>
Title: Re: javascript'leri Paylaşalım..
Post by: KirpiX on March 29, 2006, 11:20:05 PM
Bende bu konuda destek olacağım dostlar ama bir şeyde sormadan edemicem bazı java scriptler <head> </head> arasıne ve <body> </body> tagları arasına yerleştiriliyor body taglarını anladık tinyportal üzerinden girilebiliyor head tagındakini nasıl gireceğiz? bunları nasıl yerleştirebiliriz? eğer bu soruna cevap bulabilirsek elimde birbirinden ilginÇ 400 den fazla java script kodum var paylaşa bilirim
Title: Re: javascript'leri Paylaşalım..
Post by: ufuk.exe on March 30, 2006, 03:29:46 PM
Ayni sorunla ben karsi karsiyayim kirpix.

Suraya goz atarsaniz:
http://www.tinyportal.net/smf/index.php?topic=2720.msg31369#msg31369

Bende bu sorunun aynisini orda sordum, arkadas anlamadi ne dedigimi, daha sonra gosterdim.
JavaScriptler en guzel ve kolay sekilde Mercury theme'de calisiyor, cunku mercury theme TopBar (yani head icine) tag lari koymak icin ufak bir bolum birakmis.

Fakat ben diger themeleri kullaniyorum ayni sebepten dolayi java koyamiyorum head'e.

Yani javanin body'ye konan yeri cok basit sekilde ya html block olarak yada java block olara eklenebiliyor, ama head bolumu beni de saskin birakti.

Umarim birileri yardimci olabilir, java yi php icine nasil yazacagiz.
Tesekkurler.
Title: Re: javascript'leri Paylaşalım..
Post by: ufuk.exe on March 30, 2006, 04:17:31 PM
Kirpix, sanirim sorunun cozumunu gecici olarak buldum

Bir center block ac tp admin den, o center block'a <head> kismina girecek kodu yaz.
Center Block'a acarken 'SCRIPT' olarak secmeyi unutma, yoksa text olarak output verir

ama yine dogru yontemini birisi anlatirsa sevinirim.
Title: Re: javascript'leri Paylaşalım..
Post by: cumhurkorkut on March 30, 2006, 08:12:49 PM
Bilmem. Temayı değiştirebiliriz. Ama bloka <head> aÇmak iyi fikir.
Title: Re: javascript'leri Paylaşalım..
Post by: ufuk.exe on March 30, 2006, 09:02:06 PM
oyle yaptim en iyisi oyle gozukuyor
yanlis actiginiz her article'a TOP block (center) eklemeyi unutmayin
eger visible degilse center block o script calismaz.
Title: Re: javascript'leri Paylaşalım..
Post by: cumhurkorkut on March 31, 2006, 05:23:37 AM
Ufuk, her article iÇin yeni bir block aÇmıyoruz.
Title: Re: javascript'leri Paylaşalım..
Post by: ufuk.exe on March 31, 2006, 03:45:39 PM
yok hayir,
her article icin block acmayacaksiniz.

1) blocks'a gir, ve Add Center Block yap, yeni center block'u JavaScript/HTML olarak sec.
2) Icine girip Title'a javascripts veya "gerekli" falan gibi bir isim ver
3) body'e java script'in <head> kisimina girecek yerini yaz
4) Do not use title/frame'i sec ve Do not allow block to collapse 'i sec ki ucgen cikmasin.
5) yandan herkezi sec, guest, admin, mod, etc..
6) simdi cik blocks dan ve Articles'a gir
7) Her yeni article yazdigin zaman once article'i SEND yap, sonra ayni article'a geri gir, sana daha cok opsiyonlar verecek en altta, o opsiyonlardan Show centerblocks 'i sectigine emin ol.

Boylece o article acildiginda center block tepede (aslinda bos olacak ici, ama istersen icine logo falan da koyabilirsin) gozukecek, ve o article'in icinde veya sayfanin her hangi bir yerindeki JavaScript calisacaktir.

Articles' icinde:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg98.imageshack.us%2Fimg98%2F9051%2Fcetnerasdfj321ze.png&hash=08ed98fc0d7e2f6341f7a6028a6ba7bc1d5898bd)

Kolay gelsin
(Isin kolay yontemi index.template.php icinde </head> den once script'i koymak, fakat bazen uzun scriptler sorun cikartiyor.)
Title: Re: javascript'leri Paylaşalım..
Post by: cumhurkorkut on March 31, 2006, 06:35:58 PM
SaÄŸol.
Title: Re: Block Snippets
Post by: cumhurkorkut on April 01, 2006, 09:33:34 AM
ClockCalendar
Title: Re: Block Snippets
Post by: yetkili on April 01, 2006, 11:42:25 PM
Hava durumu kodları:
[img]http://www.meteor.gov.tr/2003/iller/link/simdi/eskisehir.aspx[/img]
[img]http://www.meteor.gov.tr/2003/iller/link/tahmin1/eskisehir.aspx[/img]
[img]http://www.meteor.gov.tr/2003/iller/link/tahmin2/eskisehir.aspx[/img]
[img]http://www.meteor.gov.tr/2003/iller/link/tahmin3/eskisehir.aspx[/img]

Ör:(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.meteor.gov.tr%2F2003%2Filler%2Flink%2Fsimdi%2Feskisehir.aspx&hash=73e174fc00b5f65bd3b345bafbd7059f41d404df)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.meteor.gov.tr%2F2003%2Filler%2Flink%2Ftahmin1%2Feskisehir.aspx&hash=b9504f9fab5f70e26b21e96ffb2135250b9a0f5a)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.meteor.gov.tr%2F2003%2Filler%2Flink%2Ftahmin2%2Feskisehir.aspx&hash=8ced29af0e68184502bb8b06aa3b1bbd376202e3)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.meteor.gov.tr%2F2003%2Filler%2Flink%2Ftahmin3%2Feskisehir.aspx&hash=17590b7342fcac198c71bf30bd37c0bfbe5fbcce)

Not:eskisehir yerine istediÄŸiniz ili yazarak deÄŸiÅŸtirin.
Title: Re: Block Snippets
Post by: KirpiX on April 02, 2006, 12:54:29 AM
ee peki dostum body ye gelicek girdileri nereye yazacağız?
Title: Re: Block Snippets
Post by: yetkili on April 02, 2006, 01:42:39 AM
java olayına iyi kaptırmışsınız..dostum bunları direk
Tiny Portal menü/ bloklar/blok ekle ...eklenen blokta "tip"i "html" seÇ ve bu kodu iÇine yerleştir.:) bu kadar..
Title: Re: Block Snippets
Post by: Nonpremium on April 02, 2006, 09:35:37 PM
bu saatin boyutlarını nası küÇültürüz? bloktan taştı da biraz..
Title: Re: Block Snippets
Post by: cumhurkorkut on April 03, 2006, 05:23:56 AM
Hımm. O saat Flash ama...
Title: Re: Block Snippets
Post by: Nonpremium on April 03, 2006, 11:11:54 AM
Saatin boyutlarının taşmasının sebebi kodlardaki herhangi genişlikten değilmiş. Sadece yanlış yerde alt satıra geÇio kod. onu düzeltince düzeldi.
Title: Re: Block Snippets
Post by: yetkili on April 04, 2006, 03:22:49 PM
http://webmasterim.com/ (http://webmasterim.com/)

burada TP ye script ve html olarak koyabileceğiniz faydalı kodlar var..
Title: Re: Block Snippets
Post by: BARAN on April 11, 2006, 09:06:47 AM
ClockCaledar'ı nasıl Çalıştırabileceğiz? yardımcı olurmusunuz? Teşekkürler
Title: Re: Block Snippets
Post by: Nonpremium on April 11, 2006, 01:05:44 PM
swf dosyasını server ana dizinine at. html box oluştur. kodları iÇine yapıştır.
Title: Re: Block Snippets
Post by: deniz on April 11, 2006, 08:56:24 PM
aşağıdaki kodu javascript/html bir bloğa uygularsanız oldukÇa güzel bir saate sahip olursunuz.

Quote<center><embed src="http://www.clocklink.com/clocks/0001-Blue.swf?TimeZone=EET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash"></center>


ayrıca saatin üzerine tıkladığınızda farklı saatlerden birini de seÇmneiz mümkün.




fallowing code adds a nice clock in your TP. make a javascript/html block and  put in thise:
Quote<center><embed src="http://www.clocklink.com/clocks/0001-Blue.swf?TimeZone=EET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash"></center>


Title: Re: Block Snippets
Post by: yetkili on April 12, 2006, 05:21:26 PM
Futbol haberleri
<table>
<tr>
<td>
<iframe src="http://www.turksportal.net/haber.asp">
</iframe>
</td>
</tr>
</table>
Title: Re: Block Snippets
Post by: BARAN on April 13, 2006, 05:38:19 PM
Quote from: Nonpremium on April 03, 2006, 11:11:54 AM
Saatin boyutlarının taşmasının sebebi kodlardaki herhangi genişlikten değilmiş. Sadece yanlış yerde alt satıra geÇio kod. onu düzeltince düzeldi.

o yanlış yer neresi?
Çünkü bende de taştı ve bir kaÇ müdahalede bulundum ama değişen bir şey yok. lütfen söylermisiniz hangi kodu düzeltelim?
teşekkürler
Title: Re: Block Snippets
Post by: Crip on April 13, 2006, 06:21:18 PM
Clock / Calendar


<center>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="140" HEIGHT="140">
  <PARAM NAME="movie" VALUE="clock_calendar.swf">
  <PARAM NAME="quality" VALUE="high">
  <PARAM NAME="bgcolor" VALUE="#FFFFFF">
  <param name="wmode" value="transparent">
  <param name="menu" value="true">
  <EMBED src="clock_calendar.swf" quality="high" bgcolor="#FFFFFF"  WIDTH="140" HEIGHT="140" wmode="transparent" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" menu="false">
</EMBED></OBJECT></center>


Download:

Title: Re: Block Snippets
Post by: BARAN on April 13, 2006, 06:32:57 PM
crip
duyarlılığın iÇin teşekkürler. aynı kodları copy/paste yapıp gönderiyorum ama saat takvim taşıyor. nedenini anlayamadım. burdan verdiğini de uyguladım yine taşıyor

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg68.imageshack.us%2Fimg68%2F494%2Ftasiyor3wd.jpg&hash=9aab3343ea21ea26efdd03ce8e36dd4fb0c6fb99)

resimdeki taşmış olan bölümü nasıl düzeltebilirim teşekkürler
Title: Re: Block Snippets
Post by: Mitchâ„¢ on April 13, 2006, 07:07:00 PM
Quote from: BARAN on April 13, 2006, 06:32:57 PM
crip
duyarlılığın iÇin teşekkürler. aynı kodları copy/paste yapıp gönderiyorum ama saat takvim taşıyor. nedenini anlayamadım. burdan verdiğini de uyguladım yine taşıyor

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg68.imageshack.us%2Fimg68%2F494%2Ftasiyor3wd.jpg&hash=9aab3343ea21ea26efdd03ce8e36dd4fb0c6fb99)

resimdeki taşmış olan bölümü nasıl düzeltebilirim teşekkürler

I am not exactly sure what you said, I am limited to english.
But I am just wondering cause I have used this script and it works fine for me but I was just wondering do you have your left bars set to a different width besides the default setting?
Title: Re: Block Snippets
Post by: BARAN on April 13, 2006, 07:55:25 PM
no it is as original. i did not change anything!
thanks for your answers
Title: Re: Block Snippets
Post by: Mitchâ„¢ on April 13, 2006, 08:06:03 PM
Just out of curiousity what is your screen resolution?
Title: Re: Block Snippets
Post by: G6Cad on April 13, 2006, 09:04:45 PM
In the code you paste in to the scriptbox. Just a few lines down you have a line like this. My is set to 140 , this is what you have to change to a smaller value, i guess you have a bit more, maby 170 or even 180 there.

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="140" HEIGHT="140">


And almost at the bottom, replace your code with this

<EMBED src="clock_calendar.swf" quality="high" bgcolor="#CED3DE"  WIDTH="140" HEIGHT="140" wmode="transparent"

replace the same bit you have, and see if it help you make it a bit smaller to fit the block
Title: Re: Block Snippets
Post by: Crip on April 13, 2006, 09:15:42 PM
120 x 120 should be good, i pm'ed him/her? :)
Title: news from selected board
Post by: deniz on April 14, 2006, 05:48:46 AM
if you make boardnews from diffrent special boards..

1. make an php article and write in there like this:

ssi_boardnews(BOARD NO,null,null,TEX LIMIT);

exp: ssi_boardnews(86,null,null,300);

2. make a link on left block for this.

-----

but my problem; it doesn't show "more.." link and theme stuff.




eğer farklı forumlardan haberler oluşturmak ve buna link vermek isterseniz:

1. php türü bir makale yaratıp iÇine aşağıdakine benzer bir kod ekleyin:

ssi_boardnews(BOARD NO,null,null,TEX LIMIT);

exp: ssi_boardnews(86,null,null,300);

2. menuden bu yarattığınız makaleye link verin.

ancak benim sorunum şu: eğer yazılara bir sınırlandırma yapmışsanız "daha fazla (more)" linki Çıkmıyor ve tema görünümü olmuyor.

bir Çözüm önerisi olan var mı ?




plaese check it: http://sifirforum.com/forum/index.php?page=82
Title: Re: Block Snippets
Post by: BARAN on April 14, 2006, 06:37:53 AM
Mitchâââ,¬Å¾Ã,¢
1024 x 768

G6
i have cganged it until 90x90
but i have same problem as picture!

crip
same problem as picture.

that is ok.
form edit blocs clock calendar was only with HTML ! it must be with javascript/Html
thanks every body.   140x140 is better

and sorry for my good english ;)

Arkadaşlar bu saat taşma olayı blok düzenleden Html olarak işaretlerseniz bu sorunu yaşarsınız. boyutları ile falan uğraşmanıza gerek yok.
doğrusu: javascript/Html olarak düzenlemeliyiz. deneem yanılma yöntemi ile öğrendim. buraya da yazayım dedim belki ihtiyacı olan olur diye!
Title: Re: Block Snippets
Post by: Nonpremium on April 15, 2006, 10:58:37 PM
Ben html olarak oluşturdum başta bende de sorun oluyodu. sonra kodların bi satırında yanlış yerde alt satıra geÇtiğini falan farkettik onu düzeltince olduydu. Ama nerde düzenleme yaptk hatırlayamadım şimdi. Satır aşağısına geÇen yerleri kontrol edin. deneme yanılmayla Çözersiniz sanırım..
Title: Re: Block Snippets
Post by: deniz on April 15, 2006, 11:54:35 PM
kodlar arasında satır arası yada boşluk bırakma..
Title: arcade block
Post by: solskajer on May 01, 2006, 02:17:11 PM
Arkadaşlar forumda Çok aradım Arcade blok ve sonunda tam istediğim gibi bişi buldum paylaşmak istedim portalında arcade bölümü olan arkadaşlar iÇin güzelbi skor bloğu.Aşağıdaki codları php blok iÇine gömdün ve resimleri temanın image klasörüne atın işlem tamam kolay gelsin.. :smiley6600:

Demo: www.trakyaforum.com (http://www.trakyaforum.com)

global $scripturl;
/*
|----------------------------------
      SMF ARCADE CHAMPS BLOCK
      by Eric Lawson
|----------------------------------
      Made for

      TinyPortal
      SMF SMF forum 1.1RC1/RC2
      SMF Arcade_1.2.4b (1.2.4 should be ok :) )
      And Works with Beta Arcade


*/


//Upload the arcade_block.gif (you can use you own gif - just name it arcade_block.gif)
//to your Themes/<themename>/images/ folder

// -- SETUP EDITS ---

$db_prefix = 'smf_'; //edit this to your your database prefix - usually smf_
$no = 10; //number of top players to show

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language

require('./Settings.php');


$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);

// --START BLOCK CODE --
$content = "";  //set blank for a start

//Get newest champ or die
$sql = "SELECT m.ID_MEMBER,m.realName,g.id, g.game, g.name,g.champion_score "
. "FROM {$db_prefix}members m , {$db_prefix}games g "
. "WHERE g.champion_score > 0 AND m.ID_MEMBER=g.champion_member "
. "ORDER BY g.champion_time DESC LIMIT 0,1";

if(!($result = mysql_query($sql,$link)))
{
die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id'];
$game_name = $row['name'];
$score = $row['champion_score'];

//now get the pic for the game
$ext = array('gif','GIF','png','PNG','jpg','JPG',);
$game_pic = ""; // No thumbnail for default
foreach($ext as $ex)
{
if(file_exists($boarddir. "/Games/".$row['game'].".".$ex))
{
$game_pic = $boardurl."/Games/".$row['game'].".".$ex;
}
}


//Get the 10 best players or die
$sql = "SELECT m.ID_MEMBER, m.realName, count(g.id) As cnt"
. " FROM {$db_prefix}games g, {$db_prefix}members m"
. " WHERE m.ID_MEMBER=g.champion_member"
. " GROUP BY realName "
. " ORDER BY cnt DESC LIMIT 0,{$no}";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
die("Could not get the best players");
}

$row = mysql_fetch_assoc($result);

$score_poss=0; //players position

//make the block content
$content .= "<table width=\"100%\" ><tr>
<td align=\"center\">
<br />
<a href=\"{$scripturl}?action=arcade\"><img src=\"{$settings['images_url']}/arcade_block.gif\" border= \"0\" alt=\"Arcade\" /></a>
<br /><br />
</td>
</tr>";

$content .= "
<tr>
<td>
<marquee behavior='scroll' align='center' direction='up' height='160' scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>
<br />
<div align=\"center\"><a href=\"{$scripturl}?action=arcade;sa=play;game={$game_id}\"><img src=\"{$game_pic}\" border= \"0\" /></a>
<br />{$txtlate}<br />
<a href=\"{$scripturl}?action=profile;u=$playerid\">{$player}</a><br />{$txtwit} {$score} {$txton} {$game_name}
<br />------------------<br />{$txtplay}
<br /><br /> ";
do
{
$score_poss++;
$content .= "
$score_poss -
<a href=\"{$scripturl}?action=profile;u=".$row['ID_MEMBER']."\"> ".$row['realName']."</a>
<br /> $txtwin ".$row['cnt']."
<br /><br />";
}  while ($row = mysql_fetch_assoc($result));

mysql_free_result($result);
$content .= "</marquee></div></td></tr></table>" ;

echo $content;



Title: Re: Block Snippets
Post by: deniz on June 17, 2006, 03:38:04 AM
kayan resimve yazılı bir son dakikaka haber bloğu istersen aşağıdaki kodu script box bloğu yaratıp kaydedin.

ayrıca siteye isminizi de yazdırabilrsiniz: http://www.aktifhaber.com/add2yoursite.htm

Quote<table> <tr><td> <iframe src="http://www.aktifhaber.com/hot_newsbox.php" height="200" width="150" name="aframe" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0"></iframe>
</td>
</tr>
</table>
Title: Re: Block Snippets
Post by: deniz on September 25, 2006, 06:44:01 AM
x7chat kullananlar iÇin sohbet odasında bulunanları listeleyen basit bir php scripti:

Quote//select the table, should be right if you didn't change the prefix in the data base
$result = mysql_query("select * from x7chat2_online");


$expire_time = 5;
$exp_time = time()-$expire_time;
      $q = mysql_query("DELETE FROM x7chat2_online WHERE time<'$exp_time'");

//grab all the content


while($r=mysql_fetch_array($result))
{

   //modify these to match your mysql table columns that you want to display

   $usersonline=$r["name"];
   $room=$r["room"];


   //display the row
echo ' ââ€"º';   
echo "$usersonline";
   
}

Title: Re: Block Snippets
Post by: darkasoul on November 02, 2006, 11:48:36 PM
Quote from: solskajer on May 01, 2006, 02:17:11 PM
Arkadaşlar forumda Çok aradım Arcade blok ve sonunda tam istediğim gibi bişi buldum paylaşmak istedim portalında arcade bölümü olan arkadaşlar iÇin güzelbi skor bloğu.Aşağıdaki codları php blok iÇine gömdün ve resimleri temanın image klasörüne atın işlem tamam kolay gelsin.. :smiley6600:

Demo: www.trakyaforum.com (http://www.trakyaforum.com)

global $scripturl;
/*
|----------------------------------
      SMF ARCADE CHAMPS BLOCK
      by Eric Lawson
|----------------------------------
      Made for

      TinyPortal
      SMF SMF forum 1.1RC1/RC2
      SMF Arcade_1.2.4b (1.2.4 should be ok :) )
      And Works with Beta Arcade


*/


//Upload the arcade_block.gif (you can use you own gif - just name it arcade_block.gif)
//to your Themes/<themename>/images/ folder

// -- SETUP EDITS ---

$db_prefix = 'smf_'; //edit this to your your database prefix - usually smf_
$no = 10; //number of top players to show

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language

require('./Settings.php');


$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);

// --START BLOCK CODE --
$content = "";  //set blank for a start

//Get newest champ or die
$sql = "SELECT m.ID_MEMBER,m.realName,g.id, g.game, g.name,g.champion_score "
. "FROM {$db_prefix}members m , {$db_prefix}games g "
. "WHERE g.champion_score > 0 AND m.ID_MEMBER=g.champion_member "
. "ORDER BY g.champion_time DESC LIMIT 0,1";

if(!($result = mysql_query($sql,$link)))
{
die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id'];
$game_name = $row['name'];
$score = $row['champion_score'];

//now get the pic for the game
$ext = array('gif','GIF','png','PNG','jpg','JPG',);
$game_pic = ""; // No thumbnail for default
foreach($ext as $ex)
{
if(file_exists($boarddir. "/Games/".$row['game'].".".$ex))
{
$game_pic = $boardurl."/Games/".$row['game'].".".$ex;
}
}


//Get the 10 best players or die
$sql = "SELECT m.ID_MEMBER, m.realName, count(g.id) As cnt"
. " FROM {$db_prefix}games g, {$db_prefix}members m"
. " WHERE m.ID_MEMBER=g.champion_member"
. " GROUP BY realName "
. " ORDER BY cnt DESC LIMIT 0,{$no}";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
die("Could not get the best players");
}

$row = mysql_fetch_assoc($result);

$score_poss=0; //players position

//make the block content
$content .= "<table width=\"100%\" ><tr>
<td align=\"center\">
<br />
<a href=\"{$scripturl}?action=arcade\"><img src=\"{$settings['images_url']}/arcade_block.gif\" border= \"0\" alt=\"Arcade\" /></a>
<br /><br />
</td>
</tr>";

$content .= "
<tr>
<td>
<marquee behavior='scroll' align='center' direction='up' height='160' scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>
<br />
<div align=\"center\"><a href=\"{$scripturl}?action=arcade;sa=play;game={$game_id}\"><img src=\"{$game_pic}\" border= \"0\" /></a>
<br />{$txtlate}<br />
<a href=\"{$scripturl}?action=profile;u=$playerid\">{$player}</a><br />{$txtwit} {$score} {$txton} {$game_name}
<br />------------------<br />{$txtplay}
<br /><br /> ";
do
{
$score_poss++;
$content .= "
$score_poss -
<a href=\"{$scripturl}?action=profile;u=".$row['ID_MEMBER']."\"> ".$row['realName']."</a>
<br /> $txtwin ".$row['cnt']."
<br /><br />";
}  while ($row = mysql_fetch_assoc($result));

mysql_free_result($result);
$content .= "</marquee></div></td></tr></table>" ;

echo $content;






arkadaÅŸlar sakın bu kodu kullanmayın ben kullandım site göÇtü kodda bir yanlışlık var galiba yükleyince orta alan gidiyor menü kalıyor sade forumunuz GÖZÃÆ'Ã...“KMÃÆ'Ã...“YOR dikkat!!!
Title: Re: Block Snippets
Post by: findpeople on November 04, 2006, 03:27:29 AM
Quote from: deniz on September 25, 2006, 06:44:01 AM
x7chat kullananlar iÇin sohbet odasında bulunanları listeleyen basit bir php scripti:

Quote//select the table, should be right if you didn't change the prefix in the data base
$result = mysql_query("select * from x7chat2_online");


$expire_time = 5;
$exp_time = time()-$expire_time;
      $q = mysql_query("DELETE FROM x7chat2_online WHERE time<'$exp_time'");

//grab all the content


while($r=mysql_fetch_array($result))
{

   //modify these to match your mysql table columns that you want to display

   $usersonline=$r["name"];
   $room=$r["room"];


   //display the row
echo ' ââ€"º';  
echo "$usersonline";
  
}




Bu x7chat hakkında biraz bilgi verebilirmisin deniz. Sitenize baktım sanırım flashchat kullanıyorsunuz. x7chat indirebileceğimiz bir adres ve demo link'ini verirsen sevinirim..
Title: Re: Block Snippets
Post by: deniz on November 06, 2006, 06:28:00 PM
http://www.x7chat.com/ den indirebilirsin..

ben ikisinide kullandım. kullanıcılar iÇin ve yönetim aÇısından hız sorunun yoksa (özellkle ping hızın iyi ise) flashchat daha iyi. 5 doalra satıyorlar ama biraz uraşırsan bedavasını bulabilirsin.

Title: Re: Block Snippets
Post by: deniz on December 16, 2006, 10:59:26 PM
Ã...žu an ve Bugün online olan kullanıcılar listesi:

SSI.php dosyasının içinde


// Shows a list of online users:  YY Guests, ZZ Users and then a list...
function ssi_whosOnline($output_method = 'echo')
....

ile başlayıp

// Just like whosOnline except it also logs the online presence.

de biten ssi_whosOnline fonksiyonunu aşağıdaki kodla değiştirin:


// Shows a list of online users:  YY Guests, ZZ Users and then a list...
function ssi_whosOnline($output_method = 'echo')
{
global $txt, $scripturl, $db_prefix, $ID_MEMBER, $user_info, $sourcedir;
global $modSettings, $context, $settings;

// Load the users online right now.
$result = db_query("
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);

$return['users'] = array();
$return['guests'] = 0;
$return['hidden'] = 0;
$return['buddies'] = 0;
$show_buddies = !empty($user_info['buddies']);

while ($row = mysql_fetch_assoc($result))
{
if (!isset($row['realName']))
$return['guests']++;
elseif (!empty($row['showOnline']) || allowedTo('moderate_forum'))
{
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';

// Bold any buddies.
if ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))
{
$return['buddies']++;
$link = '<b>' . $link . '</b>';
}

$return['users'][$row['logTime'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'hidden' => empty($row['showOnline']),
'is_last' => false,
);
}
else
$return['hidden']++;
}
mysql_free_result($result);

if (!empty($return['users']))
{
krsort($return['users']);
$userlist = array_keys($return['users']);
$return['users'][$userlist[count($userlist) - 1]]['is_last'] = true;
}
$return['num_users'] = count($return['users']) + $return['hidden'];
$return['total_users'] = $return['num_users'] + $return['guests'];

if ($output_method != 'echo')
return $return;

echo '
<div class="smalltext">';

echo '
', $return['guests'], ' ', $return['guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $return['num_users'], ' ', $return['num_users'] == 1 ? $txt['user'] : $txt['users'];

// Hidden users, or buddies?
if ($return['hidden'] > 0 || $show_buddies)
echo '
(' . ($show_buddies ? ($return['buddies'] . ' ' . ($return['buddies'] == 1 ? $txt['buddy'] : $txt['buddies'])) : '') . ($show_buddies && $return['hidden'] ? ', ' : '') . (!$return['hidden'] ? '' : $return['hidden'] . ' ' . $txt['hidden']) . ')';

echo '<br />';
foreach ($return['users'] as $user)
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'], $user['is_last'] ? '' : ', ';

echo'</div><br /><hr>';

// Load the users online today.
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);

$s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$time_fmt = '%I:%M' . $s . ' %p';
else
$time_fmt = '%H:%M' . $s;

$result = db_query("
SELECT
mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);

$context['users_online_today'] = array();
$context['list_users_online_today'] = array();

while ($row = mysql_fetch_assoc($result))
{
$userday = strftime('%d', forum_time(true));
$loginday = strftime('%d', forum_time(true, $row['lastLogin']));
$yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];

$lastLogin = $yesterday . strftime($time_fmt, forum_time(true, $row['lastLogin']));
$title = (allowedTo('moderate_forum') || !empty($row['showOnline'])) ? ' title="' . $lastLogin . '"' : '';

// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . ' style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . '>' . $row['realName'] . '</a>';

$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
if ($is_buddy)
{
$link = '<b>' . $link . '</b>';
}

$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'is_buddy' => $is_buddy,
'hidden' => empty($row['showOnline']),
);

$context['list_users_online_today'][$row['lastLogin'] . $row['memberName']] = (empty($row['showOnline']) && allowedTo('moderate_forum')) ? '<i>' . $link . '</i>' : $link;
}
mysql_free_result($result);

krsort($context['users_online_today']);
krsort($context['list_users_online_today']);

$context['num_users_online_today'] = count($context['users_online_today']);
    $context['show_stats']=0;


echo '
<div class="smalltext">';

echo $context['num_users_online_today'], ' ', $context['num_users_online_today'] == 1 ? strtolower($txt['user']) : strtolower($txt['users']);

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online_today']))
echo '
', 'bugün buradaydý', ':<br />', implode(', ', $context['list_users_online_today']);

echo '
<br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>';

}

// Just like whosOnline except it also logs the online presence.


daha sonra aşağıdaki kodu bir php bloğa kaydedin:

echo '<center><a href="http://sitenizinadi.com/index.php?action=who">..: Kim Nerede? :.. </a><hr></center>';
ssi_logOnline();


kodun orijinali:

http://www.tinyportal.net/index.php?topic=2365.0

örnek: http://sifirforum.com/index.php (sağ blokta üsten üçüncü modül)


örnekte görüldüğü gibi son uyeyi ve takvim etkinliklerini de göstermek isterseniz blok scriptinin altına şunları da ekleyebilirsiniz:

echo '<hr>';
ssi_latestMember();
echo '<hr>';
ssi_todaysCalendar();
Title: Re: Block Snippets
Post by: deniz on December 17, 2006, 10:07:10 AM
İçeriğinizin kopyalanmasına sağ tuş engeli koymak isterseniz aşağıdaki kodu index.template.php dosyasında

/* Internet Explorer 4/5 and Opera 6 ...

satırından öncesine kopyalayınız.

// Bu kod ziyaretcilerin sag tus kullanmasina engel olur
if ($context['user']['is_guest'])
{
    echo '

<script language="Javascript1.2">

// Set the message for the alert box
am = "Ýçeriði kopyalamaya çalýþmayýn. Lütfen buraya link veriniz.! Yukarýda adres barda görünen linki sayfanýza kopyalamanýz yeterli.";

// do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

</script>';
}
// sag tus engeli kodu burada bitti




Bu kod sadece ziyaretçiler için çalışacaktır.

ayrıntılı bilgi için: http://www.simplemachines.org/community/index.php?topic=134890

Title: Re: Block Snippets
Post by: deniz on December 23, 2006, 09:49:46 PM
aşağıdaki kodu bir php bloğa kaydettiğinizde rastgele bir konunun ilk mesajı gelir:

global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
global $func;
$length= 300;

loadLanguage('Stats');

if ($length === null)
$length = isset($_GET['length']) ? (int) $_GET['length'] : 0;
else
$length = (int) $length;

// Make sure guests can see this board.
$request = db_query("
SELECT ID_BOARD
FROM {$db_prefix}boards
WHERE FIND_IN_SET(-1, memberGroups)
        ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);

list ($board) = mysql_fetch_row($request);
mysql_free_result($request);

// Load the message icons - the usual suspects.
$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find the post ids.
$request = db_query("
SELECT ID_FIRST_MSG
FROM {$db_prefix}topics
WHERE ID_BOARD = $board
ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
$posts[] = $row['ID_FIRST_MSG'];
mysql_free_result($request);

// Find the posts.
$request = db_query("
SELECT
m.icon, m.subject, m.body, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime,
t.numReplies, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled, m.ID_MSG, t.locked
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE t.ID_FIRST_MSG IN (" . implode(', ', $posts) . ")
AND m.ID_MSG = t.ID_FIRST_MSG
LIMIT 1", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['body']) > $length)
{
$row['body'] = $func['substr']($row['body'], 0, $length);
// The first space or line break. (<br />, etc.)
        $cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<'));

if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= '...';
}

$row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']);

// Check that this message icon is there...
if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

censorText($row['subject']);
censorText($row['body']);

$return[] = array(
'id' => $row['ID_TOPIC'],
'message_id' => $row['ID_MSG'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'subject' => $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'body' => $row['body'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
'replies' => $row['numReplies'],
'comment_href' => !empty($row['locked']) ? '' : $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'],
'comment_link' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'new_comment' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '',
'link' => !empty($row['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' : $row['posterName']
),
'locked' => !empty($row['locked']),
);
}
mysql_free_result($request);

foreach ($return as $news)
{
echo '
<div>
<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
<div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

<div class="post" style="padding: 2ex 0;">', $news['body'], '</div>

', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
</div>';
}
Title: Re: Block Snippets
Post by: deniz on December 24, 2006, 12:59:09 PM
OTOMATÄ°K META TAG


arama motorlarında size büyükk avantaj sağlaycak bir çözüm buldum.

metatag keyword leriniz artık konu başlığına göre değişicek. böylece konuya özel keyword yaratılacak. doalyısıyla konularınızın google gibi arama motorlarında bulunma ve ön sıralara yükselme imkanı yaratılcak. nasıl mı ?

index.template.php dosyasına girip:

function template_main_above()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;


altına bu kodu ekliyorsunuz:

$stop_words=  array(" ben "," sen "," hakkında "," bir "," nerede "," ki "," kim "," nerede "," ve "," com "," de "," en "," için "," tarafından "," nasıl "," ne "," içinde "," ile "," www ","!",".","?","=","-");
        $keywords_ = str_replace($stop_words," ",$context['page_title']);
        $keywords_ =  preg_replace ( "/\s\s+/" , " " , $keywords_);
        $keywords_ = str_replace(" ",", ",trim($keywords_));


sonra aşağıdaki satırı
<meta name="keywords" content="....." />

(... olan yerlerde size özel keyworldler veya smf nin kendi klasik keywordleri yer alır)
bununla deÄŸiÅŸtiriyorsunuz:

<meta name="keywords" content="'.$keywords_.'" />


sonucu görmek için herhangi bir konuya girip sayfa kaynağına bakın.

alıntı (http://www.webmasterstalks.com/index.php?PHPSESSID=9e3dbad6dfd9bec9f9f0a5a9b5d9af15&topic=363.msg2147#msg2147)
Title: Tüm konular Fihristi
Post by: deniz on January 06, 2007, 10:50:47 AM
Aşağıdaki kodu php makaleye kaydedip sonrada bu makaleye link verdiğinizde sitenizdeki tüm konuların alfabetik fihristi yaratılır.

global $db_prefix, $user_info, $scripturl, $modSettings;

$page = $_GET['page'];
if (isset($_GET['letter']))
  $search = ' AND subject LIKE "'.$_GET['letter'].'%"';
else
  $search = ' AND subject LIKE "A%"';

$request = db_query("
        SELECT t.ID_TOPIC, posterTime, ID_MEMBER, subject, posterName, b.ID_BOARD, numReplies, numViews, memberGroups
        FROM {$db_prefix}messages AS mes, {$db_prefix}topics AS t, {$db_prefix}boards AS b
        WHERE ID_FIRST_MSG = ID_MSG
        AND b.ID_BOARD = t.ID_BOARD
        AND $user_info[query_see_board] $search
        ORDER BY subject", __FILE__, __LINE__);

$lastLetter = '';
echo '<table>';
echo '<tr><td colspan="5">';
for ($i = 65; $i < 91; ++$i)
  echo '<a href="' , $scripturl , '?page=' , $page , ';letter=' , chr($i) , '"><b>',  chr($i) , '</b></a> ';
echo '</td></tr>';

while ($row = mysql_fetch_assoc($request))
{
        $row['subject'] = html_entity_decode($row['subject'],ENT_QUOTES);
        if ($lastLetter <>  strtoupper($row['subject']{0}))
        {
          $lastLetter = strtoupper($row['subject']{0});
        echo '<tr><td colspan="5"> </td></tr>';
        echo '
        <tr><td><b>' , $lastLetter , '</b> ile baÅŸlayan konular</td>
                <td>BaÅŸlatan  </td>
                <td>Tarihi </td>
                <td align="center"> Yanıtlar </td>
                <td align="center"> Ä°zlenme </td></tr>
        <tr><td colspan="5"><hr /></td></tr>';
        }
        $startdate = $row['posterTime'] + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
        echo '<tr>
        <td> <a href="' , $scripturl , '?topic=' , $row['ID_TOPIC'] , '.0">' , $row['subject'] , ' </td>
        <td> <a href="' , $scripturl , '?action=profile;u=' , $row['ID_MEMBER'] , '">', $row['posterName'] , '</a> </td>
        <td> ', date('d.m.y',$startdate) , ' </td>
        <td align="center"> ' , $row['numReplies'] , ' </td>
        <td align="center"> ' , $row['numViews'] , ' </td></tr>';
}
echo '</table>';

mysql_free_result($request);


demo: http://sifirforum.com/index.php?page=128
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on January 06, 2007, 09:36:52 PM
Son haftada en çok mesaj gönderenler listesi:

aşağıdaki kodu php bloğa kaydedin:

global $db_prefix, $scripturl;

$starttime = time() - 604800; // 604800 sayisi saniye cinsinden bir haftalik suredir. Istediginiz zaman araligi icin degistirebilirsiniz.
$endtime = time ();  // Su an ki zamandir. arzu ederseniz yukardaki degeri ve bu degeri istenilen zaman aralginda da secebilirsiniz. ama tarihi unix formatina cevirmek sarti ile..

$count= array();
$poster_number = array();
$query = db_query(
    "SELECT posterName, {$db_prefix}messages.ID_MEMBER, ID_GROUP
     FROM {$db_prefix}members
     JOIN {$db_prefix}messages
     ON {$db_prefix}members.ID_MEMBER = {$db_prefix}messages.ID_MEMBER
     AND posterTime > $starttime
     AND posterTime < $endtime", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query))
{
  if (!isset($count[$row['posterName']]))
    $count[$row['posterName']] = 0;
  ++$count[$row['posterName']];
    $poster_number[$row['posterName']] = $row['ID_MEMBER'];
}

arsort($count);
$list_number = 0;
foreach ($count as $key => $value)
{
  echo '<a class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$key] . '">' . $key . '</a> (' . $value . ')<br />';
  ++$list_number;
  if ($list_number > 9) 
    break;
}


Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: LordMidnight on January 22, 2007, 04:35:28 AM
meta tag olayı harika bir şey ya
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: findpeople on January 23, 2007, 01:10:37 AM
meta tag'ı kullanmak istiyorum fakat şu bölüm ilgimi çekti ne anlama geliyor :S

" ben "," sen "," hakkında "," bir "," nerede "," ki "," kim "," nerede "," ve "," com "," de "," en "," için "," tarafından "," nasıl "," ne "," içinde "," ile "," www ",
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on January 23, 2007, 04:05:14 PM
onlar yer almamasını istediğin kelimeler. çünkü aramalarda katkısı olmayan şeyler.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: findpeople on January 23, 2007, 07:02:08 PM
anladım teÅŸekkürler  :up:
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: as_kral on March 20, 2007, 03:10:00 PM
Quote from: deniz on December 24, 2006, 12:59:09 PM
OTOMATÄ°K META TAG


arama motorlarında size büyükk avantaj sağlaycak bir çözüm buldum.

metatag keyword leriniz artık konu başlığına göre değişicek. böylece konuya özel keyword yaratılacak. doalyısıyla konularınızın google gibi arama motorlarında bulunma ve ön sıralara yükselme imkanı yaratılcak. nasıl mı ?

index.template.php dosyasına girip:

function template_main_above()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;


altına bu kodu ekliyorsunuz:

$stop_words=  array(" ben "," sen "," hakkında "," bir "," nerede "," ki "," kim "," nerede "," ve "," com "," de "," en "," için "," tarafından "," nasıl "," ne "," içinde "," ile "," www ","!",".","?","=","-");
        $keywords_ = str_replace($stop_words," ",$context['page_title']);
        $keywords_ =  preg_replace ( "/\s\s+/" , " " , $keywords_);
        $keywords_ = str_replace(" ",", ",trim($keywords_));


sonra aşağıdaki satırı
<meta name="keywords" content="....." />

(... olan yerlerde size özel keyworldler veya smf nin kendi klasik keywordleri yer alır)
bununla deÄŸiÅŸtiriyorsunuz:

<meta name="keywords" content="'.$keywords_.'" />


sonucu görmek için herhangi bir konuya girip sayfa kaynağına bakın.

alıntı (http://www.webmasterstalks.com/index.php?PHPSESSID=9e3dbad6dfd9bec9f9f0a5a9b5d9af15&topic=363.msg2147#msg2147)

Deniz Bu Olmadı sayfa Kaynagında;

<meta name="description" content="Tüm Antrenörlerimiz (Güncel)" />
<meta name="keywords" content="Tüm, Antrenörlerimiz, (Güncel)" />


Böyle Çıkıyor
Yani Sadece Konu Başlığını Alıyor Anahtar Kelime Olarak..
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on March 20, 2007, 04:41:54 PM
evet öyle çalışıyor zaten. konu içeriğinden keyword almaz.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: as_kral on March 20, 2007, 06:59:52 PM
Quote from: deniz on March 20, 2007, 04:41:54 PM
evet öyle çalışıyor zaten. konu içeriğinden keyword almaz.

Senin Sitede Birsürü Anahtar Kelime Var O Yüzden Sordum.
Konu İçeriğinide Alıyor Sendeki Sanırım.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on March 20, 2007, 07:05:27 PM
evet ben SEO kurdum... SEO da konu içeriğinden alınıyor.. senin bahsettiğin kodda ise sadece subjectten.

bu arada becerebilirseniz SEO kurmanızı öneririm.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: as_kral on March 20, 2007, 07:43:39 PM
tamam anladım teşekkür ederim ilginiz için.
saygılar.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on May 17, 2007, 09:47:18 AM
Quote from: deniz on January 06, 2007, 09:36:52 PM
Son haftada en çok mesaj gönderenler listesi:

aşağıdaki kodu php bloğa kaydedin:

global $db_prefix, $scripturl;

$starttime = time() - 604800; // 604800 sayisi saniye cinsinden bir haftalik suredir. Istediginiz zaman araligi icin degistirebilirsiniz.
$endtime = time ();  // Su an ki zamandir. arzu ederseniz yukardaki degeri ve bu degeri istenilen zaman aralginda da secebilirsiniz. ama tarihi unix formatina cevirmek sarti ile..

$count= array();
$poster_number = array();
$query = db_query(
    "SELECT posterName, {$db_prefix}messages.ID_MEMBER, ID_GROUP
     FROM {$db_prefix}members
     JOIN {$db_prefix}messages
     ON {$db_prefix}members.ID_MEMBER = {$db_prefix}messages.ID_MEMBER
     AND posterTime > $starttime
     AND posterTime < $endtime", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query))
{
  if (!isset($count[$row['posterName']]))
    $count[$row['posterName']] = 0;
  ++$count[$row['posterName']];
    $poster_number[$row['posterName']] = $row['ID_MEMBER'];
}

arsort($count);
$list_number = 0;
foreach ($count as $key => $value)
{
  echo '<a class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$key] . '">' . $key . '</a> (' . $value . ')<br />';
  ++$list_number;
  if ($list_number > 9) 
    break;
}




bu blok çok güzel fakat Admin lerin bu blokta görünmemesini sağlayabilirmiyiz mesela 1 ve 3 ıd li kullanıcılar bu blokta görünmesin
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on May 17, 2007, 09:54:08 AM
sanırım olabilr. ama ben bilmiyorum nasıl yapılacağını.

döngü içinde tanımlanmış ID lere gelindiğinde es geçmeli.
Title: Block Snippets Blok yazılımcıkları
Post by: bbTURK on August 12, 2007, 07:59:21 PM
Quote from: deniz on December 23, 2006, 09:49:46 PM
aşağıdaki kodu bir php bloğa kaydettiğinizde rastgele bir konunun ilk mesajı gelir:

global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
global $func;
$length= 300;

loadLanguage('Stats');

if ($length === null)
$length = isset($_GET['length']) ? (int) $_GET['length'] : 0;
else
$length = (int) $length;

// Make sure guests can see this board.
$request = db_query("
SELECT ID_BOARD
FROM {$db_prefix}boards
WHERE FIND_IN_SET(-1, memberGroups)
        ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);

list ($board) = mysql_fetch_row($request);
mysql_free_result($request);

// Load the message icons - the usual suspects.
$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find the post ids.
$request = db_query("
SELECT ID_FIRST_MSG
FROM {$db_prefix}topics
WHERE ID_BOARD = $board
ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
$posts[] = $row['ID_FIRST_MSG'];
mysql_free_result($request);

// Find the posts.
$request = db_query("
SELECT
m.icon, m.subject, m.body, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime,
t.numReplies, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled, m.ID_MSG, t.locked
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE t.ID_FIRST_MSG IN (" . implode(', ', $posts) . ")
AND m.ID_MSG = t.ID_FIRST_MSG
LIMIT 1", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['body']) > $length)
{
$row['body'] = $func['substr']($row['body'], 0, $length);
// The first space or line break. (<br />, etc.)
        $cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<'));

if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= '...';
}

$row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']);

// Check that this message icon is there...
if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

censorText($row['subject']);
censorText($row['body']);

$return[] = array(
'id' => $row['ID_TOPIC'],
'message_id' => $row['ID_MSG'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'subject' => $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'body' => $row['body'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
'replies' => $row['numReplies'],
'comment_href' => !empty($row['locked']) ? '' : $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'],
'comment_link' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'new_comment' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '',
'link' => !empty($row['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' : $row['posterName']
),
'locked' => !empty($row['locked']),
);
}
mysql_free_result($request);

foreach ($return as $news)
{
echo '
<div>
<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
<div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

<div class="post" style="padding: 2ex 0;">', $news['body'], '</div>

', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
</div>';
}

bu blok 1.1.3 te çalışmıyor 1.1.2 için bunu nasıl 1.1.3 e kurarız
---
this block is for 1.1.3, it doesn't work at 1.1.3. how do we add to 1.1.3 ?

sorry for my english
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on August 14, 2007, 11:56:27 PM
Quote from: bbTURK on August 12, 2007, 07:59:21 PM
Quote from: deniz on December 23, 2006, 09:49:46 PM
aşağıdaki kodu bir php bloğa kaydettiğinizde rastgele bir konunun ilk mesajı gelir:

global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
global $func;
$length= 300;

loadLanguage('Stats');

if ($length === null)
$length = isset($_GET['length']) ? (int) $_GET['length'] : 0;
else
$length = (int) $length;

// Make sure guests can see this board.
$request = db_query("
SELECT ID_BOARD
FROM {$db_prefix}boards
WHERE FIND_IN_SET(-1, memberGroups)
        ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);

list ($board) = mysql_fetch_row($request);
mysql_free_result($request);

// Load the message icons - the usual suspects.
$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find the post ids.
$request = db_query("
SELECT ID_FIRST_MSG
FROM {$db_prefix}topics
WHERE ID_BOARD = $board
ORDER BY rand()
LIMIT 1", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
$posts[] = $row['ID_FIRST_MSG'];
mysql_free_result($request);

// Find the posts.
$request = db_query("
SELECT
m.icon, m.subject, m.body, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime,
t.numReplies, t.ID_TOPIC, m.ID_MEMBER, m.smileysEnabled, m.ID_MSG, t.locked
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE t.ID_FIRST_MSG IN (" . implode(', ', $posts) . ")
AND m.ID_MSG = t.ID_FIRST_MSG
LIMIT 1", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['body']) > $length)
{
$row['body'] = $func['substr']($row['body'], 0, $length);
// The first space or line break. (<br />, etc.)
        $cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<'));

if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= '...';
}

$row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']);

// Check that this message icon is there...
if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

censorText($row['subject']);
censorText($row['body']);

$return[] = array(
'id' => $row['ID_TOPIC'],
'message_id' => $row['ID_MSG'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'subject' => $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'body' => $row['body'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
'replies' => $row['numReplies'],
'comment_href' => !empty($row['locked']) ? '' : $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'],
'comment_link' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'new_comment' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => !empty($row['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] : '',
'link' => !empty($row['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' : $row['posterName']
),
'locked' => !empty($row['locked']),
);
}
mysql_free_result($request);

foreach ($return as $news)
{
echo '
<div>
<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
<div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

<div class="post" style="padding: 2ex 0;">', $news['body'], '</div>

', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
</div>';
}

bu blok 1.1.3 te çalışmıyor 1.1.2 için bunu nasıl 1.1.3 e kurarız
---
this block is for 1.1.3, it doesn't work at 1.1.3. how do we add to 1.1.3 ?

sorry for my english

Bendede 1.1.3 kurulu ve çalışıyor
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on August 15, 2007, 01:19:07 PM
Veritabanı Hatası
Lütfen tekrar deneyin. Eğer tekrar hata mesajı alırsanız, bu hatayı yöneticiye bildirin.

bu hatayı alıyorum ilk baktığımda hatayı kopyalamayı unuttum ama 1.1.2'e güncelleyin tarzı bir hata çıkıyordu
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on August 19, 2007, 12:56:09 PM
Quote from: bbTURK on August 15, 2007, 01:19:07 PM
Veritabanı Hatası
Lütfen tekrar deneyin. Eğer tekrar hata mesajı alırsanız, bu hatayı yöneticiye bildirin.

bu hatayı alıyorum ilk baktığımda hatayı kopyalamayı unuttum ama 1.1.2'e güncelleyin tarzı bir hata çıkıyordu

1.1.2 den 1.1.3 e geçerken Small update mi yaptın yoksa Large upgrade mi
yada forumlarda update isimli mod veriyorlar onlardan birinimi uyguladın

genelde Large upgrade haricinde veri tabanı hatası çıkabiliyor
2. ise ben bu bloğu önermiyorum çünki heryerden gösteriyor duyurular kısmından ana sayfada görünmesini istemediğin kısımlardan pekte hoş olmuyor
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on August 21, 2007, 02:15:38 PM
mod olarak yükledim
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on August 22, 2007, 11:02:58 AM
Quote from: bbTURK on August 21, 2007, 02:15:38 PM
mod olarak yükledim
bence upgrade dosyalarını atıp temiz bir şekilde upgrade yapman daha güzel olucakır
eğer ben modları felan hep yükledim şimdi upgrade yapmak zahmetli olur diyorsan yeni sürümün çıkmasını bekle hepsini birden yaparsın

bu arada İsimin Baran mı
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on September 30, 2007, 02:34:58 PM
ben burada işaretlediğim yerleri portaldaki bloklarım nasıl yerleştirebilirim? bana bu konuda yardımcı olabilirmisiniz?

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fpic1.resimupload.com%2Fr7%2Fthumb_755978003.JPG&hash=1ed569b574f54f4fec7ab56c8fb44cc94caae72b) (http://www.resimupload.com/ds755978003_bak%C3%84%C2%B1n%C3%84%C2%B1z.html)

sitenin adresi
http://bjk.turkbul.com/
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on September 30, 2007, 07:23:10 PM
bjk store bloğu için script blok oluştur. içine aşağıdaki kodları kopyala
<table cellspacing="0" cellpadding="0">
  <tr>
    <td width="186"><p> BeÅŸiktaÅŸ'ın, lisansli &uuml;r&uuml;nlerini alalim. Kul&uuml;b&uuml;m&uuml;ze destek olalim. <br>
        Siteye Giris icin&nbsp; <strong><a href="http://www.bjkstore.com.tr/">tıklayın </a></strong></p></td>
  </tr>
  <tr>
    <td width="186"><p><br>
        Sitedeki bilgiler ve bazı linkler <strong><a href="http://www.bjk.com.tr">resmi siteden </a></strong> alınmıştır. </p>
        <p>Kaynak : <a href="http://www.bjk.com.tr">www.bjk.com.tr </a></p></td>
  </tr>
</table>

maçlarımız bloğu için yine bir script blok oluştur içine aşağıdaki kodu kopyala
<iframe src="http://www.bjk.com.tr/tr/yfs.php?kat_no=99&amp;akat_no=23" style="WIDTH:146px;HEIGHT:182px;BACKGROUND-COLOR:transparent" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="no" allowTransparency="1" bgcolor="transparent"></iframe>

store kodları düzeltildi
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on October 01, 2007, 07:16:18 PM
Quote from: bbTURK on September 30, 2007, 07:23:10 PM
bjk store bloğu için script blok oluştur. içine aşağıdaki kodları kopyala
<td style="border-bottom-style: dotted; border-bottom-width: 3px;" height="73" width="186">
              <p class="abc"><br>
                BeÅŸiktaÅŸ'ın, lisansli ürünlerini alalim. Kulübümüze destek
                olalim.<br>
                Siteye Giris icin&nbsp; <b>
                <a target="_blank" href="http://www.bjkstore.com.tr/">tıklayın</a></b></p></td></tr>

            <tr>
              <td height="80" width="186">
              <p class="abc"><br>
              Sitedeki bilgiler ve bazı linkler <b>
              <a target="_blank" href="http://www.bjk.com.tr">resmi siteden</a></b>
              alınmıştır.</p>
              <p class="abc">Kaynak :
              <a target="_blank" href="http://www.bjk.com.tr">www.bjk.com.tr</a></p></td></tr>

maçlarımız bloğu için yine bir script blok oluştur içine aşağıdaki kodu kopyala
<iframe src="http://www.bjk.com.tr/tr/yfs.php?kat_no=99&amp;akat_no=23" style="WIDTH:146px;HEIGHT:182px;BACKGROUND-COLOR:transparent" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="no" allowTransparency="1" bgcolor="transparent"></iframe>

store olmadıda maçlar oldu teşekkür ederim ;)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 01, 2007, 07:35:05 PM
sazanlık yapıp kodlara hiç bakamadan ekledim :D store için bunu dene
<table cellspacing="0" cellpadding="0">
  <tr>
    <td width="186"><p> BeÅŸiktaÅŸ'ın, lisansli &uuml;r&uuml;nlerini alalim. Kul&uuml;b&uuml;m&uuml;ze destek olalim. <br>
        Siteye Giris icin&nbsp; <strong><a href="http://www.bjkstore.com.tr/">tıklayın </a></strong></p></td>
  </tr>
  <tr>
    <td width="186"><p><br>
        Sitedeki bilgiler ve bazı linkler <strong><a href="http://www.bjk.com.tr">resmi siteden </a></strong> alınmıştır. </p>
        <p>Kaynak : <a href="http://www.bjk.com.tr">www.bjk.com.tr </a></p></td>
  </tr>
</table>
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on October 02, 2007, 05:32:44 PM
teşekkürle şimdi oldu. saolasın kardeşim ;)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bizdensin on October 15, 2007, 09:26:15 PM
Quote from: ufuk.exe on March 31, 2006, 03:45:39 PM
yok hayir,
her article icin block acmayacaksiniz.

1) blocks'a gir, ve Add Center Block yap, yeni center block'u JavaScript/HTML olarak sec.
2) Icine girip Title'a javascripts veya "gerekli" falan gibi bir isim ver
3) body'e java script'in <head> kisimina girecek yerini yaz
4) Do not use title/frame'i sec ve Do not allow block to collapse 'i sec ki ucgen cikmasin.
5) yandan herkezi sec, guest, admin, mod, etc..
6) simdi cik blocks dan ve Articles'a gir
7) Her yeni article yazdigin zaman once article'i SEND yap, sonra ayni article'a geri gir, sana daha cok opsiyonlar verecek en altta, o opsiyonlardan Show centerblocks 'i sectigine emin ol.

Boylece o article acildiginda center block tepede (aslinda bos olacak ici, ama istersen icine logo falan da koyabilirsin) gozukecek, ve o article'in icinde veya sayfanin her hangi bir yerindeki JavaScript calisacaktir.

Articles' icinde:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg98.imageshack.us%2Fimg98%2F9051%2Fcetnerasdfj321ze.png&hash=08ed98fc0d7e2f6341f7a6028a6ba7bc1d5898bd)

Kolay gelsin
(Isin kolay yontemi index.template.php icinde </head> den once script'i koymak, fakat bazen uzun scriptler sorun cikartiyor.)

böyle bir yer benim admin panelde AYRICA BLOK NASIL AÇILIYOR
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 15, 2007, 10:06:30 PM
TinyPortal
Ayarlar
Blok Yoneticisi
Makale Yoneticisi
Dosya Yukleme Yoneticisi

daha sonra gelen sayfada sağ blok ekle, sol blok ekle, orta blok ekle, frontpage blok ekleden birini seç(bloğun nerde görünmesini istediğine göre)

gelen sayfada ne tür blok ekleyceğini soracak. açıklamalar aşağıda var. kod eklemek için (koda göre değişir) script veya php blok oluştur.

gelen sayfada bloğun kimler trafından görüleciğini ismini ayarla ve kodu ekle, gönder e tıkla

son olarak tekrar blok düzenleye gel ve oluşturduğun bloğun yanındaki kırmızı yuvalğı yeşil yap(yani bloğu aktfeştir)

bloğun hazır artık güle güle kullan :D

Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bizdensin on October 15, 2007, 10:28:42 PM
sağol ya ben buraya baktım ne işe yarıyor diye düşünüp duruyordum:)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on October 16, 2007, 06:39:55 PM
yaw dost siteler için yukarıya doğru kayan text olarak site sismlerini koymak istiyorum yardımm!
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 16, 2007, 08:37:13 PM
<marquee behavior="scroll" direction="up" width="100%" height="50" scrollamount="2" scrolldelay="0" class="style2 style4" onmouseover="this.stop()" onmouseout="this.start()">
                    <a href="http://www.aksav.org.tr/tr/242_1.htm">Festival , Türk Sineması'nın en ünlü isimlerinin geçidine sahne olacak. </a><br>
                    <a href="http://www.aksav.org.tr/tr/242_2.htm">Dev Bir Ä°sim Daha Ağırlanacak: CHRISTOPHER LAMBERT </a>

                    <a href="http://www.aksav.org.tr/tr/242_3.htm">Shekhar Kapur ve Oscar Ödüllü ünlü oyuncu Meryl Streep'in oyuncu kızı Mamie Gummer Antalya'da... </a></marquee>

altınportakalın sitesinden aldım. istediğin site isimlerini adreslerini ekle
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on October 20, 2007, 08:49:16 AM
bunu kurdum fakat linkleri birer satır arayla göstermek istiyorum. bu modulde ise yanyana yazıyor
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 20, 2007, 08:58:20 AM
marquee behavior="scroll" direction="up" width="100%" height="50" scrollamount="2" scrolldelay="0" class="style2 style4" onmouseover="this.stop()" onmouseout="this.start()">
                    <a href="http://www.aksav.org.tr/tr/242_1.htm">Festival , Türk Sineması'nın en ünlü isimlerinin geçidine sahne olacak. </a><br><br>
                    <a href="http://www.aksav.org.tr/tr/242_2.htm">Dev Bir Ä°sim Daha Ağırlanacak: CHRISTOPHER LAMBERT </a><br><br>

                    <a href="http://www.aksav.org.tr/tr/242_3.htm">Shekhar Kapur ve Oscar Ödüllü ünlü oyuncu Meryl Streep'in oyuncu kızı Mamie Gummer Antalya'da... </a></marquee>


bunudene her link arasına <br><br> yazdım.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: pascal37 on October 20, 2007, 09:27:46 AM
teşekkür ederim oldu.

peki bu blok çok küçük gözüküyor bunu nasıl biraz uzatabilirim aşağıya doğru?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 20, 2007, 05:11:30 PM
<table height="120" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><marquee behavior="scroll" direction="up" width="100%" height="50" scrollamount="2" scrolldelay="0" class="style2 style4" onmouseover="this.stop()" onmouseout="this.start()">
                    <a href="http://www.aksav.org.tr/tr/242_1.htm">Festival , Türk Sineması'nın en ünlü isimlerinin geçidine sahne olacak. </a><br><br>
                    <a href="http://www.aksav.org.tr/tr/242_2.htm">Dev Bir Ä°sim Daha Ağırlanacak: CHRISTOPHER LAMBERT </a><br><br>

                    <a href="http://www.aksav.org.tr/tr/242_3.htm">Shekhar Kapur ve Oscar Ödüllü ünlü oyuncu Meryl Streep'in oyuncu kızı Mamie Gummer Antalya'da... </a></marquee></td>
  </tr>
</table>


height kısmını isterdiğin yüksekliğe göre değiştir.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:12:08 PM
php bloc da yapılacak


Günün en aktif üyeleri

global $db_prefix, $scripturl, $memberContext, $txt, $modSettings;
$maxlength=20;

// $starttime = strtotime('24 hours ago'); //posters laatste 24 uur
$starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y')); //posters vandaag
$list_count = 5;

$poster = array();

$request = db_query("
SELECT  m.ID_MEMBER, COUNT(m.ID_MEMBER) as postCount
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
WHERE m.posterTime > " . $starttime . "
AND t.ID_TOPIC = m.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
GROUP BY m.ID_MEMBER
ORDER BY postCount DESC LIMIT " . $list_count, __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($request))
{
    loadMemberData(array($row['ID_MEMBER']));
    loadMemberContext($row['ID_MEMBER']);
$membername = (strlen($memberContext[$row['ID_MEMBER']]['name']) > $maxlength) ? substr($memberContext[$row['ID_MEMBER']]['name'],0,$maxlength) : $memberContext[$row['ID_MEMBER']]['name'];
$poster[$row['ID_MEMBER']] = array (
  'id' => $row['ID_MEMBER'],
  'count' => $row['postCount'],
  'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $memberContext[$row['ID_MEMBER']]['name'] . '">' . '<font color="' . $memberContext[$row['ID_MEMBER']]['group_color'] . '">' . $membername . '</font>' . '</a>' );
}
mysql_free_result($request);

echo '<table width=100%>';
foreach($poster as $top_user)
{
echo '<tr>
      <td align="left" width=75%>' . $top_user['link'] . '</td>
      <td align="left">| '. $top_user['count'] . '</td>
      </tr>';
}
echo '</table>';



********************
En aktif  üyeler2
$numberofposters = 10; // You can change this to however many you want


require_once "SSI.php";
$top_posters = ssi_topPoster($numberofposters, "return");

foreach ($top_posters as $poster)
{
  echo

$poster['link'] , ' (', $poster['posts'] , ')<br />';
}


**********
sitede kullandığım( www.sanalworld.net ) aktif üyeler

global $db_prefix, $scripturl, $modSettings;

$memberstoshow = 10;
$matchperiod = false;
$countmodsandadmins = true; // not yet implemented
// Change this to the time you want the contest to start [http://www.onlineconversion.com/unix_time.htm]
$starttime = time() - 604800; // Last week posters
$endtime = time();  // Change this to the time you want the contest to end
$where_period = '';

if (!empty($modSettings['MemberColorLink'])) // check if MemberColorLink mod is installed and enabled         
{
    if ($matchperiod) // select only posts matching period
        $where_period = "AND m.posterTime > $starttime AND m.posterTime < $endtime";
    $query = db_query(
        "SELECT m.realName, m.ID_MEMBER, mg.onlineColor, m.posts
         FROM {$db_prefix}members AS m
         LEFT JOIN {$db_prefix}membergroups AS mg ON (m.ID_GROUP = mg.ID_GROUP AND m.ID_GROUP)
         $where_period
         ORDER BY m.posts DESC
         LIMIT 0,$memberstoshow", __FILE__, __LINE__);
}
else
{
    if ($matchperiod) // select only posts matching period
        $where_period = "WHERE posterTime > $starttime AND posterTime < $endtime";
    $query = db_query(
        "SELECT realName, ID_MEMBER, posts
         FROM {$db_prefix}members
         $where_period
         ORDER BY posts DESC
         LIMIT 0,$memberstoshow", __FILE__, __LINE__);
}

$firstrecord = true;
while ($row = mysql_fetch_assoc($query))
{
    if ($firstrecord)
    {
        $biggest = $row['posts'];
        $firstrecord = false;
    }
    $bar_length = intval(($row['posts']/$biggest) * 40);

    if(isset($row['onlineColor']))
        $style = 'color: '. $row['onlineColor'];
    else
        $style = '';

    echo '
    <table width="100%" border="0">
    <tr>
    <td><div class="smalltext"><a style="' . $style . '" href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a> (' . $row['posts'] . ')</div></td>
    <td><div align="right"><img src="' . $settings['images_url'] . '/bar.gif" width="' . $bar_length . '" height="10" title="' . $bar_length*2.5 . '%" alt="" /></div></td>
    </tr>
    </table>
    ';
}
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:12:58 PM
Karma Blocks Package v0

ilk önce aşağıdaki paketi paketlerden yükleyin (1.1.3 ve 1.1.4 e uyumlu hale getirildi)
http://rapidshare.com/files/65635651/Karma_Blocks_Package_v0.4.zip

paketi yükledikten sonra


Themes/default/languages/Modifications.turkish.php de
bul
?>
üstüne ekle

// Karma Blocks Package v0.4
$txt['karma_applauds'] = "Applauds";
$txt['karma_smites'] = "Smites";
$txt['karma_applaud_color'] = "green";
$txt['karma_smite_color'] = "red"; //html can be used (red - #ff0000)


daha sonra php box oluÅŸurup
Karma Log,Lowest Karma (en düşük karma sahipleri),
Top Karma(en yüksek karma sahipleri)

birini php box a yapıştırın

demo:  www.sanalworld.net Top 10 Karma ya bakınız


Karma Log
ssi_karmalog();

Lowest Karma
ssi_lowestkarma();

Top Karma

ssi_topkarma();


ssi_topkarma('10');
şeklinde yaparsanız en yüksek 10 karma sahibini gösterir
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:14:18 PM
Linkit - A member submittable links block

bu blokta üyeler favori linklerini ekleyebilme alanı veriyor.sadece linki ekleyen üye görebilir.
ekran görüntüsü:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg146.imageshack.us%2Fimg146%2F1301%2Faaago3.png&hash=5a46a5933a8be29f519a886d1126e130876651de)

php box oluşturun kodu içine kopyalayın
//////////////////////////////////////////////
// Linkit Version 1.7.1
// Developed by Thurnok
// thurnok -AT- tinyport .DOT. net
// Complete Computer Services
// August 22, 2006
//
// Last update May 18, 2007
//
// 1.7.1:
// - added explicit sort by ID when $li_sort = 0 so that if you edit your database table, changing ID numbers,
// you can sort by the ID instead of the order data was entered into the table
//
// This is a php block and/or php Article snippet.  It works in any block
// position (left/right/center/frontpage/article).
// It allows for multiple columns of links via a table.
//
// Linkit allows you to give your users the ability to add links to your
// site in a Tiny Portal block that you designate.  Your Admins can
// edit/remove entries, and you determine what 'groups' can post links!
// You can also give groups abilities to edit or delete links as well.
// Additionally, you can allow members to edit/delete their own submissions.
//
// This script will create a table for the links using your current
// TP table prefix followed by linkit (ex: smf_tp_linkit) and using your
// current database credential information.
// NOTE: Your database user/permissions used for SMF must allow you to
// create a table or you will never be able to store the links.  You
// can create the table manually if necessary.
//
//////////////////////////////////////////////

/*
****************************************
****************************************
*** !! User Configuration Section !! ***
****************************************
****************************************
*/
// *****   SECURITY OPTIONS   *****
// who has addlink access? -  format is array('<groupnum>', '<groupnum>', ...)
// Example: $li_addlink_groups = array('14');
$li_addlink_groups = array('');
// who can edit links? - same format as addlink
$li_editlink_groups = array('');
// who can delete links? - same format as addlink
$li_dellink_groups = array('');
// group that you want members denied usage even if in a group above
$li_deny_groups = array('');
// members you want to deny usage even if allowed above
$li_deny_members = array('');
// allow members to edit/delete their own links? (0 = No, 1 = Yes)
$li_edit_own = 0;
$li_del_own = 0;

// *****   LAYOUT OPTIONS   *****
// size of the edit boxes (<input>)
$li_editbox_size = 15;
// max size of the input for the URL Name (30 or less is best)
$li_urlname_maxsize = 30;
// sorting option - 0 = chronological, 1 = alphabetic, 2 = submitter
$li_sort = 0;
// sorting direction - 0 = ascending, 1 = descending
$li_sort_direction = 0;
// number of columns of links to display
$li_columns = 1;
// want to add your own styles to the rows/columns?  change the tag info here
$li_start_row = '<tr>';
$li_start_col = '<td>';
// approximate number of lines displayed in block 0 = unlimited
$li_blocklines = 30;

// you can make the columns use one of TinyPortal's text classes ("normaltext" or "smalltext") or none.
// this will add to the $li_start_col variable the classtype you choose (0 = no class, 1 = smalltext, 2 = normaltext)
// if you are making your own text styles in the $li_start_col variable above, you should set $li_useclass = 0
$li_useclass = 1;

// make it easier to use non-blanking spaces (TP blocks/articles will remove them from your code the next time you edit the same block/article)
// using a variable instead, will let you keep that code intact.
$nbsp = '&'.'nbsp;';

// *****   OTHER OPTIONS   *****
// you can set the tablename to other than linkit if you like
$li_tablename = "linkit";
// and the title displayed
$li_title = "Link Ekleme Alanı!";
// add some descriptive text here if you like to display under title
$li_desc = "Favori Linklerinizi Ekleyin ".$nbsp."Eklediğiniz Linkler Sadece Siz Görebilirsiniz.";
// Print our title - or comment the line to not display a title
if (!empty($li_title))
echo '<center><b>' . $li_title . '</b></center><br />';
if (!empty($li_desc))
echo '<font size=1>' . $li_desc . '</font><p />';
/*
****************************************
****************************************
*/

//////////////////////////////////////////////
//
// The rest of this you should leave as is
// unless you are overly industrious :)
//
//////////////////////////////////////////////
// globals for database vars
global $db_prefix, $tp_prefix;
// globals for user information
global $context, $user_info, $ID_MEMBER;

// fix for TP 0.8.6 and lower
if (empty($tp_prefix)){
$tp_prefix = $settings['tp_prefix'];
}

switch ($li_useclass){
case 1:
$li_classtxt = ' class="smalltext" ';
$li_start_col = substr($li_start_col, 0, -1) . $li_classtxt . '>';
break;
case 2:
$li_classtxt = ' class="normaltext" ';
$li_start_col = substr($li_start_col, 0, -1) . $li_classtxt . '>';
break;
default:
$li_classtxt = '';
break;
}

// get our script url (including parameters - like ?page=6)
$myself = $_SERVER['REQUEST_URL'];

// put the SMF table prefix in front of your tablename from above
$li_tablename = $tp_prefix . $li_tablename;
// check if user is in a group that is allowed to add links
$li_add_auth = array_intersect($li_addlink_groups, $user_info['groups']);
// check if user is in a group that is allowed to edit links
$li_edit_auth = array_intersect($li_editlink_groups, $user_info['groups']);
// check if user is in a group that is allowed to delete links
$li_del_auth = array_intersect($li_dellink_groups, $user_info['groups']);
// deny if in one of the deny groups or members
if (array_intersect($li_deny_groups, $user_info['groups']) || @in_array($ID_MEMBER, $li_deny_members)){
$li_add_auth = false;
$li_edit_auth = false;
$li_del_auth = false;
$li_edit_own = false;
$li_del_own = false;
}
// Admins are always allowed to add/edit/delete links
if ($context['user']['is_admin']){
$li_add_auth = 1;
$li_edit_auth = 1;
$li_del_auth = 1;
}

// set up all our functions ahead of time
// function to create table if not already there
function LinkitCreateTable($li_tablename) {
// set up the query that will create the table appropriately
$dbquery = "CREATE table $li_tablename (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
url_name TEXT, url TEXT, submitted_by TEXT);";
if (!mysql_query($dbquery)) {
die("Query Failed!  Table NOT Created!<br />\n");
}
}

// function to add links to the table
function LinkitAddLink($li_tablename, $li_urlname, $li_urllink, $li_submittedby) {
if ( (strtolower(substr($li_urllink, 0, 7)) != "http://") && (strtolower(substr($li_urllink, 0, 6)) != "ftp://") ){
$li_urllink = "http://" . $li_urllink;
}
// first see if this would be a duplicate, if so, do not post it
$dbquery = "SELECT * FROM $li_tablename
WHERE url LIKE '" . $li_urllink . "'";
$dbresult = mysql_query($dbquery);
if ($row = mysql_fetch_assoc($dbresult)){
// if a row is found, then there's already this link in table, don't dupe it
return;
}
$dbquery = "INSERT INTO $li_tablename VALUES (0, \"$li_urlname\", \"$li_urllink\", \"$li_submittedby\");";
if (!mysql_query($dbquery)) {
die("Query Failed!  Link NOT Inserted into database!<br />\n");
}
}

// function to edit links in the table
function LinkitEditLink($li_tablename, $li_urlname, $li_urllink, $li_id) {
// make sure only one ID is actually in there
if ((string)(int)$li_id === (string)$li_id){
// change only values that were there in form
$dbquery = "UPDATE $li_tablename SET ";
if ($li_urlname){
// if there was a url name provided, add it to UPDATE query
$dbquery .= "url_name=\"$li_urlname\" ";
}
if ($li_urllink){
// add HTTP:// if necessary at front of link to prevent BASE URL applying in front of link provided
if ( (strtolower(substr($li_urllink, 0, 7)) != "http://") && (strtolower(substr($li_urllink, 0, 6)) != "ftp://") ){
$li_urllink = "http://" . $li_urllink;
}
// since url link was provided, add it to UPDATE query
if ($li_urlname){
// since we already added url name, put comma and space before the url link update part
$dbquery .= ", url=\"$li_urllink\" ";
} else {
// didn't have an url name added, so no comma needed
$dbquery .= "url=\"$li_urllink\" ";
}
}
// add rest of query
$dbquery .= "WHERE id=\"$li_id\";";
if (!mysql_query($dbquery)) {
die("Query Failed!  Link NOT modified in database!<br />\n");
}
}
}

// function to delete links from the table
function LinkitDelLink($li_tablename, $li_id) {
// delete link(s) in $li_id
$dbquery = "DELETE FROM $li_tablename WHERE id in ( " . $li_id . ")";
if (!mysql_query($dbquery)) {
die("Query Failed!  Link NOT Deleted from database!<br />\n");
}
}

///////////  MAIN CODE HERE  ////////////
// convert $_POST vars to prevent undefined index errors
$li_add = empty($_POST['li_add']) ? 0 : 1;
$li_edit = empty($_POST['li_edit']) ? 0 : 1;
$li_del = empty($_POST['li_del']) ? 0 : 1;
$li_urlname = empty($_POST['li_urlname']) ? '' : $_POST['li_urlname'];
$li_urllink = empty($_POST['li_urllink']) ? '' : $_POST['li_urllink'];
$li_checklist = empty($_POST['li_checklist']) ? '' : $_POST['li_checklist'];

// if someone just added a link, post it to the database
if ($li_add){
$li_urlname = trim($li_urlname);
$li_urllink = trim($li_urllink);
if ($li_urlname && $li_urllink){
LinkitAddLink($li_tablename, $li_urlname, $li_urllink, $user_info['username']);
}
}

// if someone just edited a link, modify it in database
if ($li_edit && $li_checklist){
$li_urlname = trim($li_urlname);
$li_urllink = trim($li_urllink);
if ($li_urlname || $li_urllink){
LinkitEditLink($li_tablename, $li_urlname, $li_urllink, $li_checklist);
}
}

// if someone just deleted a link, remove it from database
if ($li_del && $li_checklist){
LinkitDelLink($li_tablename, $li_checklist);
}

////////////  MAIN DISPLAY CODE HERE  ///////////////

// set query to select all data in appropriate order
switch ($li_sort){
// alphabetical order
case 1:
$dbquery = $li_sort_direction ? "SELECT * from $li_tablename ORDER BY url_name DESC" : "SELECT * from $li_tablename ORDER BY url_name";
break;
// submitted by order
case 2:
$dbquery = $li_sort_direction ? "SELECT * from $li_tablename ORDER BY submitted_by DESC" : "SELECT * from $li_tablename ORDER BY submitted_by";
break;
// chronological order
default:
$dbquery = $li_sort_direction ? "SELECT * from $li_tablename ORDER BY id DESC" : "SELECT * from $li_tablename ORDER BY id ASC";
}

$dbresult = mysql_query($dbquery);
if (!$dbresult){
if (mysql_errno() == 1146){
// table doesn't exist, create it!
LinkitCreateTable($li_tablename);
// get our result again
$dbresult = mysql_query($dbquery);
if (!$dbresult) die("Unexpected error: " . mysql_error());
} else {
die("Unexpected error: " . mysql_error());
}
}

// javascript validations
echo '
<script type="text/javascript">
<!--
function addCheck(){
urlname = document.li_form.li_urlname;
urllink = document.li_form.li_urllink;
if (urlname.value.replace(/ /g,"") == "" || urllink.value.replace(/ /g,"") == ""){
alert("Missing information - Must supply both URL Name and URL Link!");
return false;
}
}

function editCheck(){
retval = false;
checklist = "";
numchecked = 0;
urlname = document.li_form.li_urlname;
urllink = document.li_form.li_urllink;
checkboxes = document.li_form.li_checkbox;
if (urlname.value.replace(/ /g,"") != "" || urllink.value.replace(/ /g,"") != ""){
for (i=0; i<checkboxes.length; i++){
if (checkboxes[i].checked == true){
checklist = checkboxes[i].value;
numchecked++;
}
}
switch (numchecked){
case 0:
alert("You must select a link to edit first!");
break;
case 1:
document.li_form.li_checklist.value = checklist;
retval = true;
break;
default:
alert("You can only edit one link at a time!");
break;
}
} else {
alert("No information entered!");
}
return retval;
}

function delCheck(){
retval = false;
checklist = "";
checkboxes = document.li_form.li_checkbox;
for (i=0; i<checkboxes.length; i++){
if (checkboxes[i].checked == true){
checklist += (checklist != "" ? "," : "") + checkboxes[i].value;
}
}
document.li_form.li_checklist.value = checklist;
if (checklist != ""){
retval = true;
}
if (!retval){
alert("Select a link first!");
}
return retval;
}

function urlTest(){
urllink = document.li_form.li_urllink.value;
if (urllink.replace(/ /g,"") != ""){
if (urllink.toLowerCase().substr(0, 7) != "http://" && urllink.toLowerCase().substr(0, 8) != "https://"){
urllink = "http://" + urllink;
}
// display a new window and open url in it
window.open(urllink, "TestUrl", "width=600px, height=400px, resizable, scrollbars", true);
} else {
alert("Need a link to test!");
}
}

// -->
</script>
';

// if we set number of lines, make that setting here
if (!empty($li_blocklines)){
// pad according to class chosen
switch ($li_useclass){
case 1:
// smalltext class - padding 8 for IE, and 5 for all other browsers
$li_blocklines += empty($context['browser']['is_ie']) ? 5 : 8;
break;
case 2:
// normaltext class - padding 14 for IE, and 9 for all other browsers
$li_blocklines += empty($context['browser']['is_ie']) ? 9 : 14;
break;
default:
// no class - padding 10 for IE, 9 for all other browsers
$li_blocklines += empty($context['browser']['is_ie']) ? 9 : 10;
}
echo '
<div style="width: 100%; overflow: auto; height: '.$li_blocklines.'em;">
';
}

// start our form
if (empty($context['browser']['is_ie'])){
echo "\n" . '<form name="li_form" action="' . $myself . '" method=post'.$li_classtxt.'>' . "\n";
} else {
echo "\n" . '<form name="li_form" action="' . $myself . '" method=post>' . "\n";
}

// preset our current column to first column
$li_current_column = 1;

// start our table and first row
echo '<center><table width="90%" border="0"><tr>' . "\n";

// gets set to 1 if there is at least one radio button made next to a link
$li_link_owner = 0;

// parse our data out
while ($row = mysql_fetch_assoc($dbresult)){
// new row?
if ($li_current_column > $li_columns){
// time to end current row and start new one
$li_current_column = 1;
echo "</tr>\n" . $li_start_row . "\n";
}
// each link has a column to start with
echo ' ' . $li_start_col;
// if they have edit or delete privileges then display checkbox
if ($li_edit_auth || $li_del_auth){
echo '<input type=checkbox name="li_checkbox" id="li_checkbox" value="'.$row['id'].'" /> ';
} elseif (($user_info['username'] == $row['submitted_by']) && ($li_edit_own || $li_del_own)){
// if they own this link in the list, and either edit own or delete own is on, display checkbox
echo '<input type=checkbox name="li_checkbox" id="li_checkbox" value="'.$row['id'].'" /> ';
$li_link_owner = 1;
}
echo '<a href="' . $row['url'] . '" title="Submitted by ' . $row['submitted_by'] . '" target=_blank>' . $row['url_name'] . '</a></td>' . "\n";
// next column number
$li_current_column++;
}

// end our last row and our table
echo "</tr>\n</table></center>\n";

// if there are checkboxes, add the check/uncheck all
if ($li_edit_auth || $li_del_auth || ($li_link_owner && ($li_edit_own || $li_del_own))){
echo '<div'.$li_classtxt.'><input type=checkbox name="li_checkall" value="" onClick="invertAll(this, this.form, \'li_checkbox\');"> Check/Uncheck all</input></div>';
}

// if user is allowed to add/edit/delete links (or their own and one exists), display URL Name and URL Link edit boxes
if ($li_add_auth || $li_edit_auth || $li_del_auth || ($li_link_owner && ($li_edit_own || $li_del_own))){
echo '<br />
<div'.$li_classtxt.'>Link Adı</div>
<input type=text name="li_urlname" size=' . $li_editbox_size . ' maxlength=' . $li_urlname_maxsize . '><br />
<div'.$li_classtxt.'>Link:</div>
<input type=text name="li_urllink" size=' . $li_editbox_size . '><input type=button name="li_testurl" value="Test" onClick="return urlTest()"><br /><br />
';
}
// if user is allowed to add links, display Add button
if ($li_add_auth){
echo '<input type=submit name="li_add" value="Ekle" onClick="return addCheck()" />  ';
}
// if user is allowed to edit links (or their own and one exists), display edit link button
if ($li_edit_auth || ($li_link_owner && $li_edit_own)){
echo '<input type=submit name="li_edit" value="Edit" onClick="return editCheck()" />  ';
}
// if user is allowed to delete links (or their own and one exists), display delete link button
if ($li_del_auth || ($li_link_owner && $li_del_own)){
echo '<input type=submit name="li_del" value="Sil" onClick="return delCheck()" />';
}

// our hidden elements
echo '<input type=hidden name="li_checklist" value="">';

// and finally, end our form
echo '</form>';

// if we added the <div> for our blocklines, close it here
if (!empty($li_blocklines))
echo '</div>';

// free the result for good measure
mysql_free_result($dbresult);
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:14:40 PM
ziyaretçilerin sayfa gösterim limiti (Guest Page View Limit ()
bu blok ziyaretçilerin 3 konu ya baktıktan sonra otomatik olarak kayıt sayfasına açıyor.diğer sayfalara geçisi engelliyor.
*************
php bloc oluşturup kodu kopyalayın

//////////////////////////////////////////////
// Guest Page View Limit 1.2
//////////////////////////////////////////////
// Developed by TPH Thurnok
// TinyPortal Hosting - Your premier TP/SMF host
// http://www.tinyportalhosting.com
// November 16, 2006
//
// Last update: March 10, 2007
//    added &gpvl=exceeded to redirect so scripting can be done in registration
//    to allow detecting user got there by exceeding the page view limit
//
// This is designed for a phpblock.
// This allows you to limit the number of pages a guest can view on your site
// before being redirected to the registration page.
//
// Requirements:
// In order for this to work, you must place this in a phpblock that is displayed
// on all pages.  For any pages where this block is not displayed, that page will
// not be counted against the guest.  It is recommended you do not display a title
// or frame for the block so that it is basically invisible to the user.
//
// This script will create a table for the storage of IPs and the count of pages.
// It is a very simple IP based count.  No session info or other info is used.
// Therefore, if you set this to a very high value, and a user has a dynamic IP, you
// may be ineffective as the user may simply get a new IP the next time they visit your site.
//
//////////////////////////////////////////////

/*
****************************************
****************************************
*** !! User Configuration Section !! ***
****************************************
****************************************
*/
// Set the maximum number of pages you want to limit a normal guest to view
$gpvl_MaxPages = 3;
// Set the maximum number of pages to limit "special" guests to (usually for high limit guests)
$gpvl_MaxPagesSpecial = 1000;

// Set the IPs for "special" guests in an array - Example: array('12.1.4.70', '3.88.129.211', '42.150.220.200');
$gpvl_SpecialIPs = array();

// Set the IPs you want excluded from the limit - like google/spiders etc. in an array - same format as "special" guest array
$gpvl_ExcludeIPs = array('127.0.0.1');

// set the table name you want to use (without a prefix - prefix will be auto added)
$gpvl_table = 'guest_page_limit';
/*
****************************************
****************************************
*/

//////////////////////////////////////////////
//
// The rest of this you should leave as is
// unless you are overly industrious :)
//
//////////////////////////////////////////////
// globals for database vars
global $db_prefix, $tp_prefix;
// globals for user information
global $context, $scripturl;

// fix for TP 0.8.6 and lower
if (empty($tp_prefix)){
$tp_prefix = $settings['tp_prefix'];
}
$gpvl_table = $tp_prefix . $gpvl_table;

$myself = $_SERVER['REQUEST_URL'];
// first seperate the parameters from the URL, to avoid possible search string in the URL itself
$parms = str_replace($scripturl, "", $myself);
// then see if we are actually at the registration page (action=register)
$gpvl_at_register = stristr($parms, "action=register") ? true : false;
// or if we are at the login page (action=login)
$gpvl_at_login = stristr($parms, "action=login") ? true : false;
// or if we are at the password reminder page (action=reminder)
$gpvl_at_reminder = stristr($parms, "action=reminder") ? true : false;

// only for limiting guests, so if not a guest - get out (unless at registration/login/reminder page)
if ($context['user']['is_guest'] && !$gpvl_at_register && !$gpvl_at_login && !$gpvl_at_reminder){
// preset to max pages in case we fall thru
$gpvl_NumPages = $gpvl_MaxPages;

// what is our IP?
$gpvl_ip = empty($_SERVER['REMOTE_ADDR']) ? getenv('REMOTE_ADDR') : $_SERVER['REMOTE_ADDR'];
// if we got an IP (and it is not an excluded IP), do the work, otherwise, send them to registration
if ($gpvl_ip && strtoupper($gpvl_ip) != "NULL"){
if (in_array($gpvl_ip, $gpvl_ExcludeIPs)){
$gpvl_NumPages = 0;
} else {
// if they are a "special" guest, set their max pages to the "special" max pages setting
if (in_array($gpvl_ip, $gpvl_SpecialIPs)){
$gpvl_MaxPages = $gpvl_MaxPagesSpecial;
}
// test for table existance
$gpvl_result = @mysql_query('SELECT pageviews FROM '.$gpvl_table.' WHERE ip = "'.$gpvl_ip.'" LIMIT 1');
if (!$gpvl_result){
if (mysql_errno() == 1146){
// table doesn't exist, create it!
@mysql_query('CREATE table '.$gpvl_table.'(ip TEXT, pageviews INT UNSIGNED NOT NULL)');
$gpvl_NumPages = 1;
@mysql_query('INSERT INTO '.$gpvl_table.' VALUES ("'.$gpvl_ip.'", 1)');
} else {
die("Guest Page View Limit - Unexpected error: " . mysql_error());
}
} else {
if (mysql_num_rows($gpvl_result)){
// found this IP already in table
$row = mysql_fetch_assoc($gpvl_result);
$gpvl_NumPages = $row['pageviews'] + 1;
@mysql_query('UPDATE '.$gpvl_table.' SET pageviews = '.$gpvl_NumPages.' WHERE ip = "'.$gpvl_ip.'"');
} else {
// not in table yet, insert it
$gpvl_NumPages = 1;
@mysql_query('INSERT INTO '.$gpvl_table.' VALUES ("'.$gpvl_ip.'", 1)');
}
mysql_free_result($gpvl_result);
}
}
}

// Send to registration if they are at or above max pages
if ($gpvl_NumPages > 0 && $gpvl_NumPages >= $gpvl_MaxPages){
header("Location: ".$scripturl."?action=register&gpvl=exceeded");
}
}



$gpvl_MaxPages = 3;
3 istediÄŸiniz gibi deÄŸiÅŸtirin siz
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:15:33 PM
Anket anasayfada gösterimi

php box da yapılacak.
// display most recent poll from board number 1
tp_showPoll(13663.0);   (en altta)

13663.0 buraya sizin adres çubuğundaki numarayı yazacaksınız

//Enhanced showPoll block
// Shows poll in block from specified topic,
// or the most recent from specified board
//
// Author: Greybrow
// Version: 2007-04-24 22:00
// Features:
// shows poll (or polls) that fits in a block
//         voting or scores (when voted or can't vote)
// shows question as a topic link
// shows poll from specified topic
// shows most recent poll from specified board
//
// based on ssi_showPoll();
// added block hacks by Raysr and Thurnok from:
//    http://tpblocks.ccs-net.com/index.php?topic=25
//    http://tpblocks.ccs-net.com/index.php?topic=40
//
// usage:
// - copy whole code to phpblock.
// - at the end of the code use function
// tp_showPoll(topic number or null, 'echo' or null, board number or null)
// or
// copy the function to SSI.php
// put only the function call in phpblock
//
// examples:
// show the poll from topic 34
// tp_showPoll(34);                     
//
// show the most recent poll from the board number 5
// tp_showPoll(null,'echo',5);           
//
// keep in mind, that if board is specified, topic is ignored
// so it will display the same as above
// tp_showPoll(34,'echo',5)             
//
// put the array with poll from board 5 into $thepoll variable
// $thepoll = tp_showPoll(null,null,5); 
//
// if you call the function more than once,
// with different options, block will show more polls
// but I'm not sure if voting would work correctly :(
///////////////////////////////////////////////////////

function tp_showPoll($topic = null, $output_method = 'echo', $board = null)
{
global $db_prefix, $txt, $ID_MEMBER, $settings, $boardurl, $sc, $user_info;
global $context;

$boardsAllowed = boardsAllowedTo('poll_view');

if (empty($boardsAllowed))
return array();

if ($topic === null && isset($_REQUEST['ssi_topic']))
$topic = (int) $_REQUEST['ssi_topic'];
else
$topic = (int) $topic;

if ($board === null)
{
// board not chosen, so get the one from specified topic
$request = db_query("
SELECT
p.ID_POLL, p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes, b.ID_BOARD
FROM ({$db_prefix}topics AS t, {$db_prefix}polls AS p, {$db_prefix}boards AS b)
WHERE p.ID_POLL = t.ID_POLL
AND t.ID_TOPIC = $topic
AND b.ID_BOARD = t.ID_BOARD
AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? "
AND b.ID_BOARD IN (" . implode(', ', $boardsAllowed) . ")" : '') . "
LIMIT 1", __FILE__, __LINE__);
}
else
{
// board chosen, so lets try to get the most recent poll from it
$board = (int) $board;
$request = db_query("
SELECT
p.ID_POLL, p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes, b.ID_BOARD, t.ID_TOPIC
FROM ({$db_prefix}topics AS t, {$db_prefix}polls AS p, {$db_prefix}boards AS b)
WHERE p.ID_POLL = t.ID_POLL
AND b.ID_BOARD = t.ID_BOARD
AND b.ID_BOARD = $board
AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? "
AND $board IN (" . implode(', ', $boardsAllowed) . ")" : '') . "
ORDER BY p.ID_POLL DESC
LIMIT 1", __FILE__, __LINE__);
}

// Either this topic has no poll, or the user cannot view it.
if (mysql_num_rows($request) == 0)
return array();

$row = mysql_fetch_assoc($request);
mysql_free_result($request);

if($topic == 0)
$topic = (int)$row['ID_TOPIC'];

// Check if they can vote.
if ((!empty($row['expireTime']) && $row['expireTime'] < time()) || $user_info['is_guest'] || !empty($row['votingLocked']) || !allowedTo('poll_vote', $row['ID_BOARD']))
$allow_vote = false;
else
{
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}log_polls
WHERE ID_POLL = $row[ID_POLL]
AND ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
$allow_vote = mysql_num_rows($request) == 0;
mysql_free_result($request);
}
$request = db_query("
SELECT COUNT(DISTINCT ID_MEMBER)
FROM {$db_prefix}log_polls
WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__);
list ($total) = mysql_fetch_row($request);
mysql_free_result($request);

$request = db_query("
SELECT ID_CHOICE, label, votes
FROM {$db_prefix}poll_choices
WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__);
$options = array();
$total_votes = 0;
while ($rowChoice = mysql_fetch_assoc($request))
{
censorText($rowChoice['label']);

$options[$rowChoice['ID_CHOICE']] = array($rowChoice['label'], $rowChoice['votes']);
$total_votes += $rowChoice['votes'];
}
mysql_free_result($request);

$return = array(
'id' => $row['ID_POLL'],
'image' => empty($pollinfo['votingLocked']) ? 'poll' : 'locked_poll',
'question' => $row['question'],
'total_votes' => $total,
'is_locked' => !empty($pollinfo['votingLocked']),
'allow_vote' => $allow_vote,
'topic' => $topic
);

// Calculate the percentages and bar lengths...
$divisor = $total_votes == 0 ? 1 : $total_votes;
foreach ($options as $i => $option)
{
$bar = floor(($option[1] * 100) / $divisor);
$barWide = $bar == 0 ? 1 : floor(($bar * 5) / 6);
$return['options'][$i] = array(
'id' => 'options-' . $i,
'percent' => $bar,
'votes' => $option[1],
'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll_left.gif" alt="" /><img src="' . $settings['images_url'] . '/poll_middle.gif" width="' . $barWide . '" height="12" alt="-" /><img src="' . $settings['images_url'] . '/poll_right.gif" alt="" /></span>',
'option' => parse_bbc($option[0]),
'vote_button' => '<input type="' . ($row['maxVotes'] > 1 ? 'checkbox' : 'radio') . '" name="options[]" id="options-' . $i . '" value="' . $i . '" class="check" />'
);
}

$return['allowed_warning'] = $row['maxVotes'] > 1 ? sprintf($txt['poll_options6'], $row['maxVotes']) : '';

if ($output_method != 'echo')
return $return;

if ($return['allow_vote'])
{
echo '
<form action="', $boardurl, '/SSI.php?ssi_function=pollVote" method="post" accept-charset="', $context['character_set'], '">
<input type="hidden" name="poll" value="', $return['id'], '" />
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td colspan="2" class="smalltext"><a href="', $boardurl, '/index.php?topic=', $return['topic'], '"><b>', $return['question'], '</b></a></td>
</tr>
<tr>
<td class="smalltext">', $return['allowed_warning'], '</td>
</tr>';
foreach ($return['options'] as $option)
echo '
<tr>
<td class="smalltext"><label for="', $option['id'], '">', $option['vote_button'], '</td><td class="smalltext">', $option['option'], '</label></td>
</tr>';
echo '
<tr>
<td colspan="2" class="smalltext"><input type="submit" value="', $txt['smf23'], '" /></td>
</tr>
</table>
<input type="hidden" name="sc" value="', $sc, '" />
</form>';
}
else
{
echo '
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td colspan="2" class="smalltext"><a href="', $boardurl, '/index.php?topic=', $return['topic'], '"><b>', $return['question'], '</b></a></td>
</tr>';
foreach ($return['options'] as $option)
echo '
<tr>
<td colspan="2" align="left" valign="top" style="font-style: italic" class="smalltext">', $option['option'], '</td>
</tr>
<tr>
<td align="left" class="smalltext">', $option['bar'], '</td>
<td align="left" class="smalltext">', $option['votes'], ' (', $option['percent'], '%)</td>
</tr>';
echo '
<tr>
<td colspan="2" class="smalltext"><b>', $txt['smf24'], ': ', $return['total_votes'], '</b></td>
</tr>
</table>';
}
}

///////////////////////////////////////
// display most recent poll from board number 1
tp_showPoll(13663.0);   
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 23, 2007, 01:17:23 PM
burada eklediğim bloclar ingilizce bölümünden alınmıştır.anlatımlar bana aittir (vakit buldukça yeni bloclar eklemeye devam edecem)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 25, 2007, 10:28:41 AM

Image Viewer(resim görüntüleyici)
ftp ana dizine atacağın 16 resim p1...p16 diye aşağıdaki gibi olacaktır
üstte 8 küçük altta 8 küçük resim ortada büyük boyutlu resim.hangi resme tıklarsanız o büyür
ekran görüntüsü
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.sanalworld.net%2Fdemeo.jpg&hash=703a9445c2a07f1b19a5fa4f3337e58df9ea2c63)
   

scriptbox oluşturun kodu içine kopyalayın
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Jenny Blewitt (webmaster@webdesignsdirect.com) -->
<!-- Web Site:  http://www.webdesignsdirect.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
   }
}
//  End -->
</script>

<center>
<table width=500 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="javascript:doPic('p1.jpg');"><img src="p1.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p2.jpg');"><img src="p2.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p3.jpg');"><img src="p3.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p4.jpg');"><img src="p4.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p5.jpg');"><img src="p5.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p6.jpg');"><img src="p6.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p7.jpg');"><img src="p7.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p8.jpg');"><img src="p8.jpg" width=90 height=60 border=0></td>
</tr>
<tr>
<td colspan=8 align=center><img name="mainpic" src="p1.jpg" width=500 height=300 border=0></td>
</tr>
<tr>
<td><a href="javascript:doPic('p9.jpg');"><img src="p9.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p10.jpg');"><img src="p10.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p11.jpg');"><img src="p11.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p12.jpg');"><img src="p12.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p13.jpg');"><img src="p13.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p14.jpg');"><img src="p14.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p15.jpg');"><img src="p15.jpg" width=90 height=60 border=0></td>
<td><a href="javascript:doPic('p16.jpg');"><img src="p16.jpg" width=90 height=60 border=0></td>
</tr>
</table>
</center>


küçük resimlerin boyutu width=90 height=60 siz ayarlayın bunu
resme tıklandığında büyüyen resmin boyutu width=500 height=300 bunuda istediğiniz gibi değiştirin
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on November 26, 2007, 09:13:42 PM
arkadaşlar blok yazılımcıkları konusu biraz büyüdü. aradıklarımızı daha rahat bulabilmek için ilk mesaja içindekiler ekledim. gözmden kaçan blok yazılımcıkları için uyarın.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 27, 2007, 12:12:56 AM
bbTURK yeni bir konu da keşke yapsaydın listeyi.çünkü 9 sayfa olmuş içerinde bloklardan çok sorunlarına çözüm aramış.hem çok eski tarihli bloklarda var (ör:otomatik meta tag )smf onu direk yapıyor artık
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 27, 2007, 06:38:11 PM
buyrun herkesin istediÄŸi forumdan son konular:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.resim-yukle.com%2Fimg01%2F14%2F237096demeo.JPG&hash=6e1011ecb8d06113d21ada8346e2d0b269d62c64)

global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings, $user_profile;

//////////////////////////////////////////// ---------- Unconditional Exclude
//
$exclude_boards = array(); // KEEP (to preserve variable declaration)
// $exclude_boards = array(5); //  Exclude single board
// $exclude_boards = array(5, 8); //  Exclude multiple boards
$ex_board_clause = !empty($exclude_boards) ? ' AND b.ID_BOARD NOT IN (' . implode(', ', $exclude_boards) . ')' : '';
//
//

//////////////////////////////////////////// ---------- Use in TP PHP Article (no title or frame from theme)
// This will give most recent XX posted to topics -OR-
// most recent XX unreplied to topics -OR-
// topics posted to in last XX hours -OR-
// most recent XX topics on topic notify list
//
// Sorts by most recent reply (descending; most recent first) -OR-
//          creation order (descending; most recent first)
//
// All in the detailed topic format
//
//
// Default
// index.php?page=##
// most recent posted to topics - will list
// number equal to  $settings['number_recent_posts']
//
// index.php?page=##;count=50 or index.php?page=##;type=last;count=50
// 50 most recently posted to topics
//
// index.php?page=##;type=unreplied or index.php?page=##;type=unreplied;count=50
// Most recent unreplied to topics - will
// list number specified in 'count' or default to
// number equal to  $settings['number_recent_posts']
//
// index.php?page=##;type=hours or index.php?page=##;type=hours;count=12
// Topics posted to in last number of hours
// specified in 'count' or default to 24.
//
// index.php?page=##;type=notify or index.php?page=##;type=notify;count=50
// Topics in topic notifcation list up to number
// specified in 'count' or a maximum of 100 topics.
//
// *** Admins Only ***
// index.php?page=##;type=notify;user=XXX or index.php?page=##;type=notify;user=XXX;count=50
// Topics in topic notifcation list of specified user up to number
// specified in 'count' or a maximum of 100 topics.
//
// index.php?page=##;type=started or index.php?page=##;type=started;count=50
// Topics started by current user list up to number
// specified in 'count' or a maximum of 100 topics.
//
// *** Admins Only ***
// index.php?page=##;type=notify;user=XXX or index.php?page=##;type=started;user=XXX;count=50
// Topics started by specified user up to number
// specified in 'count' or a maximum of 100 topics.
//
// Add argument order=create to sort by topic creation sequence (most recent first)
// rather than by last reply sequence

$do_query = 1;

//////////////////////////////////////////// ---------- Poor Man's Global Announcements Block (center block - no Title/Frame)
// Delete documentation comments above and marked section below
//
// $announce_topics = array(254, 568, 675, 678); // Topic ID's to be 'Announced'
//
// $heading = '<center>Announcements<center>';
// $where_clause = 't.ID_TOPIC IN (' . implode(', ', $announce_topics) . ')';
// $limit_clause = '';
// $order_clause = 't.ID_LAST_MSG DESC';
////////////////////////////////////////////   

//////////////////////////////////////////// ---------- Last 5 Topics Started by User Block (center block - no Title/Frame)
// Delete documentation comments above and marked section below
//
// $heading = 'Most Recent Topics You Started';
// $where_clause = 'ms.ID_MEMBER = '.$ID_MEMBER;
// $limit_clause = 'LIMIT 5';
// $order_clause = 't.ID_FIRST_MSG DESC';
////////////////////////////////////////////   

//////////////////////////////////////////// ---------- Boardindex Most Recent Topics Arguments
//
// Comment out the Info Center's Most Recent Posts Code and Insert this
// to show Most Recent Topics in full detail style instead
//
// $list_count = $settings['number_recent_posts'];
// $where_clause = 't.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 50 * min($list_count, 5));
// $limit_clause = 'LIMIT ' . $list_count;
// $order_clause = 't.ID_LAST_MSG DESC';
////////////////////////////////////////////   

////////////////////////////////////////////  ------ Remove down to next mark to use in block/boardindex ------
//
if (empty($settings['number_recent_posts']))
$number_recent_posts = 20;
else
$number_recent_posts = $settings['number_recent_posts'];

        if( isset($_GET['type']) )
$list_type = $_GET['type'];
else
$list_type = 'last';

        if( isset($_GET['count']) )
$list_count = $_GET['count'];
else
{
$list_count = $number_recent_posts;
if ($list_type == 'notify')
$list_count = 100;
elseif ($list_type == 'hours')
$list_count = 24;
}

if ($list_count <= 0)
{
$list_count = $number_recent_posts;
if ($list_type == 'hours')
$list_count = 24;
}

if ($list_count > 100)
$list_count = 100;

        if( isset($_GET['order']) )
$list_order = $_GET['order'];
else
$list_order = 'lastpost';

        if( $list_order == 'create' )
$order_clause = 't.ID_FIRST_MSG DESC';
else
$order_clause = 't.ID_LAST_MSG DESC';

if ($list_type == 'hours')
{
$list_from = strtotime($list_count.' hours ago');
$where_clause = 'ml.posterTime >= ' . $list_from;
$limit_clause = ' ';
$heading = 'Topics Posted To In Last '. $list_count . ' Hours';
}
elseif ($list_type == 'unreplied')
{
$where_clause = 't.numReplies = 0';
if ($list_count == 0)
{
$limit_clause = ' ';
$heading = 'Unreplied To Topics';
}
else
{
$limit_clause = 'LIMIT ' . $list_count;
$heading = $list_count . ' Most Recent Unreplied To Topics';
}
}
elseif ($list_type == 'notify')
{
if (isset($_GET['user']) && $user_info['is_admin'])
{
$watched_topics = array();
$request = db_query("SELECT ID_TOPIC FROM {$db_prefix}log_notify WHERE ID_MEMBER = {$_GET['user']} AND ID_BOARD = 0", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$watched_topics[] = $row['ID_TOPIC'];
mysql_free_result($request);
$heading = $list_count . ' Most Recent Topics Being Watched by User # '.$_GET['user'];
$where_clause = 't.ID_TOPIC IN (' . implode(', ', $watched_topics) . ')';
$limit_clause = 'LIMIT ' . $list_count;
if (empty($watched_topics))
$do_query = 0;
}
else
{
$watched_topics = array();
$request = db_query("SELECT ID_TOPIC FROM {$db_prefix}log_notify WHERE ID_MEMBER = {$ID_MEMBER} AND ID_BOARD = 0", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$watched_topics[] = $row['ID_TOPIC'];
mysql_free_result($request);
$heading = $list_count . ' Most Recent Topics Being Watched';
$where_clause = 't.ID_TOPIC IN (' . implode(', ', $watched_topics) . ')';
$limit_clause = 'LIMIT ' . $list_count;
if (empty($watched_topics))
$do_query = 0;
}
}
elseif ($list_type == 'started')
{
if (isset($_GET['user']) && $user_info['is_admin'])
{
$where_clause = 'ms.ID_MEMBER = '.$_GET['user'];
$limit_clause = 'LIMIT ' . $list_count;
        if( $list_order == 'create' )
{
$order_clause = 't.ID_FIRST_MSG DESC';
$heading = 'Most Recent Topics Started by User '.$_GET['user'];
}
else
{
$order_clause = 't.ID_LAST_MSG DESC';
$heading = 'Most Recently Posted To Topics Started by User '.$_GET['user'];
}
}
else
{
$where_clause = 'ms.ID_MEMBER = '.$ID_MEMBER;
$limit_clause = 'LIMIT ' . $list_count;
        if( $list_order == 'create' )
{
$order_clause = 't.ID_FIRST_MSG DESC';
$heading = 'Most Recent Topics You Started';
}
else
{
$order_clause = 't.ID_LAST_MSG DESC';
$heading = 'Most Recently Posted To Topics You Started';
}
}
}
else
{
$where_clause = 't.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 90 * min($list_count, 5));
$limit_clause = 'LIMIT ' . $list_count;

}
//
////////////////////////////////////////////  ------ Remove up to first mark to use in block/boardindex ------

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

$groupcolors = array();
$request = db_query("SELECT ID_GROUP, onlineColor FROM {$db_prefix}membergroups", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$groupcolors[$row['ID_GROUP']] = $row['onlineColor'];
mysql_free_result($request);

$topics = array();

if ($do_query == 1)
{
$request = db_query("
SELECT
ms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname,
t.numReplies, t.numViews, ms.ID_MEMBER AS ID_FIRST_MEMBER, ml.ID_MEMBER AS ID_LAST_MEMBER,
ml.posterTime AS lastPosterTime, IFNULL(mems.realName, ms.posterName) AS firstPosterName,
IFNULL(meml.realName, ml.posterName) AS lastPosterName,
mems.ID_GROUP as mems_group, meml.ID_GROUP as meml_group,
ml.subject AS lastSubject, b.memberGroups,
ml.icon AS lastIcon, ms.icon AS firstIcon, t.ID_POLL, t.isSticky, t.locked, ml.modifiedTime AS lastModifiedTime,
LEFT(ml.body, 384) AS lastBody, LEFT(ms.body, 384) AS firstBody,
ml.smileysEnabled AS lastSmileys, ms.smileysEnabled AS firstSmileys, t.ID_FIRST_MSG, t.ID_LAST_MSG,"
. ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= ml.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . "
FROM ({$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER)
LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER)
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)
WHERE " . $where_clause . $ex_board_clause . "
AND t.ID_TOPIC = ms.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND ms.ID_MSG = t.ID_FIRST_MSG
AND ml.ID_MSG = t.ID_LAST_MSG
AND " . $user_info['query_see_board'] . "
ORDER BY " . $order_clause . " " . $limit_clause, __FILE__, __LINE__);


$topic_ids = array();
while ($row = mysql_fetch_assoc($request))
{
if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
continue;

$topic_ids[] = $row['ID_TOPIC'];

// Clip the strings first because censoring is slow :/. (for some reason?)
$row['firstBody'] = strip_tags(strtr(parse_bbc($row['firstBody'], $row['firstSmileys'], $row['ID_FIRST_MSG']), array('<br />' => '
')));
if (strlen($row['firstBody']) > 128)
$row['firstBody'] = substr($row['firstBody'], 0, 128) . '...';
$row['lastBody'] = strip_tags(strtr(parse_bbc($row['lastBody'], $row['lastSmileys'], $row['ID_LAST_MSG']), array('<br />' => '
')));
if (strlen($row['lastBody']) > 128)
$row['lastBody'] = substr($row['lastBody'], 0, 128) . '...';

$row['lastSubject'] = $row['firstSubject'];
$row['lastBody'] = $row['firstBody'];

// Decide how many pages the topic should have.
$topic_length = $row['numReplies'] + 1;
if ($topic_length > $modSettings['defaultMaxMessages'])
{
$tmppages = array();
$tmpa = 1;
for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages'])
{
$tmppages[] = '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.' . $tmpb . ';topicseen">' . $tmpa . '</a>';
$tmpa++;
}
// Show links to all the pages?
if (count($tmppages) <= 5)
$pages = 'Ã,« ' . implode(' ', $tmppages);
// Or skip a few?
else
$pages = '« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1];

if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
$pages .= '  <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;all">' . $txt[190] . '</a>';
$pages .= ' »';
}
else
$pages = '';

// We need to check the topic icons exist... you can never be too sure!
if (empty($modSettings['messageIconChecks_disable']))
{
// First icon first... as you'd expect.
if (!isset($icon_sources[$row['firstIcon']]))
$icon_sources[$row['firstIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['firstIcon'] . '.gif') ? 'images_url' : 'default_images_url';
// Last icon... last... duh.
if (!isset($icon_sources[$row['lastIcon']]))
$icon_sources[$row['lastIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['lastIcon'] . '.gif') ? 'images_url' : 'default_images_url';
}

$color_start = !empty($groupcolors[$row['mems_group']]) ? $groupcolors[$row['mems_group']] : '';
$color_last = !empty($groupcolors[$row['meml_group']]) ? $groupcolors[$row['meml_group']] : '';

// And build the array.
$topics[$row['ID_TOPIC']] = array(
'id' => $row['ID_TOPIC'],
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'name' => $row['firstPosterName'],
'id' => $row['ID_FIRST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],
'link' => !empty($row['ID_FIRST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstPosterName'] . '">' . '<font color="' . $color_start . '">' . $row['firstPosterName'] . '</font>' . '</a>' : $row['firstPosterName']
),
'time' => timeformat($row['firstPosterTime']),
'timestamp' => forum_time(true, $row['firstPosterTime']),
'subject' => $row['firstSubject'],
'preview' => $row['firstBody'],
'icon' => $row['firstIcon'],
'icon_url' => $settings[$icon_sources[$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen">' . $row['firstSubject'] . '</a>'
),
'last_post' => array(
'id' => $row['ID_LAST_MSG'],
'member' => array(
'name' => $row['lastPosterName'],
'id' => $row['ID_LAST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'],
'link' => !empty($row['ID_LAST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'] . '">' . '<font color="' . $color_last . '">' . $row['lastPosterName'] . '</font>' . '</a>' : $row['lastPosterName']
),
'time' => timeformat($row['lastPosterTime']),
'timestamp' => forum_time(true, $row['lastPosterTime']),
'subject' => $row['lastSubject'],
'preview' => $row['lastBody'],
'icon' => $row['lastIcon'],
'icon_url' => $settings[$icon_sources[$row['lastIcon']]] . '/post/' . $row['lastIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'] . '">' . $row['lastSubject'] . '</a>'
),
'new' => $row['isRead'],
'new_from' => $row['new_from'],
'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['new_from'] . ';topicseen#new',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen' . ($row['numReplies'] == 0 ? '' : 'new'),
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen#msg' . $row['new_from'] . '">' . $row['firstSubject'] . '</a>',
'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']),
'is_locked' => !empty($row['locked']),
'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0,
'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'],
'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'],
'is_posted_in' => false,
'icon' => $row['firstIcon'],
'icon_url' => $settings[$icon_sources[$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'subject' => $row['firstSubject'],
'pages' => $pages,
'replies' => $row['numReplies'],
'views' => $row['numViews'],
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bname'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bname'] . '</a>'
)
);

determineTopicClass($topics[$row['ID_TOPIC']]);
}
mysql_free_result($request);

if (!empty($modSettings['enableParticipation']) && !empty($topic_ids))
{
$result = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}messages
WHERE ID_TOPIC IN (" . implode(', ', $topic_ids) . ")
AND ID_MEMBER = $ID_MEMBER", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($result))
{
if (empty($topics[$row['ID_TOPIC']]['is_posted_in']))
{
$topics[$row['ID_TOPIC']]['is_posted_in'] = true;
$topics[$row['ID_TOPIC']]['class'] = 'my_' . $topics[$row['ID_TOPIC']]['class'];
}
}
mysql_free_result($result);
}

}

if (!empty($topics))
    {
    echo '
        <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;margin:0px;"' : 'style="margin:0px;"', '>
            <table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor">
                <tr>';

    echo '
                    <td class="titlebg" colspan="7">', $heading, '</td>';
    echo '
                </tr>';

    echo '
<tr class="titlebg">
<td width="10%" colspan="2"> </td>
<td>', $txt[70], '
</td><td width="14%">', $txt[109], '
</td><td width="4%" align="center">', $txt[110], '
</td><td width="4%" align="center">', $txt[301], '
</td><td width="24%">', $txt[111], '
</td>
</tr>';

foreach ($topics as $topic)
{
// Do we want to seperate the sticky and lock status out?
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));

echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="6%">
<img src="' . $settings['images_url'] . '/topic/' . $topic['class'] . '.gif" alt="" />
</td><td class="windowbg2" valign="middle" align="center" width="4%">
<img src="' . $topic['first_post']['icon_url'] . '" alt="" align="middle" />
</td><td class="windowbg' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '
<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'];
if ($topic['new'] == 0)
{
echo '
';
}
echo '
<span class="smalltext">', $topic['pages'], '<br>', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>
<td class="windowbg2" valign="middle" width="14%">
', $topic['first_post']['member']['link'], '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['replies'], '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['views'], '</td>
<td class="windowbg2" valign="middle" width="22%">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
<span class="smalltext">
', $topic['last_post']['time'], '<br />
', $txt[525], ' ', $topic['last_post']['member']['link'], '
</span>
</td>
</tr>';
}

    echo '</table></div>';

    }
else
    echo '<b><u>'.$heading.'<br><br>No Topics Match Search Criteria</u></b>';
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:50:49 PM
Ãœyelerin Profilinde mesaj


üyenin Profil kısmında günün belirli zamanları ile günaydın [üye adı ]iyi akşamlar [üye adı ]i gibi çıkacak

TPortalBlocks.template.php de

bul
// Tportal userbox
function TPortal_userbox()
{
          global $context, $settings, $options, $scripturl, $txt, $modSettings;

$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

        echo'<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';
        echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

        if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
                echo $context['user']['avatar']['image'] . '<br />';

        // If the user is logged in, display stuff like their name, new messages, etc.
        if ($context['user']['is_logged'])
        {

                echo '<span class="normaltext">
                                                        ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b></span>';

                // Only tell them about their messages if they can read their messages!
                if ($context['allow_pm']){
                        echo '<br />'.$bullet.'<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
                   if($context['user']['unread_messages']>0)
                        echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';

                }
                // Are there any members waiting for approval?
                if (!empty($context['unapproved_members']))
                        echo '<br />'.$bullet.'<a href="', $scripturl, '?action=regcenter">'.$txt['tp_unapproved_members'].'<b> '. $context['unapproved_members']  . '</b></a>';

                if(isset($context['TPortal']['userbox']['unread'])){
                      echo '<br />'.$bullet.'<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
                               <br />'.$bullet.'<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
                               <br />'.$bullet.'<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>';
               }

                // Is the forum in maintenance mode?
                if ($context['in_maintenance'] && $context['user']['is_admin'])
                        echo '<br /><b>' .$bullet.$txt['tp_maintenace']. '</b>';
                // Show the total time logged in?
                if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged']))
                {
                        echo '<br />'.$bullet.$txt['tp-loggedintime'] . ' ';

                         echo '<br />'.$context['user']['total_time_logged_in']['days'] . 'd ';
                         echo $context['user']['total_time_logged_in']['hours'] . 'h ';
                         echo $context['user']['total_time_logged_in']['minutes'] .'m';
                }
               if(isset($context['TPortal']['userbox']['time'])){
                     echo '<br />'.$bullet. $context['current_time'];
               }

// module links - do not show if none
if($context['TPortal']['show_download']=='1')
{
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpmodule.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-admin4'].'</b></p>';
if($context['TPortal']['show_download']=='1')
echo $bullet5.' <a href="'.$scripturl.'?action=tpmod;dl=0">'.$txt['tp-dldownloads'].'</a><br />';
}
// admin parts etc.
             if(!isset($context['TPortal']['can_submit_article']))
                  $context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks')))
{
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpoptions.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-tools'].'</b></p>';
              // can we submit an article?
              if($context['TPortal']['can_submit_article']==1 && !allowedTo('tp_articles'))
                       echo $bullet4.'<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a><br />';

// upload a file?
              if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
                       echo $bullet4.'<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a><br />';

// tpadmin checks
if (allowedTo('tp_settings'))
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a><br />';
if (allowedTo('tp_blocks'))
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a><br />';
if (allowedTo('tp_articles'))
{
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a><br />';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo $bullet4.$bullet3.'<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a><br />';
}
if (allowedTo('tp_dlmanager'))
{
echo $bullet4.'<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '<br />'.$bullet4.$bullet3.'<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a><br />';
}
}

               echo '</div>';
        }
        // Otherwise they're a guest - so politely ask them to register or login.
        else
        {
                echo '
                                                        ', $txt['welcome_guest'], '<br />
                                                        ', $context['current_time'], '<br />

                                                        <form action="', $scripturl, '?action=login2" method="post" >
                                                                <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                                                                <select name="cookielength">
                                                                        <option value="60">', $txt['smf53'], '</option>
                                                                        <option value="1440">', $txt['smf47'], '</option>
                                                                        <option value="10080">', $txt['smf48'], '</option>
                                                                        <option value="302400">', $txt['smf49'], '</option>
                                                                        <option value="-1" selected="selected">', $txt['smf50'], '</option>
                                                                </select>
                                                                <input type="submit" value="', $txt[34], '" /><br />
                                                                ', $txt['smf52'], '
                                                        </form>';
// module links
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpmodule.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-admin4'].'</b></p>';
if($context['TPortal']['show_download']=='1')
echo $bullet2.'<a href="'.$scripturl.'?action=tpmod;dl=0">'.$txt['tp-dldownloads'].'</a><br />';
        }
echo '<br /></td></tr></table>';

}

DeÄŸiÅŸtir
// Tportal userbox
function TPortal_userbox()
{
          global $context, $settings, $options, $scripturl, $txt, $modSettings;

$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet3 = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet4 = '<img src="'.$settings['images_url'].'/tpgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet5 = '<img src="'.$settings['images_url'].'/tpmodule2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

        echo'<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';
        echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

        if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
                echo $context['user']['avatar']['image'] . '<br />';

        // If the user is logged in, display stuff like their name, new messages, etc.
        if ($context['user']['is_logged'])
        {

                echo '<span class="normaltext">
<SCRIPT LANGUAGE="JavaScript">

<!--Begin

datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();
if (thehour > 18) display = "Evening";
else if (thehour >12) display = "Afternoon";
else display = "Morning";
var greeting = ("Good " + display + "!");
document.write(greeting);

//  End -->

</script> <br> <b>', $context['user']['name'], '</b></span>';

                // Only tell them about their messages if they can read their messages!
                if ($context['allow_pm']){
                        echo '<br />'.$bullet.'<a href="', $scripturl, '?action=pm">' .$txt['tp-pm'].' ', $context['user']['messages'], '</a>';
                   if($context['user']['unread_messages']>0)
                        echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';

                }
                // Are there any members waiting for approval?
                if (!empty($context['unapproved_members']))
                        echo '<br />'.$bullet.'<a href="', $scripturl, '?action=regcenter">'.$txt['tp_unapproved_members'].'<b> '. $context['unapproved_members']  . '</b></a>';

                if(isset($context['TPortal']['userbox']['unread'])){
                      echo '<br />'.$bullet.'<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
                               <br />'.$bullet.'<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
                               <br />'.$bullet.'<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>';
               }

                // Is the forum in maintenance mode?
                if ($context['in_maintenance'] && $context['user']['is_admin'])
                        echo '<br /><b>' .$bullet.$txt['tp_maintenace']. '</b>';
                // Show the total time logged in?
                if (!empty($context['user']['total_time_logged_in']) && isset($context['TPortal']['userbox']['logged']))
                {
                        echo '<br />'.$bullet.$txt['tp-loggedintime'] . ' ';

                         echo '<br />'.$context['user']['total_time_logged_in']['days'] . 'd ';
                         echo $context['user']['total_time_logged_in']['hours'] . 'h ';
                         echo $context['user']['total_time_logged_in']['minutes'] .'m';
                }
               if(isset($context['TPortal']['userbox']['time'])){
                     echo '<br />'.$bullet. $context['current_time'];
               }

// module links - do not show if none
if($context['TPortal']['show_download']=='1')
{
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpmodule.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-admin4'].'</b></p>';
if($context['TPortal']['show_download']=='1')
echo $bullet5.' <a href="'.$scripturl.'?action=tpmod;dl=0">'.$txt['tp-dldownloads'].'</a><br />';
}
// admin parts etc.
             if(!isset($context['TPortal']['can_submit_article']))
                  $context['TPortal']['can_submit_article']=0;
// do not show if none is availalable
if($context['TPortal']['can_submit_article']==1 || allowedTo(array('tp_dlupload','tp_dlmanager','tp_settings','tp_articles','tp_blocks')))
{
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpoptions.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-tools'].'</b></p>';
              // can we submit an article?
              if($context['TPortal']['can_submit_article']==1 && !allowedTo('tp_articles'))
                       echo $bullet4.'<a href="', $scripturl, '?action=tpmod;sa=submitarticle">' . $txt['tp-submitarticle']. '</a><br />';

// upload a file?
              if(allowedTo('tp_dlupload') || allowedTo('tp_dlmanager'))
                       echo $bullet4.'<a href="', $scripturl, '?action=tpmod;dl=upload">' . $txt['permissionname_tp_dlupload']. '</a><br />';

// tpadmin checks
if (allowedTo('tp_settings'))
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=settings">' . $txt['permissionname_tp_settings'] . '</a><br />';
if (allowedTo('tp_blocks'))
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=blocks">' . $txt['permissionname_tp_blocks'] . '</a><br />';
if (allowedTo('tp_articles'))
{
echo $bullet4.'<a href="' . $scripturl . '?action=tpadmin;sa=articles">' . $txt['permissionname_tp_articles'] . '</a><br />';
// any submissions?
if($context['TPortal']['submitcheck']['articles']>0)
echo $bullet4.$bullet3.'<a href="' . $scripturl . '?action=tpadmin;sa=submission"><b>' . $context['TPortal']['submitcheck']['articles'] . ' ' .$txt['tp-articlessubmitted'] . '</b></a><br />';
}
if (allowedTo('tp_dlmanager'))
{
echo $bullet4.'<a href="' . $scripturl . '?action=tpmod;dl=admin">' . $txt['permissionname_tp_dlmanager'] . '</a>';
// any submissions?
if($context['TPortal']['submitcheck']['uploads']>0)
echo '<br />'.$bullet4.$bullet3.'<a href="' . $scripturl . '?action=tpmod;dl=adminsubmission"><b>' . $context['TPortal']['submitcheck']['uploads'] . ' ' .$txt['tp-dluploaded'] . '</b></a><br />';
}
}

               echo '</div>';
        }
        // Otherwise they're a guest - so politely ask them to register or login.
        else
        {
                echo '
                                                        ', $txt['welcome_guest'], '<br />
                                                        ', $context['current_time'], '<br />

                                                        <form action="', $scripturl, '?action=login2" method="post" >
                                                                <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                                                                <select name="cookielength">
                                                                        <option value="60">', $txt['smf53'], '</option>
                                                                        <option value="1440">', $txt['smf47'], '</option>
                                                                        <option value="10080">', $txt['smf48'], '</option>
                                                                        <option value="302400">', $txt['smf49'], '</option>
                                                                        <option value="-1" selected="selected">', $txt['smf50'], '</option>
                                                                </select>
                                                                <input type="submit" value="', $txt[34], '" /><br />
                                                                ', $txt['smf52'], '
                                                        </form>';
// module links
echo '<hr /><p style="margin: 4px 0 5px 0;"><img src="'.$settings['images_url'].'/tpmodule.gif" style="margin: 0;" align="absbottom" alt="" />
      <b>'.$txt['tp-admin4'].'</b></p>';
if($context['TPortal']['show_download']=='1')
echo $bullet2.'<a href="'.$scripturl.'?action=tpmod;dl=0">'.$txt['tp-dldownloads'].'</a><br />';
        }
echo '<br /></td></tr></table>';

}



if (thehour > 18) display = "Evening";
else if (thehour >12) display = "Afternoon";
else display = "Morning";
var greeting = ("Good " + display + "!");
document.write(greeting);

koyu siyah ile yazılı olan yerleri siz değiştirin
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:51:28 PM
    
md5 block

bu blok herhangi br kelime yada şifre ekliyorsunuz gönder butonuna tıkladığınızda , girmiş olduğunuz karakterleri md5 e çevirip geri veriyor olay bu ve md5 de tahmininiz üzere bir şifreleme olayı oluyor

php box oluştur içine kopyala
echo ' <center>';

$sifre = strip_tags($_POST['sifre']);
$sifrele = md5($sifre);

if (empty($sifre)) {
echo '
md5 e çevirmek istediğiniz karakterleri giriniz<br><br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}
else{
echo ' md5 e çevirmek istediğiniz sifreniz <b><font size="4" color="#FF0000">'.$sifre.'</font></b><br>';
echo '<br> md5 e çevilirmiş hali : <br><b><font size="4" color="#FF0000">'.$sifrele.'</font></b>';
echo '
<br><br>Tekrar Çevir <br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:51:55 PM
Günlük Sayac
Daily Counter (tiny portal bloc)
bu bloc sitenizde günlük sayaç imkanı verir

php box oluştur içine kopyalayın
// Daily Counter Script
// September 4, 2007
// Tim Antley - www.bayoumx.com

// Stores the day of week and hit count in a file.
// If current day is same as file's day-stamp, counter is incremented by one.
// If day is different, counter resets to 1.

// Specify 'silent' in URL will suppress output after incrementing count.
// Place a question mark between script name; ie. daily_counter.php?silent

// There is no error checking for the file.

$counter_file = 'daily_counter.csv'; // can use your own filename here.

// Should not have to edit anything below this line.

$today = getdate(); // Array for today's information

$handle = @fopen($counter_file, "r"); // Read-only access

$data = @fgetcsv($handle, 1000, ','); // Reads file comma-separated values & places into array $data.

@fclose($handle);

$counter = $data[1];

if($data[0]==$today['mday']) // Check file's day-stamp against current day.
{
$counter++;
}
else
{
$counter=1;
}

$output = $today['mday'].', '.$counter; // Format output into comma-separated values for file.

$handle = @fopen($counter_file, "w");

@fwrite($handle, $output);

@fclose($handle);

if(!isset($_GET['silent'])) // Display output unless 'silent' appears in URL.
{
echo $counter;
}
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:52:33 PM
Accordion Style Menu Block  (deÄŸiÅŸik menuler)
bunu uyguladığınızda menuleriniz daha değişik bir stilde oluşacak


ana dizine atın (index.php olduğu yere)
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz

Themes/<kendi teman>/index.template.php
bul

</head>

önüne ekle

<script type="text/javascript" src="mootools-accordion.js"></script>

<script type="text/javascript">
window.onload = function() {
var accordion = new Accordion(\'h3.atStart\', \'div.atStart\', {
opacity: false,
onActive: function(toggler, element){
toggler.setStyle(\'color\', \'#ff3300\');
},

onBackground: function(toggler, element){
toggler.setStyle(\'color\', \'#222\');
}
}, $(\'accordion\'));

}
</script>


Themes/senin teman/style.css

en baÅŸa ekle
/* Accordion Style Menu Block */
.toggler {
color: #222;
margin: 0;
padding: 2px 5px;
background: #eee;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-top: 1px solid #f5f5f5;
border-left: 1px solid #f5f5f5;
font-size: 11px;
font-weight: normal;
font-family: 'Andale Mono', sans-serif;
}

.element {

}

.element p {
margin: 0;
padding: 4px;
}

.float-right {
padding:10px 20px;
float:right;
}

blockquote {
padding:5px 0 5px 30px;
}

/* END! Accordion Style Menu Block */


script box oluştur içine kopyala
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>


kendinize göre editlemeyi unutmayın
<h3 class="toggler atStart">Test 1</h3>
<div class="element atStart">
This is a Test 1, if you want to know why, Don't ask me, This is not my fault, Hey after all this Is a test! :P
</div>


ana dizine atın
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:52:56 PM
'In The News' - Block [Posts from a specific board]
bu blok sizin seçtiğiniz bölümden haberleri değişik bir şekilde göstermeye yarıyor


ekran görüntüsü:(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg78.imageshack.us%2Fimg78%2F5024%2Fawc7bl2.jpg&hash=6354e36be7ecbdd080546178c734c19a1a79fd91)
   
'In The News' - Block [Posts from a specific board]
SSI.php de bul
// Show the top poster's name and profile link.
üstüne ekle


// Recent topic list reversed:   [board] Subject by Poster Date
function ssi_recentTopicsINC($num_recent = 8, $include_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

$include_boards = empty($include_boards) ? array() : $include_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . "
AND t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($include_boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")") . "
" . ((!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0) ? "
AND b.ID_BOARD != '$modSettings[recycle_board]'" : '') . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAST_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '')));
if (strlen($row['body']) > 128)
$row['body'] = substr($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}


**************
resmi ana dizine atın
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fpath-to-peace.net%2Fmisc%2Fextra.gif&hash=df15160f5650768e8e3be04af5359fd8d6cba758)
************

php box oluşturun bir tane,kodu içine kopyalayın


echo' <div align="center">
<table border="1" width="100%" id="table1">
<tr>
<td width="100" valign="top" bgcolor="#FFFFFF">
<font face="Verdana">
<img border="0" src="extra.gif" width="100" height="111"></font><p align="center">
<font size="1" face="Verdana">Read, post and discuss the latest news from around the
world in our forums!</font></p>
<p align="center"><font size="1" face="Verdana">Get all the details by comparing views!</font></td>
<td><font face="Verdana">';

global $context, $scripturl;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$result=ssi_recentTopicsINC(5,array(58),'return');
foreach($result as $my){

  echo "$bullet";
  echo '<span class="largetext">'.$my['link'];
  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
echo '
                                                <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<hr>';
}
echo '</span>';

echo'   <br></font><font size="1" face="Verdana">The News is updated
when members make new posts in the <a href="http://www.yoursite.com/link_to_your_newsboard">In the News Section</a> Please be sure
to <a href="http://www.yoursite.com/if_u_have_posting_rules_give_link_here">read posting rules</a> for that board before posting!</font></td>
</tr>
</table>
</div>';

kendinize göre bazı kısımları editleyin(www.yoursite.com/ gibi)

   
$result=ssi_recentTopicsINC(5,array(58),'return');

5 = number of topics to display (kaç tane haber gösterecekseniz o rakamı girin)
58 = board number (bölüm numarası)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:53:20 PM
En son üye avatarlı gösterimi  (Newest member block with Avatar image which links to their profile)
bu bloc ile en son üyeniz avatarlı bir şekilde gösterilecektir.


bir php bloc oluşturun bu kodu onun içine yapıştırın.


global $db_prefix;
$query = "SELECT avatar FROM {$db_prefix}members WHERE ID_MEMBER =
".$context['common_stats']['latest_member']['id'];
$exec = db_query($query);
$row = mysql_fetch_assoc($exec);
echo "<div align='center'><img src='/avatars/".$row['avatar']."' alt='".$context['common_stats']['latest_member']['name']."'><BR>".$context['common_stats']['latest_member']['link']."</div>";
mysql_free_result($exec);


avatar çıkmadı derseniz avatar yolu bu img src='/avatars/ ona dikkat edin
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:53:51 PM
Custom Page (kiÅŸisel sayfa)
portalınız ayarladığınız yerde bunun gibi bir kişisel sayfa imkanı verir
http://img519.imageshack.us/img519/2021/customfs3.jpg
boyutlarını ayarlayabiliyorsunuz

oluşan sayfanın boyutunun ayarları için bunları değiştirin
$cp_width = "100%";
$cp_height = 600;


php blok oluşturun bu kodu yapıştırın.
//////////////////////////////////////////////
// Custom Page 1.05
// Developed by Thurnok
// Complete Computer Services
// August 27, 2006
//
// Last updated - January 27, 2007
// - fix for PHP 5.x
//
// Custom Page allows you to give your users the ability to display
// a page of their choice in a centerblock or article based on their User ID.
// This project was developed due to a request on TinyPortal site for
// a centerblock that would display the currently logged in user's
// myspace site.
//
// This version allows your members to choose whether to allow other members
// to view their custom page or not.  Other members can use a pulldown to select
// a member that has their custom page set to public and hence view that member's page.
// It also updates your custompage table to accommodate this automatically.
//
// This script will create a table for the custom page using your current
// SMF table prefix followed by custompage (ex: smf_custompage) and using your
// current database credential information.
// NOTE: Your database user/permissions used for SMF must allow you to
// create a table or you will never be able to store the info.  You
// can create the table manually if necessary.
//
// Also note that a mysql connection is already alive and so creating a new connection
// and closing it is undesirable and causes problems in other blocks.  Therefore,
// you will notice the absence of mysql_connect() and mysql_close() functions
// used in this snippet.
//////////////////////////////////////////////

// User Configurable items

//   *****   LAYOUT OPTIONS   *****
// an IFRAME is necessary to keep the page "within" your site
// width and height of the IFRAME in your center block
$cp_width = "100%";
$cp_height = 600;

//   *****   SECURITY CONFIGURATION   *****
// Groups allowed to select and set their custom page
// This is in the form of their Group ID - example: array('3', '6', '9');
$cp_allowed_groups = array('');
// individual members not allowed to use even if in an allowed group
// uses the member ID - example: array('91', '16');
$cp_disallowed_members = array('');
// whether or not to allow users to make their site public
$cp_allow_public = true;

//   *****   DEFAULT STUFF   *****
// if the user is not allowed, or doesn't have a custom page yet, what
// page do you want to display to them in the IFRAME?
$cp_default_page = "http://www.google.com";

// whether to display the default page if not allowed or no page yet (set to a true value)
// or to not display any page in the block, only the form (set to a false value)
$cp_display_default = 1;

// if $cp_display_default = 0 (or some false value), and user doesn't have a page set,
// display this default text where the IFRAME would have been
$cp_default_text = "You currently do not have a custom page selected.<br />
Please use the form below to select a page.<br />
If you do not see the form below, it is because you do not have access to create a custom page.";

// you can set the tablename to other than custompage if you like
$cp_tablename = "custompage";
// and the title displayed
$cp_title = "Custom Page!";
// add some descriptive text here if you like to display under title
$cp_desc = "Your MySpace right here!  Use the form below to set your custom page.";

// if user's browser does not support IFRAMEs, display this where it would be
$cp_no_iframe = "<h1>Custom Page!</h1>
Your browser does not support IFRAMEs.  You should get a better browser to see what you are missing!<br />
Check out Mozilla or Firefox, they are great!<br />";


// Print our title - or comment the line to not display a title
echo '<center><b>' . $cp_title . '</b></center><br />';
echo '<font size=1>' . $cp_desc . '</font><p />';

//////////////////////////////////////////////
//
// The rest of this you should leave as is
// unless you are overly industrious :)
//
//////////////////////////////////////////////
// globals for database vars
global $db_prefix;
// globals for user information
global $context, $user_info, $ID_MEMBER;

$cp_id = $ID_MEMBER;
$cp_admin = false;

// set up all our functions ahead of time
// function to create table if not already there
function CustomPageCreateTable($cp_tablename) {
// set up the query that will create the table appropriately
$dbquery = "CREATE table $cp_tablename (id INT UNSIGNED NOT NULL PRIMARY KEY,
url TEXT, public tinyint(1) NOT NULL default '0', selected_user INT UNSIGNED);";
if (!mysql_query($dbquery)) {
die("Query Failed!  Table NOT Created!<br />\n");
}
}

// function to modify table to add "public" and "selected_user" columns
function CustomPageModifyTable($cp_tablename) {
// set up the query that will modify the table appropriately
$dbquery = "ALTER TABLE $cp_tablename ADD (public tinyint(1) NOT NULL default '0', selected_user INT UNSIGNED);";
if (!mysql_query($dbquery)) {
if (mysql_errno() == 1060){
// just a double precaution as part of the NULL fix :)
} else {
die("Query Failed!  Table NOT Modified!<br />\n" . mysql_errno() . ": " . mysql_error());
}
}
}

// function to add/edit a user and their custom page to/in the table
function CustomPageAdd($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public=0) {
if ($cp_url != ''){
if (strtolower(substr($cp_url, 0, 7)) != "http://"){
$cp_url = "http://" . $cp_url;
}
}
// only add user if they do not already exist
$dbquery = "SELECT * FROM $cp_tablename
WHERE id = '" . $cp_id . "'";
$dbresult = mysql_query($dbquery);
if ($dbresult){
if ($row = mysql_fetch_assoc($dbresult)){
// if a row is found, then there's already this user in table, edit instead
CustomPageEdit($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public);
return;
}
}
$dbquery = 'INSERT INTO '.$cp_tablename.' VALUES ('.$cp_id.', "'.$cp_url.'", '.$cp_public.', '.$cp_selected_user.');';
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Inserted into database!<br />\n");
}
}

// function to edit a user's custom page in the table
function CustomPageEdit($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public=0) {
// start our dbquery
$dbquery = "UPDATE $cp_tablename ";
// if no URL supplied, don't edit the URL
if ($cp_url != ''){
// add HTTP:// if necessary at front of link to prevent BASE URL applying in front of link provided
if (strtolower(substr($cp_url, 0, 7)) != "http://"){
$cp_url = "http://" . $cp_url;
}
// since an url was entered, add it to the update
$dbquery .= 'SET url = "'.$cp_url.'", public = '.$cp_public.', selected_user = '.$cp_selected_user.'
WHERE id = '.$cp_id.';';
} else {
// update all but the URL
$dbquery .= "SET public = $cp_public, selected_user = $cp_selected_user
WHERE id = $cp_id;";
}
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Modified in database!<br />\n");
}
}

// function to delete Custom Page from the table
function CustomPageDel($cp_tablename, $cp_selected_user) {
// delete Custom Page with $cp_id
$dbquery = "DELETE FROM $cp_tablename WHERE id = $cp_selected_user;";
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Deleted from database!<br />\n");
}
}


///////////  MAIN CODE HERE  ////////////
// Admins are always allowed to create a custom page
if ($context['user']['is_admin']){
$cp_admin = 1;
}

// convert $_POST vars to prevent undefined index errors
$cp_save = empty($_POST['cp_save']) ? '' : $_POST['cp_save'];
$cp_del = empty($_POST['cp_del']) ? '' : $_POST['cp_del'];
$cp_urlbox = empty($_POST['cp_urlbox']) ? '' : $_POST['cp_urlbox'];
$cp_public = empty($_POST['cp_public']) ? 0 : $_POST['cp_public'];
$cp_selected_user = empty($_POST['cp_selected_user']) || (!$cp_allow_public && !$cp_admin) ? $ID_MEMBER : $_POST['cp_selected_user'];

// get our script url including parameters (like ?page=6)
$myself = $_SERVER['REQUEST_URL'];

// put the SMF table prefix in front of your tablename from above
$cp_tablename = $db_prefix . $cp_tablename;
// do same for SMF Members table
$smf_members_table = $db_prefix . 'members';


////////////////   Security Checks  ////////////////
// check if user is in a group that is allowed to set a custom page
$cp_allowed = array_intersect($cp_allowed_groups, $user_info['groups']);

// don't let guests set page - would set default for all guests if they did
// also check if user is in the disallow array
if ($context['user']['is_guest'] || @in_array($ID_MEMBER, $cp_disallowed_members)){
$cp_allowed = false;
}

// Admins are always allowed to create a custom page
if ($cp_admin){
$cp_allowed = 1;
}
//////////////////////////////////////////////

// if someone just clicked Save, post info to database
if (!empty($cp_save) && $cp_allowed){
// if the urlbox had info in it, trim it
if (!empty($cp_urlbox)){
$cp_urlbox = trim($cp_urlbox);
} else {
$cp_urlbox = '';
}
CustomPageAdd($cp_tablename, $cp_id, $cp_urlbox, $cp_selected_user, $cp_public);
}

// if someone just deleted a page, remove it from database
if ($cp_del && $cp_admin){
CustomPageDel($cp_tablename, $cp_del);
}

////////////  MAIN DISPLAY CODE HERE  ///////////////
// set query to select all data for all users
$dbquery = "SELECT * FROM $cp_tablename;";
$dbresult = mysql_query($dbquery);

if ($dbresult){
// table exists - does it need an upate?
$row = mysql_fetch_assoc($dbresult);
if (in_array("public", array_keys($row))){
// no update needed here!
mysql_data_seek($dbresult, 0);
} else {
// YES!  then create the columns!
mysql_free_result($dbquery);
CustomPageModifyTable($cp_tablename);
// re-query the modified table
$dbresult = mysql_query($dbquery);
if (!$dbresult){
die("Unexpected error: " . mysql_error());
}
}
} else {
// no result, is it because table doesn't exist?
if (mysql_errno() == 1146){
// table doesn't exist, create it!
CustomPageCreateTable($cp_tablename);
// get our result again
$dbresult = mysql_query($dbquery);
if (!$dbresult) die("Unexpected error: " . mysql_error());
} else {
die("Unexpected error: " . mysql_error());
}
}

$cp_page = '';
$cp_selected_user = $ID_MEMBER;
$cp_selected_page = '';
// cycle through all rows
while ($row = mysql_fetch_assoc($dbresult)){
// add to public pages array if they have set to public (but not ourselves)
// or if the current user is an admin
if (($row["public"] != 0 || $cp_admin) && $row["id"] != $ID_MEMBER){
$cp_public_pages[$row["id"]] = $row["url"];
}
// if our row, get our public status, url, and our selected user
if ($row["id"] == $ID_MEMBER){
$cp_public = $row["public"];
$cp_page = $row["url"];
$cp_urlbox = $cp_page;
$cp_selected_user = $row["selected_user"];
}
}
$cp_public == 0 ? $cp_checked = '' : $cp_checked = "CHECKED";

// free previous result set
mysql_free_result($dbresult);
// if there were some public pages in table, setup the public users array
if (!empty($cp_public_pages)){
$dbquery = "SELECT ID_MEMBER, memberName FROM $smf_members_table
WHERE ID_MEMBER IN (" . implode(",", array_keys($cp_public_pages)) . ");";
$dbresult = mysql_query($dbquery);
if (!$dbresult) die("Unexpected error: " . mysql_error());
$cp_public_users = array();
while ($row = mysql_fetch_assoc($dbresult)){
$cp_public_users[$row["ID_MEMBER"]] = $row["memberName"];
}
// free the result for good measure
mysql_free_result($dbresult);
}

// get our selected user's page
if (!empty($cp_public_pages) && @in_array($cp_selected_user, @array_keys($cp_public_pages))){
$cp_selected_page = $cp_public_pages[$cp_selected_user];
}
// if the selected page is null "" then select our own page if it not ""
if (empty($cp_selected_page)){
if (!empty($cp_page)){
$cp_selected_page = $cp_page;
} else {
$cp_display_default ? $cp_selected_page = $cp_default_page : $cp_selected_page = '';
}
}

// display the $cp_selected_page to the user
if (!empty($cp_selected_page)){
echo '<center><IFRAME NAME="CustomPage" ALIGN=middle SRC="' . $cp_selected_page . '" WIDTH=' . $cp_width . ' HEIGHT=' . $cp_height . '>
' . $cp_no_iframe . '
</IFRAME></center>';
} else {
if ($cp_display_default){
echo '<center><IFRAME id="CustomPageID" NAME="CustomPage" ALIGN=middle SRC="' . $cp_default_page . '" WIDTH=' . $cp_width . ' HEIGHT=' . $cp_height . '>
' . $cp_no_iframe . '
</IFRAME></center>';
} else {
echo '<br />' . $cp_default_text . '<p />';
}
}

// only show form if user is allowed to add/edit their custom page
if ($cp_allowed){
//////////////////////////////////////////////////////////////////
/////////////           Javascript area              /////////////
//////////////////////////////////////////////////////////////////
// write out our javascript stuff

echo '
<script type="text/javascript">
<!--
// create our main array first
var jarray = new Array(); // list of member ids from pull down
var jarray2 = new Array(); // public page user ids
var jarray3 = new Array(); // public page urls
var jarray4 = new Array(); // array of public page user ids => public page urls
jarray[0] = '.$ID_MEMBER.';
jarray4['.$ID_MEMBER.'] = "'.$cp_page.'";
';
if (!empty($cp_public_pages)){
// create a list of public page user ids
$cp_public_user_list = implode(",", array_keys($cp_public_users));
$cp_page_ids = implode(",", array_keys($cp_public_pages));
foreach($cp_public_pages AS $key => $value){
if (empty($cp_page_urls)){
$cp_page_urls = '"' . $value . '"';
} else {
$cp_page_urls .= ',"' . $value . '"';
}
}
echo '
jarray.push('.$cp_public_user_list.');
// if our javascript is huge, big bandwidth waster, save some bandwidth here
jarray2.push('.$cp_page_ids.');
jarray3.push('.$cp_page_urls.');
y = jarray2.length;
for (x=0;x<y;x++){
page_id = jarray2[x];
jarray4[page_id] = jarray3[x];
}
';
}
echo '
function selectedChanged(){
s_id = jarray[document.cp_form.cp_selected_user.selectedIndex];
s_url = jarray4[s_id];
window.frames.CustomPage.location.href = s_url;
}
//-->
</script>
';


// start our form and table
echo '
<p /><form name="cp_form" action="' . $myself . '" method=post>
<table width="100%" border=0>
<tr>
<td width="40%">My Custom Page info:</td>
<td width="10%"></td>
<td width="40%">Public Member Pages</td>
<td width="10%"></td>
</tr>
<tr>
<td width="40%">URL: <input type=text name=cp_urlbox size="50" value="' . $cp_urlbox . '" /></td>
<td width="10%"></td>
<td width="40%" align="left">
<select name=cp_selected_user onChange="selectedChanged()">';
if ($cp_selected_user == $ID_MEMBER){
echo '
<option value="'.$ID_MEMBER.'" SELECTED>' . $user_info["username"] . '</option>
';
} else {
echo '
<option value="'.$ID_MEMBER.'">' . $user_info["username"] . '</option>
';
}
if (!empty($cp_public_users)){
foreach ($cp_public_users as $key => $value){
echo '

';
if ($cp_selected_user == $key){
echo '
<option value="'.$key.'" SELECTED>' . $value . '</option>
';
} else {
echo '
<option value="'.$key.'">' . $value . '</option>
';
}
}
}
echo '
</select>
</td>
<td width="10%"></td>
</tr>
<tr>
<td width="40%"><label><input type=checkbox name=cp_public value="1" ' . $cp_checked . ' />Make my page public</label></td>
<td width="10%"></td>
<td width="40%"></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="4" align="center"><input type=submit name=cp_save value="Save" /></td>
</tr>
</table>
</form>
';
}
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 07:54:50 PM
Anlatımlar bana aittir bloclar ingilizce bölümden alınmıştır
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 28, 2007, 10:20:17 PM
arkadaşınızı davet etmek (davetiye yollamak)


global $sourcedir, $user_info, $context, $settings ;

require_once($sourcedir . '/Subs.php');
require_once($sourcedir .'/Subs-Post.php');


///////////////////////////
// CONFIGURATION SECTION //
///////////////////////////


//Website address
$website_address= 'http://www.sanalworld.net';

//Admin email address
$admin_email_address= 'adminemail@yours.com';

//article to be redirected when form is submitted
$thank_you_article_id = '6';


/////////////////////////////////
//END OF CONFIGURATION SECTION //
/////////////////////////////////


$email_address= $_POST['fmail'];

$show_form= 'true';
if (isset($_POST['submitted'])) {
// Handle the form

// email the form

$subject = ' Arkadasiniz Sizi Davet Ediyor' . $_POST['real_name'] . '';
$body =
'Merhaba ' . $_POST['fname'] . '

' . $_POST['real_name'] . ' sizi kendi web sitesine davet ediyor ' . $website_address . '
Arkadasinin Mesaji
"' . $_POST['message'] . '"


Uye olmak icin linke tiklayiniz  http://www.sanalworld.net/index.php?action=register';



mail($email_address, $subject, $body,"From: " . $_POST['email']);

// Redirect to thank you page
header('Location: http://' . $_SERVER['HTTP_HOST'] .'/index.php?page=' . $thank_you_article_id);

}

//else { // Display the form
echo '
<br /><center>Arkadaşını Davet Et</center><hr>';
echo '
<form action="index.php?page='  . $this_article_id  . '" method="post">
        <INPUT id="submitted" name="submitted" type="hidden" value="TRUE" />
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0">
<TR class ="windowbg">
<TD width = "180px">Nick:<br />
<INPUT id="real_name" name="real_name" type="text" value ="';
if (isset($_POST['real_name'])) echo $_POST['real_name'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "180px">Email Adresin:<br />
<INPUT id="email" name="email" type="text" value ="';
if (isset($_POST['email'])) echo $_POST['email']; else echo $user_info['email']; 
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "180px">Arkadaşının Nicki:<br />
<INPUT id="fname" name="fname" type="text" value ="';
if (isset($_POST['fname'])) echo $_POST['fname'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "180px">Arkadaşının Email Adresi:<br />
<INPUT id="fmail" name="fmail" type="text" value ="';
if (isset($_POST['fmail'])) echo $_POST['fmail'];   
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "180px">Mesajın<br />
<TEXTAREA id="message" name = "message" rows="4" cols="20" value ="';
if (isset($_POST['message'])) echo $_POST['message'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD colspan="2" align="center">
<INPUT type="submit" value="Gönder">
<INPUT type="reset" value="Alanı Temizle"></TD>
</TR>
</TABLE>
</form>

';

Türkçeleştirmesini ben yaptım siz istiyorsanız kendinize değiştirin
sanalworld.net yazılı bir kaç yer var onları değiştirmeyi unutmayın
demo için: www.sanalworld.net i ziyaret edin
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 29, 2007, 05:41:15 PM
kontrol paneli

dosyaları klasorden çıkartıp ana dizine atın
http://rapidshare.com/files/73144275/kontrolpaneli.rar
ekran görüntüsü
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.resim-yukle.com%2Fimg01%2F14%2F232211jhg.JPG&hash=439f896cde1f84c34fbd577939d6a29e461fd541)

resimlerin üzerine tıklandığında açıklamalar geliyor.onları türkçe ye çevirip indireceğiniz dosyanın içinde.
--------
php box oluşturup kodları kopyalayın.

echo'
<head>
<SCRIPT language="JavaScript1.2" src="main.js" type="text/javascript"></SCRIPT>
</head>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="style.js" type="text/javascript"></SCRIPT>           
<div align="center"><table border="0" width="100%" style="border-collapse: collapse"><tr><td width="50%">
<table border="1" cellspacing="0" style="border-collapse: collapse">
<tr>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=account" onMouseOver="stm(Text[1],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/ksysguard.png"></a></font></td>


<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=forumProfile" onMouseOver="stm(Text[4],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kuser.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=statPanel" onMouseOver="stm(Text[5],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kwalletmanager.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=showPosts" onMouseOver="stm(Text[6],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kedit.png"></a></font></td>
<td align="center"valign="top">
</tr>
<tr>

<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=notification" onMouseOver="stm(Text[7],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mailreminder.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=editBuddies" onMouseOver="stm(Text[8],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kdmconfig.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=pmprefs" onMouseOver="stm(Text[9],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mail.png"></a></font></td>
<td align="center"valign="top">
<a href="', $scripturl, '?action=search" onMouseOver="stm(Text[11],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/find.png"></a></td>

</tr>
</table></td></tr></table></div>
';


ingilizce bölümden alınmıştır kodlar türkçeye çeviri ve anlatım bana aittir
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: cakal93 on November 29, 2007, 09:18:05 PM
Quote from: alp on November 28, 2007, 07:52:33 PM
Accordion Style Menu Block  (deÄŸiÅŸik menuler)
bunu uyguladığınızda menuleriniz daha değişik bir stilde oluşacak


ana dizine atın (index.php olduğu yere)
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz

Themes/<kendi teman>/index.template.php
bul

</head>

önüne ekle

<script type="text/javascript" src="mootools-accordion.js"></script>

<script type="text/javascript">
window.onload = function() {
var accordion = new Accordion(\'h3.atStart\', \'div.atStart\', {
opacity: false,
onActive: function(toggler, element){
toggler.setStyle(\'color\', \'#ff3300\');
},

onBackground: function(toggler, element){
toggler.setStyle(\'color\', \'#222\');
}
}, $(\'accordion\'));

}
</script>


Themes/senin teman/style.css

en baÅŸa ekle
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>

color: #222;
margin: 0;
padding: 2px 5px;
background: #eee;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-top: 1px solid #f5f5f5;
border-left: 1px solid #f5f5f5;
font-size: 11px;
font-weight: normal;
font-family: 'Andale Mono', sans-serif;
}

.element {

}

.element p {
margin: 0;
padding: 4px;
}

.float-right {
padding:10px 20px;
float:right;
}

blockquote {
padding:5px 0 5px 30px;
}

/* END! Accordion Style Menu Block */



script box oluştur içine kopyala
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>


kendinize göre editlemeyi unutmayın
<h3 class="toggler atStart">Test 1</h3>
<div class="element atStart">
This is a Test 1, if you want to know why, Don't ask me, This is not my fault, Hey after all this Is a test! :P
</div>


ana dizine atın
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>
Bu kodlarin style.css'de oldugundan emin misin?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on November 30, 2007, 10:22:28 AM
orada ufak bir hata olmuÅŸ
bu kısım style css de en başa eklenecek

/* Accordion Style Menu Block */
.toggler {
color: #222;
margin: 0;
padding: 2px 5px;
background: #eee;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-top: 1px solid #f5f5f5;
border-left: 1px solid #f5f5f5;
font-size: 11px;
font-weight: normal;
font-family: 'Andale Mono', sans-serif;
}

.element {

}

.element p {
margin: 0;
padding: 4px;
}

.float-right {
padding:10px 20px;
float:right;
}

blockquote {
padding:5px 0 5px 30px;
}

/* END! Accordion Style Menu Block */
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: cakal93 on November 30, 2007, 04:02:58 PM
Tamamdir tesekkürler ;)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on December 02, 2007, 12:04:04 AM
Quote from: alp on November 28, 2007, 07:51:28 PM
   
md5 block

bu blok herhangi br kelime yada şifre ekliyorsunuz gönder butonuna tıkladığınızda , girmiş olduğunuz karakterleri md5 e çevirip geri veriyor olay bu ve md5 de tahmininiz üzere bir şifreleme olayı oluyor

php box oluştur içine kopyala
echo ' <center>';

$sifre = strip_tags($_POST['sifre']);
$sifrele = md5($sifre);

if (empty($sifre)) {
echo '
md5 e çevirmek istediğiniz karakterleri giriniz<br><br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}
else{
echo ' md5 e çevirmek istediğiniz sifreniz <b><font size="4" color="#FF0000">'.$sifre.'</font></b><br>';
echo '<br> md5 e çevilirmiş hali : <br><b><font size="4" color="#FF0000">'.$sifrele.'</font></b>';
echo '
<br><br>Tekrar Çevir <br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}


Alp yardımcı olmaya çalışıyorsun iyi hoÅŸ güzelde  bu kodu nereden aldığınıda yazsaydın
yada kodu yazanın ismini
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on December 02, 2007, 08:22:06 AM
Quote from: alp on November 28, 2007, 07:54:50 PM
Anlatımlar bana aittir bloclar ingilizce bölümden alınmıştır
burada demiştim yalnız o md5 bloc ingilizce bölümünden almadığımı hatırlıyorum ama nerden ve kimin yazdığını bilmiyorum.sen söyle bilelim
----------------------------------------------------------------
birde şimdiden söyleyeyim buradaki kodları ben yazmadım yazanlara teşekkür ederiz amacım sadece tp kullanan sitelerin daha zengin blokları olması,bunları ben yaptım hiç bir zaman hiç bir yerde demedim.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on December 02, 2007, 03:41:32 PM
şimdi o okodu şu yazdı bu yazdı demek anlamsızlık olur
ama nasıl yazıldıysa o şekilde alınmış ve past yapılmış kodun altındada ufak bir eetiket vardı onuda kaldırmışlar işte bu yüzdenbiraz canım sıkıldı

bunu sen aldındında diyemem çünki bir kaç yerde daha rastladım yazılan kodlarda paylaşım yaparken bu şekide olan hareketler kod yazarlarınıda paylaşımdan uzaklaştırıyor
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on December 22, 2007, 02:49:39 PM
Tiny portal geliÅŸmiÅŸ chat bloÄŸu

php bloc oluşturup kodu kopyalayın

$chatuser=$context["user"]["name"];

echo "<input  type=\"hidden\" id=\"chatnick\" name=\"chatnick\" value=\"$chatuser\">";

echo "<table border=\"0\" width=\"100%\" cellpadding=\"0\"  cellspacing=\"0\"><tr><td width=\"99%\"><input id=\"chatmsg\" name=\"chatmsg\" type=\"text\" style=\"width:99%\" onkeyup=\"keyup(event.keyCode);\"></td><td width=\"1%\"><input type=\"button\" value=\"Chat\" onclick=\"submit_msg();\"></td></tr></table>";

echo "<div id=\"chatwindow\" style=\"margin-top:3px; width:100%; height:150px; overflow:scroll; border: 1px none #000000; background-color: #000000; layer-background-color: #8B0000;\"></div>";

echo "<script type=\"text/javascript\" src=\"http://siteniz.com/chat.js\"></script>";



siteniz.com yazan yeri kendinize göre değiştirin

http://rapidshare.com/files/78321640/ajax_chat.zip
inidirn klasorden çıkarttıp ana dizine atın

demo için: http://www.mekanturkiye.com/forum/index.php
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: MazdaClubTR on January 25, 2008, 01:20:41 PM
Kendi sitem için ararken şu şekilde kodlar buldum sol veya sağ blok için ideal görünüyor.

Detaylı bilgileri http://www.meteoroloji.gov.tr/2006/meteor/linkicin.aspx?set=a1 den alabilirsiniz

3 ilin anlık hava durumu ( Preview da yan yana görünüyor ama sayfada düzgün görünüyor )


<img width="150" height="50" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgdurumgor-c1-g.aspx?merkez=ISTANBUL&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" /> <img width="150" height="50" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgdurumgor-c1-g.aspx?merkez=ANKARA&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" /> <img width="150" height="50" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgdurumgor-c1-g.aspx?merkez=IZMIR&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" />


3 ilin 3 günlük hava durumu

<span style="font-weight: bold; color: rgb(0, 0, 0); font-family: Tahoma;">ANKARA</span><span style="font-weight: bold; color: rgb(0, 0, 0);"> </span><img width="162" height="54" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgtahmingor-b1-g.aspx?merkez=ANKARA&amp;gun=T&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" /><span style="font-family: Tahoma;"> </span>
<span style="font-weight: bold; color: rgb(0, 0, 0); font-family: Tahoma;">Ä°STANBUL</span> <img width="162" height="54" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgtahmingor-b1-g.aspx?merkez=ISTANBUL&amp;gun=T&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" />
<span style="color: rgb(0, 0, 0);"> </span><span style="font-weight: bold; color: rgb(0, 0, 255);"><span style="font-family: Tahoma; color: rgb(0, 0, 0);">Ä°ZMÄ°R</span> <img width="162" height="54" alt="" src="http://www.meteoroloji.gov.tr/sunum/imgtahmingor-b1-g.aspx?merkez=IZMIR&amp;gun=T&amp;renkC=111&amp;renkT=000&amp;renkZ=fff" /> </span>
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Shadow1243 on January 29, 2008, 05:14:00 PM
bu blokları nasıl ekliyoruz ?
örnek verirmisiniz ?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on January 29, 2008, 06:34:02 PM
MazdaClubTR verdiği bloklar sanırım html box da olacak
Quote from: Shadow1243 on January 29, 2008, 05:14:00 PM
bu blokları nasıl ekliyoruz ?
örnek verirmisiniz ?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: MazdaClubTR on January 29, 2008, 08:39:06 PM
Evet html/bbc box..
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Shadow1243 on January 29, 2008, 08:43:36 PM
arkadaşlar bende "html/bbc box" şeklinde ekleyince sadece kodlar gözüküyor,
bende mecburen phpbox' olarak yükleyip kaydediyorum,sonra onu düzenleme seçeneğinden html/bbc box seçiyorum

sorun nerde acaba?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: MazdaClubTR on January 29, 2008, 09:26:11 PM
Editor de Kaynak'a basıp öyle yapıştırmayı denedin mi ? Ben de ilk yaptığımda karıştırmıştım..
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Shadow1243 on January 29, 2008, 09:43:11 PM
evet denedim,yinede kodlar çıkıyordu
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Shadow1243 on January 29, 2008, 11:13:17 PM
Quote from: solskajer on May 01, 2006, 02:17:11 PM
Arkadaşlar forumda Çok aradım Arcade blok ve sonunda tam istediğim gibi bişi buldum paylaşmak istedim portalında arcade bölümü olan arkadaşlar iÇin güzelbi skor bloğu.Aşağıdaki codları php blok iÇine gömdün ve resimleri temanın image klasörüne atın işlem tamam kolay gelsin.. :smiley6600:

Demo: www.trakyaforum.com (http://www.trakyaforum.com)

global $scripturl;
/*
|----------------------------------
      SMF ARCADE CHAMPS BLOCK
      by Eric Lawson
|----------------------------------
      Made for

      TinyPortal
      SMF SMF forum 1.1RC1/RC2
      SMF Arcade_1.2.4b (1.2.4 should be ok :) )
      And Works with Beta Arcade


*/


//Upload the arcade_block.gif (you can use you own gif - just name it arcade_block.gif)
//to your Themes/<themename>/images/ folder

// -- SETUP EDITS ---

$db_prefix = 'smf_'; //edit this to your your database prefix - usually smf_
$no = 10; //number of top players to show

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language

require('./Settings.php');


$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);

// --START BLOCK CODE --
$content = "";  //set blank for a start

//Get newest champ or die
$sql = "SELECT m.ID_MEMBER,m.realName,g.id, g.game, g.name,g.champion_score "
. "FROM {$db_prefix}members m , {$db_prefix}games g "
. "WHERE g.champion_score > 0 AND m.ID_MEMBER=g.champion_member "
. "ORDER BY g.champion_time DESC LIMIT 0,1";

if(!($result = mysql_query($sql,$link)))
{
die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id'];
$game_name = $row['name'];
$score = $row['champion_score'];

//now get the pic for the game
$ext = array('gif','GIF','png','PNG','jpg','JPG',);
$game_pic = ""; // No thumbnail for default
foreach($ext as $ex)
{
if(file_exists($boarddir. "/Games/".$row['game'].".".$ex))
{
$game_pic = $boardurl."/Games/".$row['game'].".".$ex;
}
}


//Get the 10 best players or die
$sql = "SELECT m.ID_MEMBER, m.realName, count(g.id) As cnt"
. " FROM {$db_prefix}games g, {$db_prefix}members m"
. " WHERE m.ID_MEMBER=g.champion_member"
. " GROUP BY realName "
. " ORDER BY cnt DESC LIMIT 0,{$no}";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
die("Could not get the best players");
}

$row = mysql_fetch_assoc($result);

$score_poss=0; //players position

//make the block content
$content .= "<table width=\"100%\" ><tr>
<td align=\"center\">
<br />
<a href=\"{$scripturl}?action=arcade\"><img src=\"{$settings['images_url']}/arcade_block.gif\" border= \"0\" alt=\"Arcade\" /></a>
<br /><br />
</td>
</tr>";

$content .= "
<tr>
<td>
<marquee behavior='scroll' align='center' direction='up' height='160' scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>
<br />
<div align=\"center\"><a href=\"{$scripturl}?action=arcade;sa=play;game={$game_id}\"><img src=\"{$game_pic}\" border= \"0\" /></a>
<br />{$txtlate}<br />
<a href=\"{$scripturl}?action=profile;u=$playerid\">{$player}</a><br />{$txtwit} {$score} {$txton} {$game_name}
<br />------------------<br />{$txtplay}
<br /><br /> ";
do
{
$score_poss++;
$content .= "
$score_poss -
<a href=\"{$scripturl}?action=profile;u=".$row['ID_MEMBER']."\"> ".$row['realName']."</a>
<br /> $txtwin ".$row['cnt']."
<br /><br />";
}  while ($row = mysql_fetch_assoc($result));

mysql_free_result($result);
$content .= "</marquee></div></td></tr></table>" ;

echo $content;





arkadaşım resimleri nereye attın,mesajında resim filan göremiyorum :)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Shadow1243 on January 29, 2008, 11:30:59 PM
Quote from: alp on November 29, 2007, 05:41:15 PM
kontrol paneli

dosyaları klasorden çıkartıp ana dizine atın
http://rapidshare.com/files/73144275/kontrolpaneli.rar
ekran görüntüsü
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.resim-yukle.com%2Fimg01%2F14%2F232211jhg.JPG&hash=439f896cde1f84c34fbd577939d6a29e461fd541)

resimlerin üzerine tıklandığında açıklamalar geliyor.onları türkçe ye çevirip indireceğiniz dosyanın içinde.
--------
php box oluşturup kodları kopyalayın.

echo'
<head>
<SCRIPT language="JavaScript1.2" src="main.js" type="text/javascript"></SCRIPT>
</head>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="style.js" type="text/javascript"></SCRIPT>           
<div align="center"><table border="0" width="100%" style="border-collapse: collapse"><tr><td width="50%">
<table border="1" cellspacing="0" style="border-collapse: collapse">
<tr>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=account" onMouseOver="stm(Text[1],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/ksysguard.png"></a></font></td>


<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=forumProfile" onMouseOver="stm(Text[4],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kuser.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=statPanel" onMouseOver="stm(Text[5],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kwalletmanager.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=showPosts" onMouseOver="stm(Text[6],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kedit.png"></a></font></td>
<td align="center"valign="top">
</tr>
<tr>

<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=notification" onMouseOver="stm(Text[7],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mailreminder.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=editBuddies" onMouseOver="stm(Text[8],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kdmconfig.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=pmprefs" onMouseOver="stm(Text[9],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mail.png"></a></font></td>
<td align="center"valign="top">
<a href="', $scripturl, '?action=search" onMouseOver="stm(Text[11],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/find.png"></a></td>

</tr>
</table></td></tr></table></div>
';


ingilizce bölümden alınmıştır kodlar türkçeye çeviri ve anlatım bana aittir

kardeş bunu nasıl ortalarız,resimleri küçülttüm ve sola kaydı, center kodlarını nereye koymam gerek ?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: abzoker on January 30, 2008, 11:07:14 PM
Benim bi isteğim olcaktı
Son bi haftada en çok konu açanları göstercek bi block yapabilirmisiniz acaba
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: GladYatoR on January 31, 2008, 10:57:59 AM
Quote from: abzoker on January 30, 2008, 11:07:14 PM
Benim bi isteğim olcaktı
Son bi haftada en çok konu açanları göstercek bi block yapabilirmisiniz acaba

aradığın konu bu başlık altında var
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: abzoker on January 31, 2008, 03:26:08 PM
en çok mesaj gönderenlar var
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Taylan on February 08, 2008, 08:13:17 AM
Quote from: alp on November 27, 2007, 06:38:11 PM
buyrun herkesin istediÄŸi forumdan son konular:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.resim-yukle.com%2Fimg01%2F14%2F237096demeo.JPG&hash=6e1011ecb8d06113d21ada8346e2d0b269d62c64)

global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings, $user_profile;

//////////////////////////////////////////// ---------- Unconditional Exclude
//
$exclude_boards = array(); // KEEP (to preserve variable declaration)
// $exclude_boards = array(5); //  Exclude single board
// $exclude_boards = array(5, 8); //  Exclude multiple boards
$ex_board_clause = !empty($exclude_boards) ? ' AND b.ID_BOARD NOT IN (' . implode(', ', $exclude_boards) . ')' : '';
//
//

//////////////////////////////////////////// ---------- Use in TP PHP Article (no title or frame from theme)
// This will give most recent XX posted to topics -OR-
// most recent XX unreplied to topics -OR-
// topics posted to in last XX hours -OR-
// most recent XX topics on topic notify list
//
// Sorts by most recent reply (descending; most recent first) -OR-
//          creation order (descending; most recent first)
//
// All in the detailed topic format
//
//
// Default
// index.php?page=##
// most recent posted to topics - will list
// number equal to  $settings['number_recent_posts']
//
// index.php?page=##;count=50 or index.php?page=##;type=last;count=50
// 50 most recently posted to topics
//
// index.php?page=##;type=unreplied or index.php?page=##;type=unreplied;count=50
// Most recent unreplied to topics - will
// list number specified in 'count' or default to
// number equal to  $settings['number_recent_posts']
//
// index.php?page=##;type=hours or index.php?page=##;type=hours;count=12
// Topics posted to in last number of hours
// specified in 'count' or default to 24.
//
// index.php?page=##;type=notify or index.php?page=##;type=notify;count=50
// Topics in topic notifcation list up to number
// specified in 'count' or a maximum of 100 topics.
//
// *** Admins Only ***
// index.php?page=##;type=notify;user=XXX or index.php?page=##;type=notify;user=XXX;count=50
// Topics in topic notifcation list of specified user up to number
// specified in 'count' or a maximum of 100 topics.
//
// index.php?page=##;type=started or index.php?page=##;type=started;count=50
// Topics started by current user list up to number
// specified in 'count' or a maximum of 100 topics.
//
// *** Admins Only ***
// index.php?page=##;type=notify;user=XXX or index.php?page=##;type=started;user=XXX;count=50
// Topics started by specified user up to number
// specified in 'count' or a maximum of 100 topics.
//
// Add argument order=create to sort by topic creation sequence (most recent first)
// rather than by last reply sequence

$do_query = 1;

//////////////////////////////////////////// ---------- Poor Man's Global Announcements Block (center block - no Title/Frame)
// Delete documentation comments above and marked section below
//
// $announce_topics = array(254, 568, 675, 678); // Topic ID's to be 'Announced'
//
// $heading = '<center>Announcements<center>';
// $where_clause = 't.ID_TOPIC IN (' . implode(', ', $announce_topics) . ')';
// $limit_clause = '';
// $order_clause = 't.ID_LAST_MSG DESC';
////////////////////////////////////////////   

//////////////////////////////////////////// ---------- Last 5 Topics Started by User Block (center block - no Title/Frame)
// Delete documentation comments above and marked section below
//
// $heading = 'Most Recent Topics You Started';
// $where_clause = 'ms.ID_MEMBER = '.$ID_MEMBER;
// $limit_clause = 'LIMIT 5';
// $order_clause = 't.ID_FIRST_MSG DESC';
////////////////////////////////////////////   

//////////////////////////////////////////// ---------- Boardindex Most Recent Topics Arguments
//
// Comment out the Info Center's Most Recent Posts Code and Insert this
// to show Most Recent Topics in full detail style instead
//
// $list_count = $settings['number_recent_posts'];
// $where_clause = 't.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 50 * min($list_count, 5));
// $limit_clause = 'LIMIT ' . $list_count;
// $order_clause = 't.ID_LAST_MSG DESC';
////////////////////////////////////////////   

////////////////////////////////////////////  ------ Remove down to next mark to use in block/boardindex ------
//
if (empty($settings['number_recent_posts']))
$number_recent_posts = 20;
else
$number_recent_posts = $settings['number_recent_posts'];

        if( isset($_GET['type']) )
$list_type = $_GET['type'];
else
$list_type = 'last';

        if( isset($_GET['count']) )
$list_count = $_GET['count'];
else
{
$list_count = $number_recent_posts;
if ($list_type == 'notify')
$list_count = 100;
elseif ($list_type == 'hours')
$list_count = 24;
}

if ($list_count <= 0)
{
$list_count = $number_recent_posts;
if ($list_type == 'hours')
$list_count = 24;
}

if ($list_count > 100)
$list_count = 100;

        if( isset($_GET['order']) )
$list_order = $_GET['order'];
else
$list_order = 'lastpost';

        if( $list_order == 'create' )
$order_clause = 't.ID_FIRST_MSG DESC';
else
$order_clause = 't.ID_LAST_MSG DESC';

if ($list_type == 'hours')
{
$list_from = strtotime($list_count.' hours ago');
$where_clause = 'ml.posterTime >= ' . $list_from;
$limit_clause = ' ';
$heading = 'Topics Posted To In Last '. $list_count . ' Hours';
}
elseif ($list_type == 'unreplied')
{
$where_clause = 't.numReplies = 0';
if ($list_count == 0)
{
$limit_clause = ' ';
$heading = 'Unreplied To Topics';
}
else
{
$limit_clause = 'LIMIT ' . $list_count;
$heading = $list_count . ' Most Recent Unreplied To Topics';
}
}
elseif ($list_type == 'notify')
{
if (isset($_GET['user']) && $user_info['is_admin'])
{
$watched_topics = array();
$request = db_query("SELECT ID_TOPIC FROM {$db_prefix}log_notify WHERE ID_MEMBER = {$_GET['user']} AND ID_BOARD = 0", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$watched_topics[] = $row['ID_TOPIC'];
mysql_free_result($request);
$heading = $list_count . ' Most Recent Topics Being Watched by User # '.$_GET['user'];
$where_clause = 't.ID_TOPIC IN (' . implode(', ', $watched_topics) . ')';
$limit_clause = 'LIMIT ' . $list_count;
if (empty($watched_topics))
$do_query = 0;
}
else
{
$watched_topics = array();
$request = db_query("SELECT ID_TOPIC FROM {$db_prefix}log_notify WHERE ID_MEMBER = {$ID_MEMBER} AND ID_BOARD = 0", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$watched_topics[] = $row['ID_TOPIC'];
mysql_free_result($request);
$heading = $list_count . ' Most Recent Topics Being Watched';
$where_clause = 't.ID_TOPIC IN (' . implode(', ', $watched_topics) . ')';
$limit_clause = 'LIMIT ' . $list_count;
if (empty($watched_topics))
$do_query = 0;
}
}
elseif ($list_type == 'started')
{
if (isset($_GET['user']) && $user_info['is_admin'])
{
$where_clause = 'ms.ID_MEMBER = '.$_GET['user'];
$limit_clause = 'LIMIT ' . $list_count;
        if( $list_order == 'create' )
{
$order_clause = 't.ID_FIRST_MSG DESC';
$heading = 'Most Recent Topics Started by User '.$_GET['user'];
}
else
{
$order_clause = 't.ID_LAST_MSG DESC';
$heading = 'Most Recently Posted To Topics Started by User '.$_GET['user'];
}
}
else
{
$where_clause = 'ms.ID_MEMBER = '.$ID_MEMBER;
$limit_clause = 'LIMIT ' . $list_count;
        if( $list_order == 'create' )
{
$order_clause = 't.ID_FIRST_MSG DESC';
$heading = 'Most Recent Topics You Started';
}
else
{
$order_clause = 't.ID_LAST_MSG DESC';
$heading = 'Most Recently Posted To Topics You Started';
}
}
}
else
{
$where_clause = 't.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 90 * min($list_count, 5));
$limit_clause = 'LIMIT ' . $list_count;

}
//
////////////////////////////////////////////  ------ Remove up to first mark to use in block/boardindex ------

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

$groupcolors = array();
$request = db_query("SELECT ID_GROUP, onlineColor FROM {$db_prefix}membergroups", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$groupcolors[$row['ID_GROUP']] = $row['onlineColor'];
mysql_free_result($request);

$topics = array();

if ($do_query == 1)
{
$request = db_query("
SELECT
ms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname,
t.numReplies, t.numViews, ms.ID_MEMBER AS ID_FIRST_MEMBER, ml.ID_MEMBER AS ID_LAST_MEMBER,
ml.posterTime AS lastPosterTime, IFNULL(mems.realName, ms.posterName) AS firstPosterName,
IFNULL(meml.realName, ml.posterName) AS lastPosterName,
mems.ID_GROUP as mems_group, meml.ID_GROUP as meml_group,
ml.subject AS lastSubject, b.memberGroups,
ml.icon AS lastIcon, ms.icon AS firstIcon, t.ID_POLL, t.isSticky, t.locked, ml.modifiedTime AS lastModifiedTime,
LEFT(ml.body, 384) AS lastBody, LEFT(ms.body, 384) AS firstBody,
ml.smileysEnabled AS lastSmileys, ms.smileysEnabled AS firstSmileys, t.ID_FIRST_MSG, t.ID_LAST_MSG,"
. ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= ml.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . "
FROM ({$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER)
LEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER)
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)
WHERE " . $where_clause . $ex_board_clause . "
AND t.ID_TOPIC = ms.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND ms.ID_MSG = t.ID_FIRST_MSG
AND ml.ID_MSG = t.ID_LAST_MSG
AND " . $user_info['query_see_board'] . "
ORDER BY " . $order_clause . " " . $limit_clause, __FILE__, __LINE__);


$topic_ids = array();
while ($row = mysql_fetch_assoc($request))
{
if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
continue;

$topic_ids[] = $row['ID_TOPIC'];

// Clip the strings first because censoring is slow :/. (for some reason?)
$row['firstBody'] = strip_tags(strtr(parse_bbc($row['firstBody'], $row['firstSmileys'], $row['ID_FIRST_MSG']), array('<br />' => '
')));
if (strlen($row['firstBody']) > 128)
$row['firstBody'] = substr($row['firstBody'], 0, 128) . '...';
$row['lastBody'] = strip_tags(strtr(parse_bbc($row['lastBody'], $row['lastSmileys'], $row['ID_LAST_MSG']), array('<br />' => '
')));
if (strlen($row['lastBody']) > 128)
$row['lastBody'] = substr($row['lastBody'], 0, 128) . '...';

$row['lastSubject'] = $row['firstSubject'];
$row['lastBody'] = $row['firstBody'];

// Decide how many pages the topic should have.
$topic_length = $row['numReplies'] + 1;
if ($topic_length > $modSettings['defaultMaxMessages'])
{
$tmppages = array();
$tmpa = 1;
for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages'])
{
$tmppages[] = '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.' . $tmpb . ';topicseen">' . $tmpa . '</a>';
$tmpa++;
}
// Show links to all the pages?
if (count($tmppages) <= 5)
$pages = 'Ã,« ' . implode(' ', $tmppages);
// Or skip a few?
else
$pages = '« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1];

if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
$pages .= '  <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;all">' . $txt[190] . '</a>';
$pages .= ' »';
}
else
$pages = '';

// We need to check the topic icons exist... you can never be too sure!
if (empty($modSettings['messageIconChecks_disable']))
{
// First icon first... as you'd expect.
if (!isset($icon_sources[$row['firstIcon']]))
$icon_sources[$row['firstIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['firstIcon'] . '.gif') ? 'images_url' : 'default_images_url';
// Last icon... last... duh.
if (!isset($icon_sources[$row['lastIcon']]))
$icon_sources[$row['lastIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['lastIcon'] . '.gif') ? 'images_url' : 'default_images_url';
}

$color_start = !empty($groupcolors[$row['mems_group']]) ? $groupcolors[$row['mems_group']] : '';
$color_last = !empty($groupcolors[$row['meml_group']]) ? $groupcolors[$row['meml_group']] : '';

// And build the array.
$topics[$row['ID_TOPIC']] = array(
'id' => $row['ID_TOPIC'],
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'name' => $row['firstPosterName'],
'id' => $row['ID_FIRST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],
'link' => !empty($row['ID_FIRST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstPosterName'] . '">' . '<font color="' . $color_start . '">' . $row['firstPosterName'] . '</font>' . '</a>' : $row['firstPosterName']
),
'time' => timeformat($row['firstPosterTime']),
'timestamp' => forum_time(true, $row['firstPosterTime']),
'subject' => $row['firstSubject'],
'preview' => $row['firstBody'],
'icon' => $row['firstIcon'],
'icon_url' => $settings[$icon_sources[$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen">' . $row['firstSubject'] . '</a>'
),
'last_post' => array(
'id' => $row['ID_LAST_MSG'],
'member' => array(
'name' => $row['lastPosterName'],
'id' => $row['ID_LAST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'],
'link' => !empty($row['ID_LAST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'] . '">' . '<font color="' . $color_last . '">' . $row['lastPosterName'] . '</font>' . '</a>' : $row['lastPosterName']
),
'time' => timeformat($row['lastPosterTime']),
'timestamp' => forum_time(true, $row['lastPosterTime']),
'subject' => $row['lastSubject'],
'preview' => $row['lastBody'],
'icon' => $row['lastIcon'],
'icon_url' => $settings[$icon_sources[$row['lastIcon']]] . '/post/' . $row['lastIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'] . '">' . $row['lastSubject'] . '</a>'
),
'new' => $row['isRead'],
'new_from' => $row['new_from'],
'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['new_from'] . ';topicseen#new',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen' . ($row['numReplies'] == 0 ? '' : 'new'),
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen#msg' . $row['new_from'] . '">' . $row['firstSubject'] . '</a>',
'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']),
'is_locked' => !empty($row['locked']),
'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0,
'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'],
'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'],
'is_posted_in' => false,
'icon' => $row['firstIcon'],
'icon_url' => $settings[$icon_sources[$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'subject' => $row['firstSubject'],
'pages' => $pages,
'replies' => $row['numReplies'],
'views' => $row['numViews'],
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bname'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bname'] . '</a>'
)
);

determineTopicClass($topics[$row['ID_TOPIC']]);
}
mysql_free_result($request);

if (!empty($modSettings['enableParticipation']) && !empty($topic_ids))
{
$result = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}messages
WHERE ID_TOPIC IN (" . implode(', ', $topic_ids) . ")
AND ID_MEMBER = $ID_MEMBER", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($result))
{
if (empty($topics[$row['ID_TOPIC']]['is_posted_in']))
{
$topics[$row['ID_TOPIC']]['is_posted_in'] = true;
$topics[$row['ID_TOPIC']]['class'] = 'my_' . $topics[$row['ID_TOPIC']]['class'];
}
}
mysql_free_result($result);
}

}

if (!empty($topics))
    {
    echo '
        <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;margin:0px;"' : 'style="margin:0px;"', '>
            <table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor">
                <tr>';

    echo '
                    <td class="titlebg" colspan="7">', $heading, '</td>';
    echo '
                </tr>';

    echo '
<tr class="titlebg">
<td width="10%" colspan="2"> </td>
<td>', $txt[70], '
</td><td width="14%">', $txt[109], '
</td><td width="4%" align="center">', $txt[110], '
</td><td width="4%" align="center">', $txt[301], '
</td><td width="24%">', $txt[111], '
</td>
</tr>';

foreach ($topics as $topic)
{
// Do we want to seperate the sticky and lock status out?
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));

echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="6%">
<img src="' . $settings['images_url'] . '/topic/' . $topic['class'] . '.gif" alt="" />
</td><td class="windowbg2" valign="middle" align="center" width="4%">
<img src="' . $topic['first_post']['icon_url'] . '" alt="" align="middle" />
</td><td class="windowbg' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '
<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'];
if ($topic['new'] == 0)
{
echo '
';
}
echo '
<span class="smalltext">', $topic['pages'], '<br>', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>
<td class="windowbg2" valign="middle" width="14%">
', $topic['first_post']['member']['link'], '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['replies'], '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['views'], '</td>
<td class="windowbg2" valign="middle" width="22%">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
<span class="smalltext">
', $topic['last_post']['time'], '<br />
', $txt[525], ' ', $topic['last_post']['member']['link'], '
</span>
</td>
</tr>';
}

    echo '</table></div>';

    }
else
    echo '<b><u>'.$heading.'<br><br>No Topics Match Search Criteria</u></b>';


Bu son konularda seçeceğimiz bir bölümdeki açılan konuların listelenmesini engelleyebilirmiyiz.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Taylan on February 12, 2008, 08:34:13 AM
Sanırım bunn için bir yol yok. :(
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Taylan on February 13, 2008, 11:37:46 AM
Arkadaşlar üst üste yazıyorum lusura bakmayın ama sorduğum sorunun cevabını buldum.
Teşekkürler.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alp on February 13, 2008, 03:24:39 PM
Quote from: Taylan on February 13, 2008, 11:37:46 AM
Arkadaşlar üst üste yazıyorum lusura bakmayın ama sorduğum sorunun cevabını buldum.
Teşekkürler.
nasıl buldun çözümü bizimle paylaşırmısın
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Taylan on February 14, 2008, 08:29:25 AM
Kodda burayı bulun
QuoteAND ms.ID_MSG = t.ID_FIRST_MSG

Hemen altına bunu ekleyin.
QuoteAND b.ID_BOARD NOT IN ( 8 )

parantez içindeki kısma hangi bölümün görünmemesini istiyorsanız o bölümün ID sini yazın.

umarım anlatabilmişimdir. Biraz acemiyimde :)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: huseyin102 on February 15, 2008, 10:12:36 PM
Günün Sözü;

<iframe src='http://www.nenasil.com/gununsozu.asp' width='468' height='60' border='0'  marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: huseyin102 on February 15, 2008, 10:16:37 PM
Günün Resmi

<!-- Webkaynak Günün Resmi Kodu Başlangıcı --><iframe frameborder=0 height=245 marginheight=0 marginwidth=0 scrolling=no src="http://webkaynak.org/gun/gununresmi.asp" width=170> </iframe><!-- Webkaynak Günün Resmi Kodu Bitişi -->
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: ezey on May 10, 2008, 12:19:03 PM
verdiginiz bilgilerden dolayı herkese tesekkur ederim
benimde bir sorum olucak bu blok yazılımlarını arka arkaya ekledigimde alt alt a cıkıyor
ornegin doviz bilgisi ile hava durumu yana cıksın istiyorum 2 blok kodu arasına ne kodu eklersem veya baska yolu varmı bilmiyorum yan yana cıkar?
yardımcı olursanız sevinirim herkese iyigunler
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: marjinaL on May 31, 2008, 04:13:12 PM
Merhaba arkadaşlar.. Shoutcast blogu hakkında yardıma ihtiyacım var. Shoustcast blogunda, o anda calan parcaya ait bilgiler bulunuyor ancak, refresh özelliği olmadığı için sayfa yenilendiğinde bilgiler değişiyor. Kod içine refresh özelliği koymamız mümkünmüdür?

Shoutcast blogu kodlarının bulunduğu link:

http://www.tinyportal.net/index.php?topic=701.0 (http://www.tinyportal.net/index.php?topic=701.0)

İlginiz için şimdiden teşekkürler..
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on June 15, 2008, 07:54:36 PM
Quote from: deniz on December 24, 2006, 12:59:09 PM
OTOMATÄ°K META TAG


arama motorlarında size büyükk avantaj sağlaycak bir çözüm buldum.

metatag keyword leriniz artık konu başlığına göre değişicek. böylece konuya özel keyword yaratılacak. doalyısıyla konularınızın google gibi arama motorlarında bulunma ve ön sıralara yükselme imkanı yaratılcak. nasıl mı ?

index.template.php dosyasına girip:

function template_main_above()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;


altına bu kodu ekliyorsunuz:

$stop_words=  array(" ben "," sen "," hakkında "," bir "," nerede "," ki "," kim "," nerede "," ve "," com "," de "," en "," için "," tarafından "," nasıl "," ne "," içinde "," ile "," www ","!",".","?","=","-");
        $keywords_ = str_replace($stop_words," ",$context['page_title']);
        $keywords_ =  preg_replace ( "/\s\s+/" , " " , $keywords_);
        $keywords_ = str_replace(" ",", ",trim($keywords_));


sonra aşağıdaki satırı
<meta name="keywords" content="....." />

(... olan yerlerde size özel keyworldler veya smf nin kendi klasik keywordleri yer alır)
bununla deÄŸiÅŸtiriyorsunuz:

<meta name="keywords" content="'.$keywords_.'" />


sonucu görmek için herhangi bir konuya girip sayfa kaynağına bakın.

alıntı (http://www.webmasterstalks.com/index.php?PHPSESSID=9e3dbad6dfd9bec9f9f0a5a9b5d9af15&topic=363.msg2147#msg2147)


yukarıdaki kod yalnızca konu başlığından keywordleri oluşturur. bunlara tüm sayfalarda çıkmasını istediğiniz normal keywordleri eklemek isterseniz kodu şu şekilde değiştirin:

<meta name="keywords" content="'.$keywords_.',örnekword1, örnekword2,...,örnekwordn" />
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: deniz on June 15, 2008, 08:25:53 PM
ben de kendi hazırladığım ozlusoz.net sitesinden rastgele özlüsöz çekebileceğiniz bir script ekleyeyim.

<iframe src='http://www.ozlusoz.net/random_soz.php' width='468' height='60' border='0'  marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>


kullandığınız yere uydurmak için width, border vs. gibi değerleri değiştirebilirsiniz.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: behzat on August 26, 2008, 01:05:02 PM

Aşağıdaki blok yazılımcık olan son konular linki bunu yaptım ama bende son 20 konuyu gösteriyor bunu nasıl 5 veya 10 konu yapabilirim.

http://www.tinyportal.net/index.php?topic=3777.msg165940#msg165940

Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on August 26, 2008, 07:05:37 PM
Code (bul) Select
$number_recent_posts = 20;
20yi istediÄŸin gibi deÄŸiÅŸtir.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: behzat on August 26, 2008, 10:21:46 PM
Quote from: bbTURK on August 26, 2008, 07:05:37 PM
Code (bul) Select
$number_recent_posts = 20;
20yi istediÄŸin gibi deÄŸiÅŸtir.

teşşekürler sağol kardeş

Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alqo on August 28, 2008, 08:20:26 PM
Paylaşım için  teÅŸekkürler.. Yalnız Bir  isteÄŸim olucak son konular Modüllünü  orta  blokların altına almak istiyorum nasıl ala  bilirim yani en alta olucak nerde deÄŸiÅŸiklik veya  kodu yerleÅŸtirmem gerek? Sadece  Portalda gözükücek
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on August 28, 2008, 08:28:52 PM
hangi sürümü kullanıyorsun?
0.9.8 için
eğer ön blokları önce gösteri seçtiysen, orta blok olarak ekle ve sıra olarak en alta al.
eğer ön blokları sonra gösteri seçitysen, önblok olarak ekle ve sırasını en alta al.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alqo on August 29, 2008, 09:38:57 PM
0.9.8 kullanıyorum yalnız  tamam bende onu yapa  biliyorum ama  sorunum ÅŸu (forum mesajları var orta blokta  yani seçtiÄŸim katagorilerden mesaj ekleniyor  onların altına almak istiyorum son konuları..)

forum mesajlarını şöyle ekledim ayarlar  önsayfa forum mesajları ordan 4 seçenek var ordan seçtim orta  bloklarda  gösteriyor

umarım anlata bilmiÅŸimdir yardımların için saÄŸoL  tek başına  bu çaba süper.. (Yola devam) :)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on August 29, 2008, 09:46:17 PM
teşekkürler.
ÅŸimdi ÅŸunu bir dener misin
önsayfa ayarlarından önblokları sonra ekleyi seç.
daha sonra ön blok oluştur ve eklemek istediğin yazılımcığı o bloğa ekle.

böyle yapıtında sırasıyla

orta bloklar

forum mesajları

önbloklar gözükür
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alqo on August 29, 2008, 09:50:26 PM
oldu saÄŸoL
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: erdem30 on September 18, 2008, 08:17:37 PM
Quote from: alp on November 23, 2007, 01:15:33 PM
Anket anasayfada gösterimi

php box da yapılacak.
// display most recent poll from board number 1
tp_showPoll(13663.0);   (en altta)

13663.0 buraya sizin adres çubuğundaki numarayı yazacaksınız

//Enhanced showPoll block
// Shows poll in block from specified topic,
// or the most recent from specified board
//
// Author: Greybrow
// Version: 2007-04-24 22:00
// Features:
// shows poll (or polls) that fits in a block
//         voting or scores (when voted or can't vote)
// shows question as a topic link
// shows poll from specified topic
// shows most recent poll from specified board
//
// based on ssi_showPoll();
// added block hacks by Raysr and Thurnok from:
//    http://tpblocks.ccs-net.com/index.php?topic=25
//    http://tpblocks.ccs-net.com/index.php?topic=40
//
// usage:
// - copy whole code to phpblock.
// - at the end of the code use function
// tp_showPoll(topic number or null, 'echo' or null, board number or null)
// or
// copy the function to SSI.php
// put only the function call in phpblock
//
// examples:
// show the poll from topic 34
// tp_showPoll(34);                     
//
// show the most recent poll from the board number 5
// tp_showPoll(null,'echo',5);           
//
// keep in mind, that if board is specified, topic is ignored
// so it will display the same as above
// tp_showPoll(34,'echo',5)             
//
// put the array with poll from board 5 into $thepoll variable
// $thepoll = tp_showPoll(null,null,5); 
//
// if you call the function more than once,
// with different options, block will show more polls
// but I'm not sure if voting would work correctly :(
///////////////////////////////////////////////////////

function tp_showPoll($topic = null, $output_method = 'echo', $board = null)
{
global $db_prefix, $txt, $ID_MEMBER, $settings, $boardurl, $sc, $user_info;
global $context;

$boardsAllowed = boardsAllowedTo('poll_view');

if (empty($boardsAllowed))
return array();

if ($topic === null && isset($_REQUEST['ssi_topic']))
$topic = (int) $_REQUEST['ssi_topic'];
else
$topic = (int) $topic;

if ($board === null)
{
// board not chosen, so get the one from specified topic
$request = db_query("
SELECT
p.ID_POLL, p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes, b.ID_BOARD
FROM ({$db_prefix}topics AS t, {$db_prefix}polls AS p, {$db_prefix}boards AS b)
WHERE p.ID_POLL = t.ID_POLL
AND t.ID_TOPIC = $topic
AND b.ID_BOARD = t.ID_BOARD
AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? "
AND b.ID_BOARD IN (" . implode(', ', $boardsAllowed) . ")" : '') . "
LIMIT 1", __FILE__, __LINE__);
}
else
{
// board chosen, so lets try to get the most recent poll from it
$board = (int) $board;
$request = db_query("
SELECT
p.ID_POLL, p.question, p.votingLocked, p.hideResults, p.expireTime, p.maxVotes, b.ID_BOARD, t.ID_TOPIC
FROM ({$db_prefix}topics AS t, {$db_prefix}polls AS p, {$db_prefix}boards AS b)
WHERE p.ID_POLL = t.ID_POLL
AND b.ID_BOARD = t.ID_BOARD
AND b.ID_BOARD = $board
AND $user_info[query_see_board]" . (!in_array(0, $boardsAllowed) ? "
AND $board IN (" . implode(', ', $boardsAllowed) . ")" : '') . "
ORDER BY p.ID_POLL DESC
LIMIT 1", __FILE__, __LINE__);
}

// Either this topic has no poll, or the user cannot view it.
if (mysql_num_rows($request) == 0)
return array();

$row = mysql_fetch_assoc($request);
mysql_free_result($request);

if($topic == 0)
$topic = (int)$row['ID_TOPIC'];

// Check if they can vote.
if ((!empty($row['expireTime']) && $row['expireTime'] < time()) || $user_info['is_guest'] || !empty($row['votingLocked']) || !allowedTo('poll_vote', $row['ID_BOARD']))
$allow_vote = false;
else
{
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}log_polls
WHERE ID_POLL = $row[ID_POLL]
AND ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
$allow_vote = mysql_num_rows($request) == 0;
mysql_free_result($request);
}
$request = db_query("
SELECT COUNT(DISTINCT ID_MEMBER)
FROM {$db_prefix}log_polls
WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__);
list ($total) = mysql_fetch_row($request);
mysql_free_result($request);

$request = db_query("
SELECT ID_CHOICE, label, votes
FROM {$db_prefix}poll_choices
WHERE ID_POLL = $row[ID_POLL]", __FILE__, __LINE__);
$options = array();
$total_votes = 0;
while ($rowChoice = mysql_fetch_assoc($request))
{
censorText($rowChoice['label']);

$options[$rowChoice['ID_CHOICE']] = array($rowChoice['label'], $rowChoice['votes']);
$total_votes += $rowChoice['votes'];
}
mysql_free_result($request);

$return = array(
'id' => $row['ID_POLL'],
'image' => empty($pollinfo['votingLocked']) ? 'poll' : 'locked_poll',
'question' => $row['question'],
'total_votes' => $total,
'is_locked' => !empty($pollinfo['votingLocked']),
'allow_vote' => $allow_vote,
'topic' => $topic
);

// Calculate the percentages and bar lengths...
$divisor = $total_votes == 0 ? 1 : $total_votes;
foreach ($options as $i => $option)
{
$bar = floor(($option[1] * 100) / $divisor);
$barWide = $bar == 0 ? 1 : floor(($bar * 5) / 6);
$return['options'][$i] = array(
'id' => 'options-' . $i,
'percent' => $bar,
'votes' => $option[1],
'bar' => '<span style="white-space: nowrap;"><img src="' . $settings['images_url'] . '/poll_left.gif" alt="" /><img src="' . $settings['images_url'] . '/poll_middle.gif" width="' . $barWide . '" height="12" alt="-" /><img src="' . $settings['images_url'] . '/poll_right.gif" alt="" /></span>',
'option' => parse_bbc($option[0]),
'vote_button' => '<input type="' . ($row['maxVotes'] > 1 ? 'checkbox' : 'radio') . '" name="options[]" id="options-' . $i . '" value="' . $i . '" class="check" />'
);
}

$return['allowed_warning'] = $row['maxVotes'] > 1 ? sprintf($txt['poll_options6'], $row['maxVotes']) : '';

if ($output_method != 'echo')
return $return;

if ($return['allow_vote'])
{
echo '
<form action="', $boardurl, '/SSI.php?ssi_function=pollVote" method="post" accept-charset="', $context['character_set'], '">
<input type="hidden" name="poll" value="', $return['id'], '" />
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td colspan="2" class="smalltext"><a href="', $boardurl, '/index.php?topic=', $return['topic'], '"><b>', $return['question'], '</b></a></td>
</tr>
<tr>
<td class="smalltext">', $return['allowed_warning'], '</td>
</tr>';
foreach ($return['options'] as $option)
echo '
<tr>
<td class="smalltext"><label for="', $option['id'], '">', $option['vote_button'], '</td><td class="smalltext">', $option['option'], '</label></td>
</tr>';
echo '
<tr>
<td colspan="2" class="smalltext"><input type="submit" value="', $txt['smf23'], '" /></td>
</tr>
</table>
<input type="hidden" name="sc" value="', $sc, '" />
</form>';
}
else
{
echo '
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td colspan="2" class="smalltext"><a href="', $boardurl, '/index.php?topic=', $return['topic'], '"><b>', $return['question'], '</b></a></td>
</tr>';
foreach ($return['options'] as $option)
echo '
<tr>
<td colspan="2" align="left" valign="top" style="font-style: italic" class="smalltext">', $option['option'], '</td>
</tr>
<tr>
<td align="left" class="smalltext">', $option['bar'], '</td>
<td align="left" class="smalltext">', $option['votes'], ' (', $option['percent'], '%)</td>
</tr>';
echo '
<tr>
<td colspan="2" class="smalltext"><b>', $txt['smf24'], ': ', $return['total_votes'], '</b></td>
</tr>
</table>';
}
}

///////////////////////////////////////
// display most recent poll from board number 1
tp_showPoll(13663.0);   


Bu anketi koydum.Ancak sadece üyelere görünüyor.Ziyaretçilere başlık görünüyor o kadar.Forum içeriği ziyeretçilere kapalı onunla alakalı olabilirmi.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on September 18, 2008, 08:57:29 PM
kodu denemdiğim için kesin konuşmuyorum ama büyük olasılıkla onunla alakalı
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: erdem30 on September 19, 2008, 07:13:49 PM
Quote from: bbTURK on September 18, 2008, 08:57:29 PM
kodu denemdiğim için kesin konuşmuyorum ama büyük olasılıkla onunla alakalı
Yok hocam içeriği açtım anket hala ziyaretçilere kapalı.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alqo on September 28, 2008, 03:02:31 PM
Quote from: erdem30 on September 19, 2008, 07:13:49 PM
Quote from: bbTURK on September 18, 2008, 08:57:29 PM
kodu denemdiğim için kesin konuşmuyorum ama büyük olasılıkla onunla alakalı
Yok hocam içeriği açtım anket hala ziyaretçilere kapalı.

admin panelinde üye izinlerine gir ziyaretciler Düzenle tıkla sonra  Anketleri görebilir

Bu işini görür arkadaşım
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Muxa on October 08, 2008, 09:31:23 PM
Arkdaşlar shoutbox nasıl yapılıyor tpde?

versiyorn 0.9.8
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on October 08, 2008, 09:38:41 PM
bloklardan yeni blok oluştur. türünü shoutbox seç.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: alqo on January 08, 2009, 08:54:08 PM
bbTURK tekrardan seLam.

sorum:
forum mesajları var orta blokta ordan katagori seçiyorum 5 tane  seçe  biliyorum bunları 30  40 yapa  bilirmiyiz?..

Åžindiden Yardımların için  saÄŸol?
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on January 09, 2009, 04:38:11 PM
forumda daha önce soruldu biraz forumu karıştır
Title: En Çok Mesaj Atanlar Avatarlarıyla Birlikte.
Post by: Paragaya on February 22, 2009, 09:07:09 AM
ArkadaÃ...Ÿlar Php blok kodlarÃ,,±na bu kodlarÃ,,± girebilirsiniz

Bu kodlarÃ,,± kullanabilirsiniz

$top_posters = ssi_topPoster(5, 'array');

echo '
<ol>';

foreach ($top_posters as $poster)
{
loadMemberData($poster['id']);
loadMemberContext($poster['id']);

echo '
<li>
<div style="float: left; padding: 0px 5px 5px 0px;">', $memberContext[$poster['id']]['avatar']['image'], '</div>
', $poster['link'], '<br />', $poster['posts'], ' ', $txt['posts'], '
<br style="clear: left;" />
</li>';
}

echo '
</ol>';


loadMemberData() ve loadMemberContext() fonksiyonlarÃ,,± ile ayrÃ,,±ntÃ,,±lÃ,,± üye bilgilerini yükleyebilirsiniz. ÃÅ"ye bilgileri $memberContext dizisinde üyenin idsinin indexi içerisine yüklenir. Bu fonksiyonlarÃ,,± kullandÃ,,±ktan sonra aÃ...ŸaÃ,,ŸÃ,,±daki kodlarla $memberContext dizisindeki bilgileri görüntüleyebilirsiniz:

echo '<pre>';
print_r($memberContext);
echo '</pre>';


KodlarÃ,,± Yazan ---> sm.org'daki  [SiNaN] ' a teÃ...Ÿekkürler.
Title: Top 10 Karma
Post by: Paragaya on February 22, 2009, 10:36:50 AM
Admin Panelinden Php blok oluÃ...Ÿturup bu kodlarÃ,,± okutun :)


//  Top 10 karma

$members_result = db_query("
SELECT ID_MEMBER, realName, posts , karmaGood
FROM {$db_prefix}members
ORDER BY karmaGood DESC
LIMIT 10", __FILE__, __LINE__);
$context['repkarma'] = array();
$max_num_posts = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{
$context['repkarma'][] = array(
'name' => $row_members['realName'],
'id' => $row_members['ID_MEMBER'],
'karma' => $row_members['karmaGood'],
'num_posts' => $row_members['posts'],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);

if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
}
mysql_free_result($members_result);



Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: bbTURK on February 22, 2009, 03:17:10 PM
Paragaya çapraz gönderi yapmaz sevinirm. bi blok için ya buraya mesaj yaz yada konu aç ikisinide yapman gerekmez. bloklar için teÃ...Ÿekküler :D
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Paragaya on February 28, 2009, 11:27:52 AM
Yha bende uÃ,,ŸraÃ...ŸÃ,,±om :)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: captain1520 on March 15, 2009, 11:21:19 AM
ArkadaÃ...Ÿlar BenÃ,,±m Ã,,±stedÃ,,±Ã,,ŸÃ,,±m anket.. forumdakÃ,,± tum anketlerÃ,,± gostedÃ,,±kten sonrada sonuçlarÃ,,± göstersÃ,,±n oyle yapamÃ,,±yormuyuz
Title: Tags Modu Kullananlar için Son tagları çekme.
Post by: Paragaya on April 20, 2009, 08:59:34 AM
Yeni bir php blok ekleyin ve içine bu kodlarÃ,,± girin.
global $context, $db_prefix, $scripturl, $txt;
   //Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/     
   $query = "SELECT t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
      FROM {$db_prefix}tags as t, {$db_prefix}tags_log as l WHERE t.ID_TAG = l.ID_TAG
      GROUP BY l.ID_TAG
      ORDER BY l.ID DESC LIMIT 50";
   $result = db_query($query, __FILE__, __LINE__);
     
   // here we loop through the results and put them into a simple array:
   // $tag['thing1'] = 12;
   // $tag['thing2'] = 25;
   // etc. so we can use all the nifty array functions
   // to calculate the font-size of each tag
   $tags = array();
   $tags2 = array();
   while ($row = mysql_fetch_array($result))
   {
       $tags[$row['tag']] = $row['quantity'];
       $tags2[$row['tag']] = $row['ID_TAG'];
   }
     
   if(count($tags2) > 0)
   {
      // change these font sizes if you will
      $max_size = 250; // max font size in %
      $min_size = 100; // min font size in %
     
      // get the largest and smallest array values
      $max_qty = max(array_values($tags));
      $min_qty = min(array_values($tags));
     
      // find the range of values
      $spread = $max_qty - $min_qty;
      if (0 == $spread)
      { // we don't want to divide by zero
          $spread = 1;
      }
         
      // determine the font-size increment
      // this is the increase per tag quantity (times used)
      $step = ($max_size - $min_size)/($spread);
         
      // loop through our tag array
      $context['poptags'] = '';
      $row_count = 0;
      foreach ($tags as $key => $value)
      {
         $row_count++;
          // calculate CSS font-size
          // find the $value in excess of $min_qty
          // multiply by the font-size increment ($size)
          // and add the $min_size set above
          $size = $min_size + (($value - $min_qty) * $step);
          // uncomment if you want sizes in whole %:
          // $size = ceil($size);
     
          // you'll need to put the link destination in place of the #
          // (assuming your tag links to some sort of details page)
          $context['poptags'] .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
          // perhaps adjust this title attribute for the things that are tagged
         $context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
         $context['poptags'] .= '>'.$key.'</a> ';
         if ($row_count > 5)
         {
            $context['poptags'] .= '<br />';
            $row_count =0;
         }
         // notice the space at the end of the link
      }
   }
         if(isset($context['poptags']))
            echo $context['poptags'];




Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Gurbet_42 on August 16, 2009, 03:00:02 PM
Quote from: Paragaya on April 20, 2009, 08:59:34 AM
Yeni bir php blok ekleyin ve içine bu kodlarÃ,,± girin.
global $context, $db_prefix, $scripturl, $txt;
   //Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/     
   $query = "SELECT t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
      FROM {$db_prefix}tags as t, {$db_prefix}tags_log as l WHERE t.ID_TAG = l.ID_TAG
      GROUP BY l.ID_TAG
      ORDER BY l.ID DESC LIMIT 50";
   $result = db_query($query, __FILE__, __LINE__);
     
   // here we loop through the results and put them into a simple array:
   // $tag['thing1'] = 12;
   // $tag['thing2'] = 25;
   // etc. so we can use all the nifty array functions
   // to calculate the font-size of each tag
   $tags = array();
   $tags2 = array();
   while ($row = mysql_fetch_array($result))
   {
       $tags[$row['tag']] = $row['quantity'];
       $tags2[$row['tag']] = $row['ID_TAG'];
   }
     
   if(count($tags2) > 0)
   {
      // change these font sizes if you will
      $max_size = 250; // max font size in %
      $min_size = 100; // min font size in %
     
      // get the largest and smallest array values
      $max_qty = max(array_values($tags));
      $min_qty = min(array_values($tags));
     
      // find the range of values
      $spread = $max_qty - $min_qty;
      if (0 == $spread)
      { // we don't want to divide by zero
          $spread = 1;
      }
         
      // determine the font-size increment
      // this is the increase per tag quantity (times used)
      $step = ($max_size - $min_size)/($spread);
         
      // loop through our tag array
      $context['poptags'] = '';
      $row_count = 0;
      foreach ($tags as $key => $value)
      {
         $row_count++;
          // calculate CSS font-size
          // find the $value in excess of $min_qty
          // multiply by the font-size increment ($size)
          // and add the $min_size set above
          $size = $min_size + (($value - $min_qty) * $step);
          // uncomment if you want sizes in whole %:
          // $size = ceil($size);
     
          // you'll need to put the link destination in place of the #
          // (assuming your tag links to some sort of details page)
          $context['poptags'] .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
          // perhaps adjust this title attribute for the things that are tagged
         $context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
         $context['poptags'] .= '>'.$key.'</a> ';
         if ($row_count > 5)
         {
            $context['poptags'] .= '<br />';
            $row_count =0;
         }
         // notice the space at the end of the link
      }
   }
         if(isset($context['poptags']))
            echo $context['poptags'];






Güzel bir blok eklentisi ancak bu Ã...ŸÃ¶yle yapÃ,,±labilir mi, etiketlenen kelimeye tÃ,,±kladÃ,,±gÃ,,±mÃ,,±zda direk o kunuya gÃ,,±tse,bu haliyle etiket sayfasÃ,,±na yönleniyor.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Paragaya on August 20, 2009, 07:48:09 AM
O zaman o etkiket modu deistirilmesi gerekir çünkü  ssi yapÃ,,±yoruz moddan cekiyoruz tag modunda son etiketlere yönlendirdiÃ,,Ÿi için biz onu deistiremiyoruz ;)
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Gurbet_42 on August 20, 2009, 08:25:14 AM
AnladÃ,,±m teÃ...Ÿekkürler.AynÃ,,± soruyu SimlePortala da sormuÃ...Ÿtum aynÃ,,± cevap yazÃ,,±ldÃ,,±.
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: Paragaya on August 25, 2009, 10:24:26 PM
Ne güzel :]
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: tekniker on May 19, 2010, 09:04:13 PM
Quote from: alp on November 28, 2007, 07:52:56 PM
'In The News' - Block [Posts from a specific board]
bu blok sizin seçtiÃ,,Ÿiniz bölümden haberleri deÃ,,ŸiÃ...Ÿik bir Ã...Ÿekilde göstermeye yarÃ,,±yor


ekran görüntüsü:(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg78.imageshack.us%2Fimg78%2F5024%2Fawc7bl2.jpg&hash=6354e36be7ecbdd080546178c734c19a1a79fd91)
   
'In The News' - Block [Posts from a specific board]
SSI.php de bul
// Show the top poster's name and profile link.
üstüne ekle


// Recent topic list reversed:   [board] Subject by Poster Date
function ssi_recentTopicsINC($num_recent = 8, $include_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

$include_boards = empty($include_boards) ? array() : $include_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . "
AND t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($include_boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")") . "
" . ((!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0) ? "
AND b.ID_BOARD != '$modSettings[recycle_board]'" : '') . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAST_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '')));
if (strlen($row['body']) > 128)
$row['body'] = substr($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}


**************
resmi ana dizine atÃ,,±n
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fpath-to-peace.net%2Fmisc%2Fextra.gif&hash=df15160f5650768e8e3be04af5359fd8d6cba758)
************

php box oluÃ...Ÿturun bir tane,kodu içine kopyalayÃ,,±n


echo' <div align="center">
<table border="1" width="100%" id="table1">
<tr>
<td width="100" valign="top" bgcolor="#FFFFFF">
<font face="Verdana">
<img border="0" src="extra.gif" width="100" height="111"></font><p align="center">
<font size="1" face="Verdana">Read, post and discuss the latest news from around the
world in our forums!</font></p>
<p align="center"><font size="1" face="Verdana">Get all the details by comparing views!</font></td>
<td><font face="Verdana">';

global $context, $scripturl;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$result=ssi_recentTopicsINC(5,array(58),'return');
foreach($result as $my){

  echo "$bullet";
  echo '<span class="largetext">'.$my['link'];
  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
echo '
                                                <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<hr>';
}
echo '</span>';

echo'   <br></font><font size="1" face="Verdana">The News is updated
when members make new posts in the <a href="http://www.yoursite.com/link_to_your_newsboard">In the News Section</a> Please be sure
to <a href="http://www.yoursite.com/if_u_have_posting_rules_give_link_here">read posting rules</a> for that board before posting!</font></td>
</tr>
</table>
</div>';

kendinize göre bazÃ,,± kÃ,,±sÃ,,±mlarÃ,,± editleyin(www.yoursite.com/ gibi)

   
$result=ssi_recentTopicsINC(5,array(58),'return');

5 = number of topics to display (kaç tane haber gösterecekseniz o rakamÃ,,± girin)
58 = board number (bölüm numarasÃ,,±)


BaÃ...ŸlÃ,,±klarÃ,,±n karakter sayÃ,,±larÃ,,±nÃ,,± azaltma imkanÃ,,± var mÃ,,± acaba. Konu baÃ...ŸlÃ,,±Ã,,ŸÃ,,±nÃ,,±n tamamÃ,,± deÃ,,Ÿilde bir kÃ,,±smÃ,,± çÃ,,±kacak Ã...Ÿekilde ayarlayabilir miyiz?..

Bir de bölüm numarasÃ,,±nÃ,,± yazsamda bazÃ,,± bölümlerde konu eski ise bu blokta çÃ,,±kmÃ,,±yor..

www.mesleklisesi.net
Title: Re: Blok yazılımcıkları (Block Snippets)
Post by: temiz on November 22, 2011, 01:39:22 PM
sağol yeni kullanmaya başladım bu tiny portal scritini memnunum..