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)
Offline
With that excessive list of plugins I'd start with disabling one by one to find the culprit.
Offline
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)
Offline
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)
Offline
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
Offline
And search results! :-)
Offline
Added script to Header using the Add < head > element plugin
Problem SOLVED! :-)
Offline
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:
<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:
.stt { z-index: 3000; }
5. DONE!
Last edited by BigIsland270972 (2023-02-07 12:56:27)
Offline
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
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/
Offline
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
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
Offline
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
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
$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:
<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:
<div id="the_page">
The Scroll To Top personal plugin will work just fine for both pages after changing the '$search line' to:
$search = '<div id="the_page">';
The complete Personal Plugin Scroll To Top should read:
/* 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