Good Post/Bad Post Mod

Started by OutofOrder, June 17, 2009, 10:08:41 AM

Previous topic - Next topic

Jade Elizabeth

#260
Hey there, I'm trying to integrate a custom mod into this and to be honest I'm lost in the mess of ternary operations in the code. I tried to make my own but I think I'm getting something wrong...

<div', $gpbp_action == 'hide' ? ' id="gpbp_hidden_' . $message['id'] . '"' : '' ,' class="', $message['approved'] ? ($gpbp_action == 'hide' ? 'gpbp_hider ' : '') . ($gpbp_badPost && $gpbp_action != 'none' ? 'gpbp_greyed' : ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2')) : 'approvebg', '" style="' , $message['approved'] && ($gpbp_action != 'hide') && ($gpbp_badPost && $gpbp_action = 'none') ? $color : '' , '">

My part is this tiny bit:
style="' , $message['approved'] && ($gpbp_action != 'hide') && ($gpbp_badPost && $gpbp_action = 'none') ? $myvariable : '' , '">

Basically I'm trying to say that if the post is approved and the good post bad post doesnt want anything with it, then "myvariable". I was looking at the source and what was there to do it but I think I messed up lol. I was wondering if you could please help me?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

[SiNaN]

I don't know what $gpbp_action can have but I guess intead of

$gpbp_action = 'none'

in your code you meant

$gpbp_action == 'none'

First one is assigning 'none' value to $gpbp_action, the other is checking whether $gpbp_action is equal to 'none' or not.
Former SMF Core Developer | My Mods | SimplePortal

Jade Elizabeth

It still doesnt work. Honestly this is going on 16 hours of trying to work this out, not counting breaks to eat and sleep, etc.

For some reason every variable used in the beginning of that line comes up empty when attempted to be used again. Even $myvariable which is defined before the code is called.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

TechPrince

Nice mod :) It would be nice to add a profile action as a repository for all the voted posts of that author and allow author of the post to see the voters list for his posts on topic view.

Bugo

This mod conflict with dQuoteSelection.
dQuoteSelection isn't work.

IdanC

have anyone noticed that even when guests are given permission to view voter, clicking on the icon, does'nt work.

for registered members it works just fine.

any clues?

tbk22

This is a great mod... ONe of the best... But Im having some problems installing it

Is this normal?



Should I mannually install?
=)

Alpay

#267
Turkish Translate :) For SMF 2 Rc 3


/Themes/default/languages/Help.turkish.php


$helptxt['gpbp_threshold'] = 'Üyeler Tema ve Düzenden Oy vermeyi düzenleyebilirler.Üyeler Kötü oy verilmemesini isteyebilirler.';
$helptxt['gpbp_display_respect'] = 'Tüm Saygı oylarının toplamıdır. Olumsuz oylar mevcut degildir.';




/Themes/default/languages/Who.turkish.php


// Good Post/Bad Post: it may be nice to let users know of this.
$txt['whotopic_gpbp'] = 'Oylama yapıyor, konu &quot;<a href="' . $scripturl . '?topic=%d.0">%s</a>&quot;.';



./Themes/default/languages/Modifications.turkish.php


// Good Post/Bad Post permission strings.
$txt['permissiongroup_gpbp'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu';
$txt['permissiongroup_simple_gpbp'] = 'Güzel Mesaj/Kötü Mesaj İzinleri';
$txt['permissionname_gpbp_manage'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu Ayarları';
$txt['permissionhelp_gpbp_manage'] = 'İzin ver';
$txt['cannot_gpbp_manage'] = 'Derecelendirmeye izin verilmesi.';
$txt['permissionname_gpbp_vote'] = 'Mesajlara Oyla (yukarı veya aşağı)';
$txt['permissionhelp_gpbp_vote'] = 'Olumlu veya olumsuz bir yazının sonucu değiştirmek için kullanım sağlar. Kurul da yapılandırılmış olması gerekir yazı oylama izin vermek gerekir. <br/> <br/> <strong> Not </ strong>: Konuyu Ziyaretçilerin Oylamasına \izin ver';
$txt['cannot_gpbp_vote'] = 'Maalesef, mesaj oylama izniniz yok.';
$txt['permissionname_gpbp_reveal'] = 'Kötü mesajlar';
$txt['permissionhelp_gpbp_reveal'] = 'kullanıcı mesajları bir düşük oy skor nedeniyle gizli olduğunu görmek için.';
$txt['cannot_gpbp_reveal'] = 'genel oylama tarafından gizli erişim olamaz.';
$txt['permissionname_gpbp_voterslist'] = 'Seçmen Listesini Görebilir';
$txt['permissionhelp_gpbp_voterslist'] = 'Kullanıcının konuyla ilgili oylama seçimlerini görmesini sağlar.';
$txt['cannot_gpbp_voterslist'] = 'Seçmen listesini görmeye yetkiniz yok.';
// Managing area.
$txt['gpbp_manage'] = 'İyi mesaj/Kötü Mesaj';
$txt['gpbp_managearea_basic'] = 'Temel Ayarlar';
$txt['gpbp_managearea_basic_desc'] = 'Güzel Mesaj/Kötü Mesaj Temel Ayarları';
$txt['gpbp_managearea_advanced'] = 'Gelişmiş Ayarlar';
$txt['gpbp_managearea_advanced_desc'] = 'Daha derin yapılandırma ayarlarını burada bulabilirsiniz.';
$txt['gpbp_managearea_tools'] = 'GPBP Araçları';
$txt['gpbp_managearea_tools_desc'] = 'Bu kısımda hızlıcana oy verenleri ve saygı seçimlerini manuel olarak değiştirme yapabilirsiniz.Not : Arama yaparkene oy üzerinde olmasına özen gösteriniz.';
$txt['gpbp_manage_title'] = 'Güzel Mesaj/Kötü Mesaj Yönetme';
$txt['gpbp_hide_action'] = 'Güzel Mesaj/Kötü Mesaj: ne yapmak istiyorsun?';
$txt['gpbp_hide_action_hide'] = 'Gizle.';
$txt['gpbp_hide_action_grey'] = 'Grileştir.';
$txt['gpbp_hide_action_none'] = 'Hiç birşey yapma.';
$txt['gpbp_settings'] = 'Güzel Mesaj/Kötü Mesaj (GP/BP) Ayarlar';
$txt['gpbp_bad_threshold'] = 'Kötü Mesaj Eşiği';
$txt['gpbp_bad_threshold_desc'] = 'Bu değeri şu anda herhangi bir yazı ya da aşağıdaki Kötü Mesaj olarak işaretlenir.';
$txt['gpbp_show_respect'] = 'Saygıyı Göster';
$txt['gpbp_show_respect_desc'] = 'Profil Özetinde Saygı Derecesini gösterir.';
$txt['gpbp_affected_boards'] = 'Aktif Olacak Bölümler';
$txt['gpbp_enable_boards'] = 'Etkinleştir GP/BP Kurallarda';
$txt['gpbp_enable_boards_desc'] = 'oylama olacak olan Komiteleri seçin. <br /> <br /> <strong> Not: </ strong> Yazı silindi asla oy verilmedi. Yeniden bir konu gönderilmesi oylama sağlayarak sadece önceki oy görüntülemeye yol açacak.';
$txt['gpbp_choose_boards'] = 'Seçebileceğiniz Yer';
$txt['gpbp_display_stats'] = 'İstatistiklerde Aktifleştir?';
$txt['gpbp_display_stats_desc'] = 'Görüntü Seçin <strong>Top 10 Mesaj Puanı</strong> listesi ve  <strong>10 En İyi Mesaj</strong> users.';
$txt['gpbp_show_best_topics'] = 'Ana Kısımda "Haftalık Gösterim":';
$txt['gpbp_show_best_topics_desc'] = '<strong>Forum İstatistikleri</strong> in üstünde, haftalık olarak gösterilir sizin belirleyeceginiz sayı ile.<br /><strong>unutmayın 0 olarak ayarlanırsa deaktif olur.</strong>';
$txt['gpbp_button_set'] = 'Gösterilecek buton tipi :';
$txt['gpbp_button_set_desc'] = 'Oylama buton sitil seçimi.';
$txt['gpbp_users_choice'] = 'Kullanıcıların GP/BP kendi ayarları';
$txt['gpbp_users_choice_desc'] = 'Bu seçeneği üyeleri kendi ayarlarını seçmek için izin vermek için kontrol edin (gri gizlemek aşımı, hiçbir şey), ya da işaretini kaldırın Geçerli ayarları gücüne. <br /> <strong> Üye Seçenekler giderek geçerli tema ayarlarını değiştirebilirsiniz < Temalar yönetimi alanında / strong> bölümünde.';
$txt['gpbp_users_choice_none'] = 'kullanıcılar için tercih "Oysuz" Kötü Yayın';
$txt['gpbp_users_choice_none_desc'] = 'Kötü görüntülemeye izin vermeyi denetleyin Normal mesaj olarak Yayınlar. Bu bir tercihdir seçenekler geçersiz değildir, bu nedenle, yine de tamamen devre dışı bırakmak için üye tema seçenekleri düzenlemek zorunda.';
$txt['gpbp_voters_list_limit'] = 'Seçmenlerin limitlenmesi:';
$txt['gpbp_voters_list_limit_desc'] = 'Üyeler bu oy vermişlerin listesinde alfebatik olarak sırılanmaz.<br /> <strong>Not:</strong> Javascript aktif olan tararıyıcılarda çalışır.';
$txt['gpbp_disable_negative_voting'] = 'Olumsuz oylamayı pasif et?';
$txt['gpbp_disable_negative_voting_desc'] = 'Sadece iyi oy veren kişileri istiyorsanız  <strong>bu şıkkı seçiniz</strong>.';
$txt['gpbp_post_count_limit'] = 'Oy kullanması için üyenizin kaç iletiye sahip olsun:';
$txt['gpbp_post_count_limit_desc'] = 'Üyelerin oy verebilrmesi için iletisi sınırlandırması işlemi .<br />Eğer 0 secerseniz Aktif Olmayacaktır.';
$txt['gpbp_vote_search'] = 'GPBP Oy Araaması';
$txt['gpbp_vote_search_filters'] = 'Filtre ederek özel oy araması. Boş değerler dikkate alınmayacaktır.';
$txt['gpbp_vote_search_filter_by'] = 'Fitre ...';
$txt['gpbp_vote_search_topic_id'] = 'Konu ID:';
$txt['gpbp_vote_search_msg_id'] = 'İleti ID:';
$txt['gpbp_vote_search_poster_name'] = 'İleti Sahibi kullanıcısı:';
$txt['gpbp_vote_search_voter_name'] = 'Oylayıcı Kullancısı:';
$txt['gpbp_vote_search_score'] = 'Puan:';
$txt['gpbp_vote_search_any_score'] = 'Herhangi bir puan.';
$txt['gpbp_vote_list'] = 'Oy Listesi';
$txt['gpbp_vote_list_showing'] = 'Gösterilen %s den %s toplam seçmen.';
$txt['gpbp_vote_list_poster'] = 'İleti Gönderen';
$txt['gpbp_vote_list_voter'] = 'Oy Veren';
$txt['gpbp_vote_list_vote'] = 'Oy';
$txt['gpbp_vote_list_check'] = 'Tüm seçmenleri Tıklayarak(Check) Edebilirsiniz.';
$txt['gpbp_vote_list_deleted'] = 'Silinsinmi?';
$txt['gpbp_vote_list_mdeleted'] = 'Silindi.';
$txt['gpbp_vote_list_account_deleted'] = 'Seçmen(üyelik) #%s silindi.';
$txt['gpbp_vote_list_subject'] = 'Konu Başlığı:';
$txt['gpbp_vote_list_topic_deleted'] = 'Konuyu Sil?';
$txt['gpbp_vote_list_no_votes'] = 'Herhangi bir oy bulunamadı.';
$txt['gpbp_votes_deleted_s'] = '%s oy silindi.';
$txt['gpbp_votes_reversed_s'] = '%s oy tersine döndürüldü.';
$txt['gpbp_votes_deleted'] = '%s oy silindi.';
$txt['gpbp_votes_reversed'] = '%s oy tersine döndürüldü.';
$txt['gpbp_votes_delete'] = 'Sil';
$txt['gpbp_votes_reverse'] = 'Puanları Tersine Döndür';
$txt['gpbp_votes_all_checked'] = 'Tüm oylar kontrol et.';
$txt['gpbp_votes_also_update'] = 'Saygı güncenllenmesi güncellendi.';
$txt['gpbp_filtered_edit'] = 'Düzenlenmediki Tüm Filtre Sonuçları';
$txt['gpbp_filtered_edit_desc'] = 'Eğer sonuçlardaki tüm verileri düzenlemek istiyorsanız aşağıdaki formu kullanınız. <em>Yalnızca bir kaç oy düzenleyecekseniz üst kısımı kullanabilirsiniz.</em>';
$txt['gpbp_filtered_delete'] = 'Aramadaki Tüm oyları Sil.';
$txt['gpbp_filtered_reverse'] = 'Ters sonuçların tümünü ara.';
$txt['gpbp_filtered_confirm'] = 'Tümünü düzenlemeye ve %s oylar için eminmisiniz?';
$txt['gpbp_votes_deleted_filter'] = '%s oy silindi. %s ve üye saygı güncellenmesi. %s ileti skoru silindi.';
$txt['gpbp_votes_reversed_filter'] = '%s ters oy. %s üye saygı güncellenmesi. %s ileti skoru güncellenmesi.';
$txt['gpbp_respect_success'] = 'Saygı değiştirildi %s.';
$txt['gpbp_respect_not_needed'] = 'Herhangi bir değer seçilmedi';
$txt['gpbp_score_success'] = 'Yazı puan güncellendi #%s';
$txt['gpbp_orphaned_title'] = 'Boşda kalan Oy temizleme';
$txt['gpbp_orphaned_desc'] = 'İletisi silinmiş(veritabanında) ve boşda kalmış oyları ayarlamaya yarar. top 10 ve saygıyı etkileyecektir';
$txt['gpbp_orphaned_report'] = 'Sonuç <strong>%s</strong> boşda kalmış oy var.';
$txt['gpbp_orphaned_go'] = 'Boşda kalmış oyları sil.';
$txt['gpbp_orphaned_success'] = '%s oy silindi.';
$txt['gpbp_totals'] = 'Toplamı Say';
$txt['gpbp_totals_success'] = 'Yeniden sayma işlemi bitti %s üye %s ileti mevcut.';
$txt['gpbp_totals_desc'] = 'Yeniden sayma işlemi saygı,ileti ve üyelerin tüm puanlarını yapar.<br /><strong>Not: </strong>Bu işlem uzun ve sitenizi zorlayabilir. Lütfen işlemi başlatmadan önce <em>Bakım moduna</em> almanız önerilir.';
// Managing area errors.
$txt['gpbp_names_not_found'] = 'Aradığınız üye üye listesinde bulunamadı.';
$txt['gpbp_voter_not_found'] = 'Aradığınız Oy verici bulunamadı.';
$txt['gpbp_poster_not_found'] = 'Aradaığınız iletici/ileti bulnamadı.';
$txt['gpbp_vote_not_sent'] = 'Oy seçilmedi.Lüfen yeniden deneyiniz';
$txt['gpbp_filter_edit_needed'] = 'Herhangi bir işlem türü secilmedi. Geri dönerek lütfen tekrar deneyiniz';
$txt['gpbp_chosenmember_not_found'] = 'Üye adı yalnış lütfen geri dönerek lütfen tekrar deneyiniz.';
$txt['gpbp_message_not_found'] = 'Belirttiğiniz ID bulunamadı.';
// Voting errors.
$txt['gpbp_lacks_msg'] = 'Belirttiğiniz (geçerli) mesajı puanla.';
$txt['gpbp_notinthisboard'] = 'Maalesef, bu kurulu değil \'t sonrası oylama etkinleştirdiyseniz.';
$txt['gpbp_msg_not_found'] = 'Belirttiğiniz Mesaj bulunamadı.';
$txt['gpbp_msg_not_approved'] = 'İleti moderatör tarafından oylananada tek oy seçimi yapamazsınız.';
$txt['gpbp_msg_own_voted'] = 'Üzgünüm, kendi yazılarınıza oy veremessin.';
$txt['gpbp_can_not_vote_down'] = 'Üzgünüm, Oy aşağı indiremezsiniz.';
$txt['gpbp_must_fill_field'] = 'Lütfen daha cok alanı doldurunuz.';
// General user interface.
$txt['gpbp_respect'] = 'Saygı';
$txt['gpbp_post_score'] = 'Bu Yazının Şuanki Puanı.';
$txt['gpbp_vote_down'] = 'Kötü';
$txt['gpbp_vote_up'] = 'İyi';
$txt['gpbp_voted_down_alt'] = 'Oy Aşağı.';
$txt['gpbp_voted_up_alt'] = 'Oy Yukarı.';
$txt['gpbp_voted_down'] = 'Yazıdan oyumu geri al.';
$txt['gpbp_to_vote_down'] = 'Yazıyı beğenmedim.';
$txt['gpbp_voted_up'] = 'Yazıdan oyumu geri al.';
$txt['gpbp_to_vote_up'] = 'Yazıyı beğendim.';
$txt['gpbp_hidden'] = 'Gizle.';
$txt['gpbp_show'] = 'Göster.';
$txt['gpbp_member_hide_action'] = 'Oy lanan: mesajlar puanlama ile ne yapmak <strong>%s</strong> istiyorsun?';
$txt['gpbp_top_voters'] = 'Top 10 Mesajlar';
$txt['gpbp_most_respected'] = '10 En iyi Mesaj';
$txt['gpbp_show_voters'] = 'Oy verenleri Göster';
$txt['gpbp_voters_list'] = 'Oy verenler:';
$txt['gpbp_no_voters'] = 'Oy verilmemiş.';
// The following strings are meant to be used in "Respect was/was not updated" below.
$txt['gpbp_was'] = 'oldu';
$txt['gpbp_was_not'] = 'olmadı';
// Moderation log
$txt['modlog_ac_gpbp_deleted_votes'] = 'GP/BP: Silindi {amount} ileti oyu. Saygı <strong>{respect}</strong> güncellendi.';
$txt['modlog_ac_gpbp_reversed_votes'] = 'GP/BP: Ters {amount} ileti oyu. Saygı <strong>{respect}</strong> güncellendi.';
$txt['modlog_ac_gpbp_score_updated'] = 'GP/BP: Skor değişti {score} ve iletisi #{msg}';
$txt['modlog_ac_gpbp_respect_updated'] = 'GP/BP: Saygısı değiştirildi {respect} ve üye {membername}';
$txt['modlog_ac_gpbp_clean_orphaned'] = 'GP/BP: boşta kalmış oylar {orphaned} silindi.';
$txt['modlog_ac_gpbp_basic_settings'] = 'GP/BP: Temel Ayarlar Güncellendi.';
$txt['modlog_ac_gpbp_boards'] = 'GP/BP: Aktif olacak bölümler güncellendi.';
$txt['modlog_ac_gpbp_advanced_settings'] = 'GP/BP: Gelişmiş ayarlar güncellendi.';
// End of Good Post / Bad Post strings.



and :)

..
Manual changes
Edit the score of a post ...  GPBPManage.template.php

no $txt .

untranslate :)

outsider147

Hi,

what I was wondering. Is there a possibility to recreate the code into the fact that the topicstarter can vote his post and all others just vote on his post and not on their own.
I'm looking for a system where people can vote  a good or bad call on webshops. If a topicstarter has a bad experience with a seller he should be able to vote on this shop. If all other posters can do the same in his post, you get an upcount or downcount in just one posting so everybody can see the average of this shop.

Can anyone help me out on this one?

Lars

tbk22

After the install I had this error on my forum index

Quote
Ocorreu um erro! (an error occured)
Database error, given array of integer values is empty. (id_msgs)

I installed something manually cuz it gave an error through package parser so maybe I did some mistake

But then by going directly to a topic link and voting 1 post up/down I reloaded de forum index and it was ok after that...

So Im guessing the error had to do with having no votes at the beggining, still might be some  error I made in the manual install

How can I fix it?

Can you know where my mistake was?
=)

Calamita

Hi,

I have installed this Mod a few minuts ago, but now I see, that only Administratores can vote Posts. Is this normal? Because my members want to vote too. I am die only one who can vote now.

Has anyone an idea and can help me?

diablo3x.dk

Just installed this mod on rc3 with SimplePortal. Everything went smooth but no gp/bp menu anywhere. Not even in the SimplePortal menu as someone described earlier.

So; installed perfectly (no errors and installed in custom theme) but nowhere to play around with the options of the mod. Maybe I can access the gp/bp options some other way? I mean, it seems like it installed perfectly.

Can someone please help? Thanks.

Verbist

@Calamita, you may have already figured this out on your own, but under Advanced Configuration in GPBP, check the "Restrict voting to members with at least this many forum posts" value. That could be your problem.

Verbist

Does anyone know, is there a way to automatically delete posts, not just hide them, based on a number of downvotes?

anidea

#274
Hi!  Cool mod, now can I get it to work?  hehehe

smf 2 RC3.  The whole thing was a manual install.  I've been over the edits in load.php about 20 times now...

I'm getting the following error:

"Database error, given array of integer values is empty. (id_msgs)"

Please someone help?


Bugo

Quote from: anidea on July 12, 2010, 11:23:50 PM
I'm getting the following error:

"Database error, given array of integer values is empty. (id_msgs)"

Please someone help?
Are you change Display "Messages of the week" option?
Try change it to "0" and save settings.

anidea

Quote from: Bugo on July 13, 2010, 05:55:01 AM
Are you change Display "Messages of the week" option?
Try change it to "0" and save settings.
Thank you, Bugo :)

It totally was that.  I think it might've errored on the fact that it had just been installed and nobody had voted yet.  My ultimate solution was to comment out the messages of the week (hadn't realized that just turning it off would work lol) then I put in some votes, un-commended, and the error went away!

Calamita

Quote from: Verbist on July 07, 2010, 01:37:37 PM
@Calamita, you may have already figured this out on your own, but under Advanced Configuration in GPBP, check the "Restrict voting to members with at least this many forum posts" value. That could be your problem.

Hi, thanks for your answer, but that isn that problem. The number in the value is "0".

Can someone else help me? Only administratores can vote posts. I can vote with my account, which has more dann 4000 posts and also with my Test-Account, wo has only one post.

Klaudo

How do i get the code to show messages of the weeks ??

I want to show it in my portal.. Please help Me :'( :'(

anidea

Hi!  This is an awesome mod!  A few questions, if anyone has the time....

I like the idea of members sort of moderating themselves with this mod (ie. vote a post down & it goes away).  BUT we've had the problem of retaliatory voting, which has become a nightmare for me, 'cause every time it happens, I have to go and erase votes lol.

So in an attempt to prevent retaliatory voting, is there any way I could:

1. Limit users to, say, 3 negative votes per day?
2. Have a member's total respect be based on positive voting only, and only use the negative voting in the post? 
(the reason being that the forum is very new and users are earning negative respect, which is hurting their delicate sensibilities)

Thanks!

Advertisement: