Community @ The Turning Gate

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.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-03-15 19:15:32

chumby
Member
Registered: 2014-10-23
Posts: 188

HTML / CSS at the bottom of a Single Image View Page

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

#2 2020-03-15 21:47:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: HTML / CSS at the bottom of a Single Image View Page

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

#3 2020-03-16 01:37:44

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: HTML / CSS at the bottom of a Single Image View Page

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

Board footer

Powered by FluxBB