5 Star Rating System
plutonr.1
- php
0 EKKi0 Hans Wurst0 Maxx
Hallo Leute,hoffe ihr könnt mir helfen.
Habe ein 5 Star Rating System von http://www.anthonydetamore.com/scripts/rating habe es auch schon installiert.Es ist alles so zu sehen wie es soll,bloss wenn ich drauf klicke dann lädt er die Seite neu aber speichert keine Bewertung. In der Anleitung die ich hier rein setze verstehe ich Punkt 2 nicht.
To install this script do the following:
2)Enter the following SQL statement with your desired table name (replace tableName) into your database to create your ratings table
CREATE TABLE `tableName` (
ip
varchar(15) NOT NULL,
rating
varchar(1) NOT NULL,
page
varchar(99) NOT NULL,
PRIMARY KEY (ip
,page
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Enter your credentials into the constants.php file
Upload rate.js, and the contents of the include and stars folder to your server.
On your PHP page, add the following line into your <head></head> tags:
<SCRIPT LANGUAGE="JavaScript" SRC="rate.js"></SCRIPT>
Place the following line of code where you want the rating script to show up on your page. Replace identifier with a desired keyword:
writeRate(identifier);
To add other instances of this script on this page or other pages, just change the identifier keyword.
Enjoy! Punkt 2.
To install this script do the following:
2)Enter the following SQL statement with your desired table name (replace tableName) into your database to create your ratings table
CREATE TABLE `tableName` (
ip
varchar(15) NOT NULL,
rating
varchar(1) NOT NULL,
page
varchar(99) NOT NULL,
PRIMARY KEY (ip
,page
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Enter your credentials into the constants.php file
Upload rate.js, and the contents of the include and stars folder to your server.
On your PHP page, add the following line into your <head></head> tags:
<SCRIPT LANGUAGE="JavaScript" SRC="rate.js"></SCRIPT>
Place the following line of code where you want the rating script to show up on your page. Replace identifier with a desired keyword:
writeRate(identifier);
To add other instances of this script on this page or other pages, just change the identifier keyword.
Enjoy!
Danke schon mal im Voraus
Mahlzeit plutonr.1,
bloss wenn ich drauf klicke dann lädt er die Seite neu aber speichert keine Bewertung.
Dann besteht wohl ein Problem an der Stelle, wo das Skript die Bewertung speichert. Wie geschieht dies? Hast Du Dich bereits an den Hersteller der Software gewandt?
In der Anleitung die ich hier rein setze verstehe ich Punkt 2 nicht.
Was ist daran schwer zu verstehen?
2)Enter the following SQL statement with your desired table name (replace tableName) into your database to create your ratings table
CREATE TABLE
tableName
(
ip
varchar(15) NOT NULL,
rating
varchar(1) NOT NULL,
page
varchar(99) NOT NULL,
PRIMARY KEY (ip
,page
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Anscheinend werden die Bewertungen in einer SQL-Datenbank gespeichert. Hast Du die Tabelle entsprechend angelegt und die entsprechenden Zugangsdaten in die Konfigurationsdatei des Bewertungsskripts eingetragen (wie in Punkt 3 erwähnt)?
- Enter your credentials into the constants.php file
Danke schon mal im Voraus
Gern geschehen - aber warum hast Du die Anleitung gleich zweimal gepostet?
MfG,
EKKi
Setze es doch mit PHP und JS um.
JS animiert dein Rating, Ajax (JS) schickt es zu PHP und PHP speichert es in die DB. Somit muss die Seite nicht neugeladen werden, siehe eBay-Bewertung z.b.
Hallo Hanswurst,
sorry wenn ich mich ungefragt einmische.
Setze es doch mit PHP und JS um.
JS animiert dein Rating,
nein, CSS ist völlig ausreichend
Ajax (JS) schickt es zu PHP
nein, jeder Stern (jedes Rating) ist ein ganz normaler Link
und PHP speichert es in die DB.
Jupp, und liefert dem Browser einen 204'er
siehe eBay-Bewertung
Wenn es auf dieser Welt 2 Dinge gibt die wir im Internet nicht brauchen, dann sind das STOPP-Schilder und eBay-Bewertungen ;-)
Jochen