Jump to content
TNG Community
JasonCrews

Outside Image thumbnails

Recommended Posts

JasonCrews

Is it possible, i guess with a mod, to specify an outside image as a thumbnail?    

I've got most of my images stored outside TNG, and I can generate a URL and tumbnailURL  for the image.  I'd love to be able to use those rather than upload the file to multiple locations. 

Share this post


Link to post
Share on other sites
tngrlkrz
1 hour ago, JasonCrews said:

Is it possible, i guess with a mod, to specify an outside image as a thumbnail?    

I've got most of my images stored outside TNG, and I can generate a URL and tumbnailURL  for the image.  I'd love to be able to use those rather than upload the file to multiple locations. 

Perhaps symbolic links might work.  I have a symbolic link for the TNG media folder to point to a folder outside TNG folder, but within the accesible webspace.  It is only necessary for the top folder 'media' to have the link, and then all subfolders of documents,photos,etc., as well as their thumbnail subfolders are found.  In fact, I can share them with both TNG websites, Test and Live and only have one set of media.

To create a link, I run this php file on the host:

<?php
$target = "/home/owner/www/shared/media";
$shortcut = "/home/owner/www/tng13/media";
symlink($target, $shortcut);
?>

However, while create my own thumbnails, TNG still does needs to create the links to them via Admin:Media: Secondary Processes ...generate thumbnails. 

 

Share this post


Link to post
Share on other sites
JasonCrews

That's an interesting idea .... 

Are you saying that the thumbnails won't work with that approach?

 

Share this post


Link to post
Share on other sites
tngrlkrz
3 hours ago, JasonCrews said:

That's an interesting idea .... 

Are you saying that the thumbnails won't work with that approach?

 

Not sure what you mean. I am merely indicating a possible solution to access media (thumbnails,etc) outside the TNG root folder, which I thought is what you wish to do.

Share this post


Link to post
Share on other sites
JasonCrews

I'm referring to this 
 

Quote

However, while create my own thumbnails, TNG still does needs to create the links to them via Admin:Media: Secondary Processes ...generate thumbnails. 

I don't understand what you mean by this. Do you mean that using your approach, you can't use thumbnails,

Share this post


Link to post
Share on other sites
tngrlkrz

The 'generate thumbnails' will not create a new thumbnail if one already exists (must be same file name with appropriate thumbnail prefix you specified in admin:setup:media), but will do the linkage to the original media.  So, yes, you can have your own thumbnails outside TNG root. That's what I thought you were trying to accomplish.

Share this post


Link to post
Share on other sites
JasonCrews

Ok, I think I understand.  This will let me select the thumbnail from the images that already exist.    If one doesn't exist, it should let me generate one.   

If that's correct, then that should work for me.   Do you happen to know the dimensions of the thumbnail that TNG uses?  I'm not sure my other software makes a thumbnail the exact size now that I think about it.   

Share this post


Link to post
Share on other sites
Chris Lloyd

If you use a PC - Fookes Easy Thumbnails works for me regardless of base image size.

Share this post


Link to post
Share on other sites
JasonCrews
On 10/11/2020 at 12:09 PM, tngrlkrz said:

Perhaps symbolic links might work.  I have a symbolic link for the TNG media folder to point to a folder outside TNG folder, but within the accesible webspace.  It is only necessary for the top folder 'media' to have the link, and then all subfolders of documents,photos,etc., as well as their thumbnail subfolders are found.  In fact, I can share them with both TNG websites, Test and Live and only have one set of media.

To create a link, I run this php file on the host:

<?php
$target = "/home/owner/www/shared/media";
$shortcut = "/home/owner/www/tng13/media";
symlink($target, $shortcut);
?>

However, while create my own thumbnails, TNG still does needs to create the links to them via Admin:Media: Secondary Processes ...generate thumbnails. 

 

Just in case I mess it up, wow would you remove the symlink?

Share this post


Link to post
Share on other sites
tngrlkrz
15 hours ago, JasonCrews said:

Just in case I mess it up, wow would you remove the symlink?

If TNG on local server, within Windows, if created with admin cmd prompt: mklink /d, you can safely delete the symbolic link with Windows Explorer. From  admin cmd prompt: use rmdir

If TNG on remote server, you must be more careful.  The safest way, for me, is via my host (ICDsoft) Control Panel (CP).  In it's file manager, deleting the symlink will not delete the target data. You should  confirm with your own  host servers support the safest way to delete them.  Filezilla also shows  the symlinks, however deleting the symlink there will also delete the target data.  (I just ran a test).

The best way avoid problems is to setup your own little test so you have confidence in the procedure.

HTH.

Share this post


Link to post
Share on other sites
JasonCrews

Ok, I've got that working, but TNG doesn't want to list all of the folders in that directory.   I can confirm in the file system the folder is there, but it's as if TNG is limiting the number of listings.  However, when you search to find the folder, TNG isn't searching the folder names.   Do you have any suggestions to get a fulllist of the contents when you select a file?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×