mxfarsa
Forum Replies Created
-
Forum: Plugins
In reply to: [NextGEN Download Gallery] Hi res addon fatal error when activatedHi again, I checked on the providers server and ofcourse the php used was 5.2 – but the good thing was that I could easily just change that in my controlpanel, so now the website has 5.4 instead.
I am greatful for your help and assistance. Thank you!
The addon is now active and I can continue to make everything the way I want it.
Cheers
//Henrik aka mxfarsa
Forum: Hacks
In reply to: Replace GD resize function with Imagemagick.Thank you bcworkz, I will read up on this at php manual – and I will test around to see if I get it to work…
I´ll post questions along the way 🙂
//mxfarsa
Forum: Hacks
In reply to: Replace GD resize function with Imagemagick.Thank you for your answer bcworkz, and yes when I tried the plugin version it did not work.
So I need to alter the file to use imagemagick instead…. I´ll have to read up on php and these parts before i give it a try.
But right now the three parts i need to rewrite is
$image_p = imagecreatetruecolor( $size['width'], $size['height'] ); $image = imagecreatefromjpeg( $location ); list( $current_image['width'], $current_image['height'] ) = getimagesize( $location ); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $size['width'], $size['height'], $current_image['width'], $current_image['height']);1. imagecreatetruecolor – need change
2. imagecreatefromjpeg – need change
3. imagecopyresampled – need changethese are all calling GD functions, but I need to read up on what functions I should call to use imagick instead.
The plugin gets the size variable from cart when a buyer selects one of three choices (large, medium, small) – upon checkout a resized copy of the image is created and put in a tmp dir, the original is not altered.
So the different sizes are only created temporaily when bought – not on upload, but how do I initate imagicks functions with the variables that are already in the file, because all the paths and locations will remain untouched.
The only function I need is to resize an exact copy of original in a smaller size, and make sure that the resized image still have all exif info unaltered.
Alot of questions here, and I am not in any way good with php code, but I will test after reading the php manual.
Or do you have some more information on how to initiate the imagick class and execute.
My webhotel has imagick installed so it should not be any problem on the server end.
I value your help bcworkz
Regards, mxfarsaForum: Hacks
In reply to: Replace GD resize function with Imagemagick.Thank you bcworkz,
I will test this out. I hope it will work..
other than that if this does not work, can I switch out the “imagecopyresampled” function for imagicks resize function directly in plugin file.
From what I have been told, the resize function in imagick, does not strip away the exif of image. The code I posted uses imagecopyresampled, but I want it to use imagick:resize instead.
public function create_download_size( $size, $location=null ){ $image_p = imagecreatetruecolor( $size['width'], $size['height'] ); $image = imagecreatefromjpeg( $location ); list( $current_image['width'], $current_image['height'] ) = getimagesize( $location ); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $size['width'], $size['height'], $current_image['width'], $current_image['height']); $destination_file = $this->tmp_dir . basename( $location ); if ( ! file_exists( $destination_file ) ){ wp_mkdir_p( dirname( $destination_file ) ); }Regards, mxfarsa
Forum: Plugins
In reply to: [Socialize] Double set of buttons and call to action boxToday I went thrue the source in chrome and got this error message.
UnCaught TypeError: Cannot read property ‘total_posts’ of undefined.
This error comes up two times in the <div> class section of the source. This make Socialize to somehow load the floating box and call action box twice…..
update on this permission setting.
I changed the filepermissions for the nextgen-galley folder and sub folder with all files under the nextgen-galley folder to 755, wich means that the public rights are read and execute only. this setup works for me, at the moment.
When it comes to the slideshow that e7 have problems with, im not sure on what may cause this….
@ e7 i know it is not good to have it like that but on my webhostingplace this was the only way that I could get it to work, I have e-mailed them with this issue. I will go and test to see if I only need one maybe 2 folders to be in 777 and the rest to be in 755 or something more secure.
Thank you for pointing it out because to be honest with you i did not think of that.
I tested the slideshow function on my site and it worked. But I remember a while back i had another plugin that stopped this plugin from working as it should, so check if you have some conflict with another plugin, so check if you have another slideshow or thickbox plugin or something similar that might cause a conflict.
I will post any progress in this thread after i have tested the permissions again.
@ lavieenrose. I´ll try to break it down.
Changing filepermissions at my webhost is done by ftp, when I log in to my account by ftp i´ll see every folder and file that is in my space. Now I dont now your webhost, but if you have the ability to log in to your account via a ftp program like filezilla or something equal. Then you see folders and files that are in your account.
The path to wordpress if installed in your root is /public_html/
The path to the folder with nextgen gallery could be something like
/public_html/wp_content/plugins/nextgen-gallery/Now if you are able to locate this folder, then you should see wich permissions that are set for that folder, look for numbers like 710, 755, 777 on the right side of folder name. If you use filezilla like I do then you just right click on the folder and choose file attribut and then you can decide permission for the entire folder and make sure that you choose to change permission for all sub folders and files at the same time. After that let the program do the work.
This is how I have to do when changing permission on a file or folder, but it may not look the same for you.
In short: log in by ftp look for the pluginfolder and look for numbers 710, 755, 777 somewhere on the same row.
Hope it helps you a little bit.
Im off to work so it might take awhile to respond.//mxfarsa
@ e7 i changed permission on the entire ngg gallery folder and all the files in it from 755 to 777 that made it working again for me. Hope it helps you
Hi all, i got to work, on my part it was not the plugin. When I did the update the permission for the files changed to 755, i changed back the permissions to 777 for the plugin and everything worked perfectly again.
Hope that this helps for the others with problem.
Alex thank you for your reply and thank you for your work with the plugin, I will donate some to you when I am able to it.
Mvh Henrik Andersson