News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Good Post/Bad Post Mod

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

Previous topic - Next topic

IdanC


TurtleKicker

I really want to try this out. I've installed it on my test SMF2 RC3 forum.

The install test only failed on one edit of one file (sources/Display.php) but it was a trivial and simple edit. However, I can't get the admin part to appear.

I'm using the Overview Light theme (and I did check the box to install into that theme too, which it did with no errors), but I also tried switching back to Curve and I still can't find the admin panel for this mod.

Suggestions?

wwwserfer

in SMF 2.0 this feature present:

Quote- Toggle voters lists to see who voted on a post (and what was the vote).

in SMF 1.1.11 possible to do:

- who & how voted list

Thanks!

TurtleKicker

Follow-up: I found the controls in the admin panel. I have SimplePortal installed and for some reason, it put the control panel under the SimplePortal menu as opposed to the Forum menu.

So I've got it working now but this is certainly a bug if a user has SP installed. It doesn't belong there.

OutofOrder

Quote from: wwwserfer on March 26, 2010, 11:16:40 AM
in SMF 1.1.11 possible to do:
- who & how voted list
Hi. This mod won't be updated anymore for SMF 1.1.x except in the case a new SMF update breaks it. Thanks for your comment.
Quote from: sremick on March 26, 2010, 11:24:49 AM
Follow-up: I found the controls in the admin panel. I have SimplePortal installed and for some reason, it put the control panel under the SimplePortal menu as opposed to the Forum menu.

So I've got it working now but this is certainly a bug if a user has SP installed. It doesn't belong there.
Hello. Unfortunately I'm not familiar with the inner workings of SimplePortal. Maybe someone else has experimented this and found a workaround? Anyone?

MegaByte

#225
Nice mod.  There's an easy-to-fix problem when running it on a PostgreSQL database:
Database Error: ERROR: column "m.real_name" must appear in the GROUP BY clause or be used in an aggregate function
LINE 2: SELECT l.id_member, COUNT(*) AS votes, m.real_name
^

SELECT l.id_member, COUNT(*) AS votes, m.real_name
FROM smf_log_gpbp l
LEFT JOIN smf_members m ON (m.id_member = l.id_member)
GROUP BY l.id_member
ORDER BY votes DESC
LIMIT 10

Just do what the error suggests and it works.

I also had some problems running the mod in conjunction with SMF caching (memcache).  Posts disappear or turn gray and counts are not updated until the cache is flushed.

wwwserfer

#226
QuoteHi. This mod won't be updated anymore for SMF 1.1.x except in the case a new SMF update breaks it. Thanks for your comment.

too bad..  :-\ not possible select from the database values from gpbp table---> output in list?

In any case, thanks for the reply!

New question:

how admin can reset points to zero of any message (unhide message)?

sorry for my bad english  :-[

best wishes!

TurtleKicker

Thanks, [SiNaN]. Hopefully OutofOrder can incorporate that bugfix into the next version.

Also, a feature request:

Can we have the ability to re-collapse a hidden post after expanding it? Right now, expanding it is a slick AJAX function but re-collapsing it requires a page-reload.

balti27

#228
Hello everyone, Great script !!
I have maybe a small problem for u programmers , and that is GPBP only shows to the administrators: first attachmaint

and thise is how it looks for users, it shows only the number of respects "0" given in thise topic: second attachmaint

Can anyone redirect me to a topic which deals thise issue or tell me what i am doing wrong.
And i tryed all combinations, i enebeled all boards for GP/BP


Snogmarr


OutofOrder

Quote from: MegaByte on March 27, 2010, 04:00:01 PM
Nice mod.  There's an easy-to-fix problem when running it on a PostgreSQL database:
Database Error: ERROR: column "m.real_name" must appear in the GROUP BY clause or be used in an aggregate function
LINE 2: SELECT l.id_member, COUNT(*) AS votes, m.real_name
^

SELECT l.id_member, COUNT(*) AS votes, m.real_name
FROM smf_log_gpbp l
LEFT JOIN smf_members m ON (m.id_member = l.id_member)
GROUP BY l.id_member
ORDER BY votes DESC
LIMIT 10

Just do what the error suggests and it works.
Thanks for the report.
QuoteI also had some problems running the mod in conjunction with SMF caching (memcache).  Posts disappear or turn gray and counts are not updated until the cache is flushed.
Ooh. A power user :) Are those the only symptoms?
I'm going to have to take a look at the cache functions to find out how to fix this, it shouldn't be too hard. The problem is i don't have a test site using caching, so it'd be blind guesses :-\

Quote from: [SiNaN] on March 31, 2010, 01:12:28 PM
*snip*
Thanks for the heads up. I'll try tweaking the installer.

Quote from: sremick on April 02, 2010, 09:42:46 AM
Can we have the ability to re-collapse a hidden post after expanding it? Right now, expanding it is a slick AJAX function but re-collapsing it requires a page-reload.
--> http://board.koffer.ee/files/what_has_been_seen_cannot_be_unseen_695.jpg
Seriously though, I can't really understand why a user would need to re-collapse a hidden post. Could you elaborate?

Quote from: balti27 on April 04, 2010, 07:24:45 PM
I have maybe a small problem
Indeed, your problem is because you haven't configured the GPBP permissions for your users.
Go to the permissions area and look for the Good Post Bad Post membergroup permissions.

TurtleKicker

Quote from: OutofOrder on April 05, 2010, 06:27:32 AM

Seriously though, I can't really understand why a user would need to re-collapse a hidden post. Could you elaborate?
Sometimes a user will be curious and want to see just what was in the post to make it "bad" (and perhaps if they want to also vote it down themselves). You can't vote on a post unless you can read it.

If the user then votes it down (or simply decides "yes, that was a bad post after all") they'll want it to return to "hidden" while they continue to read the rest of the thread.

It was something that not only occurred to me but also came up as a request from my test users.

PureBwa

Hey,

This seems like the perfect mod for my board, but I'm having some issues.  Apologies in advance if this has already been discussed.  I'm running SMF 1.1.11.  To install the mod, I downloaded the hxxp:goodpostbadpost.1.1.3.zip [nonactive] file.  I went through the Packages center in my admin dashboard>Download Packages>Upload a Package.  I uploaded the zip, applied it and everything.  The Good Post/Bad Post option appeared under my forum options, and I applied it to my board.

Additionally, I made sure the appropriate membergroups had the permissions to use Good Post/Bad Post.  The Top 10 Post Voters stats appear on my stats page.  Everything checks out.  Except the actual vote buttons!  They don't show up on any posts.  Based on some initial research, I'm thinking it has something to do with:

1) My theme settings (although I'm using Classic YaBB SE Theme with just some minor color tweaks)

2) CHMODing the file (which I kinda understand, just not sure where I do that, or what files I would have to CHMOD)

Any tips?  I'd love to implement this mod on my forum, but I'm growing frustrated trying to install it.  Would I be better off upgrading SMF to the lastest 2.0 build?  Thanks for your help, looking forward to figuring this out.

PureBwa

Quote from: PureBwa on April 05, 2010, 10:29:45 PM
Hey,

This seems like the perfect mod for my board, but I'm having some issues.  Apologies in advance if this has already been discussed.  I'm running SMF 1.1.11.  To install the mod, I downloaded the hxxp:goodpostbadpost.1.1.3.zip [nonactive] file.  I went through the Packages center in my admin dashboard>Download Packages>Upload a Package.  I uploaded the zip, applied it and everything.  The Good Post/Bad Post option appeared under my forum options, and I applied it to my board.

Additionally, I made sure the appropriate membergroups had the permissions to use Good Post/Bad Post.  The Top 10 Post Voters stats appear on my stats page.  Everything checks out.  Except the actual vote buttons!  They don't show up on any posts.  Based on some initial research, I'm thinking it has something to do with:

1) My theme settings (although I'm using Classic YaBB SE Theme with just some minor color tweaks)

2) CHMODing the file (which I kinda understand, just not sure where I do that, or what files I would have to CHMOD)

Any tips?  I'd love to implement this mod on my forum, but I'm growing frustrated trying to install it.  Would I be better off upgrading SMF to the lastest 2.0 build?  Thanks for your help, looking forward to figuring this out.

Made some progress, but still some issues:

1) I went through and manually installed it by adding the code myself.  As a result, the voting function is working.  Unfortunately, I'm not getting the arrow images to show up - just the text saying 'Vote Up/Down'.  This isn't a dealbreaker by any stretch, but I'd much prefer to figure out how to get the arrows to show up.  Any ideas?

2) The problem was certainly that I'm using the Classic theme as opposed to the default.  I was able to edit the corresponding files in the Classic folder, but some files do not match up (i.e. there are files in the Themes/default folder that are not there in the Themes/classic folder).  I think this might be part of my problem with the arrows not showing up.  Which part of the code controls that?

3) The Vote Up/Down links and the score are centered in the header bar of each post.  Any way to right justify them so they're directly next to my quote/modify/delete buttons?

Thanks for any help that anyone can offer.

OutofOrder

Quote from: sremick on April 05, 2010, 11:34:29 AM
If the user then votes it down (or simply decides "yes, that was a bad post after all") they'll want it to return to "hidden" while they continue to read the rest of the thread.
Sorry to say I'm not really convinced by this explanation. A user that votes down a post doesn't really have to hide the post again in order to keep reading a thread. The post won't show again in the following visits.
However by your reasoning you could say that a user who votes down a post should still be able to hide it simply because he didn't like it, regardless if it has become a "Bad post". And I'm not sure this is really the point of GP/BP.

Still, I suppose it may be a valid case in certain boards where content tends to be NSFW, so I guess it could be implemented with this in mind.

Quote from: PureBwa on April 06, 2010, 11:38:31 AM
1) I went through and manually installed it by adding the code myself.  As a result, the voting function is working.  Unfortunately, I'm not getting the arrow images to show up - just the text saying 'Vote Up/Down'.  This isn't a dealbreaker by any stretch, but I'd much prefer to figure out how to get the arrows to show up.  Any ideas?

2) The problem was certainly that I'm using the Classic theme as opposed to the default.  I was able to edit the corresponding files in the Classic folder, but some files do not match up (i.e. there are files in the Themes/default folder that are not there in the Themes/classic folder).  I think this might be part of my problem with the arrows not showing up.  Which part of the code controls that?

3) The Vote Up/Down links and the score are centered in the header bar of each post.  Any way to right justify them so they're directly next to my quote/modify/delete buttons?
For the casual reader: these are troubleshooting instructions for the SMF 1.1.x version
1) Make sure the arrow images are installed in your default theme /images folder. (It should be Themes/default/images) Those are five files prefixed with "gpbp_".
2) Themes other than the default theme grab the missing files off the default one. This means that any missing file is actually not needed for the theme to work as expected, and that any new mod you install should always be working without problems in the default theme before you start modifications in other themes.
3) This is because the mod is trying to use the default gpbp.css stylesheet. Your custom theme most likely needs a stylesheet of its own. I suppose you're using an unmodified Classic theme, so i'll try to figure this out for you in my local installation.
BBS.

OutofOrder

#235
Quote from: OutofOrder on April 07, 2010, 08:50:36 AM
1) Make sure the arrow images are installed in your default theme /images folder. (It should be Themes/default/images) Those are five files prefixed with "gpbp_".
This is a bug, actually. It first tries to load the images from the default images folder, but after voting it tries to reload them from the current theme images folder.
In order to fix this, find in your custom theme's Display.template.php file

sImagesUrl: "' . $settings['images_url'] . '"

replace with

sImagesUrl: "' . $settings['default_images_url'] . '"


Edit:
here's the gpbp.css file modified to use in Classic YaBB SE. Simply install it in your /Themes/classic folder. It will fix the positioning of the voting buttons and score.

TurtleKicker

Quote from: OutofOrder on April 07, 2010, 08:50:36 AM
Sorry to say I'm not really convinced by this explanation.
That's unfortunate, since we have multiple people who independently feel like the feature would be useful. :)

QuoteA user that votes down a post doesn't really have to hide the post again in order to keep reading a thread.
Of course not, but if a post has been voted below the threshold to be "hidden", then it'd be nice for it to not clutter up the thread.

QuoteThe post won't show again in the following visits.
No, but why should the user have to re-load the page just to unclutter the thread? Especially when there's existing Javascript functionality to expand a hidden post without reloading the page.

QuoteHowever by your reasoning you could say that a user who votes down a post should still be able to hide it simply because he didn't like it, regardless if it has become a "Bad post". And I'm not sure this is really the point of GP/BP.
I agree, that's not the point of the mod. But that's not functionality I'm asking for either. ;)

Look at it this way:

The point of this mod is to allow certain posts to be hidden if the collective up/down votes fall below a certain threshold. If a post has already fallen below, it only takes 1 up vote to push it back above. So to allow the masses to push a truly bad post far below the threshold, far enough to make their opinion heard so that a few rogue up votes can't undo it, then they still need a convenient way to briefly view an already hidden post. Chances are, most of these hidden posts that they briefly view are going to indeed going to be "bad" posts, so why force them to leave them visible until next page reload, when the point of the mod is to be able to unclutter threads from these bad posts in the first place?

If a user has to reload the page just to hide them again, they're going to be less-inclined to briefly view them to see if they deserve to be pushed down with even more down votes, which means bad posts will more-easily rise back to the top again. Otherwise a person has to constantly be unhiding posts just to consider their vote, stuck with the posts visible and thereby making the mod worthless since nothing is ultimately being hidden for them.

I'm not sure if the above makes more sense, or is just rambling... it was obvious to me in the beginning, so I wasn't sure how to further explain it. :) Sorry!

OutofOrder


Alleks

I installed mod but looks like script does not work.. when I (or any other on forum) click a voting button nothing happens. I catched Mozilla page error report. Here is it:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Thu, 8 Apr 2010 12:58:48 UTC


Message: Object required
Line: 27
Char: 2
Code: 0
URI: http://www.betonbasket.ru/forum/Themes/default/scripts/gpbp.js?2_0 [nofollow]


Where could be a problem?

Alleks

any help? Looks like GPBP script does not load for some reason because it does not load when I click to view voters list.. why this happens? Maybe some conflicts with hosting or with russian version?

Advertisement: