4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 01, 2014, 05:43:40 AM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [MOD] Multi Size Download of same image [ver 4.7]
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 ... 16 17 18 19 [20] 21 22 23 » »» Print
Current Topic Rating: *****
Author Topic: [MOD] Multi Size Download of same image [ver 4.7]  (Read 177254 times)
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #285 on: September 18, 2012, 06:44:46 PM »

Hi Budduke,

thank you for fixing this problem now. Creation and deleting of categories works fine now but it seems that there is another problem with the new version of 4images.

I tried to install the mod twice with a new installation of 4images 1.7.11 and everything seems to work but when I want to download an image it opens in a new window (like i want it to do) but then I get an broken image.
Don´t know if this might be caused by download.php or if I made a mistake.


I took a look at @tiburon's download.php file and saw the mistake. It is working now.
Logged

Buddy Duke
www.budduke.com
Tiburon
Jr. Member
**
Offline Offline

Posts: 85

Thank You
-Given: 14
-Receive: 2


View Profile WWW
« Reply #286 on: September 25, 2012, 05:26:36 PM »

Thank you for looking after it. Everything works perfectly now  Very Happy
Logged

----------------------------------

Have a nice Day
Solanum
Pre-Newbie

Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #287 on: November 06, 2012, 05:56:10 AM »

Hi all,

I've installed this MOD on 4images 1.7.11 with installed multi language MOD for any text ( http://www.4homepages.de/forum/index.php?topic=6749.0 ).
In the admin categorie settings the line to switch on the multi size function is empty but I switched it on in the database by setting the value "2".
If I want to download a picture a "http 500 error" page appears.

The error log says:

1
PHP Parse error: syntax error, unexpected '}' in /var/www/vhosts/mydomain.com/httpdocs/swfpics/download.php on line 315, referer: http://mydomain.com/swfpics/details.php?image_id=69&sessionid=2reqr03focvtarqukmihc80pg2

Does anyone have an idea whats wrong? As far as I understand the bracket is correct and I checked all my inserts to download.php
« Last Edit: November 07, 2012, 05:18:45 AM by Rembrandt » Logged
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #288 on: November 06, 2012, 10:40:51 PM »

Hi all,

I've installed this MOD on 4images 1.7.11 with installed multi language MOD for any text ( http://www.4homepages.de/forum/index.php?topic=6749.0 ).
In the admin categorie settings the line to switch on the multi size function is empty but I switched it on in the database by setting the value "2".
If I want to download a picture a "http 500 error" page appears.

The error log says:

1
PHP Parse error: syntax error, unexpected '}' in /var/www/vhosts/mydomain.com/httpdocs/swfpics/download.php on line 315, referer: http://mydomain.com/swfpics/details.php?image_id=69&sessionid=2reqr03focvtarqukmihc80pg2

Does anyone have an idea whats wrong? As far as I understand the bracket is correct and I checked all my inserts to download.php

I sounds like something is not placed correctly somewhere, Can you zip all your changed files and post them and I may have time to compair them with mine to see what may be wrong?
Logged

Buddy Duke
www.budduke.com
Solanum
Pre-Newbie

Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #289 on: November 06, 2012, 11:02:31 PM »

Hi budduke,

thank you for the quick reply. Attached are my files. I have to say I already solved the problem with the empty line in the backend ( Embarassed stupid mistake) but the download still doesn't want to work.
I tried it with and without the pop up function but this didn't change anything.

Would be great if you can solve the problem.


* zip_mod.rar (55.21 KB - downloaded 4 times.)
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #290 on: November 07, 2012, 06:56:42 PM »

Hi budduke,

thank you for the quick reply. Attached are my files. I have to say I already solved the problem with the empty line in the backend ( Embarassed stupid mistake) but the download still doesn't want to work.
I tried it with and without the pop up function but this didn't change anything.

Would be great if you can solve the problem.



I only looked over the download.php file since that seemed to be the one you was having issues with. Attached is the fixed one.
Apperently, there are two places that the code can be placed, anyone reading this when you are looking for...
1
if ($user_info['user_level'] != ADMIN)
Looks for the second one in the download.php file...
I will have to update my instructions when I get time...

* download.zip (3.38 KB - downloaded 3 times.)
Logged

Buddy Duke
www.budduke.com
Solanum
Pre-Newbie

Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #291 on: November 08, 2012, 09:35:39 PM »

Thanks, it now opens a download but the image has 0kb size and the "big" folder is empty. Chmod is 777 on the folder.

Any idea what can be wrong now?
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #292 on: November 08, 2012, 09:56:08 PM »

Thanks, it now opens a download but the image has 0kb size and the "big" folder is empty. Chmod is 777 on the folder.

Any idea what can be wrong now?

I looked over your functions.php file and there were a few missing brackets (not in my mod area but in the big mod area)
try this one and let me know...

* functions.zip (18.33 KB - downloaded 3 times.)
Logged

Buddy Duke
www.budduke.com
Solanum
Pre-Newbie

Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #293 on: November 09, 2012, 09:45:37 AM »

I replaced it and cleared the chache, still the same problem.

The error log says:

1
PHP Warning: filesize(): stat failed for /var/www/vhosts/mydomain.com/httpdocs/./data/media/6/big/dsc_3823__resized_128x128.jpg in /var/www/vhosts/mydomain.com/httpdocs/swfpics/download.php on line 85, referer: http://mydomain.com/swfpics/details.php?image_id=52

Logged
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #294 on: November 09, 2012, 01:40:09 PM »

I replaced it and cleared the chache, still the same problem.

The error log says:

1
PHP Warning: filesize(): stat failed for /var/www/vhosts/mydomain.com/httpdocs/./data/media/6/big/dsc_3823__resized_128x128.jpg in /var/www/vhosts/mydomain.com/httpdocs/swfpics/download.php on line 85, referer: http://mydomain.com/swfpics/details.php?image_id=52



Can you PM me your website so I can see it in action...
I may also need admin access but will let you know.
Logged

Buddy Duke
www.budduke.com
Tiburon
Jr. Member
**
Offline Offline

Posts: 85

Thank You
-Given: 14
-Receive: 2


View Profile WWW
« Reply #295 on: November 14, 2012, 09:56:28 AM »

Hi Budduke,

I fear that I found another little problem with the actual version of 4images.

What happens to me is that I can´t restrict the resizes to images that are smaller than the original one that lies in the root of the category folder.
So it happens, that I have an image with a resolution of e.g. 1600x1200px but on detail page I can resize also the bigger resolutions (e.g. 2560x1920) although I configured the category in that way, that only smaller sizes than the original should be offered.

I first thought that that might be caused by other mods I use, but now I tried it with a clean installation of 4 images and the same thing happens. The strange thing is, that it seems to work perfectly the first time the image is selected. So if a new image is selected the first time everything works correctly, if I reload the page, all resolutions that I have in my global.php are shown, without restricting the bigger sizes that I do not want.

Any idea what might be the problem?

Thank you

Tiburon
Logged

----------------------------------

Have a nice Day
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #296 on: November 14, 2012, 08:06:40 PM »

Hi Budduke,

I fear that I found another little problem with the actual version of 4images.

What happens to me is that I can´t restrict the resizes to images that are smaller than the original one that lies in the root of the category folder.
So it happens, that I have an image with a resolution of e.g. 1600x1200px but on detail page I can resize also the bigger resolutions (e.g. 2560x1920) although I configured the category in that way, that only smaller sizes than the original should be offered.

I first thought that that might be caused by other mods I use, but now I tried it with a clean installation of 4 images and the same thing happens. The strange thing is, that it seems to work perfectly the first time the image is selected. So if a new image is selected the first time everything works correctly, if I reload the page, all resolutions that I have in my global.php are shown, without restricting the bigger sizes that I do not want.

Any idea what might be the problem?

Thank you

Tiburon

The thing that is troubling me in your post is that you are saying when it first brings the details page up everything is correct?
Then if you hit refresh it gives you all the options? Are you caching those pages? Can you turn it off to see if it is a caching issue because it should do the same thing each time.
« Last Edit: November 14, 2012, 09:40:44 PM by budduke » Logged

Buddy Duke
www.budduke.com
Tiburon
Jr. Member
**
Offline Offline

Posts: 85

Thank You
-Given: 14
-Receive: 2


View Profile WWW
« Reply #297 on: November 15, 2012, 07:33:06 AM »

The thing that is troubling me in your post is that you are saying when it first brings the details page up everything is correct?
Then if you hit refresh it gives you all the options? Are you caching those pages? Can you turn it off to see if it is a caching issue because it should do the same thing each time.

Yes, a cache issue was my first thought, but caching is disabled, browser cache is empty, delete cache plugin used and cache folder manually checked and empty. I thought that I solved the problem when this happened first with the new installaion, but after a refresh of the image, all resoultions were shown again.  

Update: Now I took again a complete new installation, with a new database, and it seems to work. So, please do nothing Smile

Next Update:: I have no idea what it is. I thought it was the database, but now I get the same problem again, after doing the whole work again. After some testing I found out, that it is really luck what appears on the details page. With each Browser Refresh I get another result. Sometimes it is 2 or 3 times correct, sometimes its 2 or 3 times wrong and all sizes are shown. Seems that the Mod has problems to identify the correct size of the image from which he should resize the downloads. It´s changing all the time. Really strange.

 
« Last Edit: November 15, 2012, 07:01:29 PM by Tiburon » Logged

----------------------------------

Have a nice Day
Solanum
Pre-Newbie

Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


View Profile
« Reply #298 on: November 24, 2012, 05:30:05 AM »

I replaced it and cleared the chache, still the same problem.

The error log says:

1
PHP Warning: filesize(): stat failed for /var/www/vhosts/mydomain.com/httpdocs/./data/media/6/big/dsc_3823__resized_128x128.jpg in /var/www/vhosts/mydomain.com/httpdocs/swfpics/download.php on line 85, referer: http://mydomain.com/swfpics/details.php?image_id=52



Can you PM me your website so I can see it in action...
I may also need admin access but will let you know.

Sorry for the delay.  Embarassed You should have a message in your inbox.
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 10
-Receive: 121


View Profile WWW
« Reply #299 on: January 13, 2013, 07:48:52 PM »

This mod has been updated to version 4.5

There was a major flaw where it was getting the file dimensions from the random image instead of the detail image...
Please note in the new instructions...
The code in the Functions.php now has to go after the "rate_form"
In the old instructions it was placed in before it. Please remove the code from Before the "rate_form" and follow the instructions as to where to place the modified code After that area of the functions file and you should be good.
Logged

Buddy Duke
www.budduke.com
Pages: «« « 1 ... 16 17 18 19 [20] 21 22 23 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.118 seconds with 20 queries.