Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000263Piwigodisplaypublic2006.01.13 00:102015.03.04 10:43
Reporterdranreb 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.3.4 
Target VersionFixed in Version 
Summary0000263: To speed up dowloading images, especially during slide show
DescriptionHi,

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 Information3 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 = "";
        }
  }
}
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
(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.


- Issue History
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
Powered by Mantis Bugtracker