Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Hi all,
Is there a way I can include some html at the bottom of a single image page - ie:
https://www.tasmanianphotos.com/tasmani … single.php
I am using using the single_bottom function as per below in my php_plugins for navigation.
Can I just add html in here or is there something else I need to do?
function single_bottom(){
// support for left/right arrow key and esc key navigation
$photo = $this->photo;
$album = $this->album;
echo' <script>
function checkKey(e) {
switch(e.which) {
case 37: ';
if ($album->getPreviousPhoto($photo)) {
echo 'location.href=$("li.single_image_prev a").attr("href");';
}
echo 'break;
case 39:';
if ($album->getNextPhoto($photo)) {
echo 'location.href=$("li.single_image_next a").attr("href");';
}
echo 'break;
case 27:';
echo 'location.href=$("li.single_image_back a").attr("href");';
echo 'break;
default: return;
}
e.preventDefault();
}
document.onkeydown = checkKey;
</script>';
}
Appreciate the help as always.
Cheers,
Chumby
Offline
I’d think that you should be able to add it either just after the closing </script> tag or just before the opening <script> tag.
Give it a try and see what happens.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Yes, you can. Like I do in this example: https://lab.danielleu.com/blog/customiz … page-view/
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline