MEO tarafından yazılmış olan Ajax Teşekkür Scripti |
Lütfen Dikkat!
![]() ![]() |
MEO tarafından yazılmış olan Ajax Teşekkür Scripti |
29.11.2007, 20:25:47
Son düzenleme tarihi : 29.11.2007 22:27 (SpongeBOB)
İleti
#1
|
|
|
IPB-User
Grup: Grup: IPB-User
İleti: 204 Açtığı Konu Sayısı:63 Mod Upload: 9 Katılım: 25.08.2007 Nereden: antalya Skin: IP.Board Pro Üye No: 5,216
Sunucu OS: Linux
IPB Sürüm: IPB 2.1.x |
Selamlar,
Aries Hocamızın bana önerdiği ajax teşekkür scriptini paylaşıyorum. Türkçedir kendisi (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Profil Görünümü : (IMG:http://img111.yehhe.com/images/6637profilden.JPG) Konu içi görünümü : (IMG:http://img111.yehhe.com/images/3135gorunum.JPG) (IMG:http://img110.yehhe.com/images/1016gorunum1.JPG) Ajax olduğu için saniyeler içerisinde işlem halloluyor. Tabi hostunuzun hızına bağlı. Benim sitemde çeyrek saniye civarı sürüyor (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Tıklar tıklamaz teşekkür edenler kısmında adınız görünüyor. Sayfayı yenilemeye gerek kalmıyor. Sadece konular değil, yorumlar da teşekkür alabiliyor. Her şey resimlerde olduğu gibi.. Kurduğunuzda türkçe olacaktır. Başlayalım : Kendi yaptığınız teşekkür iconunu veya benim kullandığımı style_images/1/ klasörüne upload edin. (IMG:http://www.portalyum.net/forum1/style_images/1/postbit_thanks.gif) Eğer kendiniz icon yapacaksanız, adı postbit_thanks.gif olmalı. Gidiyoruz : ACP > Admin > SQL Toolbox Şu sorguları ayrı ayrı çalıştırıyoruz : CODE CREATE TABLE ibf_post_thanks ( id int(10) NOT NULL auto_increment, userid int(10) NOT NULL default '0', username varchar(50) NOT NULL default '', `date` int(10) NOT NULL default '0', postid int(10) NOT NULL default '0', PRIMARY KEY (id) ); CODE ALTER TABLE `ibf_members` ADD `thanks_r` INT( 10 ) DEFAULT '0'; Editlemeler : aç : Cache > Skin Cache > Cache ID X > skin_topic.php Bul : CODE function member_posts($posts="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<<EOF {$this->ipsclass->lang['m_posts']} $posts Bununla Değiştir : CODE function member_posts($posts="", $thanks) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<<EOF {$this->ipsclass->lang['m_posts']} $posts <br />Teşekkür Sayısı: <span style='color:red;'>{$thanks}</span> Bul: CODE function RenderRow($post="",$author="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<<EOF Altına Ekle: CODE <script type="text/javascript"> <!-- function meo_createRequestObject() { var ro; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ ro = new XMLHttpRequest(); } return ro; } var meo_http = meo_createRequestObject(); var meo2 = new ajax_request(); function meo_sndReq(action, arg, arg1, arg2) { meo2.show_loading(); meo_http.open('get', 'index.php?action='+action+'&arg='+arg+'&arg1='+arg1+'&arg2='+arg2); meo_http.onreadystatechange = meo_handleResponse; meo_http.send(null); } function meo_handleResponse() { if(meo_http.readyState == 4){ var response = meo_http.responseText; var update = new Array(); if(response.indexOf('|' != -1)) { update = response.split('|'); document.getElementById(update[0]).innerHTML = update[1]; var update2 = update[0] + 'b'; document.getElementById(update2).innerHTML = ""; meo2.hide_loading(); } } } //--> </script> Bul: CODE <!-- REPORT / UP --> <div align="right"> Altına Ekle : CODE {$this->ipsclass->thanks_button} Bul: CODE </tr><tr> <td class="catend" colspan="2"> Değiştir : CODE </tr> {$this->ipsclass->thanks_postbit} <tr> <td class="catend" colspan="2"> Kaydet & Upload et. Aç : Cache > Skin Cache > Cache ID X > skin_profile.php Bul : CODE <div class="postdetails"> {$this->ipsclass->lang['mgroup']}: {$info['group_title']}<br /> {$this->ipsclass->lang['joined']}: {$info['joined']} </div> Altına Ekle: CODE <br />Teşekkür Sayısı: <span style='color:red;'>{$info['thanks_r']}</span> Kaydet & Upload Et. Aç : sources/lib/func_topic_linear.php Bul : CODE //----------------------------------------- // Print post row //----------------------------------------- Altına Ekle : CODE // thanks hack $thank_pid = $row['pid']; $this->ipsclass->thanks_button = "<a id=\"thank_".$thank_pid."b\" href=\"java script:meo_sndReq('thanks', '{$thank_pid}', '{$row['author_name']}','{$row['author_id']}')\"><img src=\"style_images/1/postbit_thanks.gif\" alt=\"Thanks\" title=\"Thanks\" /></a>"; if ($this->ipsclass->member['id'] == $row['author_id'] || !$this->ipsclass->member['id']) { $this->ipsclass->thanks_button = ""; } $thank_text = ""; $thank_text1 = ""; $tquery = $this->ipsclass->DB->query("SELECT * FROM ibf_post_thanks WHERE postid = '$thank_pid' ORDER BY username ASC"); $thank_tot = $this->ipsclass->DB->get_num_rows($tquery); if ($thank_tot) { $thank_text1 = "<div class=\"row1\" colspan=\"2\" align=\"top\"><strong>{$row['author_name']} Kullanıcısının Bu Mesajına {$thank_tot} Kullanıcı Teşekkür Etmiş :</strong></div>"; while($th_row =$this->ipsclass->DB->fetch_row($tquery)) { if ($this->ipsclass->member['id'] == $th_row['userid']) { $this->ipsclass->thanks_button = ""; } $tannk_date = $this->ipsclass->get_date( $th_row['date'], 'SHORT'); $thank_text .= "<a href=\"index.php?showuser=".$th_row['userid']."\">".$th_row['username']."</a> (".$tannk_date."), "; } $thank_text = preg_replace( "/,\s+$/", "" , $thank_text); } $this->ipsclass->thanks_postbit = "<tr> <td class=\"row2\" colspan=\"2\" align=\"top\"><div id=\""; $this->ipsclass->thanks_postbit .= "thank_".$thank_pid."\"> \n {$thank_text1} {$thank_text} </div></td></tr>\n"; //End thanks hack Aç : index.php Bul : CODE //=========================================================================== // REQUIRE AND RUN //=========================================================================== Altına Ekle : CODE // Thanks hack if($ipsclass->input['action'] == "thanks") { $output = ""; $thpid = $ipsclass->input['arg']; $divid = "thank_".$ipsclass->input['arg']; $userpost = $ipsclass->input['arg1']; $userpostid = $ipsclass->input['arg2']; if (!$thpid || !$ipsclass->member['id']) { return; } $curdate = time(); $userid = $ipsclass->member['id']; $username = $ipsclass->member['members_display_name']; $ipsclass->DB->query("INSERT INTO ibf_post_thanks (userid, username, date, postid) VALUES('$userid', '$username', '$curdate', '$thpid')"); $query = $ipsclass->DB->query("SELECT thanks_r FROM ibf_members WHERE id = '$userpostid'"); $row = $ipsclass->DB->fetch_row($query); $thanks_r = $row['thanks_r']; ++$thanks_r; $ipsclass->DB->query("UPDATE ibf_members SET thanks_r ='$thanks_r' where id = '$userpostid'"); $query = $ipsclass->DB->query("SELECT * FROM ibf_post_thanks WHERE postid = '$thpid' ORDER BY username ASC"); $thank_tot = $ipsclass->DB->get_num_rows($query); if ($thank_tot) { $thank_text1 = "<div class=\"row1\" colspan=\"2\" align=\"top\"><strong>{$userpost} Kullanicisinin bu mesajina {$thank_tot} kullanici tesekkur etmis:</strong></div>"; while($row = $ipsclass->DB->fetch_row($query)) { $tannk_date = $ipsclass->get_date($row['date'], 'SHORT'); $thank_text .= "<a href=\"index.php?showuser=".$row['userid']."\">".$row['username']."</a> (".$tannk_date."), "; } $thank_text = preg_replace( "/,\s+$/", "" , $thank_text); $output = "{$thank_text1} {$thank_text}"; $output = str_replace("|", "", $output); } //echo "$divid|foo done".$ipsclass->input; echo "$divid|$output"; exit; } // End Thanks Hack Aç : sources/action_public/topics.php Bul : CODE $member['member_posts'] = $this->ipsclass->compiled_templates['skin_topic']->member_posts( $this->ipsclass->do_number_format($member['posts']) ); Bununla Değiştir : CODE $tquery = $this->ipsclass->DB->query("SELECT thanks_r FROM ibf_members WHERE id = '{$member['id']}'"); $thanks = $this->ipsclass->DB->fetch_row($tquery); $member['member_posts'] = $this->ipsclass->compiled_templates['skin_topic']->member_posts( $this->ipsclass->do_number_format($member['posts']), $thanks['thanks_r'] ); Kaydet ve Çık Aç : Sources > Action Public > profile.php Bul: CODE $info['members_display_name'] = $member['members_display_name']; Altına Ekle: CODE $info['thanks_r'] = $member['thanks_r']; Bitti (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Arkadaşlar bir sorun çıkarsa bildiriniz. Ama çıkacağını sanmıyorum. Bizi bu eklentiyle tanıştıran Aries hocamıza teşekkürle..
Diğer bağlantılar ve kaynak sayfalar :
http://www.ipbaccess.com/forum...ons/default/smile.gif http://img111.yehhe.com/images/6637profilden.JPG http://img111.yehhe.com/images/3135gorunum.JPG http://img110.yehhe.com/images/1016gorunum1.JPG http://www.portalyum.net/forum...ages/1/postbit_thanks.gif |
|
|
|
29.11.2007, 21:02:35
İleti
#2
|
|
|
Üye
![]()
Grup: Grup: Üye
İleti: 195 Açtığı Konu Sayısı:12 Mod Upload: 0 Katılım: 08.09.2007 Nereden: Kürre-i Arz Skin: IPBAccess v2.5 NJ2 Üye No: 5,248
Sunucu OS: Linux
IPB Sürüm: IPB 2.3.x |
tşkler güzel duruyor bende CHMOD sorununu çözdüğüme göre kurabilirim artık ayrıca şu mavi butonların hoş duruyor paylaşman mümkün mü acaba ? aynı skin'i kullanıyorum bende.saygılar.
|
|
|
|
30.11.2007, 16:10:18
İleti
#3
|
|
|
Admin
Grup: Grup: IPB-Support
İleti: 1,348 Açtığı Konu Sayısı:98 Mod Upload: 52 Katılım: 19.08.2006 Nereden: Trabzon(Mersin/Erdemli) Skin: IPBAccess v2.5 NJ2 Üye No: 1,575
Sunucu OS: Linux
IPB Sürüm: IPB 2.3.x Ülke :
|
Mod 2.1.x içindir. (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Diğer sürümlere uymayabilir.. (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/wink.gif)
Diğer bağlantılar ve kaynak sayfalar :
http://www.ipbaccess.com/forum...ons/default/smile.gif http://www.ipbaccess.com/forum...cons/default/wink.gif |
|
|
|
30.11.2007, 17:54:33
İleti
#4
|
|
|
IPB-User
Grup: Grup: IPB-User
İleti: 204 Açtığı Konu Sayısı:63 Mod Upload: 9 Katılım: 25.08.2007 Nereden: antalya Skin: IP.Board Pro Üye No: 5,216
Sunucu OS: Linux
IPB Sürüm: IPB 2.1.x |
Dostum Forum hocam ,
Buton setinin hangi resimlerden oluştuğunu bilmiyorum (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/biggrin.gif) Style images'te tema klasörünün altındaki gifleri attım. İşinize yarayanları kullanırsınız (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif)
iconlar.rar ( 272.86k )
İndirilme Sayısı: 9
Diğer bağlantılar ve kaynak sayfalar :
http://www.ipbaccess.com/forum...s/default/biggrin.gif http://www.ipbaccess.com/forum...ons/default/smile.gif |
|
|
|
30.11.2007, 18:41:39
İleti
#5
|
|
|
Üye
![]()
Grup: Grup: Üye
İleti: 195 Açtığı Konu Sayısı:12 Mod Upload: 0 Katılım: 08.09.2007 Nereden: Kürre-i Arz Skin: IPBAccess v2.5 NJ2 Üye No: 5,248
Sunucu OS: Linux
IPB Sürüm: IPB 2.3.x |
ARieS uyarı için tşkler ve SpongeBOB resimleri için tşkler sınavlarında başarılar.
|
|
|
|
![]() ![]() |
Benzer Konular
| Konu Başlığı | Yanıtlar | Başlatan | Okunma | Son hareket | |||
|---|---|---|---|---|---|---|---|
![]() |
6 | hevra | 190 | 27.12.2008 - 00:01:21 Son İleti: krallen2000 |
|||
![]() |
87 | Oscar | 6,125 | 15.11.2008 - 19:41:48 Son İleti: Oscar |
|||
![]() |
10 | hevra | 462 | 14.11.2008 - 23:18:07 Son İleti: vetgenetics |
|||
![]() |
6 | vetgenetics | 475 | 29.10.2008 - 18:48:39 Son İleti: vetgenetics |
|||
![]() |
2 | Oscar | 465 | 29.10.2008 - 10:33:32 Son İleti: Oscar |
|||
|
Basit Görünüm | Tarih: 09.01.2009 - 10:05:19 |