| | | | |
| | |
| Neuer Benutzer Registriert seit: 08.04.2010
Beiträge: 3
PHP-Kenntnisse: Anfänger ![]() | Hallo, ich habe ein kleines Problem mit der Ajax Star Rating Bar und hoffe dass mir evtl. hier jemand weiterhelfen kann. Und zwar zeigt es mir folgende Fehlermeldung an: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-vote4dogs.ratings WHERE id='8xxa'' at line 1 Siehe auch: http://vote4dogs.de/voting.php (am Ende der Seite). Gruß, Gina |
| |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Neuer Benutzer Registriert seit: 08.04.2010
Beiträge: 3
PHP-Kenntnisse: Anfänger ![]() | Programm: Unobtrusive AJAX Star Rating Bar | Masuga Design - Web Design and Development Located in Grand Rapids, MI Script: Bewertungs Sterne erstellen mit Ajax Star Rating Bar | Web:Manual bzw. Code: --->INSTALLATION:
====================================================================== =======
1. Make your table for the ratings in your db (you should be able to copy
and paste the following SQL)
====================================================================== =======
CREATE TABLE `ratings` (
`id` varchar(11) NOT NULL,
`total_votes` int(11) NOT NULL default 0,
`total_value` int(11) NOT NULL default 0,
`used_ips` longtext,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=3;
====================================================================== =======
2. Enter your specific info into _config-rating.php
====================================================================== =======
$dbhost = 'localhost';
$dbuser = '###';
$dbpass = '###';
$dbname = '###';
$tableName = 'ratings';
$rating_unitwidth = 30;
====================================================================== =======
3. Enter this line at the top of any page where you want
to have rating bars.
====================================================================== =======
<?php require('_drawrating.php'); ?>
====================================================================== =======
4. Point to the right Javascript and CSS files (you need
behavior.js, rating.js, and rating.css)
====================================================================== =======
<script type="text/javascript" language="javascript" src="js/behavior.js"></script>
<script type="text/javascript" language="javascript" src="js/rating.js"></script>
<link rel="stylesheet" type="text/css" href="css/rating.css" />
Remember to make sure to fix paths for the images as well. I kept behavior.js separate
from rating.js, because you can use it for other things!
====================================================================== =======
5. Drop the function wherever you want a rating bar to appear
====================================================================== =======
NOTE: As of version 1.2.1, use the echo statement! Also, if you use the static
parameter, you should always specify the 2nd parameter (number of units), even if
it is blank (which will default to 10 units)
<?php echo rating_bar('8'); ?> - 10 stars (default), ID of 8
<?php echo rating_bar('8xxa','5'); ?> - 5 stars, ID of 8xxa
<?php echo rating_bar('9a','5','static'); ?> - 5 stars, ID of 9a, static (non votable)
<?php echo rating_bar('9b',''); ?> - 10 stars, ID of 9b
<?php echo rating_bar('9c','8','static'); ?> - 8 stars, ID of 9c, static (non votable)
If you want to change how the rating bar is rendered, you will need to edit
the _drawrating.php file. Also, you might need to edit the bottom of the rpc.php
file at about line 52, where the $newback variable is.
PHP-Code: |
| |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Fileupload via AJAX | GSJLink | HTML, Usability und Barrierefreiheit | 13 | 17.05.2012 21:41 |
| [Erledigt] Ajax, jQuery - CKEDITOR Fehler bei Instanzierung | jGeee | JavaScript, Ajax und mehr | 3 | 26.03.2010 09:09 |
| Ajax Anwendung, reines Ajax oder Ajax und Html | jackie1983 | JavaScript, Ajax und mehr | 5 | 09.02.2010 16:50 |
| class.GMapper --> Mit Firefox Problem bei Ajax | Plague | PHP Tipps 2008 | 3 | 08.07.2008 10:31 |
| ajax problem (serverseitig) | phyton | HTML, Usability und Barrierefreiheit | 9 | 05.07.2008 13:42 |
| Timestamp problem | phrain | PHP Tipps 2008 | 2 | 04.04.2008 09:41 |
| AJAX: Session-Inhalt an PHP | Curanai | HTML, Usability und Barrierefreiheit | 2 | 05.11.2007 15:45 |
| AJAX open mit POST und GET | DonTermi | HTML, Usability und Barrierefreiheit | 5 | 04.10.2007 18:22 |
| Ajax bild.php aktualisieren | M3g4Star | HTML, Usability und Barrierefreiheit | 3 | 09.03.2007 17:14 |
| Ajax und Sonderzeichen? | GSJLink | HTML, Usability und Barrierefreiheit | 1 | 11.11.2006 14:36 |
| datensätze defekt oder problem mit dem einlesen? | Ministry | Datenbanken | 4 | 06.07.2006 18:42 |
| ajax / popup problem | flflfl | HTML, Usability und Barrierefreiheit | 11 | 11.06.2006 20:05 |
| AJAX Problem - DB Auftrag | HTML, Usability und Barrierefreiheit | 1 | 01.04.2006 09:38 | |
| Encoding Problem mit AJAX | HTML, Usability und Barrierefreiheit | 1 | 23.02.2006 14:10 | |
| Smarty und PHP-Skript Problem | PHP Tipps 2004-2 | 2 | 03.12.2004 22:27 | |