Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 01:13

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 13. Jul 2015, 12:49 
Offline

Joined: 13. Jul 2015, 12:02
Posts: 1
In thumbnail view, the forward button does not always have the same link as the next page number button.
When e.g. thumbnail page 2 is shown, the forward button and "3" button have different twg_offsets in their links.
The number button is always correct, but the forward button is wrong from page 2 and up.

I think it has something to do with my album having a subdir, thus page 1 has fewer thumbnails.
In my setup, page 1 has a subdir + 7 x 1 thumbnails while page 2 and up have 7 x 3 thumbnails.
In page 1, the forward button has twg_offset=7 which is correct.
In page 2, the forward button has twg_offset=14 which should have been 28. The "3" button however has twg_offset=28.
This also gives the effect that when page 2 is displayed and if pressing the forward button, a single thumbnail row is shifted up and the active page is still at 2.

I found a solution to my case, but it might have some undesired side effects in other cases:
Code:
--- a/inc/index.inc.php 2015-07-13 11:32:02 +0200
+++ b/inc/index.inc.php 2015-07-13 11:37:51 +0200
@@ -636,8 +636,8 @@
             }
         }
         if ($actpage != $numpages - 1) {
-            $hrefnext = getScriptName() . '?twg_album=' . $album_enc . '&twg_offset=' . ($twg_offset + $thumbnails- $missing_images_page_one) . $twg_standalone;
-            $hrefnextjs = getScriptName() . '?twg_album=' . $album_enc . '&twg_offset=' . ($twg_offset + $thumbnails- $missing_images_page_one) . $twg_standalonejs;
+            $hrefnext = getScriptName() . '?twg_album=' . $album_enc . '&twg_offset=' . (($actpage + 1) * $thumbnails - $missing_images_page_one) . $twg_standalone;
+            $hrefnextjs = getScriptName() . '?twg_album=' . $album_enc . '&twg_offset=' . (($actpage + 1) * $thumbnails - $missing_images_page_one) . $twg_standalonejs;
             echo '<script type="text/javascript"> function key_foreward() { location.href="' . $hrefnextjs . '" } </script>';
             printf("&nbsp;<a href='%s'>%s</a> ", tfu_seo_rewrite_url($hrefnext), $lang_thumb_forward);
         } else {

I think this is the only relevant parameter from my_config.php:
Code:
$use_nonscrolling_dhtml=true;


Top
 Profile  
 
PostPosted: 18. Jul 2015, 23:00 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Thanks. I'll check this and add the fix to the next version if it also works fine for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy