[ABD] Ratings for topics

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
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

[ABD] Ratings for topics

Post by TheUniqueTiger »

MOD Title: Ratings for topics
MOD Description: Allows users with 'posting' permission in a forum to rate topics (from 0-5) in that forum. A member can rate only once and cannot change the rating he gives. The ratings for each topic are shown in the viewforum, viewtopic pages, search results (only for topics) and mcp_forum page.
MOD version: 0.2.2 (12 Nov '07)
phpBB version: 3.0 (Tested with 3.0 RC7)

Author: TheUniqueTiger

Features: (lots of new features added in 0.2)
  • Only registered users with 'posting' permission in that forum may rate topics in that forum.
  • Users may rate a topic only once.
  • Users cannot rate a locked topic.
  • A User cannot rate a topic that was started by him. (Thats the purpose of ratings, it has to be rated by others!)
  • Ratings for topics now shown on viewforum, viewtopic pages, search results (only for topics) and mcp_forum page.
  • Complete moderation control over ratings. Moderation options include locking ratings, unlocking ratings and resetting ratings. (like lock/unlock topics) ... Moderators who can lock topics can lock ratings and moderators who can delete topics can reset ratings, as the permissions are analogous. Plus appropriate logging. Moderation options available as Quick-mod and in MCP.
  • Topics shown on viewforum page can be sorted by ratings.
  • Search results can be sorted by topic ratings. This is only if you choose to display results as topics. If you choose results as posts, it instead causes a search ordered by post time and shows results as posts.
  • 'View top rated topics' as a pre-defined search on index page.
  • Now added automatic redirect after submission of ratings.
Supported style: Prosilver

Mod format: MODx

About current version: This version includes star icons from idiotnesia. More importantly I've fixed some typos in the install.xml as reported. This is a quite stable version. No changes have been made to the code since 0.2... In future I'll need to do a bit of clean up the code and install.xml so that it meets phpBB's coding guidelines before sending it for validation. Otherwise its all done!

(Those who are updating from 0.2 need to simply correct the typo in install instructions for the file styles/prosilver/template/viewforum_body.html.)

Additional author notes: This MOD creates a new table in the database for storing information about the topics a user has rated, in addition to modifying the topics table.
Number of queries made: For viewforum page, search results, mcp_forum page - No additional queries,
For viewtopic page - 1 additional query,
For submitting rating - total 4 queries in addition to the basic ones used by phpBB3.

Planned for future betas: (all implemented in latest dev version yet to be posted)
  • Ability to change own ratings and rate own topics according to permissions... In addition permission to see ratings, and moderation permissions for locking and resetting ratings, but thats very far.
  • User can select the type of rating icon ... disc or star.
  • ACP configurable option to make topics with ratings above certain threshold after certain number of rating votes as sticky for a configurable period of time.
  • Topic rating statistics shown in viewtopic (hidden by default) ... similar to poll about how many of 5s, 4s, 3s ... a topic has got as rating votes.
Screenshots album: Screenshots

Demo:
Visit the following forum and see the viewforum and viewtopic pages for the topmost forum. As a guest you will not see the ratingbox.
Demo username: test_user
Demo password: test_all
(Please do all the testing in the Testing Board subforum in that forum. Since a user cannot rate a topic that was started by him and a user can rate a topic only once, you may rate the demo topics started by me in that board. If the test_user (someone else) has already rated then you cannot vote again, I cannot do anything.. Its an essential part of the MOD. However I'll be periodically resetting the ratings so that you as a test_user can again rate those.)

This version does not contain update instructions from previous version. Those who had installed this MOD earlier, can manually compare and update. I'm sorry for this.

I'll be glad to receive your suggestions about this MOD (reply in this topic). However no new features or versions for the next three weeks as I'm busy. (I could have called this to be of RC caliber as its quite stable! ;) )

MOD Download: Download MOD Ratings for topics 0.2.2

This is my first MOD for phpBB. I hope you like it. :P
Last edited by TheUniqueTiger on Wed Jan 16, 2008 5:06 pm, edited 13 times in total.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
xxxgamer
Registered User
Posts: 574
Joined: Mon Jul 16, 2007 11:25 pm

Re: [DEV] Ratings for topics

Post by xxxgamer »

ah this would be sweet :D You could also have this as a system that if a certain post gets 3 or more ratings under 2 or of just 1 star that the topic is deleted!

Great idea and great mod. Hope to see more on this.
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] Ratings for topics

Post by TheUniqueTiger »

In future versions, I might make it so that the topic whose rating goes below a certain threshold after a certain number of votes, goes to moderation. But thats very far. I'm trying first to get a working version soon with basic functionality as it is intended.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] Ratings for topics

Post by TheUniqueTiger »

I have a working version thats almost of RC level (no bugs encountered at all!) but I'll still call it a beta since this is my first mod.
I'm working on preparing the install.xml and probably I can put up a working version some time soon.

Isn't anybody interested at all? I thought since this is a common feature of vB, people might be interested! :)
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
jimaniac
Registered User
Posts: 93
Joined: Tue Jun 05, 2007 7:16 pm
Location: Greece
Contact:

Re: [DEV] Ratings for topics

Post by jimaniac »

We are interesting in this mod! It would be great ....When are you planning release it?
Image
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] Ratings for topics

Post by TheUniqueTiger »

Well quite soon, may be within tomorrow I'll put up the first beta here. I've done a considerable amount of testing on my home pc/server so I can say its quite stable to be called a beta.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
idiotnesia
Registered User
Posts: 509
Joined: Sun Jun 18, 2006 10:58 am
Location: www.phpbbindonesia.com
Name: Pungky Putra
Contact:

Re: [DEV] Ratings for topics

Post by idiotnesia »

wew, it would be nice mod...
especially if this mod would be like rating topic in vb. Just simple but nice
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] Ratings for topics

Post by TheUniqueTiger »

idiotnesia wrote:wew, it would be nice mod...
especially if this mod would be like rating topic in vb. Just simple but nice
Yes, it would have almost all of the topic rating features in vB.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
idiotnesia
Registered User
Posts: 509
Joined: Sun Jun 18, 2006 10:58 am
Location: www.phpbbindonesia.com
Name: Pungky Putra
Contact:

Re: [BETA] Ratings for topics

Post by idiotnesia »

wow nice mods!!!
I have installed it in my demo forum and it works

BTW there are some mistypo installation instruction in constant.php, viewtopic.php, viewforum.php


Suggestion/request
- User can't rate their own topic
- Ability to sort by rating in viewtopic
- Add title "Rating" in column header
- AUtomatically redirect to the topic after x second
- Allow/disallow topic rating per forum
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Ratings for topics

Post by TheUniqueTiger »

idiotnesia wrote:wow nice mods!!!
I have installed it in my demo forum and it works

BTW there are some mistypo installation instruction in constant.php, viewtopic.php, viewforum.php


Suggestion/request
- User can't rate their own topic
- Ability to sort by rating in viewtopic
- Add title "Rating" in column header
- AUtomatically redirect to the topic after x second
- Allow/disallow topic rating per forum
Thanks! Can you please tell me the exact typos in installation instructions, I couldn't find any. I'll be glad to correct if any.

Regarding your suggestions,
1. Already planned, adding to future features.
2. I think you meant sorting in viewforum... also planned!
3. 'Rating' is shown as rating icons floating to the right of the topic title. If you notice a tooltip with additional info is shown on hovering over the rating icons. I'm not planning any separate column as it would take unnecessary space, and as you may see the rating icons utilize the otherwise empty space.
4. Auto redirect already implemented in latest dev build, I'll post the new version of the MOD soon.
5. Allow/disallow ratings is already there in the above 0.1 version. Users can only rate topics in the forums where the user has permission to 'post replies'. If this is not what you meant, then please clarify.

To all,
New features already implemented in the next version I'll be posting soon...

1. Moderation actions including Quick-mod for locking ratings (users in future cannot rate the topic unless ratings are unlocked), unlocking ratings, resetting ratings.
Moderators who can lock topics in that forum can lock ratings for topics in that forum.
Similarly moderators who can delete topics in that forum can reset ratings for topics in that forum, as both are analogous.

2. Auto-redirect to the appropriate page after submission of ratings and moderation actions given in (1).

3. Change from previous version ... 'Not rated' not shown in viewtopic... Neither such a message nor icons are shown for topics without ratings.

4. If topic ratings are locked, the ratings are still retained and displayed, but users cannot rate the topic further. They can do so only after the ratings have been unlocked. If the ratings are reset, all the ratings are lost. If ratings for such topic is not locked, users who had already rated the topic can again rate that topic, and also other users. Resetting ratings for a topic causes the topic ratings and topic rating votes to be set to zero and all data about which users had rated that topic is lost.

5. A few changes to the display to the ratingbox etc, to look better in layout.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
008008
Registered User
Posts: 117
Joined: Tue Jul 10, 2007 8:44 am

Re: [BETA] Ratings for topics

Post by 008008 »

great mod thank you :P

edit : euh and subsilver2 modifs ? :|
vb6
Registered User
Posts: 11
Joined: Wed Mar 09, 2005 2:09 pm

Re: [BETA] Ratings for topics

Post by vb6 »

I have an error when add your mod to my forum:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\wamp\www\forum\viewforum.php on line 645
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\wamp\www\forum\viewtopic.php on line 624
Please help me fix it. Thanks so much!.
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Ratings for topics

Post by TheUniqueTiger »

vb6 wrote:I have an error when add your mod to my forum:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\wamp\www\forum\viewforum.php on line 645
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\wamp\www\forum\viewtopic.php on line 624
Please help me fix it. Thanks so much!.
Please make sure you have added the leading comma as given in the install instructions. According to the MOD (or in any case), the additions to be done are to be added to the array which spans the given error lines, in both files. Please install properly. A user has mentioned of a successful working install in a post above.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Ratings for topics

Post by TheUniqueTiger »

008008 wrote:great mod thank you :P

edit : euh and subsilver2 modifs ? :|
Yes, I will include the modificaions for the subsilver2 style too. Let me implement all the features first, then I'll do the subsilver2 style, till then this MOD will remain usable by prosilver only. Once I complete the features, I'll jump onto modifying subsilver2 for this MOD. It'll not be long! :P

To all,
I'm finding myself confused about the search.php. I wanted to implement something like top-rated topics as a pre-defined search id, which shows topics ordered by their ratings. Somehow I'm unable to complete this, so I won't be implementing it (yet). I would really appreciate any suggestions/help in this regard.
Any other suggestions are welcome! :)

EDIT: Success with search.php... New feature done for a 'View top-rated topics' pre-defined search like 'View active topics'. In addition, users can now optionally sort the search results by the topic ratings (only if the show results option is set to 'topics', as it should not show posts according to topic ratings.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
idiotnesia
Registered User
Posts: 509
Joined: Sun Jun 18, 2006 10:58 am
Location: www.phpbbindonesia.com
Name: Pungky Putra
Contact:

Re: [BETA] Ratings for topics

Post by idiotnesia »

TheUniqueTiger wrote: 2. I think you meant sorting in viewforum... also planned!
Yup you're right in viewforum not in viewtopic
TheUniqueTiger wrote: 3. 'Rating' is shown as rating icons floating to the right of the topic title. If you notice a tooltip with additional info is shown on hovering over the rating icons. I'm not planning any separate column as it would take unnecessary space, and as you may see the rating icons utilize the otherwise empty space.
see pic below:
Image

what I meant it's not to add new column, just add text "Rating" (also floating) in column header
TheUniqueTiger wrote: 5. Allow/disallow ratings is already there in the above 0.1 version. Users can only rate topics in the forums where the user has permission to 'post replies'. If this is not what you meant, then please clarify.
What I mean it's not about permission but to enable/disable topic rating per forum. For example I don't want my user to rate topic in announcement forum.

Can hardly wait to see your new update
Locked

Return to “[3.0.x] Abandoned MODs”