Member Rewards 2 / Üyeleri Ödüllendirin :), Reputationun yetişemediği yerde, reward :D |
Lütfen Dikkat!
![]() ![]() |
Member Rewards 2 / Üyeleri Ödüllendirin :), Reputationun yetişemediği yerde, reward :D |
03.09.2007, 19:01:34
Son düzenleme tarihi : 03.09.2007 22:05 (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 , Sizlerle şimdi paylaşacağım eklenti , bazı forumlar için gereksiz fakat bazıları için işe yarar bir eklenti (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Üyelerinizi ödüllendiriyorsunuz. Karma sisteminden tamamen farklı. Ya yine eklemeyi unuttum 2.1.x İçin Ama diğer sürümlerde de belki çalışır. Ben bilemiyorum ama bilen çıkar elbet Nasıl kullanılıyor? (resimleri kendi hostingime attım. Hangi resmin ne ile ilgili olduğunu isimlerinden anladığım için böyle yaptım (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) umarım sorun olmaz ) 1-) Admin CP'den üye ismini aratırsınız. 2-) Açılan sonuçlarda üyenin adının yanındaki açılır menüden "re-warrds section" seçersiniz. (IMG:http://www.portalyum.net/down/reward/uyebul.jpg) 3-) Ödül ile ilgili formu (ödülün adı, açıklaması, ödül resmi URL'si ) yazıp gönder dersiniz. (IMG:http://www.portalyum.net/down/reward/form.jpg) Peki ödül aldığı nasıl anlaşılır? 1-) Profil Alanında Görünür (IMG:http://www.portalyum.net/down/reward/profilden.jpg) 2-) Tıklayan herkes ayrıntılı bilgiyi görür (IMG:http://www.portalyum.net/down/reward/gorunum.jpg) 3-) Kullanıcı profilini gözlemlerken görünür. (IMG:http://www.portalyum.net/down/reward/kullanici.jpg) Ödülümü silebilir miyim? (IMG:http://www.portalyum.net/down/reward/odulyonet.jpg) Tabii ki (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) Hangi alanlarda kullanılabilir? Örneğin : Sitenizdeki en komik resim yarışması ödülü, 200 konu açan ilk üyeye verilen ödül, en iyi paylaşımcı ödülü, moderatör olduğu için kutlama ödülü vs. Örnek olarak söylüyorum. Daha fikir üretebilirsiniz... Gelelim kuruluma...
MEMBER_REWARDS_V2.rar ( 148.08k )
İndirilme Sayısı: 7İndiriyoruz... Upload Edilecek Dosyalar : Arşivden Çıkan install klasörünü ana dizine atıyoruz. Editlenecek (yedeklenecek )Dosyalar : * sources/action_admin/member.php * sources/action_public/topics.php * sources/action_public/profile.php * jscripts/ipb_profile.js * jscripts/ipb_topic.js * cache/lang_cache/en/lang_profile.php * cache/lang_cache/en/lang_topic.php * 1 Veri Tabanı Tablosu Eklenecek * 4 Template Bit Eklecenek * 2 template bit değişecek Kesinlikle yedekleyelim (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/smile.gif) İlkemiz olsun. Daima yedek! Kurulum : ///////////////////////////////////// Adım 1-) //////////////////////////////////// Az önce upload ettiğimiz install klasörüne, browserimizle gidiyoruz (www.forumadı.com/forum/install/ ) Söylenen adımları tek tek tek tek (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/biggrin.gif) takip ediyor, install işlemini tamamlıyoruz. Geçelim Düzenlemelere.. ////////////////////////////////// Adım(lar) 2-) ///////////////////////////////// AÇ : sources/action_admin/member.php Bul : CODE //----------------------------------------- // Delete / Prune //----------------------------------------- case 'member_delete': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' ); $this->member_delete(); break; 1 Satır Aşağı (enter ile) in ve yapıştır : CODE //----------------------------------------- // Member rewards //----------------------------------------- case 'edit_rewards': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->edit_rewards(); break; case 'doedit_rewards': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' ); $this->doedit_rewards(); break; case 'delete_rewards': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':delete' ); $this->delete_rewards(); break; case 'doadd_rewards': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->member_do_add_rewards(); break; case 'list_rewards': $this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' ); $this->list_rewards(); break; Bir Daha Bul : CODE "<img src='{$this->ipsclass->skin_url}/images/memsearch_changename.gif' style='margin:4px;' border='0' /> " + "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=changepassword&id={$r['id']}{$page_query}'>Change/Reset Password...</a>", 1 Satır Aşağıya (enter ile ) in ve yapıştır: CODE "<img src='{$this->ipsclass->skin_url}/images/memsearch_changename.gif' style='margin:4px;' border='0' /> " + "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list_rewards&mid={$r['id']}{$page_query}'>Re-Wards Section...</a>", Bul bul bitmiyor (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/biggrin.gif) Dedektif Gibi Olduk (IMG:http://www.ipbaccess.com/forum/style_emoticons/default/biggrin.gif) Burayı da buluyoruz : CODE /*-------------------------------------------------------------------------*/ // Generate page string /*-------------------------------------------------------------------------*/ function _generate_page_string() { Üstüne Ekle (üst satıra çık, yazı varsa enter'a basarak bir boşluk aç ve boş satıra yapıştır ): CODE //----------------------------------------- // Rewards by vadim88 - start //----------------------------------------- function list_rewards() { //----------------------------------------- // Get member //----------------------------------------- $member_id = intval($this->ipsclass->input['mid']); //----------------------------------------- // check //----------------------------------------- if ( ! $member_id ) { $this->ipsclass->admin->error("Could not resolve member id"); } //----------------------------------------- // Page details //----------------------------------------- $this->ipsclass->admin->page_title = "Rewards Listing"; $this->ipsclass->admin->page_detail = "You Can See The Member Rewards"; $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rewards', 'where' => "reward_member_id={$member_id}", 'order' => 'reward_date DESC' ) ); $this->ipsclass->DB->simple_exec(); if ( $this->ipsclass->DB->get_num_rows() ) { //----------------------------------------- // Start table //----------------------------------------- $this->ipsclass->adskin->td_header[] = array( "Reward Title" , "20%" ); $this->ipsclass->adskin->td_header[] = array( "Reward Description" , "25%" ); $this->ipsclass->adskin->td_header[] = array( "Reward" , "25%" ); $this->ipsclass->adskin->td_header[] = array( "Reward Date" , "20%" ); $this->ipsclass->adskin->td_header[] = array( "Edit/Delete" , "10%" ); $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Rewards Listing" ); while ($mem = $this->ipsclass->DB->fetch_row()) { $date = $this->ipsclass->get_date( $mem['reward_date'], 'SHORT' ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "{$mem['reward_title']}<br>Rewarded By: <a title='View this members profile' href='index.{$this->ipsclass->vars['php_ext']}?showuser={$mem['reward_by_id']}' target='blank'>{$mem['reward_by_name']}</a>" , $mem['reward_desc'] , "<img src='{$mem['reward']}' border='0'>" , $date , "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=edit_rewards&id={$mem['reward_id']}'>Edit</a> /<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=delete_rewards&id={$mem['reward_id']}&mid={$mem['reward_by_id']}'>Delete</a>" , ) ); } } else { //----------------------------------------- // Start table //----------------------------------------- $this->ipsclass->html .= $this->ipsclass->adskin->start_table( " No Rewards" ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "No Re-Wards For This Member" ) ); } $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); //----------------------------------------- // Start table //----------------------------------------- $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); //----------------------------------------- // get member info //----------------------------------------- $this->ipsclass->DB->cache_add_query( 'member_search_do_edit_form', array( 'mid' => $this->ipsclass->input['mid'] ) ); $this->ipsclass->DB->cache_exec_query(); $mem = $this->ipsclass->DB->fetch_row(); $mem['id'] = $mem['memid']; $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doadd_rewards' ), 2 => array( 'act' , 'mem' ), 3 => array( 'mid' , $mem['id'] ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Add a Re-Ward For This Member" ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Reward Title:</b>" , $this->ipsclass->adskin->form_input( "title", $_POST['title'] ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Reward Description:</b>" , $this->ipsclass->adskin->form_input( "desc", $_POST['desc'] ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Type In The Re-Warded Image Url:</b>" , $this->ipsclass->adskin->form_input( "image", $_POST['image'] ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Re-Ward Member"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); $this->ipsclass->admin->output(); } function member_do_add_rewards() { //----------------------------------------- // Check form //----------------------------------------- if ( ! $_POST['image'] OR ! $_POST['title'] OR ! $_POST['desc'] ) { $this->ipsclass->admin->error("You must complete the form fully!"); } //----------------------------------------- // Set it up for the DB //----------------------------------------- $image = trim($this->ipsclass->input['image']); $title = trim($this->ipsclass->input['title']); $desc = trim($this->ipsclass->input['desc']); $rewarded_name = $this->ipsclass->member['members_display_name']; $rewarded_id = $this->ipsclass->member['id']; $reward = array( 'reward_member_id' => $this->ipsclass->input['mid'], 'reward_by_name' => $rewarded_name, 'reward_by_id' => $rewarded_id, 'reward' => $image, 'reward_title' => $title, 'reward_desc' => $desc, 'reward_date' => time(), 'reward_ip_address' => $this->ipsclass->input['IP_ADDRESS'], ); //----------------------------------------- // Insert: REWARDS //----------------------------------------- $this->ipsclass->DB->force_data_type = array( 'name' => 'string' ); $this->ipsclass->DB->do_insert( 'rewards', $reward ); //----------------------------------------- // Log and bog? //----------------------------------------- $this->ipsclass->admin->save_log("Reward Added"); $this->ipsclass->admin->done_screen("Reward added", "Re-Wards Listing", "{$this->ipsclass->form_code}&code=list_rewards&mid={$this->ipsclass->input['mid']}", 'redirect' ); } function delete_rewards() { //----------------------------------------- // check for input //----------------------------------------- if ($this->ipsclass->input['id'] == "") { $this->ipsclass->admin->error("We could not match that ID"); } $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'rewards', 'where' => "reward_id='".$this->ipsclass->input['id']."'" ) ); $this->ipsclass->admin->save_log("Removed A Reward"); $this->ipsclass->admin->done_screen("Reward Removed", "Re-Wards Listing", "{$this->ipsclass->form_code}&code=list_rewards&mid={$this->ipsclass->input['mid']}", 'redirect' ); } function edit_rewards() { //----------------------------------------- // Get reward //----------------------------------------- $reward_id = intval($this->ipsclass->input['id']); //----------------------------------------- // check //----------------------------------------- if ( ! $reward_id ) { $this->ipsclass->admin->error("Could not resolve reward id"); } //----------------------------------------- // Page details //----------------------------------------- $this->ipsclass->admin->page_title = "Edit A Re-Ward"; $this->ipsclass->admin->page_detail = "You Can Edit The Member Reward"; //----------------------------------------- // Start table //----------------------------------------- $this->ipsclass->adskin->td_header[] = array( " " , "40%" ); $this->ipsclass->adskin->td_header[] = array( " " , "60%" ); $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doedit_rewards' ), 2 => array( 'act' , 'mem' ), 3 => array( 'id' , $reward_id ), 4 => array( 'section', $this->ipsclass->section_code ), ) ); $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit Reward" ); $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rewards', 'where' => "reward_id={$reward_id}", 'order' => 'reward_date DESC' ) ); $this->ipsclass->DB->simple_exec(); while ($mem = $this->ipsclass->DB->fetch_row()) { $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Reward Title:</b>" , $this->ipsclass->adskin->form_input( "title", $mem['reward_title'] ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Reward Description:</b>" , $this->ipsclass->adskin->form_input( "desc", $mem['reward_desc'] ) ) ); $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Reward Image:</b>" , $this->ipsclass->adskin->form_input( "reward", $mem['reward'] ) ) ); } $this->ipsclass->html .= $this->ipsclass->adskin->end_form("Edit"); $this->ipsclass->html .= $this->ipsclass->adskin->end_table(); $this->ipsclass->admin->output(); } function doedit_rewards() { //----------------------------------------- // Check form //----------------------------------------- if ( ! $_POST['image'] OR ! $_POST['title'] OR ! $_POST['desc'] ) { $this->ipsclass->admin->error("You must complete the form fully!"); } //----------------------------------------- // Set it up for the DB //----------------------------------------- $this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'rewards', 'where' => "reward_id={$this->ipsclass->input['id']}", 'order' => 'reward_date DESC' ) ); $this->ipsclass->DB->simple_exec(); $mem = $this->ipsclass->DB->fetch_row(); $member['id'] = $mem['reward_member_id']; $reward = trim($this->ipsclass->input['reward']); $title = trim($this->ipsclass->input['title']); $desc = trim($this->ipsclass->input['desc']); $rewarded_name = $this->ipsclass->member['members_display_name']; $rewarded_id = $this->ipsclass->member['id']; //----------------------------------------- // Update the DB... //----------------------------------------- $this->ipsclass->DB->do_update( 'rewards', array( 'reward_member_id' => $member['id'], 'reward_by_name' => $rewarded_name, 'reward_by_id' => $rewarded_id, 'reward' => $reward, 'reward_title' => $title, 'reward_desc' => $desc, 'reward_date' => time(), 'reward_ip_address' => $this->ipsclass->input['IP_ADDRESS'] ), 'reward_id='.$this->ipsclass->input['id']); //----------------------------------------- // Log and bog? //----------------------------------------- $this->ipsclass->admin->save_log("Re-ward Edited"); $this->ipsclass->admin->done_screen("Re-ward edited", "Re-wards Listings", "{$this->ipsclass->form_code}&code=list_rewards&mid={$member['id']}", 'redirect' ); } Kaydedip FTP'mize upload ediyoruz. /////////////////////////////////////////////////////////////////////// Açıyoruz : sources/action_public/topics.php Bunu Buluyoruz : CODE if ( $poster['id'] ) { $poster['members_display_name'] = "<a href='{$this->base_url}showuser={$poster['id']}'>{$poster['members_display_name']}</a>"; } 1 Satır Aşağıya (enter ile ) inip yapıştırıyoruz : CODE $row['rewards'] = $this->rewards($poster['id']); Tekrar Buluyoruz : CODE /*-------------------------------------------------------------------------*/ // Render the edit button /*-------------------------------------------------------------------------*/ Üzerine Ekliyoruz (üst satırda yazı varsa , enter'a basarak üst satırı boşaltıyor ve yapıştırıyoruz ) : CODE function rewards($id) { //----------------------------------------- // Get the Rewards By vadim88 &nb |