Tiburon
Jr. Member

Offline
Posts: 85
Thank You
-Given: 14
-Receive: 2
|
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  . 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
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
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
|
|
|
|
kar76
Newbie
Offline
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
@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 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 
|
|
|
|
|
|
Logged
|
|
|
|
kar76
Newbie
Offline
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
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
|
|
|
|
kar76
Newbie
Offline
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
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
|
|
|
|
kar76
Newbie
Offline
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
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  I update it before and my browser started to malfunction so i reset to original.
|
|
|
|
|
|
Logged
|
|
|
|
budduke
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
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  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
|
|
|
|
kar76
Newbie
Offline
Posts: 27
Thank You
-Given: 3
-Receive: 0
|
Work perfectly now.  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
Sr. Member
  
Offline
Posts: 474
Thank You
-Given: 10
-Receive: 93
|
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} {image_file_size}</TD> </TR> <TR> <TD align="center">Dimensions: {width} X {height}</TD> </TR> </TABLE> </body> </html>
|
|
|
|
|
|
« Last Edit: March 05, 2013, 12:07:16 AM by budduke »
|
Logged
|
|
|
|
|