663 comments found

  • Exclusive Author
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
zreed Purchased

Is it possible to make the script `user_id_check` true, but still allow users to vote once per day? It looks like currently, if `user_id_check` is set to true, they can only vote once per item?

zreed
zreed Purchased

Nevermind, I got it! I ended up doing some custom variables to make it check.

GeertDD

Good job!

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years
petriz Purchased

Dear GeertDD

I would like to use the “user_login_required” option. I have a separate user_login PHP script with its own MySQL database. I followed your instructions and “user_id” variable is passed to the thumbsup/config.php file true session.

At the top of the thumbsup/config.php file is: function chk_login() { @session_start(); return @$_SESSION[‘user_id’]; }

And further down is: ‘user_id_callback’ => ‘chk_login’,

When I try to vote I get a message »You need to login in order to vote«, but when I replace »return $_SESSION['user_id'];« with »echo $_SESSION[‘user_id’];« the correct user login ID is showed.

What am I doing wrong?

GeertDD

The code you show here looks fine. Can’t tell where it is going wrong based on this information. Feel free to send me a mail with more details. Also, if you’d like to start debugging yourself already, the catch_vote() method is a good place to inspect some variables.

  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years

Can’t get your script to work. After trying to complete the first steps (after database integration) I get the following error:

“Fatal error: Class ‘ThumbsUp’ not found in /home/funpoll5/public_html/index.php on line 7”

Here is a screenshot of the page where I’m trying to include the script. http://i.imgur.com/ImSW5lc.png

Note: I’m running an linux server…so if a capital is out of place in your script it will not work. Not sure if that helps.

Please advise

GeertDD

Two things: 1) you need to move the inclusion of the thumbsup/init.php file to the very top of the file, even before the doctype or any space; 2) I’m guessing the path to your thumbsup/init.php file is not correct. I don’t know your directory structure but try each of the following:

include './thumbsup/init.php';
include '../thumbsup/init.php';
include '../../thumbsup/init.php';
include '../../../thumbsup/init.php';
Default-user

Ah I see. I have fixed the first problem, but have run into another. I am getting the error: “Fatal error: Class ‘PDO’ not found in /home/funpoll5/public_html/thumbsup/classes/thumbsup.php on line 65” when trying to include a rating section on my site. The file path is correct. Perhaps a db connection error?

Default-user

Please disregard that previous message, I fixed the problem my enabling pdo on my server (wasn’t enabled previously). May be a good idea in your documentation to make clear that: 1. thumbsup/init.php should be literally at the VERY begining of the document. and 2. Ensure .pdo is enabled on server.

Thanks for you help, appreciate it :)

GeertDD

Good job. :-) By the way, the points you mention are already included in the docs: http://www.geertdedeckere.be/shop/thumbsup/help

by
by
by
by
by
by