vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - [AJAX] Thumbs Up? (https://vborg.vbsupport.ru/showthread.php?t=285654)

Scandal 07-16-2012 10:00 PM

[AJAX] Thumbs Up?
 
1 Attachment(s)
Thumbs up/down system for all content of vBulletin!

This mod gives a simple thumbs system for:
  • Forum posts
  • Pictures
  • Picture comments
  • Profile visitor messages
  • Social group messages
Features
  • Thumbs up/down rating system
  • Ability to turn off "thumbs down" votes
  • Uses AJAX technology (= no page refresh when voting)
  • Ability to turn off system on each section
  • Show who vote feature (with ability to turn it off for up or/and down thumbs)
  • Notification system for new thumbs (with ability to turn it off via usercp)
  • Only first post feature
  • Ban user/usergroup feature
  • Turn off system on individual forums
  • Importers from Post Thanks/Groans included!
  • Thumbs Up? Center:
  • - latest thumbs on "my" content
  • - latest thumbs "I gave"
  • - statistics
Credits to my friend Lea Verou for designing the appearance of this hack!

Changelog:
v1.0 - first release
v1.0.2 - 1 bug fixed (only first post function issue), phrases added

-Scandal :D

Scandal 07-17-2012 10:14 AM

Comming soon: vB4 version! Stay tuned. :cool:

vijayninel 07-17-2012 10:14 AM

Ah .. interesting. I have also converted the vBSEO like into a "thums up" on my forum.

3raq4all 07-17-2012 01:38 PM

Does not appear in the posts!

Scandal 07-17-2012 01:43 PM

Quote:

Originally Posted by 3raq4all (Post 2348954)
Does not appear in the posts!

hmm, try to open plugin Box for Forum Posts and add at first line (above from all):
Code:

global $vbulletin;
I re-upload the product with this fix.

3raq4all 07-17-2012 01:55 PM

I re-upload the product with this fix. https://vborg.vbsupport.ru/images/smilies/up.gif

v123shine 07-17-2012 05:39 PM

Nice mod :)

RobbieZ 07-17-2012 06:19 PM

Excellent.. can't wait for Vb4.. will it resemble post ratings mod from xenforo?

maki_69 07-17-2012 07:38 PM

Great mod but I have problem with permissions of usergroups. Where Can I enable / disable voting for usergroups? I check all options in plugin setting but I get error about permissions.
Another thing is problem with voting after changing forum language. I use polish language and when I want check error message in english, I change forum language and vote but buttons disappear and my vote didn't count.

I have proposition about new function of mod ;). If this isn't problem You can add to "forumdisplay" box with number of votes.

valdet 07-17-2012 08:05 PM

Anyone tried this in vB 3.6.x versions ?

Would this work, although the templates in which this hack works are a bit different in vB 3.6.x ?

Skyrider 07-17-2012 10:35 PM

I shall wait for the vB4 version!

Scandal 07-18-2012 06:47 AM

1 Attachment(s)
Quote:

Originally Posted by maki_69 (Post 2349056)
Great mod but I have problem with permissions of usergroups. Where Can I enable / disable voting for usergroups? I check all options in plugin setting but I get error about permissions.

On admincp settings about Thumbs Up? there is the option to Ban Usergroups of using the system:
Attachment 139898
This option is on settings, not on usergroup manager. ;)
Quote:

Originally Posted by maki_69 (Post 2349056)
Another thing is problem with voting after changing forum language. I use polish language and when I want check error message in english, I change forum language and vote but buttons disappear and my vote didn't count.

hmm I don't understand the problem. :o
If the language of your site is set to English, the system works fine, but if you turn to Polish, and try to thumb, the box disappear? What with error message?

(sorry for my bad English :erm: )

maki_69 07-18-2012 07:23 AM

Quote:

Originally Posted by Scandal (Post 2349188)
On admincp settings about Thumbs Up? there is the option to Ban Usergroups of using the system:
Attachment 139898
This option is on settings, not on usergroup manager. ;)

I saw this option but when I want vote I get error about permissions my usergroup but banned usergroups field is empty.


Quote:

Originally Posted by Scandal (Post 2349188)
hmm I don't understand the problem. :o
If the language of your site is set to English, the system works fine, but if you turn to Polish, and try to thumb, the box disappear? What with error message?

This problem You can see when You install mod on language number 1 (in my example polish) and next you change language to number 2 (english). Now try vote. Box with thumbnails disappear and error doesn't appear.

BTW. And what you thing about my proposition about box on forumdisplay?
Example (but in this example looks ugly):
https://vborg.vbsupport.ru/
This box can be like optional function :)

Scandal 07-18-2012 07:41 AM

Quote:

Originally Posted by maki_69 (Post 2349191)
I saw this option but when I want vote I get error about permissions my usergroup but banned usergroups field is empty.

Can you let me know what is your usergroup ID its users has this problem? (no permission). Also check if the problem is only for your test account. Other users on this usergroup has the same problem?

Quote:

Originally Posted by maki_69 (Post 2349191)
This problem You can see when You install mod on language number 1 (in my example polish) and next you change language to number 2 (english). Now try vote. Box with thumbnails disappear and error doesn't appear.

Try this change temporary to see the error: Go to admincp > vBulletin Options > General Settings, and disable All AJAX features. Then try to vote and let me know the error message.


Quote:

Originally Posted by maki_69 (Post 2349191)
BTW. And what you thing about my proposition about box on forumdisplay?
Example (but in this example looks ugly):
http://iv.pl/images/88229702496831398859.png
This box can be like optional function :)

The box you describe is for "thumb up/down" threads, or a sum of post thumbs for each thread?

maki_69 07-18-2012 09:52 AM

Quote:

Originally Posted by Scandal (Post 2349197)
Can you let me know what is your usergroup ID its users has this problem? (no permission). Also check if the problem is only for your test account. Other users on this usergroup has the same problem?

I test mod on localhost like admin and registered user. Both usergorups have this error.


Quote:

Originally Posted by Scandal (Post 2349197)
Try this change temporary to see the error: Go to admincp > vBulletin Options > General Settings, and disable All AJAX features. Then try to vote and let me know the error message.

I disabled ajax features and got the same error:
"admin, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation."


Quote:

Originally Posted by Scandal (Post 2349197)
The box you describe is for "thumb up/down" threads, or a sum of post thumbs for each thread?

Described box is for sum of thumbs up for first post. Of course You can do this box for others options like counting every thumbs in topic or displaying sum of thumbs up and sum of thumbs down.

Scandal 07-18-2012 02:32 PM

Very strange :(
What your vBulletin version?

If you couldn't thumb a post, the buttons would be "grey" ("not allowed"). Has anyone the same problem?

hmm, do a right click on a button (up or down), copy the url and paste it here.

maki_69 07-18-2012 02:53 PM

Quote:

Originally Posted by Scandal (Post 2349267)
Very strange :(
What your vBulletin version?

I use 3.8.6 on localhost but in few minutes I install and check mod on my forum.

EDIT: On my forum I have the same problem (I use vBulletin 3.8.7 Patch Level 3).

Quote:

Originally Posted by Scandal (Post 2349267)
hmm, do a right click on a button (up or down), copy the url and paste it here.

URL:
Code:

http://localhost/vbulletin/thumbs.php?do=add&contenttype=post&thumb=-1&contentid=2&securitytoken=1342626612-cf8705a736092af96d2083ce350a15fff2c20d0f

3raq4all 07-18-2012 06:28 PM

https://vborg.vbsupport.ru/external/2012/07/31.png


Hello
How do I get on the variable for the number?
I want to add the number to the Post template
I hope to help

Fluke667 07-18-2012 10:08 PM

i want import from reputation system to thumbs up... howto do this?

Scandal 07-19-2012 11:04 AM

Quote:

Originally Posted by maki_69 (Post 2349270)
I use 3.8.6 on localhost but in few minutes I install and check mod on my forum.

EDIT: On my forum I have the same problem (I use vBulletin 3.8.7 Patch Level 3).


URL:
Code:

http://localhost/vbulletin/thumbs.php?do=add&contenttype=post&thumb=-1&contentid=2&securitytoken=1342626612-cf8705a736092af96d2083ce350a15fff2c20d0f

Let's do some edits, just for testing.
1. Open file thumbs.php and delete the lines:
Quote:

// check security
if (!verify_security_token($securitytoken, $vbulletin->userinfo['securitytoken_raw'])) {
print_no_permission();
}
then try to use the system.
2. Open file includes/functions_sc_thumbs.php and find the function:
Quote:

function thumbed_already_check
change the line:
Quote:

return false;
to
Quote:

return true;
then try to use the system
3. On the same file, find the function:
Quote:

function is_in_banned_usergroup()
change the line:
Quote:

return false;
to
Quote:

return true;
then try to use the system
4. On the same file, find the function:
Quote:

function is_in_banned_list()
change the line:
Quote:

return false;
to
Quote:

return true;
then try to use the system
5. On the same file, find the function:
Quote:

function is_a_banned_forum($forumid)
change the line:
Quote:

return false;
to
Quote:

return true;
then try to use the system

Quote:

Originally Posted by 3raq4all (Post 2349325)
https://vborg.vbsupport.ru/external/2012/07/31.png


Hello
How do I get on the variable for the number?
I want to add the number to the Post template
I hope to help

What exactly you want to do? These numbers refers the thumbs has been given on the whole site.

Quote:

Originally Posted by Fluke667 (Post 2349372)
i want import from reputation system to thumbs up... howto do this?

I haven't check reputation system. will see.

maki_69 07-19-2012 11:22 AM

I installed mod on my other forum and works fine and I don't know how is problem on the first forum ;/. When I end configuring mod I will be testing mod on first forum (maybe other plugin conflict with this mod?).
You add phrase "sc_thumbs_title_thumbsdown" and "sc_thumbs_title_thumbsup" but You didn't use it in mod but You use twice "sc_thumbs_thumbs_down" and "sc_thumbs_thumbs_up" (templates "sc_thumbs_box").

EDIT: I know where is bug :). Turn on voting only in first post and you will see the same bug what mine. If You turn on voting in every post Your mod works fine.

Scandal 07-19-2012 02:41 PM

Quote:

Originally Posted by maki_69 (Post 2349468)
EDIT: I know where is bug :). Turn on voting only in first post and you will see the same bug what mine. If You turn on voting in every post Your mod works fine.

wow, you're right! I'll fix it as soon as posible. :up:

Thanks, ;)

maki_69 07-19-2012 03:06 PM

Hmm, now i'm testing mod on other forum and I saw in my postbox e-mail with vbulletin database errors like this:

"Database error in vBulletin 3.8.7:

Invalid SQL:
SELECT * FROM sc_thumbs_post WHERE postid IN () ORDER BY username ASC;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY username ASC' at line 1"

If You have a time and desire, I have another proposals for modifications Your mod like:
- public statistic (eg: with the best post from latest x days)
- disabling for view post with more than x "thumbs down" or mark the best posts in topic
A little imagination and this mod will be the best mod of the month :P

3raq4all 07-19-2012 05:17 PM

Quote:




Hello
How do I get on the variable for the number?
I want to add the number to the Post template
I hope to help

What exactly you want to do? These numbers refers the thumbs has been given on the whole site.
I want to add the number of figures for each member of thumb template to the Post Legacy I just want the numbers for this variable

Scandal 07-19-2012 05:53 PM

Quote:

Originally Posted by maki_69 (Post 2349537)
Hmm, now i'm testing mod on other forum and I saw in my postbox e-mail with vbulletin database errors like this:

"Database error in vBulletin 3.8.7:

Invalid SQL:
SELECT * FROM sc_thumbs_post WHERE postid IN () ORDER BY username ASC;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY username ASC' at line 1"

If You have a time and desire, I have another proposals for modifications Your mod like:
- public statistic (eg: with the best post from latest x days)
- disabling for view post with more than x "thumbs down" or mark the best posts in topic
A little imagination and this mod will be the best mod of the month :P

Can you give me more info about the database error? I need the url of the error and the info of user (he is a guest or a member?). I think this info is on the e-mail.

Thanks for your ideas, will see on the next versions!!

The bug with only first post function, fixed!

Quote:

Originally Posted by 3raq4all (Post 2349584)
I want to add the number of figures for each member of thumb template to the Post Legacy I just want the numbers for this variable

The variables you need for postbit legacy are:
$post[sc_thumbs_up_received]
$post[sc_thumbs_down_received]
$post[sc_thumbs_up_gave]
$post[sc_thumbs_down_gave]
:up:

maki_69 07-19-2012 07:26 PM

Quote:

Originally Posted by Scandal (Post 2349599)
Can you give me more info about the database error? I need the url of the error and the info of user (he is a guest or a member?). I think this info is on the e-mail.

Url: http://my_forum.pl/thumbs.php
User: Drytomm (but this rather can't help with fix problem)

Shortly I check fixed version :)

3raq4all 07-19-2012 07:56 PM

Quote:

Originally Posted by Scandal (Post 2349599)
Can you give me more info about the database error? I need the url of the error and the info of user (he is a guest or a member?). I think this info is on the e-mail.

Thanks for your ideas, will see on the next versions!!

The bug with only first post function, fixed!


The variables you need for postbit legacy are:
$post[sc_thumbs_up_received]
$post[sc_thumbs_down_received]
$post[sc_thumbs_up_gave]
$post[sc_thumbs_down_gave]
:up:




Thank you, King :up:

Chris8 08-07-2012 07:34 PM

Looks very promising.

How about adding ability to thumb up blog (vbblog) entries and comments?
Useful could be also to see a page with of most thumbed up or thumbed down posts or a search feature for most thumbed up or thumbed down posts.

Kolektor 08-11-2012 07:16 AM

works perfectly! :)
Hope to see more features ;)
love you man!
Nominated to MOTM!

Kolektor 08-11-2012 07:26 AM

There is one uncached template:

sc_thumbs_memberinfo_block

:)

d1alaccom 08-11-2012 02:21 PM

Super!! Thank you very much!

i have a question, is it also possible to make... if there are more than 20 Thumbs Down, ,that the thread will be automatically deleted?

Kolektor 08-13-2012 05:41 PM

Dear, hope you can add the update to 3.8.x line for the updates you have made to 4.x :)
especially the postbit thingie...

klaush 08-14-2012 06:08 AM

Is this already fixed?

Quote:

Originally Posted by Kolektor (Post 2356155)
There is one uncached template:

sc_thumbs_memberinfo_block

:)


Kolektor 08-14-2012 09:46 AM

Quote:

Originally Posted by klaush (Post 2356820)
Is this already fixed?

use ZH Cache Template for the meantime.

Kolektor 08-14-2012 09:57 AM

Quote:

Originally Posted by Kolektor (Post 2356685)
Dear, hope you can add the update to 3.8.x line for the updates you have made to 4.x :)
especially the postbit thingie...

Kindly update 3.8.x

v1.8.0
- new feature: support for vBCMS articles & comments
- whos online locations added
- new feature: top rated (in latest 7 days) contents page
- new feature: postbit statistics
- change: only one button when "thumbs down" are disabled
- new feature: ability to change the color of the thumbs box and the color of amount font via admincp
v1.9.0
- new feature: support for vBBlog entries & comments
- small fix to box template (thanks to Valter)

klaush 08-15-2012 07:13 AM

One issue. If someone clicks the thumbs down/thumbs up button for some reason by mistake he is not able to revise this click.

That needs to be corrected in some way because of the position of the buttons near other buttons and/or the small size of them.

Thanks!

Kolektor 08-19-2012 10:53 PM

Thumbs are not properly aligned in conversation page.

Kolektor 09-08-2012 02:53 AM

Quote:

Originally Posted by Kolektor (Post 2356846)
Kindly update 3.8.x

v1.8.0
[S]- new feature: support for vBCMS articles & comments[/S]
- whos online locations added
- new feature: top rated (in latest 7 days) contents page
- new feature: postbit statistics
- change: only one button when "thumbs down" are disabled
- new feature: ability to change the color of the thumbs box and the color of amount font via admincp
v1.9.0
- new feature: support for vBBlog entries & comments
- small fix to box template (thanks to Valter)

Hi Scandal, wish you'll update also here... :up:

home9000 09-14-2012 10:10 AM

good one

If you hide or unproved any thread have numbers of too much down thumbs
Also you can send notification to moderators about this thread

wangyu1314 09-14-2012 02:41 PM

I had test, it is can not work in vb 3.6.x


All times are GMT. The time now is 08:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01612 seconds
  • Memory Usage 1,859KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (39)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete