Customizing SMF > Modifications and Packages

Post Ratings

(1/100) > >>

Link to ModGet the Pro version of this Mod
Note: Re-Upped and Revised using the <database> tag.  Which allows you to choose to uninstall the database changes or not upon uninstallation of Post Ratings.  Uninstalling database changes will completely remove all post ratings settings and ratings.  On the PLUS side of this, you can uninstall Post Ratings, and still keep all of the ratings by not uninstalling the database tables and columns.  So, in case you ever want to install Post Ratings again in the future, you should be able to pick up right where you left off with it last time.

Brief Description
Post Ratings allows your posts to be rated on a scale from 1 - 5 stars.  Users can not rate their own posts.  This mod is completely customizable.  You can choose the rated and non-rated images to display.  Put BBC and Smileys into the rating options.  And many more features.  You can Enable All Posts, and/or New Posts, or Disable All Posts, and/or New Posts from being rated.  You can choose to not allow the First post within a topic to be rated.  You can set the % values for each rating within the Ratings Threshold and also set the Ratings Threshold Strength.  You can also choose a limit on how many ratings each post can have as well as what to do when locking that topic.  If a message and/or topic is removed, all ratings within that message/topic will also be removed.  Also, permissions can be set to allow for enable/disable in topics and/or posts on a per Board basis via Board Profiles.RELATED TO CUSTOM THEMES
When installing Post Ratings if you want to install into your additional themes, besides Core (which installs for both Curve and Core Themes automatically upon installation, and needs to be this way in order for Post Ratings to work in the Core Theme).  There is no need to install the images, as they are automatically installed and linked to the Curve images directory.  The only thing that must be installed is the index.template.php edit.   You can refer to this pic attached for how to install in your other themes.

If, for some reason, you are not able to view the Enable, Disable, and Delete Ratings images in your custom themes within all posts (and it's not disabled in Post Ratings Settings), or you have installed Themes after you installed Post Ratings, you can edit the index.template.php file manually within the SMF Admin Panel:
STEP 1:  Browse to:  Admin -> Configuration -> Themes and Layout -> Theme Settings
STEP 2:  Click on your Custom Theme's Name, you may have to scroll down until you see it.
STEP 3:  Under Edit Theme, click on:  Modify the index template. (the main template)
STEP 4:  In the 3rd textarea edit box, you will see: function template_html_above(), look for this code in there:
--- Code: ---<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?rc2" media="print" />
--- End code ---
Directly After this, but before the '; ADD the following code:
--- Code: ---   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/postratings.css?rc2" />
--- End code ---
STEP 5:  Scroll down to the bottom of the page, and Click on the SAVE CHANGES button.  ALL DONE!  Repeat these steps for all other installed Custom Themes.
This mod lacks certain features that are presented in Post Ratings Pro, which can be purchased here:
Post Ratings Pro provides the following abilities:

* The ability to turn this into a Topic Ratings MOD.
* Ordering all topics within a board by highest/lowest rating.
* Guaranteed to work on any SMF 2.x version, including the latest!
* The ability to select Categories/Boards to enable/disable Post Ratings in.
* Statistics added to the SMF Stats page (index.php?action=stats) for Highest Rated Topics/Posts and Most Rated Users. Adds a complete Statistic settings Administration section for manipulating the output of these statistics.
* Ability to display ratings on the Message Index.
* Fully customizable for whatever your forum needs. Change any strings (with full BBC code support), images, display output, and more.
* Fixes Bugs found in this mod here offered for free.
* Integrates into the SMF Moderation Logs, and will let you know when any ratings are enabled/disabled or if any ratings within any topics/posts have been deleted.
* Full Theme Support!
Change Log

! Fixes is_ratings error when other mods use the SMF createPost() function to create a post.  Will automatically disable ratings within that topic instead.
+ Added SMF 2.0 RC2 Core Theme edits so that both layouts will now, also, work in the Core Theme of SMF 2.0 RC2.  As well as rating posts in the Core Theme is now possible.

Note:  This is the last FREE Version of the Post Ratings MOD!  ENJOY :)

! Fixed anchor for posts when Header Style is selected.
! Changed Header Style pic a little, just didn't look right with the Drop Shadow on the Header.
! Fixed CDATA <script> tag in Admin.template.php

! Fixes all undefined indexes that would populate the SMF Error Log if Post Ratings was disabled, or a post was not rated in a topic.
+ Added Feature for SMF 2.0 RC2 ONLY:  Allows for a different Post Ratings Layout Style for ratings within your posts.  Added the Header Style.

This mod should upgrade fine for SMF 2.0 RC2, for users who use SMF 2.0 RC1.2, you'll have to reinstall it to have these undefined errors fixed.

RE-UPPED - Problem with the Upgrade from 1.0 to 1.1, NOW FIXED!  If you are upgrading from 1.0 to 1.1, after you upgrade you can delete Post Ratings 1.0 from your Browse Packages area of the Admin Panel.

Version 1.1 - Fixes bug when replying to topics and/or modifying posts within a topic, if topic was enabled for rating, it would disable Post Ratings within that entire topic.

FINAL REVISION - FIXES A BUG that presented itself when trying to Move Topics to another board.  Error in is_ratings, which prevented the topic from being moved altogether.  All Fixed.

Revised:  Fixes a display issue that added the Modify Button 2 times when displaying posts via Display.template.php.  All fixed!  Also changed the way Automatically Expanded in posts option works, to a better, overall, way of doing this.  So now there is a selectbox instead of a checkbox, allowing you to choose from the following options:  Disabled, Enabled (All Posts) - by default, Enabled (Unrated Posts).  So it will expand all posts by default.  Also, now you can define some text, bbc, and/or smilies for Expanded and Collapsed and it will always be displayed whether the Automatically Expanded in posts option is enabled or not.

This mod makes changes in SMF 2.0 RC1.2 to the default (Core Theme) Display.template.php and Post.template.php files.  Themes are well known to supply their own Display and Post template files.  So if you need your theme files (Display.template.php and/or Post.template.php) updated to work with Post Ratings, you can click on the Support and Comments link for this mod and post them up in a reply and I'll see what I can do.

This mod also fixes an SMF RC1.2 attachment problem.  While this edit is included in the package when you install it, it technically isn't required for Post Ratings to work, however, I coded it in since it could cause display problems if attachments are posted up.  For those of you who are interested in the edit that gets done to fix this, this is an edit in Display.template.php....
--- Code: ---<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" title="' . $txt['modify_msg'] . '" class="modifybutton" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '';
--- End code ---
--- Code: ---<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" title="' . $txt['modify_msg'] . '" class="modifybutton" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '<div style="clear: both;"></div>';
--- End code ---
This is the 6th EDIT in Display.template.php which is a REPLACE.  If there is an error on this edit, it will simply ignore the error and install the mod anyways, since it's not a mandatory edit.

Important Note:  To ensure Post Ratings Settings are correctly placed and loaded, you will be redirected so that your File Cache will be cleared, directly after installing Post Ratings.  After which, go to: Forum -> Posts and Topics -> Post Ratings and complete setup.  Than make sure you have your permissions set for each usergroup.  You will notice their are Board Profile permissions as well for enabling in topics and posts.

Sudhakar Arjunan:
Excellent mod will try it now.

Marcus Forsberg:
Great job on this. Nice programming, nice features, nice layout... Keep it up! :D

Thanks very much guys :)

Note:  This is the first mod I ever published that was approved by the SMF Customization Team the first time around and didn't have to be changed, other than my Next Topic Page mod (which is so easy and simple), and my SoLoSMiLeY's mod which is just smiley's, so it's good to know I'm finally getting the hang of making mods for SMF :)

1.1.10 please.  :D


[0] Message Index

[#] Next page

Go to full version