![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Hello! Some years ago, I sort of muddled my way through porting my style over from LiveJournal. However, there were a few minor issues that I couldn't seem to figure out on my own, so I posted here awhile back. I received some wonderful help and was able to resolve all but one of the problems! Now I've returned in hopes of finding a way to fix that last one.
My layout: I'm using the Component layout from LJ, which I more or less just copied over and worked my way through the errors until it finally compiled. I believe my version over here is labeled LiveJournal S2 Core, v1. I realize that this is an old style and not native to DW, but I'd prefer to troubleshoot it rather than try and adapt another style to my needs. I've put the code I'm using in a Pastebin here.
My theme: I'm using a custom theme called Shades of Brown, which includes an added custom header bar and various other minor customizations. The code for this is in a Pastebin here.
Custom CSS: On DW's basic Customize Journal page, under Custom CSS the box for "Use layout's stylesheet(s)" is checked. I have nothing in the text box labeled Custom Stylesheet and I'm not using a custom external stylesheet. All of my customizing so far has either been done through the wizard or through my theme layer.
Problem: Adding direct entry links to my journal. When I load my journal and look at my entries, there's a link at the bottom of each one that says "Leave a comment". If there are comments on an entry, there will also be a link to the left of that which says "[X] comments". I would really like to also always have a link in this area that just links directly to that entry. Ideally something like
style_system itself has ("Link" and "Reply" if there are no comments, "Link" "[X] comments" and "Reply" if there are some).
If you got all the way through that, thank you for taking the time to read! Any help with this would be so deeply appreciated. What little I know about coding layouts is self-taught and spotty at best, so any and all explanations to accompany any help offered would be especially awesome, too. Thanks so much!
My layout: I'm using the Component layout from LJ, which I more or less just copied over and worked my way through the errors until it finally compiled. I believe my version over here is labeled LiveJournal S2 Core, v1. I realize that this is an old style and not native to DW, but I'd prefer to troubleshoot it rather than try and adapt another style to my needs. I've put the code I'm using in a Pastebin here.
My theme: I'm using a custom theme called Shades of Brown, which includes an added custom header bar and various other minor customizations. The code for this is in a Pastebin here.
Custom CSS: On DW's basic Customize Journal page, under Custom CSS the box for "Use layout's stylesheet(s)" is checked. I have nothing in the text box labeled Custom Stylesheet and I'm not using a custom external stylesheet. All of my customizing so far has either been done through the wizard or through my theme layer.
Problem: Adding direct entry links to my journal. When I load my journal and look at my entries, there's a link at the bottom of each one that says "Leave a comment". If there are comments on an entry, there will also be a link to the left of that which says "[X] comments". I would really like to also always have a link in this area that just links directly to that entry. Ideally something like
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
If you got all the way through that, thank you for taking the time to read! Any help with this would be so deeply appreciated. What little I know about coding layouts is self-taught and spotty at best, so any and all explanations to accompany any help offered would be especially awesome, too. Thanks so much!
no subject
Date: 2022-08-29 11:28 pm (UTC)taking a look at your code feels a lot like time travelling way into the past! I haven't looked at anything related to component in ages, but I used various heavily modified versions of this style until about a decade ago, so I hoped I could help you. I still vaguely recognize some of your modifications from
Anyway, I have found some traces of the code that's needed to display the permalink (that's what it's called) in your code, so maybe it's just missing the instruction to actually display it?
You already have the following function in your code:
function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
{
}
Well, my old Component code of that function included this bit:
### PERMALINK OPTION ###
# Display a permalink: true or false?
var bool show_permalink = true;
I have no idea if adding this code might fix your problem, but it's a startig point. Other than that, I fear this issue is beyond my (limited) coding abilities, especially since I can't replicate your layout to play around with it. Sorry!
If that works, I can also offer you this bit of relevant code to change the Link title for the permalink:
set text_permalink = "Link";
change "Link" to whatever you want your permalink link text to say.
Good Luck!
Also, just an additional idea: it might be easier to just "linkify" your entry subjects lines? That's where most layouts have a default permalink anyway. Just a thought...
Oh, did you know that the awesome creative people on DW have replicated the LJ Component layout? I discovered this just recently and got really nostalgic! It's called Librarian's Dream, so if your really old style stops working some day or you want to use all the awesome newer DW features, you might find some awesome alternative there!