Jump to content
TNG Community

Outside Image thumbnails


JasonCrews

Recommended Posts

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. 

Link to comment
Share on other sites

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. 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.   

Link to comment
Share on other sites

  • 2 months later...
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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...