753 comments found.
First off I’d just like to say I have very little experience in html, php etc so if my questions have obvious answers I apologize ahead of time.
I am having trouble finding the “database_dsn” to insert into my config.php file. Can you explain where I can find this and/or link me to a tutorial.
Also is the user/password that I use to access PhpMyadmin the same user/pass I enter into the config.php file?
Thank you for your help, it is greatly appreciated.
I have the thumbsup folder at website.com/thumbsup and have updated the config.php with the user/pass and the database dsn (mysql:dbname=freetous_thumbsup;host=localhost’,)
figured out the user/pass and was able to create a new database, However I’m still stuck as it won’t display the thumbs up items I’m not sure whats the issue.
I’m trying to use it on a blank html doc with the code to try and isolate the error
The code to my page is
<!DOCTYPE html>
<?php include ’./thumbsup/init.php’ ?> <head> <?php echo ThumbsUp::css() ?> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js”></script> </head>
<?php echo ThumbsUp::item(‘thumbs_up’)>template(‘thumbs_up’)>options(‘align=left’) ?>
Is there an error/errors in my html or is it still a problem on the databases side
Okay, you need to place <?php include ’./thumbsup/init.php’ ?> even before the doctype or before any whitespace, at the very top of the document. Also, make sure you are inserting the codes in a .php file, not a .html file.
If things still don’t work out then, try enabling debug mode in the thumbsup/config.php file. Look for that option and change FALSE to TRUE. That way, at least an error message should pop up aiding a lot while debugging.
Why did you not include a good complete example with output you only provided a guide for study for PHP coders, I dont know PHP my knowledge only is to substitute variables from examples, If I knew PHP I would write this script my self and I would have to buy it.
I want to list the results from votes
<?php $items = ThumbsUp::items()>orderby(‘votes_total’)>get() ?>
<?php $items = ThumbsUp::items(‘MyVote1’)->get(‘MyVote1’) ?> <?php echo $items ?> How do I display the values?
Hello can you tell me how this would work on your script I have written this for another voting script to output the values
<?php echo “
| Names/td> | Ranking | ”; echo “
| ” . $row[‘item’] . “ | ”; echo “” . $row[‘rank’] . “ | ”; echo “
that small code gives me the reults of total votes
Sorry if you didn’t find the documentation helpful. I tried to create an example for your specific needs. Some basic PHP skills are strongly recommended, though.
<?php
// Select all ThumbsUp items that contain the word "Bob" in
// their name and order them by vote count (high to low).
$items = ThumbsUp::item('Bob')->orderby('votes_total desc')->get();
// Now you need to loop over the items array in order to
// display them in whatever way you want.
foreach ($items as $item) {
var_dump($item); // or echo $item['name'];
}
?>
I just bought it for use in a smarty template setup but its not working. Having read a few posts it doesn’t seem to be workable via a smarty setup.
Is there a defined variable and file for the thumbsup that I can call via smarty.
If I have a variable then I can smarty to assign it.
Instead of echoing the ThumbsUp item you could store the HTML output it generates in a string and assign that to a variable. (I have no experience with Smarty.)
not a coding expert but if I can see how to get the string then I can assign it
Okay, instead of echoing just capture the output into a variable:
$var = ThumbsUp::item('demo')->render();
Okay nearly there
$thumbcounter = ThumbsUp::item(‘demo’)->render();
STemplate::assign(‘thumbcounter’, $thumbcounter);
Then in template {$thumbcounter}
Now because my site is dynamic I need make sure every counter is linked to its specific url or ID
done it replaced the ‘demo’ with the url ID 
Yeah, right, ‘demo’ was just an example. You can build your own item names using PHP variables if you want to. Good job!
PLEASE PROVIDE A QUICK CODE TO SHOW THE GRAPHICS
I ONLY GET A -1 AND +1 BUTTONS
<?php echo ThumbsUp::item(‘item_name’)>template(‘mini_thumbs’)>format(‘{+PCT_UP}%’) ?>
I WANT THE QUICK CODE FOR THUMBS GRAPHICS AND THE RESULT IN %
I JUST WANT THAT I DONT WANT TO WASTE ANYMORE TIME ON THIS THAT IS WHY I BOUGHT THE SCRIPT
please provide the code for the example in the main page where it says Support for MySQL… …and other databases. All database access goes through PDO. Check out the other system requirements before buying.
I WANT TO RUN THIS
<?php echo ThumbsUp::item(‘item_n2ame’)>template(‘thumbs_up_down’)>format(‘{PCT_DOWN}%’)->options(‘align=left&option1=value1’) ?>
BUT IT GIVES ME THIS ERROR 50%
Notice: Undefined offset: 1 in C:\xampp\htdocs\Thv\templates\thumbs_up_down.php on line 15
Notice: Undefined offset: 1 in C:\xampp\htdocs\Thv\templates\thumbs_up_down.php on line 17
Again, please, stop writing in capitals. I just replied to your mail.
Note that the thumbs_up_down.php template was built with two result values in mind (being up and down votes). If you only display a single value (e.g. a percentage), you may need to slightly tweak the actual template as well since there will be no $result[1] in that case.
WHAT IS THE DEFAULT ADMIN AREA USER-PASS WHY DIDNT YOU INLCUDE A GOOD README FILE WITH THIS SCRIPT
I BOUGHT IT TO SAVE TIME BUT NOW IM WATING IT TRYING IT TO MAKE IT TO WORK
ok i found it the answer is there is no default, it has to be activated in the config
It’s a PHP script. A help file is available. Beyond that I commented my code very well. If you go over thumbsup/config.php you’ll get an explanation of each item in there.
No need for writing in ALL-CAPS, is there?
Hello, I love your scripts for my site, but I can not show, only appears.
template(‘thumbs_up’) ?>
http://musicwww.com/?name=Artur_Rojek
I have reviewed from beginning to end the entire manual, but I have no positive results.
can your help plz..
Are you putting PHP code in a HTML file? In that case you’ll see the actual PHP code in the browser which is not good. You need to put it in a .php file.
yep..upps..!!!
Hi,
Can it supports the rich snippets markup formats: schema.org, Microdata, Microformats and RDFa ?
Thanks!
Mick
You can modify an existing template to match the schema.org markup. Styles may need to be updated as well then.
You can filter out videos and quotes if you name your ThumbsUp items consistenly. Did you check out the following page already?
http://www.geertdedeckere.be/shop/thumbsup/help#filtering-itemsAlso, feel free to extend the ThumbsUp::items() code to build in custom functionality if needed. The code is well commented.
yes i’ve read it. I’m sorry I meant to say [video] (topic) then [quote] (topic). The topic word didn’t show up in the initial post because i put it in brackets.
Like going through two different filters (or three if neccessary)
I’m going to go ahead and buy it. i’m sure i’ll probably be able to edit the code if its already not in place, hopefully
Okay, thanks. Let me know if you need further assistance.
Hi, I uploaded this on my server, configured file correctly, I used PHPMyAdmin to place database.sql and after logged in using demo : demo all I see is just a blank page.
Server has PDO set up correctly. ‘database_dsn’ => ‘mysql:dbname=bravo120;host=localhost’,
uncommented two lines: ‘admin_users’ => array( —> An example user with username and password set to “demo”: —> ‘demo’ => ‘demo’, ),
Could you turn on debug mode? Seeing an actual error message would be helpful to pinpoint what exactly is going wrong. You can enable debug mode via the thumbsup/config.php file as well, change FALSE to TRUE.
Hi, thanks for this create little script… Worked just as the documentation explains.
Just one quick question please?
When I add a php variable to <?php echo ThumbsUp::item(’$cpslug’)->template(‘thumbs_up’) ?>
All I get in the items database is $cpref displayed in the name field – But it should read the user name… like user-name
How do I set it so the username is displayed correctly and not the php variable.. Thanks in advance…
Don’t put quotes around the PHP variable, then it will be treated as a string. That should fix it.
Hi, Thanks for your quick reply,
When I remove the quotes from around the PHP variable.
I get a thumbs up error after clicking ? But the correct username is inserted into the database.
Any ideas how to correct this error please, Thanks again.
Sounds like an ajax related problem. Make sure you only use a single (sub)domain, either with or without “www”.
Hi! I’ve got a problem with plugin. I’ve istalled it and displays on my website correcty but when i hover the thumbs up icon or thumbs down icon, the icon disappears. Also when i clicked it, it does not add the value of the vote. I’ve tried offline with WAMP and it worked fine, i dont know what im doing wrong. This is my website: www.compartiendohistorias.com . Thanks a lot!
I’ve discovered that i can actually vote if i hold the mouse button and press the thumbs up or down but it shows error. When i reload the page it shows the vote. Also, it let me vote vote more than once. Hope you can help me out!
First of all, you should only use a single domain. It looks like you are not using “www”, in that case don’t configure the “url” setting in thumbsup/config.php with “www” because that will cause trouble related to crossdomain ajax requests.
Also, you are loading jQuery twice (and different versions as well). That should be fixed. Just load the most recent version once before you load the thumbsup javascript file.
Hi! Thanks, i’ve changed the config.php and now it doesnt show error anymore. Now i still got the problem of the jquery loaded more than once but i dont know where is being loaded the other jquery. In header.php is only the juery call that i added and in fuctions.php i found this:
/* Register our scripts -------------------------------*/
wp_register_script('validation', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js', 'jquery', '1.9', true);
wp_register_script('superfish', get_template_directory_uri() . '/js/superfish.js', 'jquery', '1.4.8');
wp_register_script('supersubs', get_template_directory_uri() . '/js/supersubs.js', 'jquery', '0.2');
wp_register_script('zilla-custom', get_template_directory_uri() . '/js/jquery.custom.js', array('jquery', 'flexslider', 'isotope', 'fitvids', 'imagesLoaded'), '1.0', TRUE);
wp_register_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', 'jquery', '2.0');
wp_register_script('jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', 'jquery', '2.1');
wp_register_script('fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', 'jquery', '1.0');
wp_register_script('isotope', get_template_directory_uri() . '/js/jquery.isotope.min.js', array('jquery', 'imagesLoaded'), '1.5.19');
wp_register_script('imagesLoaded', get_template_directory_uri() . '/js/jquery.imagesloaded.min.js', 'jquery', '2.0.1');
But i dont know what to do with it.
this too:
if ( !function_exists( ‘zilla_enqueue_admin_scripts’ ) ) { function zilla_enqueue_admin_scripts() { wp_register_script( ‘zilla-admin’, get_template_directory_uri() . ’/includes/js/jquery.custom.admin.js’, ‘jquery’ );
Sorry, but this is WP code unrelated to ThumbsUp. As far as I know, wp_register_script() doesn’t even load scripts. Can’t you just include the ThumbsUp script after all the rest?
include it where exactly?
In your theme’s header.php file, after the wp_head action.
It worked! Thanks you so much!!
I was including it a little bit above. Thanks again!
Great! 
is that possible to share the votes in facebook?
No direct link to Facebook sharing has been built in.
How can I get this to work with WordPress 3.8 and specifically with Headway Themes v 3.6? I host on Rackspace Cloud Sites so should be no issue with MySQL DB setup, etc. Please advise. I already purchased this awhile ago and could never get it to work properly in my WordPress. Now the link to the tutorial online for WP is no longer active. Thanks for your assistance.
Dante
It’s much like the regular install actually. Include the thumbsup/init.php file in your functions.php template file. Then add the necessary CSS and JS files to the header.php file.
Does the thumbsup_vote table ever get used? can you give an example a callback for the userid? can i use the votes table to query all the items a user has voted on? please outline that process for me. thank you =) my end goal is to use thumbsup to track a users “favorite” items. is this possible?
ive seen many examples of your callback function and none of them work for me =/
The thumbsup_vote table is used to store IP addresses and/or user IDs if one of these options is enabled. The vote counts are stored in the items table.
Here’s a quick callback function for the userid, to put at the top of the thumbsup/config.php file:
function my_user_id_callback() {
@session_start();
return @$_SESSION['id'];
}
Tracking “favorite” items is not really what this script was built for. I guess you could transform it into it. If the cookie check is enabled item IDs are store in a cookie.
doesn’t work, i am unable to get a UID to write to the db
i pasted your function inside the array and outside the array. i put the function name in between the callback ’’s with and without the () and it doesnt work. please supply a working example with a user id writing to the database or id like my money back. thank you
its a great script, for sure but it seems a lot of people are having this question. it appears many times in the comments here and there isnt a working example available. i purchased this script with this functionality as a key point and if it doesnt work I’d like my money back.
please supply a complete config with settings for the writing of uid to db ty
That function should come right after the ”<?php” part at the top of the config file. Of course, it assumes your user ID system is session based and uses the “id” key. You may have to change that to your own setup.
There is anyway to integrate this with Centova Cast 3 to create a TOP 10 songs block?
Thanks.
Uhm, no idea what that is but if it is a PHP app you should be able to integrate it most of the time.
Yes, Centova Cast is PHP, if i purchase, you can help me with the code?
No, sorry. You may be better off searching for a Centova Cast plugin. I can’t offer support for that. Hope you understand, thanks.
Hi! Im installing the script and i’ve changed “database_user” and ‘database_pass’ to admin, but when i go to the admin section it shows Notice: You need to setup an admin user first in thumbsup/config.php in order to be able to login. in C:\wamp3\www\wordpress\wp-content\plugins\thumbsup\classes\thumbsup_admin.php on line 109. I guess it must be an error on the ‘database_dsn’ which i completed with ‘mysql:dbname=mepaso;host=localhost’. Im working on WAMP if it means something.
If you’re talking about the ThumbsUp admin screen, you need to set up users for that near the bottom of the config file where it says “admin_users”. The database setup is something else.
Ok, Thanks. I’ve got this other issue now. I’ve unzipped the script folder into the theme folder (im using worpress) and i added the js, php, jquery and css code into page.php and header.php, but i got these errors:
Warning: include(./thumbsup/init.php) [function.include]: failed to open stream: No such file or directory in C:\wamp3\www\wordpress\wp-content\themes\bueno\page.php on line 1
Warning: include() [function.include]: Failed opening ’./thumbsup/init.php’ for inclusion (include_path=’.;C:\php5\pear’) in C:\wamp3\www\wordpress\wp-content\themes\bueno\page.php on line 1
Fatal error: Class ‘ThumbsUp’ not found in C:\wamp3\www\wordpress\wp-content\themes\bueno\header.php on line 6
Nevermind, i’ve solved 
Last question. I’ve added the script on page.php and it works fine, but then, when i add it to index.php i got the next error:
Notice: Undefined index: woo_post_content in C:\wamp3\www\wordpress\wp-content\themes\bueno\index.php on line 25
which i thinks is here:
<?php if ( $woo_options[‘woo_post_content’] == “content” ) { the_content(‘[...]’); } else { the_excerpt(); } ?>
, but it works fine when the script is off.
Oh, and where is the mysql update line? Thank you
I want to make a balance field and update it
I’ve solved the last question, i only help with the
Notice: Undefined index: woo_post_content in C:\wamp3\www\wordpress\wp-content\themes\bueno\index.php on line 25
problem
That doesn’t seem like a ThumbsUp related notice, to be honest. You can get rid of that “undefined index” notice by first checking whether $woo_options[‘woo_post_content’] exists by using isset() or empty().
As for the ordering on votes balance, updating your own column is a bit of work. Note that you can also order on vote balance by doing a calculation in the ORDER BY clause (may not be a very efficient query, though):
SELECT * FROM thumbsup_items ORDER BY (votes_up – votes_down)
I want to buy this script….but want to know if it will work on Godaddy shared hosting? Also, can I integrate it easily into Small Machines Forum as a voting system for each post?
Thank You, Lane
It should work on any host with PHP5 and a MySQL database. If you really want to be sure, ask your host. As for the custom integration in existing forum software, that may be tricky. I have no experience with Small Machines Forum.
Hi there, I want to create a new template in order to better integrate ThumbsUp into my pages. What I’d like to do is take the ‘thumbs_up’ template, keep this square layout and add a thumbs down button instead of just the thumbs up. The number appearing above the buttons would be the balance between UPs & DOWNs, proceeded by the + or – sign. The background color would be green for positive balance values and red for negative.
Is this easy to do? Is there a tutorial / guide that could help me with this?
Thx, Mike
There’s no specific tutorial, but if you know your way around with HTML and CSS it should not be hard to duplicate an existing template and tweak it to your likings.
Hmmm… In order to customize this I need to create a new, custom sprite. Could you help me by providing the source of the images?
Thx, Mike
Hi there, if the number of votes is lower than a predefined threshold I’d like instead of the actual balance to show something like “Not enough votes…” How could I do that?
Hmm, it is possible but it would require some manual tweaks to the templates and the PHP script. My code is well commented, feel free to play around with it.
Hi! Can you give an example of the code you have to put on your website for the script to work?
And the format of the table of the DB
Thanks
Did you have a look at http://www.geertdedeckere.be/shop/thumbsup/help ? A link to the database setup file is included there too. Let me know if that works for you. Thanks. 
Can i add a balance field in thumbsup_items table? Because i want to sort the items by that value. Would that interfiere with the script in any way? Thanks
You are free to add a column to the table, no problem. However, you need to make sure you update the column yourself then.
Thanks a lot.