5 Star + Thumb + Hearts Rate Extension + translate variable

In this section you can share self-made extensions with other users of WYSIWYG Web Builder.

There are already more than 250 extensions available!
User avatar
BaconFries
 
 
Posts: 4647
Joined: Thu Aug 16, 2007 7:32 pm

Post by BaconFries » Sun Apr 26, 2009 12:35 pm

WOW as the words of the song......
"Things can only get better Can only get better"
thx Eddy......

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Sun Apr 26, 2009 2:09 pm

What are the difference between the 1st (with translation) and the others
I did write an answer in the first post.

rolo
 
 
Posts: 9
Joined: Sat Jun 09, 2007 5:42 pm

Php Rater Bug

Post by rolo » Tue Jun 09, 2009 11:56 pm

I insert the php rater in a wysiwyg .php page.

When published, I get this error:

Warning: fopen(item_1.rating) [function.fopen]: failed to open stream: Permission denied in /home/todo/domains/mydomain.com/public_html/prueba/rater.php on line 86

Warning: fclose(): supplied argument is not a valid stream resource in /home/todo/domains/mydomain.com/public_html/prueba/rater.php on line 87


Any idea on how to fix it?

Thanks

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Wed Jun 10, 2009 10:02 am

There are two files,the proses file and the rate file.

check the file permissions - they are probably set in a way that the web server cannot open it.

Cmod to 755 or 777
Look also if php safe mode is off.

rolo
 
 
Posts: 9
Joined: Sat Jun 09, 2007 5:42 pm

Post by rolo » Thu Jun 11, 2009 11:59 am

I only have Rater.php file (with chmod 777)

and a Stars dir with png files.

1) Where can I find "Rater" and "Proses" files you mention ?

2) How can I know if I have php safe mode off in cpanel ?

Thanks !

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Thu Jun 11, 2009 12:18 pm

Code: Select all

I only have Rater.php file (with chmod 777) 
and a Stars dir with png files.
The rate file what stores the ratings is generated after the first rating on your server.(item_1.rating)
1) Where can I find "Rater" and "Proses" files you mention ?
On your server.
2) How can I know if I have php safe mode off in cpanel ?

You can ask your hosting compagny.

Ask them also about the error message ,maybe they know how to solve it or what they have to change on the server to make it work.

This is where you have the error,

Code: Select all

 }
 fclose($rater_file);
}else{
 $rater_file=fopen($rater_filename,"w");
 fclose($rater_file);
}

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Tue Jul 07, 2009 12:37 am

The rate file what stores the ratings is generated after the first rating on your server.(item_1.rating)

Have u tried changing the permission to 777 right after the file item1.rating is created?

cmod the file item1.rating to 777

Please contact your hosting maybe they can help you if cmod to 777 das not solve your problem.

User avatar
v84x4
 
 
Posts: 112
Joined: Thu Sep 18, 2008 1:48 am
Contact:

Post by v84x4 » Sat Sep 19, 2009 6:26 pm

hey...

I was messing around with the NEW star rater (80 max)
I deleted (item_1.rating ) from my server & now when I re-upload the Star rater extention
the upload dosnt put the nessesary file back...........hmmmm

I have tried uploading the entire site to get it to work but still
wont upload the file item_1.rating

See example here http://www.highwaytrucker.com/talent.php

Regards V8

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Sat Sep 19, 2009 8:19 pm

item_1.rating is generated on your server after the first rating,please read previous posts about the same problem.

It looks that the rater das not work on your server ,something on your server is not configured for this script ( fopen) I have read this from other users to but dont know how to change the php to make it work on al servers.
Contact your hosting maybe they know what todo. :?

Your error code:
Warning: fopen(item_5.rating) [function.fopen]: failed to open stream: Permission denied in /home/v84x4/public_html/rater.php on line 35

Warning: fread(): supplied argument is not a valid stream resource in /home/v84x4/public_html/rater.php on line 37

Warning: fwrite(): supplied argument is not a valid stream resource in /home/v84x4/public_html/rater.php on line 60

Warning: fclose(): supplied argument is not a valid stream resource in /home/v84x4/public_html/rater.php on line 63

Warning: fopen(item_5.rating) [function.fopen]: failed to open stream: Permission denied in /home/v84x4/public_html/rater.php on line 86

Warning: fclose(): supplied argument is not a valid stream resource in /home/v84x4/public_html/rater.php on line 87
Maybe you can use this?
http://nl2.php.net/function.fopen

User avatar
v84x4
 
 
Posts: 112
Joined: Thu Sep 18, 2008 1:48 am
Contact:

Post by v84x4 » Mon Sep 21, 2009 2:59 am

I manually created the item_1.rate and then chmod it to 666. All works now.

Thank you eddy This is a great estention

Regards V8

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Mon Sep 21, 2009 6:51 am

manually created the item_1.rating and then chmod it to 666.

Never thought about that,maybe this works for others to :?
Last edited by Eddy on Wed Sep 23, 2009 4:54 pm, edited 1 time in total.

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Wed Sep 23, 2009 4:42 pm

Open notepad.
Save a new page as item_1.rating
Upload that empty page to your server in the same directorie as rate.php and cmod to 666.

Or look first in the php file for the exact name:
Open rater.php and look to the raterID "rating" for the exact name after item_1.

// DO NOT MODIFY BELOW THIS LINE
$rater_filename='item_'.$rater_id.".rating";

User avatar
v84x4
 
 
Posts: 112
Joined: Thu Sep 18, 2008 1:48 am
Contact:

Post by v84x4 » Wed Sep 23, 2009 5:32 pm

Thanks Eddy

It worked but now Im having a problem using "Star Rater" with "Form" with submit button

When I hit "Rate" it mixes up with the "Submit" button on the form

See Here http://highwaytrucker.com/talent.php

Regards V8

User avatar
Eddy
 
 
Posts: 477
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy » Wed Sep 23, 2009 5:56 pm

The form prosesses the rater after submit and thats what the form prosessor from webbuilder shut do,it proseses all forms in your page.

I think the best thing todo is:
Make the form on another page and show the form in an iframe page.

User avatar
v84x4
 
 
Posts: 112
Joined: Thu Sep 18, 2008 1:48 am
Contact:

Post by v84x4 » Wed Sep 23, 2009 7:07 pm

:wink:

Ahhhh,

Good Idea Eddy

Once again...........Your the man


Best Regards V8

Post Reply