News:

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

Main Menu

Thumbs Ups

Started by Charles Hill, April 21, 2008, 10:59:57 PM

Previous topic - Next topic

Charles Hill

Link to Mod

Name: Thumbs Ups
Version: 1.44
Author: charlesh
Email: [email protected]

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

Description:

This modification adds a new feature to Simple Machines Forum.  Users will now be able to give each others' posts and topics Thumbs Ups.  Thumbs Ups for each individual topic and post are stored and can be used for any purpose.  "Recently Thumbed" posts and topics appear in a table in the Info Center when you enable Recently Thumbed in Admin => Features and Options => Thumbs Up Settings (can also enable a "Most Thumbs" window which is similar).

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

Features:

Navbar link [Thumbs Ups] which links to a moderation page where Thumbs Ups given wait to be checked.  Thumbs Ups don't have to be approved to count, but they can be deleted.

View all of the Thumbs Up related settings at Admin > Features and Options > Thumbs Up Settings

The Thumbs Up feature appears in every post and topic as a thumbup.gif image (the one from SMF).  All of the options are accessible via a simple drop-down / pop-out menu that appears when you hover over the thumbup image.

Thumbs Up Options include: 
1. Displays the current # of thumbs ups that post/topic has received
2. Give this post a thumbs up!
3. Take back your thumbs up (only appears if you have given the post/topic a thumbs up)
4. View the 30 most recent thumbs ups for this post/topic

Thumbs Up Permissions:
1. view thumbs ... can see thumbs ups in posts and topics
2. give thumbs ... can give thumbs ups to posts and topics
3. moderate thumbs ... can moderate thumbs ups via the moderation page (approve/delete)
4. take back thumbs ... can take back thumbs ups they have given to posts and topics

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

Files Modified:

index.php
Sources/BoardIndex.php
Sources/Display.php
Sources/ModSettings.php
Sources/ManageBoards.php
Sources/ManagePermissions.php
Sources/Profile.php
Sources/RemoveTopic.php
Sources/Subs-Boards.php
Sources/Subs-Members.php
Themes/default/index.template.php
Themes/default/BoardIndex.template.php
Themes/default/Display.template.php
Themes/default/index.template.php
Themes/default/ManageBoards.template.php
Themes/default/Profile.template.php
Themes/default/style.css
Themes/default/languages/Admin.english.php
Themes/default/languages/Help.english.php
Themes/default/languages/index.english.php
Themes/default/languages/ManageBoards.english.php
Themes/default/languages/ModSettings.english.php

Database changes via add_settings.php

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

Instructions:

Uninstall any old version of this mod before installing a new version.

Upload the zip file via the package manager (Admin -> Packages -> Download Packages) then apply the mod.

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

Custom Themes:

If you are using a theme other than the default theme, install the mod through the package manager then follow the thumbs_up.xml file to figure out what changes you must make to your theme's .template.php files.

If you're using a custom theme, you'll want to consult the following topic on my support / blog site concerning font size issues:
http://degreesofzero.com/index.php?topic=11.0

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

Version Info:

1.0 -
Released

1.1 -
Added Thumbs Up stats and Recently Given Thumbs Ups to member profiles
Now when a member is deleted, the thumbs ups they have given are deleted as well

1.2 -
Changed how thumb counts are tracked
Thumbs are now removed when a message is removed
Now when a board or topic is deleted all the associated thumbs ups are removed as well
More Thumb stats are tracked in member profiles
Added Most Thumbed window option to info center

1.3-
Updated for 1.1.5
Added board by board mode which (when enabled) allows you to enable/disable Thumbs Ups for each board individually

1.31-
Fixed theme/styling issues with internet explorer

1.4-
Redesigned the Thumbs Up button in posts/topics
The new design includes a drop down css menu with a few options (including a couple new thumbs up related functions)
Added new permission (take back thumbs) which allows users to take back the thumbs up they have given to a post/topic
Added new option (view thumbs ups for this post/topic) which displays up to 30 of the most recent thumbs ups a post/topic has received

1.41-
Minor bug fix (in Display.template.php)

1.42-
Minor bug fix (in ThumbsUp.php)

1.43-
Minor bug fixes

1.44-
Works with Internet Explorer 7 now
View List of Thumbs Ups for a Post is now AJAXified... It will now "pop-up" and load the list of Thumbs Ups for that post below that post's subject/time posted on the topic page.  The pop-up div includes a close window function.

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

Notes:

Please post comments, suggestions, bugs at http://www.simplemachines.org/community/index.php?topic=235414.0 or you can try http://degreesofzero.com/index.php?board=3.0

Test forum for this mod:
http://www.degreesofzero.com/devforum2

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

karlbenson


Apllicmz

Yes nice work
good Mod
iam translate Portuguese pt_PT/pt_BR

<file name="$themedir/languages/index.english.php">

<operation>

<search position="before"><![CDATA[$txt['ajax_in_progress'] = 'Loading...';]]></search>

<add><![CDATA[

// Thumbs Up text variables
$txt['thumbs_ups'] = 'Thumbs Ups';
$txt['thumbs_up'] = 'Thumbs Up';
$txt['thumbs_up_administration'] = 'Thumbs Up Administration';
$txt['date_time_of_thumb'] = 'Date Given';
$txt['thumb_given_by'] = 'Thumb Given By';
$txt['no_thumbs_waiting'] = 'There are no Thumbs Ups waiting to be checked.';
$txt['unchecked_thumbs'] = 'Unchecked Thumbs Ups';
$txt['no_thumbs_given'] = 'No thumbs ups have been given...';
$txt['recently_thumbed'] = 'Recently Thumbed';
$txt['category'] = 'Category';
$txt['give_thumb_to_topic'] = 'Give this topic a Thumbs Up!';
$txt['give_thumb_to_post'] = 'Give this post a Thumbs Up!';
$txt['permissiongroup_thumbsup'] = 'Thumbs Ups';
$txt['permissionname_view_thumbs'] = 'Can see thumbs ups in posts and topics';
$txt['permissionname_give_thumbs'] = 'Can give thumbs ups to posts and topics';
$txt['permissionname_moderate_thumbs'] = 'Can moderate thumbs ups';

]]></add>

</operation>

</file>

<file name="$themedir/languages/index.portuguese.php" error="skip">

<operation>

<search position="before"><![CDATA[$txt['ajax_in_progress'] = 'A carregar...';]]></search>

<add><![CDATA[

// Thumbs Up text variables
$txt['thumbs_ups'] = 'polegares para Cima';
$txt['thumbs_up'] = 'polegar Cima';
$txt['thumbs_up_administration'] = 'polegar para Cima Administra&#231;&#227;o';
$txt['date_time_of_thumb'] = 'Data Dada';
$txt['thumb_given_by'] = 'Polegar dada pelo';
$txt['no_thumbs_waiting'] = 'N&#227;o h&#225; nenhum polegar para Cima &#224; espera de ser controlado.';
$txt['unchecked_thumbs'] = 'Desmarcada polegares para Cima';
$txt['no_thumbs_given'] = 'N&#227;o foram dadas polegares para Cima...';
$txt['recently_thumbed'] = 'Polegar Recentemente';
$txt['category'] = 'Categoria';
$txt['give_thumb_to_topic'] = 'D&#234; a este t&oacute;pico  uma  polegar para Cima!';
$txt['give_thumb_to_post'] = 'D&#234; a este poste um polegar para Cima!';
$txt['permissiongroup_thumbsup'] = 'polegares para Cima';
$txt['permissionname_view_thumbs'] = 'Posso ver polegares para Cima nos outros lugares e nos t&oacute;picos';
$txt['permissionname_give_thumbs'] = 'Posso dar polegares para cima para postes e t&oacute;picos';
$txt['permissionname_moderate_thumbs'] = 'Posso moderar polegares para Cima';

]]></add>

</operation>

</file>

<file name="$themedir/languages/index.brazilian.php" error="skip">

<operation>

<search position="before"><![CDATA[$txt['ajax_in_progress'] = 'A carregar...';]]></search>

<add><![CDATA[

// Thumbs Up text variables
$txt['thumbs_ups'] = 'polegares para Cima';
$txt['thumbs_up'] = 'polegar Cima';
$txt['thumbs_up_administration'] = 'polegar para Cima Administra&#231;&#227;o';
$txt['date_time_of_thumb'] = 'Data Dada';
$txt['thumb_given_by'] = 'Polegar dada pelo';
$txt['no_thumbs_waiting'] = 'N&#227;o h&#225; nenhum polegar para Cima &#224; espera de ser controlado.';
$txt['unchecked_thumbs'] = 'Desmarcada polegares para Cima';
$txt['no_thumbs_given'] = 'N&#227;o foram dadas polegares para Cima...';
$txt['recently_thumbed'] = 'Polegar Recentemente';
$txt['category'] = 'Categoria';
$txt['give_thumb_to_topic'] = 'D&#234; a este t&oacute;pico uma  polegar para Cima!';
$txt['give_thumb_to_post'] = 'D&#234; a este poste um polegar para Cima!';
$txt['permissiongroup_thumbsup'] = 'polegares para Cima';
$txt['permissionname_view_thumbs'] = 'Posso ver polegares para Cima nos outros lugares e nos t&oacute;picos';
$txt['permissionname_give_thumbs'] = 'Posso dar polegares para cima para postes e t&oacute;picos';
$txt['permissionname_moderate_thumbs'] = 'Posso moderar polegares para Cima';

]]></add>

</operation>

</file>



<file name="$themedir/languages/Admin.portuguese.php" error="skip">

<operation>

<search position="after"><![CDATA[$txt['enableBBC']]]></search>

<add><![CDATA[

// Thumbs Ups txt variables
$txt['enableThumbsUps'] = 'Activar polegares ups nos postes e tópicos';
$txt['enableRecentlyThumbed'] = '<span style="font-size:11px;">Activar Thumbed recentemente no Centro de Informação</span>';
$txt['limit_recently_thumbed'] = '<span style="font-size:11px;">Número de itens para exibição na janela Recentemente Thumbed.</span>';

]]></add>

</operation>

</file>

<file name="$themedir/languages/Admin.brazilian.php" error="skip">

<operation>

<search position="after"><![CDATA[$txt['enableBBC']]]></search>

<add><![CDATA[

// Thumbs Ups txt variables
$txt['enableThumbsUps'] = 'Activar polegares ups nos postes e tópicos';
$txt['enableRecentlyThumbed'] = '<span style="font-size:11px;">Activar Thumbed recentemente no Centro de Informação</span>';
$txt['limit_recently_thumbed'] = '<span style="font-size:11px;">Número de itens para exibição na janela Recentemente Thumbed.</span>';

]]></add>

</operation>

</file>



<file name="$themedir/languages/ModSettings.portuguese.php" error="skip">

<operation>

<search position="end"></search>

<add><![CDATA[

// Thumbs Up admin area text strings
$txt['thumbs_up_settings'] = 'Polegares acima configurações';

]]></add>

</operation>

</file>
<file name="$themedir/languages/ModSettings.brazilian.php" error="skip">

<operation>

<search position="end"></search>

<add><![CDATA[

// Thumbs Up admin area text strings
$txt['thumbs_up_settings'] = 'Polegares acima configurações';

]]></add>

</operation>

</file>



Charles Hill

Thanks for the kind words.  I've updated the mod.

Version 1.1 includes the following changes:
Added Thumbs Up stats and Recently Given Thumbs Ups to member profiles
Now when a member is deleted, the thumbs ups they have given are deleted as well

Please don't hesitate to make suggestions :)

Basie

"Recently Thumbed" just doesn't sound right...  :P

Sudhakar Arjunan

Hi Charles Hill,

Really this mod is very good, but when i have installed in my smf 1.1.4, it has showed me test failed for index page, then i have manually modified it.

But it has stretched my Default Page. Even that stretch was reflected in my Forum Default Dilber MC Theme.

So i have tried it to clear the tables for long but without hope i have to Uninstalled it.

Any good solution for it Charles Hill.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Charles Hill

#6
By default page do you mean the board index or every page?  Have you manually modified the default template files at all or installed any other mods?

Ikhsan4488

installed on my forum.. :D

dannbass

Very nice mod!
Maybe for the next release could you add the permission to be enable in the manageboards as well?

Thank you for the mod!


_Anthony_


Charles Hill

Glad you all like it :)

Quote from: dannbass on April 30, 2008, 11:16:58 AM
Very nice mod!
Maybe for the next release could you add the permission to be enable in the manageboards as well?

Thank you for the mod!


Do you mean make an option in the Thumbs Up Settings area to enable board micro management  (have to enable Thumbs Ups in each board)?

bozric

Just tried it on my site and it appeared to install properly, however, once I activated the feature, the index page stopped loading properly and generated a PHP error instead.

Charles Hill

#12
The board index or every page in your forum has this error?

Also, do you have any other mods installed?

_Anthony_

Lol everyone pretty much has other mods installed....
I got it working

bozric

#14
board index - couldn't get anywhere other than that. luckily I had the admin page open in another browser.

And, yes, I have a metric ton of other mods installed.

Charles Hill

#15
Quote from: MrMoney on April 30, 2008, 11:31:20 PM
Lol everyone pretty much has other mods installed....
I got it working

That's true.  I tried really hard to make the modification xml file use references that are likely to remain the same even if other mods are installed.  There are a lot of mods though, so if anyone has trouble installing the mod using the package manager, it would help a lot if you could let me know where other mods are causing problems.

On another note, I am working on another mode for this modification (board by board Thumbs Ups) which will allow an admin to pick and choose on which board(s) to enable thumbs ups.


Quote from: bozric on April 30, 2008, 11:31:45 PM
board index - couldn't get anywhere other than that. luckily I had the admin page open in another browser.

And, yes, I have a metric ton of other mods installed.

Sounds like one of the other mods you installed changed the index.template.php file.  Could you attach your index.template.php and I will take a look (the one with thumbs up mod installed).

dannbass

Quote from: Charles Hill on April 30, 2008, 08:09:25 PM
Do you mean make an option in the Thumbs Up Settings area to enable board micro management  (have to enable Thumbs Ups in each board)?

Yes that could work better than the option of having it in the manageboards template and have to enable board by board, like the ratings mod or the thank-o-matic mod.

Thanks, and great mod!

Sudhakar Arjunan

Quote from: Charles Hill on April 28, 2008, 02:14:23 PM
By default page do you mean the board index or every page?  Have you manually modified the default template files at all or installed any other mods?

Hi Charles Hill,

Thank you for your Response,

I see the index page allignment is changed and all the pages in default theme as will in my dilber mc theme to , then only i had uninstalled.

And yes i do have lots of Mods Installed in My forum.

What i could Do Charles Hill.

Any Suggestions.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Ikhsan4488

can i use this mod for smf 1.1.5?

Charles Hill

#19
Quote from: Ikhsan4488 on May 01, 2008, 03:00:17 PM
can i use this mod for smf 1.1.5?
Yes this works with 1.1.5

Quote from: asudhakar on May 01, 2008, 01:57:30 PM
Quote from: Charles Hill on April 28, 2008, 02:14:23 PM
By default page do you mean the board index or every page?  Have you manually modified the default template files at all or installed any other mods?

Hi Charles Hill,

Thank you for your Response,

I see the index page allignment is changed and all the pages in default theme as will in my dilber mc theme to , then only i had uninstalled.

And yes i do have lots of Mods Installed in My forum.

What i could Do Charles Hill.

Any Suggestions.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com

Yes it looks like you have a ton of mods installed.  If you are decent with programming you should be able to modify the ThumbsUp.template.php functions that display in the BoardIndex on your forum so that they work with the rest of the Board Index.  Look for function displayInfoCenterRecentlyThumbed() and function displayInfoCenterMostThumbed() in ThumbsUp.template.php.

If you want you could attach your BoardIndex.template.php file here (or send it to me) and I could take a look for you.

Advertisement: