Piwigo bug tracker has moved to Github
This bugtracker is kept to provide history on old issues.
Anonymous | Login | Signup for a new account | 2019.02.19 10:56 CET | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000263 | Piwigo | display | public | 2006.01.13 00:10 | 2015.03.04 10:43 | ||||
Reporter | dranreb | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 1.3.4 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000263: To speed up dowloading images, especially during slide show | ||||||||
Description | Hi, here is an idea to avoid to wait for too long if you don't have a very high speed Internet (that's my case) : you can preload the next image while the visitor is looking at the current one. The code I have tried is in the additionnal information. It works fine (my ADSL is 500 k), but I don't know well your code, and I'm not sure I have seen all the problems it could induce. It does not suppress the delay for the first image, but for the following ones, it's quicker. Best regards, Bernard. PS : Je n'ai pas une version récente, alors désolé si une telle fonctionnalité a déjà été intégrée. En tous cas, merci pour PhpWebGallery, et bonne continuation. | ||||||||
Additional Information | 3 files are modified : picture.php, header.tpl and scripts.js. ------------------------------------------------------- In picture.php : ------------------------------------------------------- Add a variable to have the previous and next pictures source name $template->assign_block_vars( 'next', array( 'TITLE_IMG' => $picture['next']['name'], 'IMG' => $picture['next']['thumbnail'], 'U_IMG' => add_session_id($picture['next']['url']), 'IMGHS' => $picture['next']['src'], )); Same for previous. Move the line include(PHPWG_ROOT_PATH.'include/page_header.php'); after setting the data for next and previous. ------------------------------------------------------- File header.tpl : ------------------------------------------------------- function phpWGLoadNextPrevious() { // first preload next one. <!-- BEGIN next --> phpWGPreLoad('{next.IMGHS}'); <!-- END next --> // preload previous one in case of rolling back visit <!-- BEGIN previous --> phpWGPreLoad('{previous.IMGHS}'); <!-- END previous --> } </script> <body onload="phpWGLoadNextPrevious()"> ------------------------------------------------------- File scripts.js : (taken from a preload found on the web) ------------------------------------------------------- function phpWGPreLoad() { var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=phpWGPreLoad.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0) { window.status = "preloading " + a[i]; d.MM_p[j]=new Image; d.MM_p[j++].src=a[i]; window.status = ""; } } } | ||||||||
Tags | No tags attached. | ||||||||
browser | any | ||||||||
Database engine and version | |||||||||
PHP version | |||||||||
Web server | Apache 1.3.x | ||||||||
Attached Files | |||||||||
![]() |
|
(0007777) plg (manager) 2015.03.04 10:43 edited on: 2015.03.04 10:43 |
Already implemented in recent Piwigo versions and even better with plugin such as Fotorama. |
![]() |
|||
Date Modified | Username | Field | Change |
2006.01.13 00:10 | dranreb | New Issue | |
2006.01.13 00:10 | dranreb | browser | => any |
2006.01.13 00:10 | dranreb | Web server | => Apache 1.3.x |
2006.02.10 02:33 | rvelices | Status | new => assigned |
2006.02.10 02:33 | rvelices | Assigned To | => rvelices |
2008.07.11 22:08 | rvelices | Assigned To | rvelices => |
2015.03.04 10:43 | plg | Note Added: 0007777 | |
2015.03.04 10:43 | plg | Note Edited: 0007777 | |
2015.03.04 10:43 | plg | Status | assigned => closed |
2015.03.04 10:43 | plg | Resolution | open => fixed |
Copyright © 2000 - 2019 MantisBT Team Contact |