Page 1 of 1

Adding php Language vars to ratings script

Posted: 26 Jan 2015, 22:47
by David
Is it possible to add language vars like so to the ratings script js?

Code: Select all

'.$lang['rated'].'
No doubt I would have to include the ./language file but I'd like to make it language compliant if It's possible to do?
Thanks.

Adding php Language vars to ratings script

Posted: 27 Jan 2015, 07:49
by Admin
The ratings script not uses a language file, there are only a few texts in the "ratings.js" file ("Ratings", "Thanks for rating", "Votes"), and this text: "Vote Not registered. You must be logged in to can rate." in class.rating.php.
It is to complicated to implement language file from php to javascript code, so I not think about that.

Adding php Language vars to ratings script

Posted: 27 Jan 2015, 08:10
by David
And at my age - I'm not going to either. :)

So we agree on something.

I lost the rating script because I had a test-copy in the root and I put a copy in the root/directory/ and as soon as I cleared the browser cache the rating stars etc were gone. :(

But I did dabble with the js and removed the / from ratingfiles/etc (line 115?) and set refresh to false because I have too many pics on the pages - and along with a few other path changes it worked out fine.