#1 2023-01-29 14:07:44

BigIsland270972
Member
Norway
2022-03-15
374

[resolved] Scroll to top not working anymore

Hello!

Scroll to top only works in Piwigo admin. Anyone know why?
 


    Piwigo 13.5.0 Check for upgrade
    Installed on 11 april 2020, 2 years 9 months 2 weeks 3 days ago
    Operating system: Linux
    PHP: 7.4.33 (Show info) [2023-01-29 13:04:15]
    MySQL: 5.5.5-10.5.16-MariaDB [2023-01-29 14:04:15]
    Graphics Library: External ImageMagick 6.9.12-70
    Cache size 113378.36 Mo   calculated 2 weeks ago Refresh

Activated plugin list 54

    Add < head > element
    Additional Pages
    Admin Tools
    Advanced Menu Manager
    Batch Downloader
    Batch Manager Prefilters
    Batch Manager, Description
    Block search
    Contact Form
    Copyrights
    Download by Size
    Download Permissions
    Evil_Blog
    Export Data
    Extended Description
    External Reference
    FCK Editor
    Force HTTPS
    Grum Plugins Classes.3
    GThumb+
    LocalFiles Editor
    Look_like_gbo2
    Manage Properties Photos
    Meta Open Graph
    OpenStreetMap
    Permalink Generator
    Perso Footer
    Personal Favicon
    Photo Update
    Physical Photo Move
    Posted Date Changer
    Prepaid Credits
    Properties Mass Update
    PWG Stuffs
    rightClick
    RV autocomplete
    RV Thumb Scroller
    Scroll To Top
    Search links
    Security Headers
    ShareAlbum
    SmartAlbums
    Social Buttons
    Social Connect
    SortOrders
    Tag Groups
    Tag Recognition
    Thumbnail Tooltip
    Title
    Update Album
    URL Uploader
    User Collections
    VideoJS
    Write Metadata

Last edited by BigIsland270972 (2023-01-29 15:21:58)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#2 2023-01-29 16:07:07

erAck
Only trying to help
2015-09-06
2196

Re: [resolved] Scroll to top not working anymore

With that excessive list of plugins I'd start with disabling one by one to find the culprit.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2023-01-29 18:20:13

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

erAck wrote:

With that excessive list of plugins I'd start with disabling one by one to find the culprit.

I'm lazy was'nt there a function to disable all plugins in one button? :-)

Last edited by BigIsland270972 (2023-01-29 18:20:38)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#4 2023-01-29 18:58:51

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

https://www.fotoarkiv.no/priv/scroll.png

Deactivated all plugins but STILL no Scroll To Top other than in ADMIN Interface.

Piwigo 13.5.0

Last edited by BigIsland270972 (2023-01-29 18:59:23)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#5 2023-02-01 14:54:58

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

Since Scroll To Top is currently broken, I added a custom JS script to my server, BUT How do I also show the button when browsing tags??

Best Regards
Robert
www.fotoarkiv.no


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#6 2023-02-01 15:11:45

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

And search results! :-)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#7 2023-02-01 15:16:06

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

Added script to Header using the Add < head > element plugin
Problem SOLVED! :-)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#8 2023-02-07 12:51:26

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Scroll to top not working anymore

Instructions to install and configure an alternative Scroll To Top script in PIWIGO.

1. Download and unzip to piwigo webroot : https://www.fotoarkiv.no/priv/Scroll-to_top.zip
You should then have "js" and a "css" folder in your piwigo root.

2. Install and activate Piwigo extension: https://piwigo.org/ext/extension_view.php?eid=582

3. Goto the newly installed extension in admin UI and add the following code:

Code:

<link rel="stylesheet" href="./css/scrollToTop.css" />
<script defer src="./js/scrollToTop.js"></script>
<div class="stt stt__block_black"></div>

4. To make sure the scroll to top script always stays on top in foreground, add the following code to your admin.php?page=plugin-LocalFilesEditor-css:

Code:

.stt {
  z-index: 3000;
}

5. DONE!

Last edited by BigIsland270972 (2023-02-07 12:56:27)


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#9 2025-01-08 13:36:31

BMS
Member
2015-12-24
25

Re: [resolved] Scroll to top not working anymore

Hello,
Got the same problem, shows in admin pages only.

Piwigo 15.3.0
Geïnstalleerd op 25 januari 2017, 7 jaren 11 maanden 2 weken geleden
Besturingssysteem: Linux
PHP: 8.3.8 (Toon info) [2025-01-08 13:39:32]
MySQL: 10.5.9-MariaDB [2025-01-08 13:39:32]
Afbeeldingen-bibliotheek: ImageMagick ImageMagick 6.9.13-11

Tried to implement your solution, but https://www.fotoarkiv.no/priv/Scroll-to_top.zip results in Error 502 bad gateway.
Is there url from which I can download Scroll-to_top.zip

Last edited by BMS (2025-01-08 13:41:03)

Offline

 

#10 2025-01-08 14:20:23

Katryne
Member
2016-12-03
437

Re: [resolved] Scroll to top not working anymore

I installed Scroll-to top as an extension in 2 of my browsers , Firefox and Palemoon. So, I do not need to cope with any plugin in Piwigo : https://addons.mozilla.org/fr/firefox/a … ll-to-top/


https://album.chauvigne.info/ v.15.3.0  PHP: 8.2.26
https://balades.comoni.org/  v.15.3.0 PHP: 8.2.26
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#11 2025-01-08 15:48:05

BMS
Member
2015-12-24
25

Re: [resolved] Scroll to top not working anymore

Hy Katrine, your proposal works fine but is not what I am looking for.
I am hosting a Piwigo gallery and want to offer its webpages including a scroll to top button as a service as it used to be and don't want the user having to install a browser extension.

BigIsland270972 offers a work around but the given url is dead.

It is not a real Piwigo plugin but a personal plugin in Local Files Editor and the Author is Mistic.
On his site https://www.strangeplanet.fr/ I cannot find anything on Scroll to Top.

Last edited by BMS (2025-01-08 17:00:02)

Offline

 

#12 2025-01-08 19:16:57

Schneider-Fotografie
Member
Berlin
2023-04-16
75

Re: [resolved] Scroll to top not working anymore

Hi BMS

You can also install it yourself. That's what I did.
You just have to adjust the button. Take a look here:

https://stackoverflow.com/questions/321 … -html-only

Best regards from Berlin
Olaf


-Schneider-Fotografie- Galerie
----------------------------------
  Piwigo 15.3.0 / PHP: 8.4.1

Offline

 

#13 2025-01-08 20:02:20

BMS
Member
2015-12-24
25

Re: [resolved] Scroll to top not working anymore

Hi Olaf,

Thanks for your reaction, will try some in the weekend.
By the way the site of BigIsland270972 has come to live again, so I also downloaded his zip file.
I will report back with the results.
Regards,
Ben

Offline

 

#14 2025-01-09 18:03:23

BMS
Member
2015-12-24
25

Re: [resolved] Scroll to top not working anymore

Hi All,

Looked for differences in the header templates of both the admin and album pages.

In the personal plugin created by Mistic in the function scroll_to_top_pref($content) is a line

Code:

$search = '<body id="{$BODY_ID}">';

In the admin header this tag exists, but in the most recent default header.tpl for album pages the tag reads:

Code:

<body id="{$BODY_ID}" class="{foreach from=$BODY_CLASSES item=class}{$class} {/foreach}"  data-infos='{$BODY_DATA}'>

Therefor the function will not work for the album pages.

Directly underneath the <body ... > tag in both pages and still in header.tpl is the tag:

Code:

<div id="the_page">

The Scroll To Top personal plugin will work just fine for both pages after changing the '$search line' to:

Code:

$search = '<div id="the_page">';

The complete Personal Plugin Scroll To Top should read:

Code:

/*
Plugin Name: Scroll To Top
Version: 1.0
Author: Mistic
Author URI: http://www.strangeplanet.fr
*/
 
add_event_handler('loc_end_page_header', 'scroll_to_top');
 
function scroll_to_top()
{
  global $template;
  $template->set_prefilter('header', 'scroll_to_top_pref', 100);
}
 
function scroll_to_top_pref($content)
{
  $search = '<div id="the_page">';
  $scroll = '
{html_style}{literal}
.scrollup {
    width:48px; height:48px; opacity:0.7; position:fixed; border-radius:24px;
    bottom:50px; right:50px; display:none; text-indent:-9999px;
background: rgba(255,255,255,0.8) url("local/images/scrollup.png") no-repeat;
    z-index:1000; border:none !important; text-decoration:none !important;
}
.scrollup:hover { opacity:1; }
{/literal}{/html_style}
{footer_script}{literal}
jQuery(window).scroll(function(){
    if (jQuery(this).scrollTop() > 100) {
        jQuery(".scrollup").fadeIn();
    } else {
        jQuery(".scrollup").fadeOut();
    }
});
jQuery(".scrollup").click(function(){
    jQuery("html, body").animate({ scrollTop: 0 }, 600);
    return false;
});
{/literal}{/footer_script}
<a href="#" class="scrollup">Scroll</a>';
 
  return str_replace($search, $search.$scroll, $content);
}

Last edited by BMS (2025-01-09 22:39:16)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact