[ABD] (Topic &) Post Rating System (with Karma module)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

I've looked in to the SQL error, but can not confirm the bug for 0.3.5. Would you please upgrade to 0.3.5? If copying includes/functions_posts_ratings.php doesn't help would you please add before:

FILE: includes/functions_posts_ratings.php
LINE: 1420
CALL: is_voteround_open()

the following:
print "topic=$topic_id post=$post_id user=$user_id<br>";

I'm guessing that $row['topic_first_post_id'] doesn't get set some how in viewtopic.php.

The forth note will be in 0.3.6 (I usually copy the lines, then this doesn't happen) Thanks for reporting it.

@tupeu: That's just a bug update. New features will not be included before 0.4.0
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
f.palagiano
Registered User
Posts: 5
Joined: Tue Jan 15, 2008 3:24 pm

Re: [DEV]Post Rating System

Post by f.palagiano »

Hi again.
I've done some debugging, and it seems the problem is here:
$template->assign_vars(posts_ratings_display_rating_topics($topic_info, $posts_ratings_data));
The $topic_info array is empty (there's no place in viewtopic.php where it is declared or initialized or populated), so nothing is passed to the posts_ratings_display_rating_topics() function.

PS - I've upgraded to version 0.3.5 but the error is still there.
f.palagiano
Registered User
Posts: 5
Joined: Tue Jan 15, 2008 3:24 pm

Re: [DEV]Post Rating System

Post by f.palagiano »

Ok, so: I've replaced $topic_info with $topic_data and all went fine. :)
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

I've included your translation for 0.3. Tanks again for your efforts.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA
Contact:

Re: [DEV]Post Rating System

Post by phpDummie »

Alfatrion, I've but three questions:
  • what karma MOD are you using
  • how is karma calculated
  • how about freezing the feature set and getting it out for approval
:?:
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

1. I don't understand the question. I'm using my own karma mod.

2. Karma is calculated through a weighted algorithme. You can set the interval period and the number of intervals. Ratings within the last interval get a weight of 1 and the first get a interval of N^2 - (N-1)^2 = 2*N - 1 Thus we get a weighted average.

3. I don't understand what you mean by this. Karma is indirectly calculated, you can invluence it by changing the ratings of posts.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
Kalapuikkoja
Registered User
Posts: 25
Joined: Wed Jul 11, 2007 3:22 pm

Re: [DEV]Post Rating System

Post by Kalapuikkoja »

hey, maybe I didn't read it, but I want to use that MOD for a Fanfiction-Competion.
So is that possible that the users ONLY can vote in a specific forum?
and just for a time the admin sets?
Maybe just for may, and june not?


thanks for answers ;)

edit
Last edited by Kalapuikkoja on Thu Jan 17, 2008 4:06 pm, edited 1 time in total.
User avatar
dlt123
Registered User
Posts: 127
Joined: Wed Aug 29, 2007 6:46 am
Contact:

Re: [BETA] Post Rating System

Post by dlt123 »

notsa wrote:link for this great mod please :D :D
I agree, nice mod.
Dennis
Belief has no effect on Reality
Image
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

No ratings are enabled for the whole board. If you want this then you should modify the code. I agree that this would be nice feature to have.

Yes users can only vote for a time the admin sets. This is relative to date of the post.

@Dennis: Tanks Dennis.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA
Contact:

Re: [DEV]Post Rating System

Post by phpDummie »

Alfatrion wrote:1. I don't understand the question. I'm using my own karma mod.
OK, there are other karma MODs out there, so I thought you may have used somebody else's. Yours is fine - keeps it all in the same hands.
Alfatrion wrote:2. Karma is calculated through a weighted algorithme. You can set the interval period and the number of intervals. Ratings within the last interval get a weight of 1 and the first get a interval of N^2 - (N-1)^2 = 2*N - 1 Thus we get a weighted average.
eh... So if I rate Joe Q. Public's post at one star it lowers his karma... right? By how much?
And if I rate it at five stars, it will raise his karma? By how much?
Alfatrion wrote:3. I don't understand what you mean by this. Karma is indirectly calculated, you can invluence it by changing the ratings of posts.
I mean the Post Rating System MOD. Looking at MOD's features, it has plenty and it's all good. You should release it if it doesn't have any bugs.
User avatar
dlt123
Registered User
Posts: 127
Joined: Wed Aug 29, 2007 6:46 am
Contact:

Re: [DEV]Post Rating System

Post by dlt123 »

[NOTE] Please read two more posts ahead, I am at a point where I need help populating my SQL DB with the templates. [/NOTE]

You know the more I look at your avatar Alfatrion, the more tired it looks... Hang in there. :lol:

I was going to install another MOD, but decided this was higher on my priority list so I am going to do this one first... and this will be my first MOD attempt... I'm a MOD vrgn. :oops:

I have one question before I begin the install of this MOD... I have MSSql and not MySql, so running phpMyAdmin will not work for installing the SQL portion of this MOD.

In order to do the SQL database population, can I just copy the SQL code from the INSTALL.XML file and pop it in a php file of my choosing, i.e. Post_Rate_Mod_SQL_Install_db.php, then copy it to the root of my web site, (or do I need to copy it to the phpBB3 folder), then run it using my Firefox browser?

Note: Just so you know, I am going to make backup copies of ALL pre-edited files along with making a copy of my SQL Database so I can revert back in case I goof up this MOD installation.

Anything else I need to be aware of before starting this install?

Thanks,
Dennis
Last edited by dlt123 on Fri Jan 18, 2008 5:11 am, edited 1 time in total.
Belief has no effect on Reality
Image
User avatar
dlt123
Registered User
Posts: 127
Joined: Wed Aug 29, 2007 6:46 am
Contact:

Re: [DEV]Post Rating System

Post by dlt123 »

Well all went fine until I tried to edit my viewforum.php file and searched for... (this was the 3rd find in file)

[EDIT] FOUND>>> the strings, they are really jumbled in the install.xml file... Just do a search for S_TOPIC_TYPE_SWITCH and you'll find the whole line... then add the ADD code where you're supposed to...[/EDIT]

Code: Select all

                        'S_TOPIC_TYPE_SWITCH'   => ($s_type_switch == $s_type_sw
itch_test) ? -1 : $s_type_switch_test)
                );

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[EDIT] FOUND >>> Again text in install.xml file is really jumbled and spaced out... doing a search for one of the strings in the FIND text will locate where you need to insert... [/EDIT]

Could not find the following text in the memberlist.php file...(this is the 2nd find)

Code: Select all

// a_user admins
and founder are able to view inactive users and bots to be able to manage them m
ore easily
// Normal users are able to see at least users having only changed their profile
 settings but not yet reactivated.

These were the only two files I had problems with... BUT did manage to find the strings and make changes...

ooooohhh, talk about delayed gratification... :roll:

Thanks,
Dennis
Belief has no effect on Reality
Image
User avatar
dlt123
Registered User
Posts: 127
Joined: Wed Aug 29, 2007 6:46 am
Contact:

Re: [DEV]Post Rating System

Post by dlt123 »

OK I copied my files over, but I'm not sure how to populate my SQL DB... I tried to run my iPost_Rate_Mod_SQL_Install_db.php file and it didn't work... So I am not sure what to do now.

I logged onto my forum and tried to create a post and got the following error message when I processed the post...

Code: Select all

SQL ERROR [ mysql4 ]

Table 'roadt2.phpbb_posts_ratings_modpoints' doesn't exist [1146]

SQL

DELETE FROM phpbb_posts_ratings_modpoints WHERE time < 1200632179

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/functions_posts_ratings.php
LINE: 2263
CALL: dbal_mysql->sql_query()

FILE: includes/functions_posts_ratings.php
LINE: 2276
CALL: clean_modpoints()

FILE: posting.php
LINE: 1008
CALL: posts_ratings_new_posts()
I would have to say I need my DB populated with the SQL code from the code in install.xml. As mentioned earlier, I created a file called, Post_Rate_Mod_SQL_Install_db.php and added the SQL code text from install.xml... I then uploaded it to my phpBB3 root, and tried to launch it from my browser... No deal it didn't work. Guess it shows you what I know about SQL databases... :shock:

I don't know how I am going to do this since I am using MSSQL and can't use phpMyAdmin... any suggestions?

Also on a final note, I manually copied over the root/styles/prosilver/imageset star files. Not sure if I should have done this but I did. :oops:

Dennis
Belief has no effect on Reality
Image
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

phpDummie wrote:eh... So if I rate Joe Q. Public's post at one star it lowers his karma... right? By how much?
And if I rate it at five stars, it will raise his karma? By how much?
First there are votes and there a ratings. A rating is the average vote for a post. The karma will stay between 1 and 5. If someone post has only 5 star ratings then his karma will be 5.

I can't say by how much it would raise or lower the karma of someone. It depends on the number of posts a users has (each post has a default rating of 3) and on the votes of other users.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [DEV]Post Rating System

Post by Alfatrion »

dlt123 wrote:You know the more I look at your avatar Alfatrion, the more tired it looks... Hang in there. :lol:
It must be all that cheese. ;) You could make it in to a gif with a transparent layer with photoshop or the gimp to lose all that white.
dlt123 wrote:In order to do the SQL database population, can I just copy the SQL code from the INSTALL.XML file and pop it in a php file of my choosing, i.e. Post_Rate_Mod_SQL_Install_db.php, then copy it to the root of my web site, (or do I need to copy it to the phpBB3 folder), then run it using my Firefox browser?
You need to run it with the client for your database. You could write a php file to do this for you, but it not as simple a just copy-past.
dlt123 wrote:Anything else I need to be aware of before starting this install?
Take it one step at a time. If you have trouble with the SQL then don't continue until your insert the SQL.
dlt123 wrote:I don't know how I am going to do this since I am using MSSQL and can't use phpMyAdmin... any suggestions?
I can't help you with using MSSQL. Perhaps you can get support from on of the other forums on this board for that.
dlt123 wrote:Also on a final note, I manually copied over the root/styles/prosilver/imageset star files. Not sure if I should have done this but I did.
You should copy all files within root/ for this mod to work.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
Locked

Return to “[3.0.x] Abandoned MODs”