coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: uk_martin on June 17, 2007, 10:17:27 PM

Title: My "Rate This Photo" system needs fixing
Post by: uk_martin on June 17, 2007, 10:17:27 PM
Hi

Don't know what's gone wrong here. (www.brummiesfans.com/gallery) but logged on users don't get the photo rating options at the bottom of the screen, and non-logged in users who DO see the options get an error message when they try to rate a photo.

I've had a look to see where the rating can be enabled / disabled to see if there are any settings there, but I cou;dn't find them.

Any idea what the cause and fix for this problem are?

Thanks in advance

Martin
Title: Re: My "Rate This Photo" system needs fixing
Post by: Stramm on June 20, 2007, 11:11:22 AM
you enable/ disable rating in the group control panel

the error you get... please enable debug mode and post the actual error message
Title: Re: My "Rate This Photo" system needs fixing
Post by: uk_martin on June 20, 2007, 06:53:16 PM
Thanks for the advice

The debug error message says:

While executing query "DELETE FROM cpg_votes WHERE vote_time < 1179762074" on 0

mySQL error: Table '***_copp1.cpg_votes' doesn't exist


Sure enough, in phpMyAdmin, the table is not there...which puzzles me as by clicking on the "Top Rated" button, some earlier votes WERE cast, and are still there.

Anyway, does anyone have the SQL needed to create the cpg_votes table?

Thanks

Martin


Title: Re: My "Rate This Photo" system needs fixing
Post by: Stramm on June 20, 2007, 07:00:48 PM
seems like your votes table is missing/ has been deleted.
You need to recreate it. Use a tool like phpmyadmin for that. Open your coppermine db and run that query (click SQL and paste the code in the textarea)

CREATE TABLE cpg_votes (
  pic_id mediumint(9) NOT NULL default '0',
  user_md5_id varchar(32) NOT NULL default '',
  vote_time int(11) NOT NULL default '0',
  PRIMARY KEY  (pic_id,user_md5_id)
) TYPE=MyISAM COMMENT='Stores votes for individual pics';
Title: Re: My "Rate This Photo" system needs fixing
Post by: uk_martin on June 21, 2007, 02:27:14 AM
Thanks guys. All functioning properly now.