4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2014, 01:22:08 AM

Login with username, password and session length
Search:     Advanced search
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
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 2 Guests are viewing this topic. « previous next »
Pages: «« « 1 ... 17 18 19 20 [21] 22 23 » »» Print
Current Topic Rating: *****
Author Topic: [MOD] Multi Size Download of same image [ver 4.7]  (Read 190411 times)
Tiburon
Jr. Member
**
Offline Offline

Posts: 85

Thank You
-Given: 14
-Receive: 2


View Profile WWW
« Reply #300 on: January 14, 2013, 08:51:11 AM »

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.


It works fine Smile. Thank you for investing so much time and knowledge to keep this great Mod up to date!!
Logged

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

Have a nice Day
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #301 on: February 18, 2013, 07:21:02 AM »

Hello

I have problem to insert tag {prepend_head_title}, it show blank instead of image name.
Don't know why its not work in "multi_popup.html" but it work fine in other places.

Please help
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #302 on: February 19, 2013, 12:17:25 AM »

Hello

I have problem to insert tag {prepend_head_title}, it show blank instead of image name.
Don't know why its not work in "multi_popup.html" but it work fine in other places.

Please help

I have updated the original code to version 4.6...
in the instructions, look for the last replace in the download.php file and replace it with the updated code.
Let me know if that works or not because I have not tested it yet on my end.
Logged

Buddy Duke
www.budduke.com
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #303 on: February 19, 2013, 10:22:20 PM »

Quote  [Expand]
I have updated the original code to version 4.6...
in the instructions, look for the last replace in the download.php file and replace it with the updated code.
Let me know if that works or not because I have not tested it yet on my end.


Its not worked.  it only show - of code "prepend_head_title"        => $image_name . " - "

Like this - sitename
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #304 on: February 20, 2013, 12:25:19 AM »

@kar76,
I must have fell asleep while doing that one. I modified my original code again...
in the download.php file look for this area
Quote  [Expand]
Also on the first line of the "look for" code above (new replace for version 4.4)
add new code to the end of the first line so it looks like this (Updated the code for version 4.6)
I added the ,image_name to that line of code

Now it should be working for you. I tested it on my test server just to make sure  Embarassed
Logged

Buddy Duke
www.budduke.com
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #305 on: February 20, 2013, 09:07:13 AM »

Yes it working now.

And more problem i noticed in this mode, it related to "0=dropdown"  links.
I noticed that when someone access dropdown links trough mobiles it download nothing
« Last Edit: February 20, 2013, 08:27:15 PM by kar76 » Logged
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #306 on: February 26, 2013, 06:36:24 AM »

Does anyone know why drop down menu link download nothing (0 files ) , when download by mobiles.

I use "0=dropdown" option and check it through mobile "Samsung c3312"  and found that no image are downloading, instead it show blank files in mobile.
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #307 on: February 27, 2013, 12:23:19 AM »

Does anyone know why drop down menu link download nothing (0 files ) , when download by mobiles.

I use "0=dropdown" option and check it through mobile "Samsung c3312"  and found that no image are downloading, instead it show blank files in mobile.

Sorry, did not see your edit on the post above this one...
I tested it with my android phone and you are correct. I have been researching, trying to figure out what the difference is between a mobile phone browser and a desktop but not having much luck. It seems the mobile does not get the file size when using the dropdown list but the desktop does.
I do not have any time to play with the code till the weekends but will post it when I figure it out. Unless someone else has a quick idea they can post/PM me?
Logged

Buddy Duke
www.budduke.com
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #308 on: February 27, 2013, 11:14:49 AM »

is there major difference between between drop down  links and text link?
Text links work fine, only problem occurred by drop down  links.
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #309 on: February 28, 2013, 12:05:56 AM »

is there major difference between between drop down  links and text link?
Text links work fine, only problem occurred by drop down  links.

The dropdown list is submitting a form to the code instead of a download link. Not sure if that is where the problem is or not for the mobile browsers.

Update: If you install the opera mini browser on your phone it works fine with the dropdown lists so it does appear that there are limitations in the other browsers on the phones from what I have been reading. Will look into it further to see if there is a workaround that I can come up with.
« Last Edit: February 28, 2013, 12:45:58 AM by budduke » Logged

Buddy Duke
www.budduke.com
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #310 on: February 28, 2013, 05:58:07 AM »

Quote  [Expand]
If you install the opera mini browser on your phone it works fine with the dropdown lists

I don't know about latest opera mini but i have version 6.5.27510 which also show empty file. And i can not update it Shocked
I update it before and my browser started to malfunction so i reset to original.
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #311 on: March 02, 2013, 07:31:24 PM »

Quote  [Expand]
If you install the opera mini browser on your phone it works fine with the dropdown lists

I don't know about latest opera mini but i have version 6.5.27510 which also show empty file. And i can not update it Shocked
I update it before and my browser started to malfunction so i reset to original.

I have updated the code to version 4.7 with the fix included...
To save yourself all the trouble, I only changed on spot of code in to fix the issue.
in the functions.php file
look for...
1
<form action='".$site_sess->url(ROOT_PATH."download.php")."' method='post'".$multi_download_var['target'].">
Change to...
1
<form action='".$site_sess->url(ROOT_PATH."download.php")."' method='get'".$multi_download_var['target'].">

in other words change the method= from 'post' to 'get' and things should start working for you.
Logged

Buddy Duke
www.budduke.com
kar76
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 5
-Receive: 1


View Profile
« Reply #312 on: March 02, 2013, 07:55:33 PM »

Work perfectly now. Smile
You are the best.


I am facing one more trouble and its related to this mode only.

You see i want to use tags  {width}x{height}   and   {image_file_size}  these tags work everywhere except multi_popup.html

Can you fix this issue?
Logged
budduke
Hero Member
*****
Offline Offline

Posts: 504

Thank You
-Given: 10
-Receive: 123


View Profile WWW
« Reply #313 on: March 03, 2013, 08:46:19 PM »

I am facing one more trouble and its related to this mode only.

You see i want to use tags  {width}x{height}   and   {image_file_size}  these tags work everywhere except multi_popup.html

Can you fix this issue?

The popup window was designed because someone requested it so they could put ads above/below the downloaded image and not to recreate the details page all over again.
I do see the reason you are asking for the filesize and dimensions because with this mod they are different then what is displayed on the details page.
I am not trying to recreate ALL the data that is displayed on the details page, at this point the user just wants to download the image...

I am not making this request part of the original MOD but here is the fix for anyone interested in using it. I do not think this will work if your images are stored on remote servers. I have not had time to test that part of it but it works fine for local files...
The last insert in the download.php file...
replace the entire insert with this one...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//MOD multi download for popup window
if (($multi_download_var['target']<>"") && $size){
   $meta_keywords  = !empty($image_row['image_keywords']) ? implode(", ", explode(",", $image_row['image_keywords'])) : "";
$meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " : "";
$image_name = format_text($file['file_name'],2);
$file_size = "n/a";
if ($file_size = @filesize($file['file_path'])) {
$file_size = format_file_size($file_size);
}
else {
$file_size = get_remote_file_size($file['file_name']);
}
$image_info= @getimagesize($file['file_path']);
$site_template->register_vars(array(
"img_url" => $file["file_path"],
"site_name" => $config['site_name'],
"charset" => $lang['charset'],
"direction" => $lang['direction'],
"detail_meta_description"   => $meta_description,
            "detail_meta_keywords"      => $meta_keywords,
            "prepend_head_title"        => $image_name . " - ",
"width"=> $image_info[0],
"height"=> $image_info[1],
"image_file_size"=>$file_size,
"image_name"=>$image_name,
"lang_file_size" => $lang['file_size']
));
$site_template->print_template($site_template->parse_template("multi_popup"));
}
else{
        send_file($file['file_name'], $file['file_path']);
     }
//END MOD multi download for popup window

and this is the multi_popup.html I came up with to display the info...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{prepend_head_title}{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="{detail_meta_description}{site_name}">
<meta name="keywords" content="{detail_meta_keywords}">
</head>
<body>
<table align=center">
<TR>
<TD align="center"><img src="{img_url}"></img></TD>
</TR>
<TR>
<TD align="center">{image_name}</TD>
</TR>
<TR>
<TD align="center">{lang_file_size}&nbsp;&nbsp;{image_file_size}</TD>
</TR>
<TR>
<TD align="center">Dimensions:&nbsp;&nbsp;{width} X {height}</TD>
</TR>
</TABLE>
</body>
</html>
« Last Edit: March 05, 2013, 12:07:16 AM by budduke » Logged

Buddy Duke
www.budduke.com
PamBreeze
Newbie
*
Offline Offline

Posts: 43

Thank You
-Given: 10
-Receive: 0

I'm Not Crazy...I'm Just Me!


View Profile WWW
« Reply #314 on: July 13, 2013, 09:59:08 AM »

Mod works great except when using the drop down menu there is just a small blank square instead of a button saying download. Is this normal?
« Last Edit: July 13, 2013, 10:27:49 AM by PamBreeze » Logged

Pages: «« « 1 ... 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.162 seconds with 20 queries.