News:

Wondering if this will always be free?  See why free is better.

Main Menu

Good Post/Bad Post Mod

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

Previous topic - Next topic

Sabre™

Try the attached file and see how that works for you.
If you have any problems, then post back :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


markoal

Quote from: Sabre™ on July 30, 2009, 08:05:23 AM
Try the attached file and see how that works for you.
If you have any problems, then post back :)

Thanks a lot!
Man You help me A lot,  ;D ;) :D ;D

Sabre™

My pleasure mate.
The mod is working for you then?
No need for other template edits?
I moved where the function is usually displayed, so it is more 'noticeable'.

If all is good, then enjoy  ;D
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Eva

Hi! Great Mod!

Is there any way that the "thumbs up" & "thumbs down" will be displayed on the user's info separately, and not as a sum? (eg. Respect: +5/-2 or 5 likes/2 dislikes rather than Respect: 3)

That would make the mod just perfect for my needs!

thanks  :)

Alleks

Module working great until I switch forum to russian language it does not show "reputation under profile" and empty place in forum admin area.

I am ready to translate all needed phrases from English to Russian but please let me know what should I translate to make a russian translation for this great mod.

OutofOrder

Quote from: Eva on August 02, 2009, 03:02:35 PM
Hi! Great Mod!

Is there any way that the "thumbs up" & "thumbs down" will be displayed on the user's info separately, and not as a sum? (eg. Respect: +5/-2 or 5 likes/2 dislikes rather than Respect: 3)

That would make the mod just perfect for my needs!

thanks  :)
Sounds like an option for a future update. (I actually intended to do this for the first version, but in the end decided to leave it out of the mod.)

Quote from: Alleks on August 06, 2009, 05:58:02 AM
Module working great until I switch forum to russian language it does not show "reputation under profile" and empty place in forum admin area.

I am ready to translate all needed phrases from English to Russian but please let me know what should I translate to make a russian translation for this great mod.
Hi Alleks, please check out this file
http://www.simplemachines.org/community/index.php?action=dlattach;topic=318290.0;attach=110098
And thank you in advance, your translation will be very welcomed.


I'd like to know, if someone could check for me, are the UTF-8 translations working allright in UTF-8 set forums? Please confirm this if you are able to.

Alleks

Attached file is russian translation for Good/Bad post mod.

Alleks

When we can expect GB/BP with russian language included?

telles0808

Template Parse Error!

There was a problem loading the /Themes/default/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected ',' in .../Themes/default/Display.template.php on line 260
251: <tr', $context['gpbp_action'] == 'hide' ? ' id="gpbp_hidden_' . $message['id'] . '"' : '' ,'', $context['gpbp_action'] == 'hide' ? ' id="gpbp_hidden_' . $message['id'] . '"' : '' ,'><td style="padding: 1px 1px 0 1px;">';
252:
253: // Show the message anchor and a "new" anchor if this message is new.
254: if ($message['id'] != $context['first_message'])
255: echo '
256: <a name="msg', $message['id'], '"></a>', $message['first_new'] ? '<a name="new"></a>' : '';
257:
258: echo '
259: <table width="100%" cellpadding="3" cellspacing="0" border="0">
260: <tr><td class="', $context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2')), '">';
261:
262: // Show information about the poster of this message.
263: echo '
264: <table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">


after install it =\

OutofOrder

Quote from: telles0808 on August 13, 2009, 10:31:32 PM

*snip*

260: <tr><td class="', $context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2')), '">';

*snip*

after install it =\
I have to assume (by the looks of it and since you did not specify) that you've installed the SMF 1.1.x version of this mod. Did you manually edit Display.template.php?
Anyway, this should fix it for you:
Open /Themes/Default/Display.template.php
Code (Search for) Select
<tr><td class="', $context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2')), '">';

Code (Replace with) Select
<tr><td class="', $context['gpbp_action'] == 'hide' ? 'gpbp_hider ' : '', $context['gpbp_bad_post'] && $context['gpbp_action'] != 'none' ? 'gpbp_greyed' : ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2'), '">';


The bug looked like a repeated edit, as if you tried to install the mod more than once without uninstalling whatever modifications it would have done first.

OutofOrder

Quote from: Alleks on August 10, 2009, 03:43:49 AM
When we can expect GB/BP with russian language included?
Thanks for your translations.
I am sorry but can not specify a date at the moment. I have also some questions regarding this: have you tested this translation? Do these work in a UTF-8 enabled SMF forum?
I have to be careful not to mess with the mod installer so it actually works for Russian admins.

telles0808

I deleted the forum dir and replaced it with a brand new install. Now it's working right.

jak6868

hi - the voting arrows do not appear on firefox running on osx. I've confirmed this on two different macs.
they do appear on everything else (on windows computers they appear on firefox or anything else; and on macs they do appear in safari).

any ideas? thanks

jak6868

Quote from: jak6868 on August 16, 2009, 01:42:01 PM
hi - the voting arrows do not appear on firefox running on osx. I've confirmed this on two different macs.
they do appear on everything else (on windows computers they appear on firefox or anything else; and on macs they do appear in safari).

any ideas? thanks

actually, never mind.  When I upgraded to the latest firefox (3.5.2), it works fine.

IdanC

wonderful mod, thanks!

any kind of coding i can do in order to allow guests to vote?

OutofOrder

Thanks.
Quote from: IdanC on August 19, 2009, 06:08:08 PM
any kind of coding i can do in order to allow guests to vote?
You would have to implement IP-saving & IP-checking in order to prevent (at least a big part of) abuse, either from abusive users or unaware spider bots. This is the reason guests can't vote in this mod (i did consider guest voting at the beggining). It's some coding trouble.

IdanC

#96
yes, i tried, way out of my league... :)

but, i came across a new issue - i've used gpbp in a post i show on the index page. but each time the poor basterds vote, they are redirected to the actuall post.

i found this line in GoodPostBadPost.php
redirectexit(($score <= $modSettings['gpbp_hide_threshold'] ? 'revealmsg=' . $message .';' : '') . 'topic=' . $topic . '.msg' . $message . '#msg' . $message);


but if i disable it, i disable the mod.

any ideas?

OutofOrder

The redirection happens because the javascript code needed for the AJAX requests to happen is not loaded in the index page.
If you want to enable AJAX voting, you'll have to make sure that the index page loads the gpbp.js file, and that the Javascript PostVoting object oVotePost is created. About the latter, look for this code at the bottom of Display.template.php:

,
$context['gpbp_enabled'] ? '

var oVotePost = new PostVoting({
iBoard: ' . $context['this_board'] . ',
iTopic: ' . $context['current_topic'] . ',
sVoteDownAlt: "' . $txt['gpbp_vote_down'] . '",
sVoteUpAlt: "' . $txt['gpbp_vote_up'] . '",
sVotedDownAlt: "' . $txt['gpbp_voted_down_alt'] . '",
sVotedUpAlt: "' . $txt['gpbp_voted_up_alt'] . '",
sVotedDown: "' . $txt['gpbp_voted_down'] . '",
sToVoteDown: "' . $txt['gpbp_to_vote_down'] . '",
sVotedUp: "' . $txt['gpbp_voted_up'] . '",
sToVoteUp: "' . $txt['gpbp_to_vote_up'] . '",
sScriptUrl: "' . $scripturl . '",
sImagesUrl: "' . $settings['images_url'] . '"
});' : '', '

Make sure it is also added in a <script> tag in the HTML output source of your index page.

IdanC

* IdanC is doing the happy happy joy joy dance

thanks! works great!

Özgür

Quote from: OutofOrder on June 30, 2009, 12:11:33 PM
Thank you Php Coder Turkish, I'll sure be adding these :) Also, it would be great if there was another turkish speaker that could check those.

Thanks Sabre, djkmmo & [Daydreamer] for the spotted bugs. Looks like a new version fixing these problems is needed.

Parecelsus, the empty gpbp.js file bug seems to be a Firebug bug only. It doesn't happen with Firebug disabled or in any other browsers AFAIK.
I'll later take a look at your Display.template file, the bugfixes come first, so please hang on.


OutOfOrder New version coming soon ? (:

And how can i make a "Most liked posts" list?
So Long

Advertisement: