This question is not answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 30 - Pages: 3 [ Previous | 1 2 3 | Next ] - Last Post: 24-Feb-2021 23:28 Last Post By: RobM Threads: [ Previous | Next ]
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 08-Feb-2021 11:50   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
WCICellars wrote:
Hi Jeff, thank you for the explanation but I already understood what an alt text is and what its purpose is for. But like as you mentioned, we can add a title, comment, keywords on to the photo. But is there a way where we can also user-enter an alt text for the image?

I apologize if my explanation wasn't clear enough. Thank you for all of your patience into helping out.

One way would be to use user variables, in edit mode. For example you could add a variable named altTag and add the text as its value. You could also define the variable in Settings > Advanced > User variables, giving it a default value, then just use
alt="${altTag}"

With a bit more code you could detect the default value and change the alt tag to the filename or another supported variable.
WCICellars

Posts: 13
Registered: 26-Dec-2014
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 16:41   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
Attachment Screenshot_5.jpg (113.4 KB)
So I just tried adding tags on the keywords tab in the jalbum. But it I believe it doesn't seem to be added on the website. Is there something missing that I might have not done? Please see attachments on what I mean. Many thanks.
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:12   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
I’m fairly sure that keywords are not supported by Hydrogen. It is another thing that would have to added. I really think you would be better choosing another skin, Hydrogen is unsupported.
JeffTucker

Posts: 7,375
Registered: 31-Jan-2006
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:18   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
The skin is not coded to use the image-specific keywords for anything. They will not appear in the album.

Where would you expect to find them in the live page?
JeffTucker

Posts: 7,375
Registered: 31-Jan-2006
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:27   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
About the best you can do, with just a bit of editing, is to include the album tags in the page. Enter your tags under Settings > General > Album tags. Then edit the skin's index.htt file and change line 10 to:
<meta name="keywords" content="${tags}" />
That still won't pick up keywords you've entered for individual images.

While you're at it, you might as well change line 9 to:
<meta name="description" content="${albumDescription}" />
That will let it pick up whatever you've entered under Settings > General > Album description.
WCICellars

Posts: 13
Registered: 26-Dec-2014
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:39   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Do you happen to know or suggest a better template / skin to support something similar if thats the case?
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:45   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
Look at the skins page , maybe filter by options you want and then look at the sample albums. Having narrowed it down, try looking at the skin manual for settings and further details on features.
JeffTucker

Posts: 7,375
Registered: 31-Jan-2006
Re: Hydrogen Hyperlinks
Posted: 19-Feb-2021 17:53   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
You're going to have a problem switching to any of the current skins, I'm afraid. None of them is designed to be embedded on your own web pages, with things like you pop-out menu at top right.

I'm a little puzzled about what "problem" you're trying to fix. The Hydrogen album on your site integrates nicely with the rest of your site, and everything works very well.

I have a suspicion that you've been reading some nonsense about how embedding keywords on your pages or in your alt tags will magically cause Google to vault you to the top of the search results. One thing we've all learned about Google searches is that every time someone figures out a way to "game" the results, Google changes their algorithms to put a stop to the manipulation. Keywords, for example, were so abused by site owners a decade ago, Google simply started ignoring them.

The only way to boost your SEO is to have good content, and to have other sites linking to yours. Everything else is pretty much a waste of effort.
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 20-Feb-2021 00:27   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
WCICellars wrote:
So I just tried adding tags on the keywords tab in the jalbum. But it I believe it doesn't seem to be added on the website. Is there something missing that I might have not done? Please see attachments on what I mean. Many thanks.
Hydrogen is a great idea, but it is a code nightmare for us mere mortals. However:
In Hydrogen's skin folder goto res/controller/js/script.js and open the file in a text editor.
Goto line 192 and look for the code block
case 'image':
slides[imgVidIndex] = {
name: obj.name,
path: obj.path,
slide: currPath + obj.image.path,
width: obj.image.width,
height: obj.image.height,
type: 'image',
comment: obj.comment
Now, after the last 'comment' add a comma and then a new line. Now enter
keywords: obj.keywords
Next is where to add the keywords, the below will add it after the images comments.

Open the skin's index.htt file and goto line 206 and look for
// print thumbs
$jA(window).on('thumbsView', function (event) {
A bit further down look for the code
var text = slides[i].comment == undefined ? "" : slides[i].comment;
Now, insert two new lines of code
if(slides[i].keywords != undefined) text += " keywords: " + slides[i].keywords;
text = text.replaceAll(",",", ");

Save all the edits and rebuild your album. The line numbers given may be out slightly, I can't remember the other changes made before, nor do I know if you incorporated them.
WCICellars

Posts: 13
Registered: 26-Dec-2014
Re: Hydrogen Hyperlinks
Posted: 23-Feb-2021 18:00   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thank you so much for the help. I've done the steps you have instructed and got added along. Is there any way I could put a line break between the comment and keywords? I tried to see if I could add a
or \n but it doesn't seem to be working.
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 23-Feb-2021 18:15   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
The comments are added to the web page as a text node, html elements like break tags would only appear as text. I think you would need to target the text’s container element with CSS, something like
 white-space: pre;
. Offhand, I can’t recall the container element, I’ll have a look later, to see if I can do it, though my coding is a bit rusty.
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 23-Feb-2021 18:27   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
content deleted.

Edited by: RobM on 23-Feb-2021 21:19
Deleted untested code with new response below
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 23-Feb-2021 22:19   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
The CSS code does not work in common.css, instead in the skin's folder goto 'res/Hydrogen/css/style.css' and open that file.

Now scroll down to line 7699
#fh5co-board .item .fh5co-desc{
  padding: 20px;
  float: left;
  line-height: 24px;
}
After the line-height entry add a new line and enter
white-space: pre;


The line in index.htt
text = text.replaceAll(",",", ");
Is not really needed, you can delete it, or just add '//' at the start of the line to make it a 'remark'.
WCICellars

Posts: 13
Registered: 26-Dec-2014
Re: Hydrogen Hyperlinks
Posted: 24-Feb-2021 14:19   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
The white-space: pre; doesn't seem to do the job since all the texts became one liner instead.
RobM

Posts: 3,376
Registered: 4-Aug-2006
Re: Hydrogen Hyperlinks
Posted: 24-Feb-2021 17:48   in response to: WCICellars in response to: WCICellars
 
  Click to reply to this thread Reply
Try changing from 'white-space: pre;' to 'white-space: pre-line;'
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums