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

NEOne15

'// Good Post/Bad Post: it may be nice to let users know of this. $txt['whotopic_gpbp'] = 'Voting a message from "%s".';'

This appears at the top of my Administrative Panel index, but on no other pages.

margarett

Check for that text in Modifications.english.php after the final ?>
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Moniker

#522
Quote from: CedarMill on April 21, 2014, 12:38:01 PM
rik300, this module works on SMF 2.0.7 8)

I have tried changing the versions as described previously and I am not able to get it to install. I'm running 2.0.7.

Anyone get it going in 2.0.7? Is there a fix or modification to the files that I missed?

If anyone can help, I would really appreciate it.

Edit: I got it working by emulating version 2.0.4 - see: http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version

Moniker

Quote from: NEOne15 on May 05, 2014, 06:53:44 PM
'// Good Post/Bad Post: it may be nice to let users know of this. $txt['whotopic_gpbp'] = 'Voting a message from "%s".';'

This appears at the top of my Administrative Panel index, but on no other pages.
I am getting this very same thing and can't find the cause.

Quote from: margarett on May 05, 2014, 06:58:52 PM
Check for that text in Modifications.english.php after the final ?>
I looked here and found nothing that resolved the problem.




Anyone else experiencing this? Anyone know if a fix?

margarett

Check Who.english.php
According the manual installation instructions, that's where that text is.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

ExSpirit

#525
Currently each user had total "Respect" shown, but I would like to show number of "Good posts" and number of "Bad posts". Can someone help me where I can get those numbers from?

It would also be great if we could specific in permissions page who can vote up and who can vote down (not it's only 1 permission for both), this way normal members can only vote up, and special members also down...

DDDD11

#526
I just did the mod installation and it said successful. I can click on the basic and advanced configuration settings but when I click on GPBP Tools it gives this error:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/GoodPostBadPost.php
Line: 505

Also, if I enable GP / BP on any board I get his error when clicking on a post:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/Display.php
Line: 1161

Here is partial log from the mysql.

140707 13:37:26   127 Connect   root@localhost on
                 
                  127 Query     CREATE TABLE smf_log_gpbp
(
        `id_msg` int(10) unsigned NOT NULL ,
        `id_member` mediumint(8) unsigned NOT NULL ,
        `score` smallint(2) NOT NULL ,
        `id_poster` mediumint(8) unsigned NOT NULL ,
        `log_time` int(10) unsigned NOT NULL ,
        KEY id_member (id_member),
        KEY id_poster (id_poster),
        PRIMARY KEY (id_msg,id_member)) TYPE=MyISAM
                  127 Query     SHOW FIELDS
                FROM `smf_messages`
                  127 Query     ALTER TABLE smf_messages
                        ADD `gpbp_score` smallint(6) NOT NULL default '0'
140707 13:37:28   127 Query     SHOW FIELDS
                FROM `smf_members`
                 
It looks like the tables are removed: here is the smf_log_packages log:

a:4:{i:0;a:2:{i:0;s:12:"remo
ve_table";i:1;s:12:"smf_log_gpbp";}i:1;a:3:{i:0;s:13:"remove_column";i:1;s:10:"smf_boards";i:2;s:11:"enable_gpbp";}i:2;a:3:{i:0;s:13:"remove_colu
mn";i:1;s:12:"smf_messages";i:2;s:10:"gpbp_score";}i:3;a:3:{i:0;s:13:"remove_column";i:1;s:11:"smf_members";i:2;s:12:"gpbp_respect";

So what is going on with this?

DDDD11

#527
Quote from: DDDD11 on July 07, 2014, 04:48:16 PM
I just did the mod installation and it said successful. I can click on the basic and advanced configuration settings but when I click on GPBP Tools it gives this error:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/GoodPostBadPost.php
Line: 505

Also, if I enable GP / BP on any board I get his error when clicking on a post:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/Display.php
Line: 1161

Here is partial log from the mysql.

140707 13:37:26   127 Connect   root@localhost on
                 
                  127 Query     CREATE TABLE smf_log_gpbp
(
        `id_msg` int(10) unsigned NOT NULL ,
        `id_member` mediumint(8) unsigned NOT NULL ,
        `score` smallint(2) NOT NULL ,
        `id_poster` mediumint(8) unsigned NOT NULL ,
        `log_time` int(10) unsigned NOT NULL ,
        KEY id_member (id_member),
        KEY id_poster (id_poster),
        PRIMARY KEY (id_msg,id_member)) TYPE=MyISAM
                  127 Query     SHOW FIELDS
                FROM `smf_messages`
                  127 Query     ALTER TABLE smf_messages
                        ADD `gpbp_score` smallint(6) NOT NULL default '0'
140707 13:37:28   127 Query     SHOW FIELDS
                FROM `smf_members`
                 
It looks like the tables are removed: here is the smf_log_packages log:

a:4:{i:0;a:2:{i:0;s:12:"remo
ve_table";i:1;s:12:"smf_log_gpbp";}i:1;a:3:{i:0;s:13:"remove_column";i:1;s:10:"smf_boards";i:2;s:11:"enable_gpbp";}i:2;a:3:{i:0;s:13:"remove_colu
mn";i:1;s:12:"smf_messages";i:2;s:10:"gpbp_score";}i:3;a:3:{i:0;s:13:"remove_column";i:1;s:11:"smf_members";i:2;s:12:"gpbp_respect";

So what is going on with this?

Okay so I just manually added the table back into the database without the "TYPE=MyISAM" and it works.

Can we get an updated version that replace

TYPE=MyISAM

with

ENGINE=MyISAM

due to MySQL updates? Also, if anyone knows which file this is defines I would appreciate it, searching each one is proving a pain.

I'm thinking this is edited in the MySQL file. Hmm, I will get back.

DDDD11

Quote from: DDDD11 on July 08, 2014, 03:30:26 PM
Quote from: DDDD11 on July 07, 2014, 04:48:16 PM
I just did the mod installation and it said successful. I can click on the basic and advanced configuration settings but when I click on GPBP Tools it gives this error:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/GoodPostBadPost.php
Line: 505

Also, if I enable GP / BP on any board I get his error when clicking on a post:

Table 'forums.smf_log_gpbp' doesn't exist
File: /var/www/html/forums/Sources/Display.php
Line: 1161

Here is partial log from the mysql.

140707 13:37:26   127 Connect   root@localhost on
                 
                  127 Query     CREATE TABLE smf_log_gpbp
(
        `id_msg` int(10) unsigned NOT NULL ,
        `id_member` mediumint(8) unsigned NOT NULL ,
        `score` smallint(2) NOT NULL ,
        `id_poster` mediumint(8) unsigned NOT NULL ,
        `log_time` int(10) unsigned NOT NULL ,
        KEY id_member (id_member),
        KEY id_poster (id_poster),
        PRIMARY KEY (id_msg,id_member)) TYPE=MyISAM
                  127 Query     SHOW FIELDS
                FROM `smf_messages`
                  127 Query     ALTER TABLE smf_messages
                        ADD `gpbp_score` smallint(6) NOT NULL default '0'
140707 13:37:28   127 Query     SHOW FIELDS
                FROM `smf_members`
                 
It looks like the tables are removed: here is the smf_log_packages log:

a:4:{i:0;a:2:{i:0;s:12:"remo
ve_table";i:1;s:12:"smf_log_gpbp";}i:1;a:3:{i:0;s:13:"remove_column";i:1;s:10:"smf_boards";i:2;s:11:"enable_gpbp";}i:2;a:3:{i:0;s:13:"remove_colu
mn";i:1;s:12:"smf_messages";i:2;s:10:"gpbp_score";}i:3;a:3:{i:0;s:13:"remove_column";i:1;s:11:"smf_members";i:2;s:12:"gpbp_respect";

So what is going on with this?

Okay so I just manually added the table back into the database without the "TYPE=MyISAM" and it works.

Can we get an updated version that replace

TYPE=MyISAM

with

ENGINE=MyISAM

due to MySQL updates? Also, if anyone knows which file this is defines I would appreciate it, searching each one is proving a pain.

I'm thinking this is edited in the MySQL file. Hmm, I will get back.

Okay so I can't find the SQL file in the Mod that is setting this. Anyone know anything  :'(

Uardo

Hey Guys

I couldn't request this modification on mod topic where it was posted because it was locked.

I would like to know if someone can make this mod " Good Post/Bad Post " so at the message of the week that displays in the Info center at the board index, including the most voted messages of the past few days will not display messages from topics that has been locked. So i am not a scripter nor i have any knowledge how php works, if anyone willing to make it please add a code that will ignore locked topic from displaying in messages of the week.

Sorry if sometimes i explain myself bad, so if I'm confusing or not clear... tell me.

-Thanks

Uardo


margarett

Gave a quick look at the code, it's not a direct task...

The function that gathers that content isn't checking, in any point, the "topics" table, which is the only place where you know a topic is locked.
In order to do that, you would need to join both the messages and topics tables to the first query and then exclude locked topics. I'm not sure about the performance implications on that...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Uardo

Thank you for replying,
but as i said above i have no idea how scripting stuffs work, if it is possible please write the code that you already explained above and tell me where i should exactly add it. If you believe you can do it, please do it, it's not an issue the performance implication for me.

Thank You in Advance!

margarett

I merged this into the MOD's support topic.

So, you can do this by editing Sources/GoodPostBadPost.php, find:
$request = $smcFunc['db_query']('','
SELECT SUM(score) AS score, id_msg AS msg
FROM {db_prefix}log_gpbp
WHERE log_time >= {int:weekago}
GROUP BY msg
ORDER BY score DESC
LIMIT {int:limit}',
array(
'weekago' => $aWeekAgo,
'limit' => $modSettings['gpbp_show_best_topics']
)
);

And replace with this:
$request = $smcFunc['db_query']('','
SELECT SUM(log.score) AS score, log.id_msg AS msg
FROM {db_prefix}log_gpbp AS log
JOIN {db_prefix}messages AS mess ON (mess.id_msg = log.id_msg)
JOIN {db_prefix}topics AS top ON (mess.id_topic = top.id_topic)
WHERE log.log_time >= {int:weekago}
AND top.locked = 0
GROUP BY msg
ORDER BY score DESC
LIMIT {int:limit}',
array(
'weekago' => $aWeekAgo,
'limit' => $modSettings['gpbp_show_best_topics']
)
);

It worked here in my short tests.

Anyway, do note that this information isn't cached and will be loaded on every page load of your board index. It's not a pretty query :P

Keep a backup of your original file before you mess it, will you? :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Are you intending INNER or LEFT joins there?

margarett

INNER. All fields have to exist in every table ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

That's what I thought, but it's always best to clarify... we didn't have a debate about this in one of the other boards today about this :P

vallejo

Buenas me pueden colaborar, porque no puedo instalar este MOD, mi SMF es V 2.0.9 trato de emularlo a la 2.0.4 e inferior y me dice que puede estar dañado el archivo gracias..!

Myth_72

How to uninstall this mod, it haven't option for uninstall?

Myth_72

Someone to help me? How to uninstall this mod? There isn't option "uninstall" only "delete".

Advertisement: