vb.org Archive

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

Alex@bulletin 07-27-2012 11:01 AM

Quote:

Originally Posted by AURFSCAN (Post 2351746)
I didnt want the thumbs box in each post displaying a '0'

I only wanted it to display a number if someone thumbed up/down.

Heres how to,

edit sc_thumbs_box template

find

Code:

{vb:raw amount}
and replace with

Code:

<vb:if condition="$amount !=0 ">{vb:raw amount}</vb:if>

:) thanks again for a great mod Scandal

I also would like this modification of the code. Maybe something to make available in the options of the hack. ^^

Scandal 07-28-2012 01:11 PM

Quote:

Originally Posted by Mr_Running (Post 2351756)
I like the idea :up:
Current I only have this mod set up for Album Pictures and Picture Comments.
The above template change does not seem to work as it is displaying (zero) 0...
at least for me.

May you have disabled the thumbs down votes, so works only the counter of thumbs up votes
($amount is an overall counter).

So the template edit for you is to find:
Code:

{vb:raw amount}<vb:else />{vb:raw list.users_plus_num}</vb:if>
.. and replace with:
Code:

{vb:raw amount}<vb:else /><vb:if condition="$list['users_plus_num'] !=0 ">{vb:raw list.users_plus_num}</vb:if></vb:if>
(notice: there are two "</vb:if>" at the end)

Coming soon: Thumbs Up? available for vBulletin Blog entries and comments. :D

Scandal 07-28-2012 01:16 PM

Quote:

Originally Posted by sandboa (Post 2351431)
Great mod. But can you help me get the Name field above the thumbs up/down field?

The "Real Name" field is there automatically or by the edit of your postbit_legacy template manually?

paulket 07-28-2012 01:56 PM

This is a great mod! It's one of the best in some time on vBulletin.org... Nominated for mod of the month.

socialteenz 07-28-2012 07:12 PM

For some reasons i am not able to run the Rebuild Statistics.

I am getting a database error!

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

                  SELECT SUM(if(thumb = 1, 1, 0)) AS thumbsup, SUM(if(thumb = -1, 1, 0)) AS thumbsdown
                  FROM vb_sc_thumbs_node;

MySQL Error  : Table 'xxxxxx_smf1.vb_sc_thumbs_node' doesn't exist


Barbaro 07-28-2012 08:30 PM

It's the same

Database error in vBulletin 4.2.0:

Invalid SQL:

UPDATE user
SET sc_thumbs_up_received = sc_thumbs_up_received - 1
WHERE userid = 743258;

MySQL Error : BIGINT UNSIGNED value is out of range in '(`foooooo_com`.`user`.`sc_thumbs_up_received` - 1)'
Error Number : 1690

Mr_Running 07-29-2012 01:14 AM

Quote:

Originally Posted by Scandal (Post 2352099)
May you have disabled the thumbs down votes, so works only the counter of thumbs up votes
($amount is an overall counter).

So the template edit for you is to find:
Code:

{vb:raw amount}<vb:else />{vb:raw list.users_plus_num}</vb:if>
.. and replace with:
Code:

{vb:raw amount}<vb:else /><vb:if condition="$list['users_plus_num'] !=0 ">{vb:raw list.users_plus_num}</vb:if></vb:if>
(notice: there are two "</vb:if>" at the end)

Thanks, If this is fixed in the next update I will wait.
I will not need to do a template change. :)

Scandal 07-29-2012 07:45 AM

Quote:

Originally Posted by socialteenz (Post 2352182)
For some reasons i am not able to run the Rebuild Statistics.

I am getting a database error!

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

                  SELECT SUM(if(thumb = 1, 1, 0)) AS thumbsup, SUM(if(thumb = -1, 1, 0)) AS thumbsdown
                  FROM vb_sc_thumbs_node;

MySQL Error  : Table 'xxxxxx_smf1.vb_sc_thumbs_node' doesn't exist


Are you sure you have installed the *xml product during the upgrade to v1.8?
Look at your admincp page with your products. What version of Thumbs Up? it says that you have installed?
How to upgrade?
1. Upload and replace the new files.
2. Import XML product with "Allow overwrite" to YES.

Quote:

Originally Posted by Barbaro (Post 2352197)
It's the same

Database error in vBulletin 4.2.0:

Invalid SQL:

UPDATE user
SET sc_thumbs_up_received = sc_thumbs_up_received - 1
WHERE userid = 743258;

MySQL Error : BIGINT UNSIGNED value is out of range in '(`foooooo_com`.`user`.`sc_thumbs_up_received` - 1)'
Error Number : 1690

What you try to do and appears this db error?
Also, can you see and tell me how many thumbs up "received" your user with ID 743258?

Barbaro 07-29-2012 07:54 AM

Increasingly, issues are cleared of any user masse or deleting a user.

socialteenz 07-29-2012 12:28 PM

Quote:

Originally Posted by Scandal (Post 2352281)
Are you sure you have installed the *xml product during the upgrade to v1.8?
Look at your admincp page with your products. What version of Thumbs Up? it says that you have installed?
How to upgrade?
1. Upload and replace the new files.
2. Import XML product with "Allow overwrite" to YES.

Thanks you, it worked!


All times are GMT. The time now is 10:50 PM.

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.01287 seconds
  • Memory Usage 1,750KB
  • 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
  • (8)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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