Skip to content
FREE & OPEN SOURCE Million Dollar Script is a free WordPress plugin for sponsor walls, campaign grids, fundraiser boards, and premium add-on workflows.

General

Mouse-over box

Started May 20, 2011 by Martin

Hello everyone,i have some problems with the ad/mouse-over-box-effect.First: If I try to upload an additional image I get this error message:[b]Edit Your Ad:[/b]Warning: move_uploaded_file(images/4_bild1305904561.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:Program FileswampwwwMillionDollarScript-2.0.15includefunctions.php on line 2495Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:Program Fileswamptmpphp7CBC.tmp' to 'images/4_bild1305904561.jpg' in C:Program FileswampwwwMillionDollarScript-2.0.15includefunctions.php on line 2495Warning: getimagesize(images/4_bild1305904561.jpg) [function.getimagesize]: failed to open stream: No such file or directory in C:Program FileswampwwwMillionDollarScript-2.0.15includefunctions.php on line 2527Second: It would be great, if the uploaded pixels shown in the grid would be shown in the mouse-over box as well (larger format)- instead of the additional image.Can anyone help me?Thank you in advance.

7 replies

I am not entirely sure what the errors are all about but perhaps they have to do with the windows file path. I don't test this on windows, I don't even have windows to test it on so I cant guarantee this will work in windows in the future either. However, at first glance, it could be something to do with the slash in the destination file: images/4_bild1305904561.jpgWindows would likely be expecting a rather than a / so you would probably have to change the lines of code near where it mentions in the errors to make sure it is using the proper slash.As for the mouse over image, I suppose you could somehow hook the code to use the same image. It would likely be inside users/order_pixels.php where it processes the image uploads.

I just noticed on line 729 of opder_pixels.php there is a / but I think this is on a temp folder so it may not be the problem. However it could be a problem at some point so you could change this line to: [code]$uploaddir = SERVER_PATH_TO_ADMIN."temp" . DIRECTORY_SEPARATOR;[/code]Also in includes/functions.php on line 2471 change the 2 lines to this:[code]$uploaddir = UPLOAD_PATH."images" . DIRECTORY_SEPARATOR;$thumbdir = UPLOAD_PATH."images" . DIRECTORY_SEPARATOR;[/code]And at line 2628 change it to:[code]@unlink (UPLOAD_PATH."images" . DIRECTORY_SEPARATOR.$row[$field_id]);[code]Note that the line numbers may be slightly different but they should look the same, all I did was add the . DIRECTORY_SEPARATOR part.There are actually a bunch of other places in other files with the same problem with the slashes, so if you get an error on those, just search the file mentioned in the error for some PHP code with the images/ part in it, or whatever it references and delete the / and add in the DIRECTORY_SEPARATOR part and it hopefully will fix it if you did it right. I will add a bug report about this.

Hi Ryan,thank you very much for your help.I fixed the first problem, but i do not know how to hook the code to use the same image.Any ideas?

Well, I don't think that will be as easy. There could be more than one way to do it.You could remove the upload form field for the image and that might cause some issues validating so you would probably have to modify some code to get past that. I think there was a forum post about doing that some place, or at least something similar. Maybe it was an email. I don't remember.And then you would have to make it use the other image instead which you would possibly have to query the DB to find out. Maybe it would be possible to just modify the form field to be a hidden element containing the value of the image you want to use which is probably possible to pass via POST variables or something.One part is int he lang/english.php file where it actually shows the layout of the popup:[code]$label['mouseover_ad_template']='%ALT_TEXT% %URL% %IMAGE% '; [/code]Then you would have to find where it is doing a str_replace on the %IMAGE% string and replace what its using with the other image.Also, you would have to remove the users ability to edit that image inside their user area which I believe would be in the /users/publish.php file.If you submit a feature request for this on the tracker I could try to add it to a future version.

Hey I am having the same problem as you. Could I get a copy of your functions.php file pleeeaasse :blush: ?

Warning: move_uploaded_file( /home/html/g/m/d/html/4850vender/ads/upload_files/images/1_pix_ad_1347936048.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/html/g/m/d/html/4850vender/ads//include/functions.php on line 2496Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpAhgTbh' to ' /home/html/g/m/d/html/4850vender/ads//upload_files/images/1_pix_ad_1347936048.jpg' in /home/html/g/m/d/html/4850vender/ads//include/functions.php on line 2496Warning: getimagesize( /home/html/g/m/d/html/4850vender/ads/upload_files/images/1_pix_ad_1347936048.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/html/g/m/d/html/4850vender/ads//include/functions.php on line 2528I have your latest version of this script and i got the same erro meassge when uploading a second image on crating ad treidmy script is in godaddy hosting. anyone know how to fix this erro and use the second upload image function?

It sounds like maybe you aren't allowed to access uploaded files for some reason. Maybe a file/folder permission issue on the tmp folder.