News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Post Ratings

Started by SoLoGHoST, October 27, 2009, 11:54:09 AM

Previous topic - Next topic

SoLoGHoST

Yes, I made the Pro Version available for purchase only.  There was many great features in it, and was beginning to expand it even further, but I lost interest due to the strict templating structure of SMF.  I than thought of giving it away for free, but lost all of the code for it as it was on a computer that I don't have anymore.  I might have backed it up somewhere, but not entirely interested in updating it for the latest version of SMF if it is going to be too much trouble.  I will look into it, if still interested...

Let me know.

FragaCampos

Hi, SoLoGHoST.
Thank you for your reply.

Yes, I'm still interested in purchasing this mod.
I'm with version 2.0.11, so that won't be a problem, for now.

SoLoGHoST

Ok, I will see if I can hunt it down, and get back to you on this by this weekend.  Cheers :)

SoLoGHoST

Here is the Post Ratings Pro Mod version 1.6.  I have found it and performed a quick test of it on SMF 2.0.11 on a fresh install from the current download available here online in the downloads section.  Install functions without error and seems to be working fine, despite over 2 years since the Post Ratings Pro mod has had any modifications to it.

I am giving this mod to everyone here for FREE, as it's been over 2 years since I have done any work on it and this being the very last Modification that I will give away for SMF.  I will not provide any theme support for it, nor will any updates be made to it.  Have fun, and enjoy.  Thanks to all of those who purchased this mod over 2 years ago.  1 of the last features I added, besides the statistics page addition, is the ability to see who all rated the posts/topics from those who have the permissions to do this.  This is a link that can be clicked on from the "Rated {x} times" text.

- Solomon

d3vcho

Thank you for the release, it will be very helpful on my forum.

Amazing job. Regards :)
"Greeting Death as an old friend, they departed this life as equals"

FragaCampos

Hi, SoLoGHoST.
First of all, thank you very much for providing this free of charge. I would like to pay or donate for it, so if you're willing to accept that, please contact me in private.

It's sad that you're abandoning SMF and your mods. I understand your reasons and it's with heavy heart that I see more and more people walk away from this software. Maybe things will change in the future, who knows.

Take care and thank you once more.

SoLoGHoST

No need to pay anything.  I am making more money than I have ever made right now, doing this type of work on other platforms and am still having very much fun doing it.  SMF was fun while it lasted though.  Currently converting a site from Umbraco to Wordpress CMS.  Anyways, just Enjoy it!  Keep your money, don't need it.

Cheers :)

iMiKK


ob

Does anyone know if this mod works with 2.0.15?

dodos26

Nope i try and see only permits but don't see effects :(

-Rock Lee-

Quote from: dodos26 on December 29, 2019, 06:25:56 PM
Nope i try and see only permits but don't see effects :(

Did it give you problems installing? Does the error log mark you something?


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dodos26

Quote from: Rock Lee on December 30, 2019, 10:12:08 AM
Quote from: dodos26 on December 29, 2019, 06:25:56 PM
Nope i try and see only permits but don't see effects :(

Did it give you problems installing? Does the error log mark you something?


Regards!

No dint have problems when install. I am stupid all mods are on by default for each thread and are not here. In addition, it is done in such a way that it is hard to notice :D This work with 2.0.15 :)

-Rock Lee-

It is taken into account some modifications are somewhat old and sometimes it happens more than how SMF is being updated (something that is now normal layers before it was not). I try it at home is perfect what is great considering the time it takes ...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dodos26

Unfortunately, it won't work with most custom themes

-Rock Lee-

I have not been able to try it with any custom theme but it sure can be adapted without problems if you understand some code :).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dodos26

Yuuup but see it :(   can do all this to me, but I have a problem as an administrator with icons. Use sunrise

-Rock Lee-

It would have to adapt taking into account the rules that it uses to be adaptable, that's why the icon gives you problems because of the way it works to adapt to many resolutions. I will try to take some time to try it on my test website and any news I publish. Happy 2020


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dodos26

#517
Ok i fix it. Full instruction see down. But all "Custom changes beter displayed:" the globally changing way you view ratings, you won't be able to change this in settings. But I shared it because it fits very well.

Install Bug:
    3.    Dodaj po    ./Themes/SunRise20/Display.template.php

Ignore

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Install Bug:
    4.    Dodaj po    ./Themes/SunRise20/Display.template.php    Porażka

Find and replace: (Fix error when install mod index.template.php num 2)

<h5 id="subject_', $message['id'], '" style="display:none;">

Replace:

<h5 id="subject_', $message['id'], '" style="display:none;" style="margin-bottom: 1em;">

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Install Bug:
    5.    Dodaj po    ./Themes/SunRise20/Display.template.php    Porażka

Find and add: (Fix error when install mod index.template.php num 3 - And change it now can click here to see rates user)

                                    <div class="time_posted">
                                        <a href="', $message['href'], '" class="time_posted_href">
                                            <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], '
                                        </a>';

Add:

                                        if (!empty($modSettings['post_ratings_show_lastratedtime']))
                                            if ($message['ratings_enabled'] && $message['first_enabled'] && $message['topic_enabled'] && allowedTo('postratings_view') && $message['has_ratings'] && !empty($message['rating']['last_rated_time']))
                                                echo ', <a href="' . $scripturl . '?action=postratings;sa=view;board=' . $context['current_board'] . ';topic=' . $message['topic_id'] . ';msg=' . $message['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" class="time_posted_href" onclick="return reqWin(this.href);">', $txt['last_rated_time'], ' ', $message['rating']['last_rated_time'], '</a>';

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Display Bug: ./Themes/SunRise20/Display.template.php

Find and replace: (Fix bugs when display button enable disable and remove all rates)

        if (!$context['is_ratings_locked'])
        {
        // Let them know if it is enabled or disabled and give them an option to enable/disable it if they are permitted.
        if (!empty($modSettings['post_ratings_posts_enable_icon']))
            if ($message['can_enable_disable_postratings'] && $message['first_enabled'] && $message['topic_enabled'])
                echo '
                        <li class="', $message['ratings_enabled'] ? 'enable_ratings_button' : 'disable_ratings_button', '"><a href="', $scripturl, '?action=postratings;sa=', ($message['ratings_enabled'] ? 'disable' : 'enable'), ';board=', $context['current_board'], ';topic=', $context['current_topic'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', $message['ratings_enabled'] ? $txt['enable_ratings_post_alt'] : $txt['disable_ratings_post_alt'], '">', ($message['ratings_enabled'] ? $txt['enable_ratings_post'] : $txt['disable_ratings_post']), '</a></li>';
   
   
        // How about deleting post ratings from this particular post?
        if (!empty($modSettings['post_ratings_posts_delete_icon']))
            if (allowedTo('postratings_administrate') && !empty($message['ratings_enabled']) && $message['first_enabled'] && $message['topic_enabled'] && $message['has_ratings'])
                echo '
                            <li class="remove_ratings_button"><a href="', $scripturl, '?action=postratings;sa=deleteall;board=', $context['current_board'], ';msg=', $message['id'], '" title="', $txt['delete_ratings_post_alt'], '">', $txt['delete_ratings_post'], '</a></li>';

        }

Replace:

        if (!$context['is_ratings_locked'])
        {
        // Let them know if it is enabled or disabled and give them an option to enable/disable it if they are permitted.
        if (!empty($modSettings['post_ratings_posts_enable_icon']))
            if ($message['can_enable_disable_postratings'] && $message['first_enabled'] && $message['topic_enabled'])
               
                            echo '<li class="enable_disable_rates_button"><a class="tooltip" title="', $message['ratings_enabled'] ? $txt['enable_ratings_post_alt'] : $txt['disable_ratings_post_alt'], '" href="', $scripturl, '?action=postratings;sa=', ($message['ratings_enabled'] ? 'disable' : 'enable'), ';board=', $context['current_board'], ';topic=', $context['current_topic'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span>', ($message['ratings_enabled'] ? $txt['enable_ratings_post'] : $txt['disable_ratings_post']), '</span></a></li>';
   
        // How about deleting post ratings from this particular post?
        if (!empty($modSettings['post_ratings_posts_delete_icon']))
            if (allowedTo('postratings_administrate') && !empty($message['ratings_enabled']) && $message['first_enabled'] && $message['topic_enabled'] && $message['has_ratings'])
                            echo '<li class="remove_rates_button"><a class="tooltip" title="', $txt['delete_ratings_post_alt'], '" href="', $scripturl, '?action=postratings;sa=deleteall;board=', $context['current_board'], ';msg=', $message['id'], '"><span>', $txt['delete_ratings_post'], '</span></a></li>';

        }


File change: ./Themes/SunRise20/css/index.css
Find and add after:

ul.quickbuttons li.modify_button a:before, .button_strip_edit:before {
    content: "\f044";
}

Add:

ul.quickbuttons li.enable_disable_rates_button a:before, .button_strip_edit:before {
    content: "\f5c0";
}
ul.quickbuttons li.remove_rates_button a:before, .button_strip_edit:before {
    content: "\f005";
}

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Install Bug:
    3.    Zastąp    ./Themes/SunRise20/MessageIndex.template.php    Porażka

Find and replace:

                    </td>
                    <td class="stats taphoNone ', $color_class, '">

Replace:

                    </td>';
            if (isset($topic['ratings']) && !empty($topic['ratings']))
            echo '
                    <td align="center" class="ratings ', $alternate_class, '">', $topic['ratings'], '</td>';

            echo '
                    <td class="stats taphoNone ', $color_class, '">

---------------------------------------
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
---------------------------------------

Custom changes beter displayed: ./Themes/SunRise20/Display.template.php

Find and remove: (Remove code for display rate inside post)

        //
        // Post Ratings BEGIN...
        //
       
        // Inner Style?
        if(empty($modSettings['post_ratings_layout_style']))
        {
            // Inner - is it enabled or not??
            if ($message['ratings_enabled'] && $message['topic_enabled'] && $message['first_enabled'] && allowedTo('postratings_view'))           
            {
                echo '<table cellpadding="0" cellspacing="0"><tr><td align="left" valign="middle" style="white-space: nowrap;">';
               
                // does the post have any ratings yet?
                if (!$message['has_ratings'])
                {
                    echo parse_bbc($modSettings['post_ratings_not_rated']);
                }
                else
                {
                    $textOut = 'post_ratings_text' . $message['post_rating_num'];

                    echo $message['post_rating_stars'] . '</td>
                    <td align="left" valign="middle" width="100%"><div> ' . parse_bbc($modSettings[$textOut], true) . '</div>';

                    $view_ratings =  $view_ratings && !empty($message['ratings_enabled']) && $message['topic_enabled'];

                    if (!empty($message['post_rating_totals']))
                    {
                        if (!empty($modSettings['post_ratings_show_quantity']))
                            echo '
                                </td><td class="smalltext" align="right" valign="middle" style="white-space: nowrap;">', ($view_ratings ? '<a href="' . $scripturl . '?action=postratings;sa=view;board=' . $context['current_board'] . ';topic=' . $message['topic_id'] . ';msg=' . $message['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return reqWin(this.href);">' : ''), $txt['postratings_count1'], ' <strong>', $message['post_rating_totals'], '</strong> ', ($message['post_rating_totals'] < 2 ? $txt['postratings_count2'] : $txt['postratings_count3']), ($view_ratings ? '</a>' : '');
                        else
                            if ($view_ratings)
                            echo '
                                </td><td class="smalltext" align="right" valign="middle" style="white-space: nowrap;"><a href="', $scripturl, '?action=postratings;sa=view;board=', $context['current_board'], ';topic=', $message['topic_id'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return reqWin(this.href);">', $txt['post_ratings_view_ratings'], '</a>';
                    }
                }   
                echo '</td></tr></table>';
            }
        }               
        //
        // Post Ratings END!
        //               

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Custom changes beter displayed: ./Themes/SunRise20/Display.template.php

Find and remove: (Remove code for display rate inside post)

        //
        // Post Ratings BEGIN...
        //

        // Header Style?
        if (!empty($modSettings['post_ratings_layout_style']))
        {
            // Header - is it enabled or not??
            if ($message['ratings_enabled'] && $message['topic_enabled'] && $message['first_enabled'] && allowedTo('postratings_view'))           
            {
                echo '
                <div class="title_bar">
                <h3 class="titlebg" style="font-weight: normal;">';

                $view_ratings =  $view_ratings && !empty($message['ratings_enabled']) && $message['topic_enabled'];
               
                if ($message['has_ratings'])
                {
                    if (!empty($message['post_rating_totals']))
                    {
                        if (!empty($modSettings['post_ratings_show_quantity']))
                            echo '
                                <div class="floatright smalltext">', ($view_ratings ? '<a href="' . $scripturl . '?action=postratings;sa=view;board=' . $context['current_board'] . ';topic=' . $message['topic_id'] . ';msg=' . $message['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return reqWin(this.href);">' : ''), $txt['postratings_count1'], ' <strong>', $message['post_rating_totals'], '</strong> ', ($message['post_rating_totals'] < 2 ? $txt['postratings_count2'] : $txt['postratings_count3']), ($view_ratings ? '</a>' : ''), '</div>';
                        else
                            if ($view_ratings)
                            echo '
                                <div class="floatright smalltext"><a href="', $scripturl, '?action=postratings;sa=view;board=', $context['current_board'], ';topic=', $message['topic_id'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return reqWin(this.href);">', $txt['post_ratings_view_ratings'], '</a></div>';
                    }

                    $textOut = 'post_ratings_text' . $message['post_rating_num'];

                    echo $message['post_rating_stars'] . '<table cellspacing="0" cellpadding="0" border="0" class="floatleft"><tr><td align="left" valign="middle">' . parse_bbc(stripslashes($modSettings[$textOut])) . '</td></tr></table>';
                }
                else
                    echo parse_bbc(stripslashes($modSettings['post_ratings_not_rated']));

                echo '
                    </h3></div>';
            }
        }               
        //
        // Post Ratings END!

---------------------------------------
.
.
.
.
.
.
---------------------------------------

Custom changes beter displayed: ./Themes/SunRise20/Display.template.php

Find and add after: (New display rate inside post)

        // Okay, are you at least logged in?  Then we can show something about why IPs are logged...
        elseif (!$context['user']['is_guest'])
            echo '
                                    <br/><a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';

                            echo'
                                    </div><div id="msg_', $message['id'], '_quick_mod"></div>
                                </div>';

Add:

        if(empty($modSettings['post_ratings_layout_style']))
        {
            // is it enabled or not??
            if ($message['ratings_enabled'] && $message['topic_enabled'] && $message['first_enabled'] && allowedTo('postratings_view'))
            {
                // does the post have any ratings yet?
                if (!$message['has_ratings'])
                {
                    echo '<center> ' . parse_bbc($modSettings['post_ratings_not_rated']) . '</center>';
                }
                else
                {
                    echo '<center>' . $message['post_rating_stars'] . '</center>';
                }
            }
        }

I have bug with text coding in this mod.. in the settings when I give Polish characters example ś ę ą ć etc he loses these signs.
And if I translate the text into Modifications.english.php I see utf encoding there but the characters are not displayed

Advertisement: