Code

Discussion on ThumbsUp

Discussion on ThumbsUp

By
Cart 1,995 sales

GeertDD supports this item

Supported

This author's response time can be up to 10 business days.

753 comments found.

i`ve purchased the script. can you make a tutorial how to install the script on a joomla site? or can you make a plugin to use it on a joomla site?

No. I’m sorry to disappoint you but I have no Joomla experience at all.

I actually think this is a great little app, very nice graphics etc. I haven’t managed to get it to work on Wordpress myself but it seems that you have proven that it does work…. Any chance of writing an idiots guide to setting up the files for wordpress? I sent email you a run down of what I did and the error message I get (looks like it’s my lack of knowledge – not a “Sleazy” application) No Warning needed 2-HOT-headedboy!

Thanks, zapprabbit. Due to the apparent popular demand to install ThumbsUp with WordPress, I am planning to create a dedicated WordPress blog just for the ThumbsUp installation instructions. Give me a bit of time. I’ll keep you posted.

Warning

I bought Thumbs and later emailed the author twice about using it with Wordpress, because it didn’t seem to be working.

Both emails STILL have not been answered—from a month ago.

My guess? Thumbs does not work with WP.

If that’s the case, why ignore me instead of simply answering “No” GeertDD? I noticed you chose not to answer the other Wordpress questions above as well. That’s a pretty sleazy way to do business. Wish I could get my money back.

What’s up GeertDD?

I am sorry you are disappointed with my ThumbsUp support, 2headedboy. Let’s make it clear, though, that I did reply to your email (on the same day I received it, August 6th).

In that email you ask two questions. The first one is about the format of THUMBSUP_WEBROOT. I answered that. The other one was specific to your WordPress setup. I didn’t answer that. Look, ThumbsUp is not a WordPress plugin, and I’m not giving WordPress support. Sleazy or reasonable?

ThumbsUp does work with WordPress. I installed it on my own blog (look at the bottom of an article). The installation for a WordPress site is the same as for another site: include the PHP script, include the javascript and create your ThumbsUp items anywhere you want them in your templates.

Have a nice day, Damian.

This looks sooo very good…..! Just need to know if I can integrate it into WordPress? And if so how???

If you ever decide to convert it into a mysql version, do ping me.

BTW , the next step in your script needs to be another unique identifier. Where as now you allow a unique for the rating (and ip {unreliable}), you need to allow another for something like user_id. This should give the avg user all they will ever need to implement this script anywhere.

Another bonus would be ability to interact with sql+lite via documentation…

It works a charm. You can see it on Clan Themes and here is the code I used.

Brilliant Script.

Can you disable voting via the syntax. For instance, I want people to be able to see the votes, but have to view the article page to actually vote.

Good question, floppydrivez. While this functionality is not hard-coded into it, the ThumbsUp script is flexible enough to provide you with an easy and elegant solution. The “trick” is to add an extra option yourself.

Firstly, on the page where you want to show the results only, pass on 'closed' => TRUE as an extra array item, along with option1 and option2. All these options are passed on to the html.php template file in the $config array. In thumbsup/templates/mini-poll/html.php add this line: if ( ! empty($config['closed'])) { $item['closed'] = TRUE; }

Hope this helps. Here are the edits again, in color: http://pastie.textmate.org/586804

I get this error while trying to go to admin:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /www/thumbsup/admin/index.php on line 17

Does your server run PHP 5 ? This is a requirement.

Hi,

I dont really have much knowledge of mysql, but where is the database file, because the database folder is empty.

i get this error:

Fatal error: Uncaught exception ‘SQLiteException’ with message ‘SQLiteDatabase::construct() [-construct’>sqlitedatabase.-construct]: unable to open database:{........}thumbsup/database/thumbsup.db’ in{........}t/thumbsup/core/thumbsup_database.php:31 Stack trace: #0 {........}t/thumbsup/core/thumbsup_database.php(31): SQLiteDatabase->construct(’/usr/home/deb19…’, 438, ‘unable to open …’) #1 /{........}tthumbsup/core/thumbsup.php(281): ThumbsUp_Database::db() #2 {........}t/thumbsup/core/thumbsup.php(145): ThumbsUp->load_item(‘Section Demo’) #3 {........}t/demo/index.php(47): ThumbsUp->setup(‘Section Demo’, ‘mini-thumbs’, Array) #4 {main} thrown in {........}thumbsup

Most probably your database folder is not writable (chmod 666). Also see this comment.

does it works with dynamic pages ? like i have articles php dynamic pages and i want that every article will get automatically vote system.

does it support to react polls with dynamic pages ?

All you need to make sure is to pass on unique names for each ThumbsUp item. You can do this dynamically, for example by pulling article IDs from the URL or your own database.

<?php $thumbsup->setup('article_'.$myID)->render() ?>

Oh man I would love this if it used MYSQL ! Tell me if you make one using mysql.

Hi David. It took a while, but ThumbsUp 2.0 is now up for download. MySQL is supported. View the documentation at: http://www.geertdedeckere.be/shop/thumbsup/

Hi! Thanks for your fast reply! But i try to put the code and have a “Warning” problem. So i put this code:

<? $a = file_get_contents(”./thumbsup/core/thumbsup.php”); echo ($a); ?>

and the “first” problem is solved. But if i put this:

<?php include ’./thumbsup/core/thumbsup.php’ ?>

I get error!

Thanks for your patience. :)

PS: sry for my bad eng :)

Again, this has to be a problem with the relative path. Since I can’t tell how your files are structured, I can’t give an accurate answer. Try ../ or ../../

Maybe it would be easier to specify an absolute path to the thumbsup file. Starts with a slash. For example: /home/minimac/web/thumbsup/core/thumbsup.php

hi! All I get is… Fatal error: Fatal error: Call to a member function setup() on a non-object in ….. line 68

I guess you’ve got a problem with step 3 of the installation, the inclusion of the PHP script. Note that the path to the thumbsup file is relative to the file you are including it into.

<?php include './thumbsup/core/thumbsup.php' ?>

I think if you make it to work with MYSQL

You will got more sales !

Most of people here working with opensource projects with MYSQL .

Just Make it with MYSQL that will not take from you 10 minutes of work and thats it. Get more sales

Might be. Thanks for the suggestion. Note, though, that the installation with SQLite is actually easier; you just need to point to a writable database-file. Also, SQLite is included by default in PHP5 .

Another question, my main db is mysql, but since this script uses sqlite, I am running into a problem. All my database results are displayed from mysql and the votes are queried from the sqlite db. Users want to sort the data from my main database by votes… Is there a way to join the two db or do you know of some other work around for this? I hope my question makes sense.

On the same db structure, this is what the query might look like:

$data = mysql_query(“SELECT * FROM main_db, votes_sql WHERE main_db.di_id=votes_sql.id)

I’m sorry, but I don’t know an easy way to combine MySQL and SQLite queries like that.

hi cant u make 1 which can have more than 2 options ??

Maybe, one day…

$thumbsup=new ThumbsUp(); $tud = $thumbsup->setup($did, ‘mini-thumbs’)->render(TRUE);

print “blah blah $tud”;

Just got the script, but I can’t seem to prevent render() from echoing. Addtionally, I can’t log into db.. also I dont see thumbs.db in database folder.

Calling render(TRUE) returns the output instead of echoing it. I just double-checked. It works.

As for the database, are you sure the database folder is writable?

So it’s not a WP “plugin”. No problem. I assume the php code can just be integrated in a WP php page?

Is it possible to integrate this into WP comments?

Your assumption is right. It’s both PHP code indeed. You should also be able to integrate it into WP comments. In the WordPress Howto I added it to single posts and used get_the_ID() to generate unique ThumbsUp names automatically. For comments you can do the same with get_comment_ID().

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey