Jump to content
TNG Community

Insert image as html


Adri1

Recommended Posts

Because we have already a big dabase I'd like to add media (picures, fotos, headstones......) as html.

If we add a lot of media this would problaby slow down the whole website.

And html is a lot smaller I suppose.

Is this possible in a way.

Link to comment
Share on other sites

Rob Severijns

HTML is not a mediafile extension and therefor TNG will not recognize it as such.

This will have an effect on how media is shown in the browsemedia.php, showmedia.php in tickers and other php pages that deal with media.

Also a HTML isn't placed within the database as a mediafile so you will most likely need a hyperlink to refer to each mediafile. 

Which is smaller, bigger or faster depends on different things.

IMHO using HTML to define mediafiles is not the smartest way to handle mediafiles within TNG.

But..... others might have a different opinion and maybe even a good solution.

Link to comment
Share on other sites

If you've gathered media as an HTML file, it might be a true media file (e.g. JPG, etc.) that is wrapped with HTML, including hyperlink/reference to the location of the true media.

If this is the case, you develop something to save the "link" in the database that refers to the location of the content. This is actually how TNG works; the media is stored in a folder on the filesystem (not in the database) and referenced from a "link" in the database. Again, you might "rig" TNG config to use an external location instead of the /img subfolder...

Link to comment
Share on other sites

I agree with what Rob said:

  • HTML is not a mediafile extension and therefore TNG, or any other program , will not recognize it as such.

 

Link to comment
Share on other sites

Thanks, but as I mentioned earlier, my biggest concern is the speed.

When I'm going to add a lot off pictures will that not slow down things to much.

So I'm looking for the best way: inside tng, outside......

Link to comment
Share on other sites

I'm afraid I don't actually understand what you are trying to achieve. Are you trying to add links to media files that are stored somewhere else? 

Unless you are going to add absolutely huge media files, I wouldn't worry too much about file size or how much media you are adding. My relatively small site has over 1,000 photos and over 4,000 certificates, census & document images and it doesn't slow anything down. 

Link to comment
Share on other sites

5 hours ago, Adri1 said:

My biggest concern is thé speed of Tng

So I search for thé best way to integrate pictures (also a lot off them).

 

If you run TNG on a cloud server, it's amazingly fast, even with complex pages and imagery. 

Link to comment
Share on other sites

You still haven't explained what you are trying to achieve. The media has to go somewhere if you want to show it, so where do you want to store it? If a database can handle 800,000 people, it is capable of processing 800,000 media items as well surely. It may be a lot of people for a family tree, but it isn't a lot of data by modern standards. If you have a decent host and a large enough hosting plan, these sorts of numbers are not going to be a problem.

Link to comment
Share on other sites

Rob Severijns
5 hours ago, Adri1 said:

The database at this moment 800.000 persons.

I always wondered how databases with that many persons is maintained.

How do you make sure all of the data is accurate and accommodated with reliable and verifiable sources?

Cause if it's not, part of the data isn't reliable and nothing more than a good guess.

My site is compareable with ADC's site and it takes my a good amount of time to keep everything accurate and accommodated with reliable and verifiable sources.

Sometimes "More can be less"

Link to comment
Share on other sites

10 hours ago, Rob Severijns said:

I always wondered how databases with that many persons is maintained.

How do you make sure all of the data is accurate and accommodated with reliable and verifiable sources?

Cause if it's not, part of the data isn't reliable and nothing more than a good guess.

My site is compareable with ADC's site and it takes my a good amount of time to keep everything accurate and accommodated with reliable and verifiable sources.

Sometimes "More can be less"

 

 

 

Link to comment
Share on other sites

If course it was/is a lot of work.

In thé Mean while it is becoming a Sort of benchmark from thé region instead op a family tree.

All thé input is coming from official documents: civil, Christian.....

ADC

And because it is such a big database, which is thé best way to ad pictures (birth documents, death documents.......)

Link to comment
Share on other sites

Hello Adri ! Our friends from Corsica run 2 different sites for their genealogical work : one made with TNG and another one made with a specialised CMS dedicated to photos albums : Piwigo https://piwigo.org/ Their 2 sites are connected, but I do not know the details.

As I have been using Piwigo as well for years and I started testing the "corsican" way of medias organisation for TNG. I installed for this Jean-Luc's mod External medias : https://tng.lythgoes.net/wiki/index.php?title=External_Media

It might be worth giving it a try : a site designed specifically to handle large quantities of photos could be more productive than inventing a system for converting images into html, which could actually slow down site display by overloading the html page

Link to comment
Share on other sites

 

First of all : I created my online album to be independant from any external entity, to replace the Picasa system when Google deleted the service. I was so disappointed that I swore not to depend anymore from an external service, also, I did not join when Google launched its Google photo...

My Piwigo website has become today a kind  of document center for all my different websites, not only the TNG. But it is mainly a gigantic online family photo album. https://album.chauvigne.info/

Look at this picture Adri :   it's in my Piwigo online album, but is displayed within my TNG website (my dad was fighting in the French Resistance and wore this FFI armband) : https://clan.chauvigne.info/showmedia.php?mediaID=1350&medialinkID=1608

I look for its real URL, the one of the photo, not of the Piwigo page by right-clicking on the photo to display the picture in a new tab, there, I copy the URL which is : ... /picture?/Brassard_FFI_Rene_Cadel/category/resistance-morbihan

Then I open the TNG page of my dad : https://clan.chauvigne.info/getperson.php?personID=I3611&tree=kati  and I edit it to add a media.
I have Installed Jean-Luc's mod External media. Without it, even if I check the external media box, I'll get a url, not an image.

 

 

image.png

Link to comment
Share on other sites

I think it is clear to me Katryne.

What is the difference between the two url's you mentioned?

Why to use the especially the 'real' URL?

I tryed now with dropbox and I got the 'avatar' of een Photo.

But because I work with XAMPP on my pc to try out things, I can not go to the picture.

Link to comment
Share on other sites

Wherever you're going to host your photo, it's necessary to use the image address, not the address of the page where it's located through the viewer of the tool you're using.

If you're running simulations locally with Xamp, I don't know if it works in a closed circuit or if your TNG on Xamp has access to the Internet. I always run my tests on a twin site on the same hosting, so I can't tell you.

Link to comment
Share on other sites

I'm testing the solution from Katryne.

It works fine, the picture is shown, but in the title I get this error:

 

Error 03: Original media-item Bidprentjes(=Map)/then URL image is NOT FOUND

Path Bidprentjes

Cache mods/watermark_mod_cache

Imagename: url

Extension => .jpg
mediatypeID = mich001
Real Path = Bidprentjes

 

It is problaby because the picture isn't in the Path?

Can this be resolved (do not show this message)?

 

Link to comment
Share on other sites

I was never able to add an external image without the mod. If I put an URL in the field without the mod been installed, well, I will have a link, not an image

In my example, I added a transparent gif image. And TNG made of it a non-transparent thumbnail picture (jpg) Thus you can see that what is displayed as default picture is the thumbnail made with TNG (black background, located within TNG), while if you click on the thumbnail below, you will open the real gif image (transparent background, larger size) and this one is displayed within TNG while it is located elsewhere.

You need the external media mod if you want to use external medias ...

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...