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!

oldz442 07-30-2012 10:16 AM

Nice.

I had to LOL @ this setting... Allow users to thumb themselves? :D

So... I have the default Reputation, Post Thanks, and now this one (Thumbs Up), three enabled at the same time. Just trying to figure out which one I like better. ;)

Crotan 07-31-2012 09:12 PM

This mod looks awesome! I'm thinking hard about switching from the ancient thanks mod.

Anybody import their thanks? painless process or anybody run into problems with importing?

TheChief 08-01-2012 05:54 AM

I'd still like to see this linked to rep so that when they thumb up they get +1 rep

Any ideas whether this will be done or if anyone knows how/if it can be done

Still loving the mod thought

Valter 08-01-2012 05:34 PM

1. Is there a way to disallow removal of given thumbs?
I would like grey thumbup icon to appear here instead of red thumbdown icon.

2. Why number of thumbs in post is linked to DOMAIN/forum.php#{post_number}?
Do we really need <a href="#{vb:raw contentid}">?

3. Why you are not using existing global phrases for:

-From
-Type
-Date
-Time
-Content
-None
etc... ?

Valter 08-01-2012 05:37 PM

Quote:

Originally Posted by Crotan (Post 2353158)
Anybody import their thanks? painless process or anybody run into problems with importing?

Just imported from Post Thanks.

It takes some time to import/re-count, but works fine.


Note: If you get "done or not fresh install" just uninstall/reinstall product, then try again.

micza 08-02-2012 06:53 AM

Some users ask me, why the "thumbs up"-button is not first and tell me, that it would be better to have a counter for each "thumb". This would be very helpfull.

Valter 08-02-2012 02:56 PM

You should give us ability to view stats for other users.

Code:

http://domain/thumbs_center.php?u={userid}

;)

Valter 08-02-2012 03:16 PM

Advanced Forum Statistics now works with "Thumbs Up?" system too.

Quote:

v7.1 - Avg 02. 2012.
-New: Top Thanked now works with "Thumbs Up?" system by Scandal too
-Note: Above still works with "Post Thanks" system by Abe

To upgrade:
-Import product XML, allow overwrite

micza 08-02-2012 08:25 PM

I think it will be also usefull, if you can click on the username in the little box...

Gecuba 08-04-2012 10:46 AM

Quote:

Originally Posted by micza (Post 2353571)
Some users ask me, why the "thumbs up"-button is not first

+1
Quote:

I would like grey thumbup icon to appear
- but for removal of given thumbs

I like this mod very much - tagged and voted for MOTM and look forward for new features and changes. Thank you, Scandal!

zascok 08-04-2012 05:20 PM

1 Attachment(s)
nice one, Tiny thing when thumbs up! given the icon turns into thumbs down for a user. it's a little confusing. lots of my users PMed me and asked to fix it cos they though the pressed Up! but antecedently pressed Down :) Can we have something else instead?

Or at list a function to allow or dissalow to take off given Thumbs.

fishmaster 08-05-2012 12:18 AM

Any ideas..

Had to uninstall to make the forum readable again.

Warning: require_once([path]/includes/functions_sc_thumbs.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_postbit.php(345) : eval()'d code on line 122

Fatal error: require_once() [function.require]: Failed opening required '/public_html/******/forums/includes/functions_sc_thumbs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/***********/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 122

Scandal 08-05-2012 07:11 AM

1 Attachment(s)
Quote:

Originally Posted by zascok (Post 2354447)
nice one, Tiny thing when thumbs up! given the icon turns into thumbs down for a user. it's a little confusing. lots of my users PMed me and asked to fix it cos they though the pressed Up! but antecedently pressed Down :) Can we have something else instead?
https://vborg.vbsupport.ru/attachmen...8&d=1344104374
Or at list a function to allow or dissalow to take off given Thumbs.

You're free to change the file of the red button with something you like. For example you can use this:
Attachment 140332
(it is an inverted green button)
... just rename it to down.png and replace it with the already file.
You can use every button you like, by replace the down.png.

A notice: you should reupload the normal red button if you decide to enable the Thumbs down votes.

However, if you have use facebook, you'll see that normally it has not "dislike" choice for contents BUT if you push "like", to undo it you must push a phrase named "dislike". That may means that we dislike ALL content of facebook since we push a "like". :confused::p

Quote:

Originally Posted by fishmaster (Post 2354539)
Any ideas..

Had to uninstall to make the forum readable again.


Warning: require_once([path]/includes/functions_sc_thumbs.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_postbit.php(345) : eval()'d code on line 122

Fatal error: require_once() [function.require]: Failed opening required '/public_html/******/forums/includes/functions_sc_thumbs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/***********/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 122

Are you sure you had upload correctly the necessary files to your forum directory?
On your forum root there are these directrories:
/admincp/
/clientscript/
/images/
/includes/
.. you should upload the files as there are in the folder packet of *zip attached to the first post. Files thumbs.php and thumbs_center.php must be to the same "root" directory with the above folders.

PS: Thank you all for your suggestion and ideas! I'm already working for the next release!

zascok 08-05-2012 08:19 AM

1 Attachment(s)
I see what do you mean. But yesterday ev things gone so weird I had to change the button in template to up_dis.png. Most of my users don't have any idea of facebook (who cares of fb, right? ).

But any way imo it would be really useful to have a function to disable ability to take off "Thums!" given. Ones given it stays grey and disabled, end of story. :)


pretty please

fishmaster 08-05-2012 04:55 PM

Working like a champ..

Impromptu 08-05-2012 06:11 PM

Very nice work and love it.

I use post-legacy style and just some minor issues.

With the people who are listed as thumbs up is there a way I can put in a right-margin it as the last letter is cut off on the right hand side.

Also, when the hover over the number of thumbs up, it's fine for posts with 4-5 lines but where there is a post with 1 lines it goes really weird. Just when I hover it, but otherwise it's fine.

fishmaster 08-05-2012 10:35 PM

Some issues with the display cutting off on the numbers...

ywwz 08-06-2012 01:05 PM

Very cool, works on 4.2.0

mgbhard 08-06-2012 01:39 PM

First let me thank you for sharing this!

I've set it up so everyone can see the "+1 hand" when they don't have access, or to use it on them self.
The problem i'm having is that sometimes on some posts (not from themself) users complain that there is no hand, or there is but when they click it they get a "you don't have access to this page".

It's happing randomly, and it doesn't happend to all the users on the same post, i mean some users will get a you don't have access, but other will be able to thank for that post without any problem.

Do u have any clue what could be wrong? Thanks for your help, and sorry about my sucky english.

Gecuba 08-06-2012 02:09 PM

I made some 'сosmetic' changes for thumbs box.
Decrease the width from 150px to130px and aligned icon in box - now it's in the middle of the upper block.
Code:

<img src="images/buttons/up.png" border="0" alt="" style="vertical-align: middle" class="inlineimg" />
https://vborg.vbsupport.ru/external/2012/08/112.png https://vborg.vbsupport.ru/external/2012/08/113.png

wat3v3r 08-06-2012 02:35 PM

How is this exactly different from the Vbseo Likes system?
Does this allow an option to add reputation too ?

zascok 08-06-2012 08:57 PM

Hi, just noted. If one clicks on inactive thums!' where the number shows(even the guest) it redirects to the index page :) Is it only me?

check it out yourself

askalon

AURFSCAN 08-07-2012 06:08 AM

Quote:

Originally Posted by zascok (Post 2355081)
Hi, just noted. If one clicks on inactive thums!' where the number shows(even the guest) it redirects to the index page :) Is it only me?

I had that too but i edited that out of the code.. Scandal, can you address that in next update :)

AURFSCAN 08-07-2012 06:15 AM

Also I think the show thumbers popup should be to the left of the box and up, not below..

That too can be fixed in the css. Reason being If there is only one post in a thread theres no room for the box and the browser goes crazy with trying to scroll.. theres a mention of it in this thread

zascok 08-07-2012 10:01 AM

Quote:

Originally Posted by AURFSCAN (Post 2355166)
I had that too but i edited that out of the code.. Scandal, can you address that in next update :)

Can you share that fix please

Valter 08-07-2012 10:46 AM

You need to remove this (template sc_thumbs_box):
Code:

<a href="#{vb:raw contentid}">
and of course closing tag:
Code:

</a>
https://vborg.vbsupport.ru/showpost....0&postcount=94

zascok 08-07-2012 03:12 PM

Thanks Valter, we are on the same page as far as I can see.

DM BoNeZ 08-08-2012 02:35 AM

one question since this is a very interesting mod. will this work on any other vb version on 4.1.x ?

Scandal 08-08-2012 06:13 AM

v1.9.0 available!
- new feature: support for vBBlog entries & comments
- small fix to box template (thanks to Valter :up:)

Thank you all for your functions ideas, are really very interesting and I'll try to include them to next releases, but currently I can't promise the earth, 'cause I'm busy with my site. :p

scabbed 08-08-2012 09:15 PM

first sorry for my english.

nice hack, i use it on my forum, i would like to know if it's possible to show the post with the most thumbs up under the first post of a thread ?

for example, someone create a thread and ask a question about something and the best answer which has most thumbs up just show after the first post (even if its like the 10th post of the thread)

thanks


All times are GMT. The time now is 05:03 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.01567 seconds
  • Memory Usage 1,845KB
  • 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
  • (12)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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