Jump to content
TNG Community
Ted Steele

Adding a lengthy caption to a photo

Recommended Posts

Ted Steele

Hello. I have a brand new TNG website with a nice photo of a large family gathering -- about 25 people in it --on my home page. I'd lie to add a caption (or a pop-up) that lists all of the names, e.g, Front row (L to r): name, name, name...; Second row (L to R): name, name, name...; Back row (L to R); name, name, name... There will be a lot of names, so I don't want to take up "real estate" on the home page for the whole list, but I'd like a way to make it visible with a click. Anybody got any suggestions?

Thanks, Ted

Share this post


Link to post
Share on other sites
Newfloridian

Hi Ted

Do you mean something like this? Roll the mouse over the main photo in column 1:

Wedding photo 1942

That's accomplished by adding title=" your full text here " inside the img src=" " definition of the image. Could show you the full definition in a PM if you wish.

 

Alan

Share this post


Link to post
Share on other sites
Ted Steele

Alan,

Yes, that is exactly what I want to do. Hows do I get to the HTML that is editable? (When I simply r-click on the page and select "View page source" I can see the HTML but I cannot edit it. Thanks again, Ted

Share this post


Link to post
Share on other sites
Newfloridian

Can you provide a link to your home page? How did you get the image onto your home page in the first place? Did you add it through Admin > Template settings or directly to index.php?

Alan

Share this post


Link to post
Share on other sites
Ted Steele

Alan,

The home page is SteeleFamilyHistory.net. I have done all of my editing to the page via the Administrator panels.

Apparently I will need an FTP program to access and edit HTML, but I don't have one. Is there one that you (or Darrin) recommend?

Share this post


Link to post
Share on other sites
Newfloridian

I think most people use filezilla although for many years I have been an advocate of Ipswitch WS_FTP Professional . Both have free downloadable versions. 

I don't use template switching (but that's another story) so I don't have access to the "Administrator" panels. However it should be possible to add the title as a tooltip to the image reference from the "Welcome paragraph(s - depending on how many languages you are using). Maybe send me a copy of your current entry from the Welcome paragraph box (in a PM?) and  we could have a look.

Alan

Share this post


Link to post
Share on other sites
Ted Steele

I have just downloaded FileZilla, but when I attempt to connect to my home page I get this error:

The server's certificate is unknown. Please carefully examine the certificate to make sure the server can be trusted.

?? Ted

Share this post


Link to post
Share on other sites
Ted Steele

Thanks Alan. So I did that (clicked the button to accept) but I still get an error: Critical error. Could not connect to server.

So I went back to my Administrator panel to verify my username and password, but my password is all "dots" so I can't verify what it is. I got an email giving my the name and password that I thought I had used, but there are way more "dots" on the admin page than I have characters in what I thought was my password. So I re-entered my password and saved it. But FTP still can't connect.

Any thoughts?

 

Share this post


Link to post
Share on other sites
Ken Roy

The Unknown certificate might be a question for your hosting service.  I use ICDSoft and their certificates do show up in FileZilla but based on the certificate URLs I know it is my hosting service. 

 

Share this post


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

Apparently I will need an FTP program to access and edit HTML, but I don't have one. Is there one that you (or Darrin) recommend?

Once set up, I find Filezilla speedy and easy to use.  The only files it doesn't seem to see are symbolic links (redirection of folder locations), so need to use my host's Control Panel to see them.   You can do editing within Filezilla, having it load an editor for you, then will make sure the updated file is uploaded.  But generally I do my editing locally (Notepad++ is free and excellent) on the PC, then use Filezilla to upload them in a separate step.  And always have backups, of course.

 

30 minutes ago, Ken Roy said:

I use ICDSoft and their certificates do show up in FileZilla but based on the certificate URLs I know it is my hosting service. 

Same situation, and I examine the URL to tell it is legitimate.

Ron

Share this post


Link to post
Share on other sites
Ted Steele

OK folks, I now have my Filezilla FTP program working -- I can attach to my TNG website. But being a FTP dummie, is there a simple tutorial about how to access and edit my web pages? I don't even see my home page on the Filezilla host side...  Ted

Share this post


Link to post
Share on other sites
Ted Steele

Alan,

I hope you're still there as I am desperately wanting to implement the solution that you posted the other day to add that floating caption to the photo on my home page. If you've been following the "managing photos" thread you're aware of my stumbling around. So let me briefly summarize:

- I have learned (a bit) how to use my FileZilla utility to FTP transfer my site to my home PC.

- have learned (thank you Ken Roy) that TNG "uses PHP to dynamically generate the html sent to the browser using the MySQL database for the data."

- I have found the index.php file for my template (Template 10).

- None of the files that I seem to have on my home PC appear to contain the HTML code that I would need to change to implement your solution: " by adding title=" your full text here " inside the img src=" " definition of the image. " Is that code somewhere in a MySQL database?

So, can you please (gently) step me through how I can find that HTML ode to change it so that I can enter my floating caption.

Thank you so much. Ted

Share this post


Link to post
Share on other sites
Newfloridian

You should be able to add the title="" to the definition in the Welcome paragraph box in Admin > Setup > Configuration > Template Settings. 

Alan

Share this post


Link to post
Share on other sites
Brett

Ted

I hope I am reading your question correctly. If you have modified the Template and included an additional image than normal, there is no need to edit any HTML or upload anything special using FTP.

While logged into your TNG Admin, choose Media. From there, you will see your photos. Choose to edit the photo from your home page.

In the Media Information
Edit media title, description and other basic details section,  add a title and description. This detail will be added as mouse over when the PHP is served.

If however you are using the Template as supplied and have changed the image to be used, the default Template code does not include the Title or Alt code necessary to show the text you request.

A modification to the base code would need to be done in this case.

Share this post


Link to post
Share on other sites
XerxX

Hi Ted,

 

I am afraid that none of the above works.

It's simply not possible to add a title="The caption you want" directly into the template 10 Admin panels.

You will need a MOD for this change in template 10.

 

1) Open the attached mod-file in your Notepad or a similar PLAIN-TEXT editor.

2) Replace the text between the double-quotes here, with your caption:

title=
"Add your CAPTION-TEXT here.
A linebreak is made by pressing ENTER to make a new line.
Do NOT use double-quotes here!"
/>

Note how to make a linebreak. Do NOT touch the double-quotes! Do NOT use double-quotes in your caption.

3) Save the file and then Upload it (by FileZilla f.ex) to your site's mods folder

4) Go to your site >> Administration >> Mod Manager  and Install the mod

5) Check the result:

inde-image-caption.jpg

 

HTH

Erik

 

PS. As I'm going away in a minute, this was a quick "hack". I hope I've covered everything. Otherwise I'll be back w/i 8 hrs.

 

Add_Index-image_Caption.cfg

 

Edited by XerxX
Added PS

Share this post


Link to post
Share on other sites
Ted Steele

Well, I've received three informative and helpful responses to my inquiry -- all different.

Alan, I tries adding title = "text" to the admin template page and all I get it that text [title = "text"] to appear on the page.

Brett, When I go to the media admin page the only images that I see are those for the people in my family tree. I do not see this photo that is on the home page. That photo is defined as a jpg in the admin template settings in the [Main image (home page) box.

XerxX, I have not yet even looked at a mod. When I go to the admin mods panel it says, " No mod definition files (cfg) found in the mod folder - mods" So if I create this text as you recommend (which I understand clearly) and upload it using FTP, where do I put it and what do I call it and how does it get associated with that home page photo.

Suddenly hopeful, Ted

Share this post


Link to post
Share on other sites
Ken Roy

Ted,

Since you added the photo in Template Settings.  Why not use the Template Settings dialog to add your description to be displayed with the photo where you attempted to add the title= text

Granted it will not work as a hover tooltip, but that might be an easy solution until you learn how TNG works.  There are a lot of articles on the TNG Wiki

https://tng.lythgoes.net/wiki/index.php?title=Category:How_TNG_Works

https://tng.lythgoes.net/wiki/index.php?title=How_TNG_builds_a_page

https://tng.lythgoes.net/wiki/index.php?title=Category:Templates

Share this post


Link to post
Share on other sites
XerxX

Hi Ted,

Upload via FTP (FileZilla) the already completely prepared file to your mods drawer in your TNG root.

When it's there, you log-in to your site as Administrator and go to Administration >> Mod Manager.

Now there will be an entry for this file.

Click in the field that (hopefully ;) )says "OK  to install"

When it opens, there is a button "Install" - click it.

The background will change colour to greeen(ish) and the text says "Installed".

Now go to your homepage and try to hover the image.

It should look like the image I posted above.

 

EDIT:

Regarding your last questions (I forgot):

You don't have to change the file-name.

When you "Install" the mod, it will edit your index.php to include the caption as a title="Your caption text" in the <img> tag.

 

HTH

Erik

 

Edited by XerxX
See Edit

Share this post


Link to post
Share on other sites
Ted Steele

ZerxX,

I'm getting close! I created a text file for my caption and called it caption.cfg. (I figured it needed to be a cfg file since that what the mods manager said it was looking for. I uploaded it and it appears in my mods area. But when I go to admin Mod Manager (and update it) the line reads:

[Mod Name]  [Config file name]  [version]  [wiki]  [status]

[missing]        [Caption.cfg]          [ ???]         [     ]    [cannot install]

What now? Ted

Share this post


Link to post
Share on other sites
XerxX

Ted, I said

4 hours ago, XerxX said:

1) Open the attached mod-file in your Notepad or a similar PLAIN-TEXT editor.

2) Replace the text between the double-quotes here, with your caption:


title=
"Add your CAPTION-TEXT here.
A linebreak is made by pressing ENTER to make a new line.
Do NOT use double-quotes here!"
/>

Note how to make a linebreak. Do NOT touch the double-quotes! Do NOT use double-quotes in your caption.

3) Save the file and then Upload it (by FileZilla f.ex) to your site's mods folder

You should not create a new file but edit the one I attached and use it.

Okay?

Erik

Share this post


Link to post
Share on other sites
Ted Steele

OK, OK. I downloaded your mod onto my PC and edited it to include my caption. .I messed up the quotes (natch) the first time I edited your mod and uploaded it to the mods folder. The caption hovering caption reads [title=]

I am also seeing [" />] above the text on my page.

But I went back and FIXED the quotes so that my mod is exactly like your mod. I'll attach it for you to take a look. I then used FTP to delete the bad cfg and then uploaded the current cfg file. I went back to the admin mods section and did a save but I now get this error message

%location% #1 Bad target

I am using template 10 and the photo is my main image.

Ted

BTW, I do really appreciate you stepping in here. I know that "the devil's in the details" so I figure I still have an extra " somewhere but I can't spot it.

Add_Index-image_Caption.cfg

Share this post


Link to post
Share on other sites
Newfloridian

I could be wrong here (because I've always avoided such a construct) but I think there shouldn't be spaces (or line breaks) between the attribute name, the equals sign and/or  the text contents.

Try:

title="1st row (L to R): Gerald A. Lowe II, Richard E. Steele, Jane A. Lowe
2nd row: Bess Wheeler Steele (holding Ted Steele), Ada West Lowe, Alice Bell West Ripley, Mimi Botsford
3rd row: Alan Lovett, Donald E. Steele, Jane Botsford Lowe, Frank A. Lowe, Jr., Barbara Lowe Steele, Frank A. Lose Sr., Rodger R. Lowe, Marjorie Shupe Lowe, Gerald A. Lowe, Virginia Botsford Lovett"
 

Share this post


Link to post
Share on other sites
XerxX

That file is okay to use. I just did:

caption2.jpg

 

The error you have is because you deleted the installed mod without UNinstalling it first.

WHAT YOU HAVE TO DO:

Find the original Template 10 index.php and upload it, thereby overwriting the one that is there. In the templates/template10 folder

You will find it in your original download package that you got from Darrin.

 

If you have uploaded the .cfg file already, you should now be able to install it. Otherwise upload it to the mods drawer and install.

 

Erik

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

×