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 2019-01-24 04:20:45

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Disable filenames and download possible?

Hi,

Is it possible to not show the file names when going over an image with your mouse?
When I go over an image in my gallery I see files names appear.
Also when right clicking on an image the option to save an image is possible. Any ways of getting rit if this?

Regards,
Cris

Offline

#2 2019-01-24 05:27:19

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

Re: Disable filenames and download possible?

Is it possible to not show the file names when going over an image with your mouse?

This is a function of the browser. You can Google around and find some script that might do what you want. Then use phplugins and insert the script using the scripts() function.

Same with the right-click save issue.

Changing browser function isn't supported by TTG (I feel safe in saying that since Matt has been pretty vocal about it).

That being said, if you want to do this on your own, it's up to you. Here's something from the CE4 documents about it: http://ce4.theturninggate.net/docs/doku … ntext_menu


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 2019-01-24 21:41:35

skipper
Member
Registered: 2013-04-26
Posts: 121

Re: Disable filenames and download possible?

I also thought about that, but anybody can still make a screenshot to save the image;-)

Offline

#4 2019-01-26 03:48:20

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

Yeah.. on the other hand if you do not want them to get "stolen" don't put it online.
I was just wondering.. thanks.

Offline

#5 2019-01-26 03:57:20

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

Re: Disable filenames and download possible?

It's the risk we run. I choose to watermark images and not worry too much about it.
But I imagine your images have much more commercial value. They are pretty awesome smile


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2019-01-26 23:57:40

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

Thank you Rod.

Offline

#7 2019-02-20 22:56:23

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

I found the following script:

function add_custom_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery('a').removeAttr('title');
jQuery('img').removeAttr('title');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_tooltip');

When I add the code, the filenames do still appear when holding the mouse over an image after 2 seconds.

Offline

#8 2019-02-20 23:36:48

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

Re: Disable filenames and download possible?

That's a script meant to work in WordPress.
It first creates a function, and then calls that function in the WordPress Footer via the WordPress add_action function.

What it does is remove the title attribute from images and links, which keeps the tooltip (the little box that would appear next to the mouse pointer) from appearing. But it does nothing to disable the url showing at the bottom of the browser.


If you want to remove the title attributes, this is what it should look like in phplugins.

function scripts () {
echo'
<script>
jQuery("a").removeAttr("title");
jQuery("img").removeAttr("title");
</script>
';
}

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2019-02-21 00:51:56

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

Oh.. I am such a noob at this.. I do try to understand it. So, it does not disable the filename of the image?
When I hover with my mouse over an image in my showcase, I see the file name appear, like in the image below.
I am looking for a script or something that does not allow the files names to appear.

AsEV1ti.png

Offline

#10 2019-02-21 01:12:27

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

Re: Disable filenames and download possible?

If there's a file name in the image's title attribute, then you'll see the file name

The script disables the title attribute of the image or link.

What is that a screen shot of? An album thumbnail grid? If so, that script should remove the title attribute and therefore the filename that's in that attribute.

in that script above, if you only want to remove the title attribute from the images and not links, then just remove the part concerning links:
jQuery("a").removeAttr("title");


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2019-02-21 01:25:42

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

It is indeed a screenshot of an album thumbnail grid.
Ill give it another try..

Offline

#12 2019-02-21 02:42:05

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

Still showing, cleared cage etc. script is not removing the image filename.

Offline

#13 2019-02-21 02:54:25

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

Re: Disable filenames and download possible?

If you assign a title to the image, then the title will show instead of the filename.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#14 2019-02-21 02:59:18

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

Re: Disable filenames and download possible?

It’s working for me.
Can you post a link?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#15 2019-02-21 03:15:55

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

http://www.aimhigh.aero/galleries/showcase/

If you assign a title to the image, then the title will show instead of the filename.

In Lightroom or the publisher module?

Last edited by Crizz (2019-02-21 03:18:58)

Offline

#16 2019-02-21 03:29:33

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

Re: Disable filenames and download possible?

Crizz wrote:

Still showing, cleared cage etc. script is not removing the image filename.

the script isn't being loaded on the page.

Have you added it to your phplugins file? Is your page template using that phplugins file?

If the answer to both is yes, then there's likely a problem with your phplugins file. You can post the contents of the file here, or feel free to email it to me and I'll take a look.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#17 2019-02-21 03:31:20

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

Re: Disable filenames and download possible?

Crizz wrote:

http://www.aimhigh.aero/galleries/showcase/

If you assign a title to the image, then the title will show instead of the filename.

In Lightroom or the publisher module?

In Lightroom. Populate the Title metadata field in the Library Module. Then republish the images.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#18 2019-02-21 03:43:11

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

Wait a minute...

Have you added it to your phplugins file? Is your page template using that phplugins file?

I do not have a page template for the page... it is an album directly placed under the menu button showcase..
That is why it will not work...I guess..

Offline

#19 2019-02-21 03:48:29

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

Re: Disable filenames and download possible?

The album template uses a page template. That page template needs to be the one using the phplugins file.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#20 2019-02-21 04:00:03

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

I am trying so hard to understand.. it making me nuts. I really really appreciate your efforts in making me trying to understand it.

Now.. I managed to find the page template that was used by the album, I activated .phpplugins on that page template.
I have also added a title to the first image..

Title works.. that is awesome! It shows a title instead of the filename.
Script does not work, other images still show filename.

Here is how my phplugins look:

<?php
/*
*  TTG Core Elements "PHPlugins" User Hooks v1.2 - initialization mainline
*
*  developed by john bishop images (http://johnbishopimages.com)
*  for Matthew Campagna of The Turning Gate (http://theturninggate.net)
*
*/

function user_load($style, $path) {
  $g_tsvrl = explode(' ', $style); // Extract gallery type
  define ('G_STYLE', strtoupper($g_tsvrl[1])); // and set global for later
  $g_path = str_ireplace('\\','/',$path); // change \ to /
  $chunks = explode('/',$g_path); // and put into array
  define ('G_PATH', strtoupper($chunks[count($chunks)-2])); // gallery folder name is second to last
  //define ( 'TTG_SITE', ''); // set new site root for navigation, resources, etc.
}

if (defined('BACKLIGHT_HOOK')) {
    require_once(realpath(BACKLIGHT_HOOK).'/modules/module-designer/application/helpers/APHPlugins.php');
}

class PHPlugins extends APHPlugins
{
function head() {
   echo '<link rel="stylesheet" type="text/css" media="all" href="/backlight/custom/vanilla-form/css/vanilla-form.min.css">';
   echo '<script src="/backlight/custom/vanilla-form/js/vanilla-form.min.js"></script>';
}
function scripts()  {
     echo'
         <script>$(document).ready(function() {
   var myForm;
   myForm = new VanillaForm($("form.vanilla-form"));
});</script>
';
function scripts () {
echo'
<script>
jQuery("img").removeAttr("title");
</script>
';
}
}// END /**/

Offline

#21 2019-02-21 04:06:54

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

Re: Disable filenames and download possible?

you're calling the scripts () function twice. It can only be called once. Put the script that disables the title attribute directly after the first script you're using. It should end up like this:

function scripts()  {
     echo'
         <script>$(document).ready(function() {
   var myForm;
   myForm = new VanillaForm($("form.vanilla-form"));
});</script>

<script>
jQuery("img").removeAttr("title");
</script>
';
}

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#22 2019-02-21 04:18:33

Crizz
Member
From: the Netherlands
Registered: 2013-03-26
Posts: 101
Website

Re: Disable filenames and download possible?

You just made my day Rod!!! Where would the Backlight community be without your knowledge!! THANK YOU SO MUCH!!

It all works the way I wanted.. on to the next challenge..

Offline

Board footer

Powered by FluxBB