[personal profile] seleneheart posting in [community profile] style_system
I had an image map of my journal navigation for my imported Flexible Squares layout. I recently switched to a native DW layout (Abstractia) and have gotten all the CSS fixed. However, I'm at a loss as to the theme layer coding for DW.

The image map is giving me a compilng error of: Can't define undeclared object function Page::lay_print_header()


Here is the image map code from my previous theme layer:
 
function Page::lay_print_header()
{	
	print  """
        
img src="https://seleneheart.dreamwidth.org/file/22357.png" USEMAP="#travelheader" BORDER=0>
map name="travelheader">
  area name="Recent" shape="poly" coords="139,87,246,61,275,178,160,201,133,87,133,87" href="https://seleneheart.dreamwidth.org"  alt="Recent">
  area name="Friends" shape="poly" coords="347,83,456,120,440,277,318,228,350,82,350,82" href="https://seleneheart.dreamwidth.org/read/Daily Friends"  alt="Reading">
  area name="History" shape="poly" coords="524,158,613,148,637,286,545,294,526,157,526,157,526,157" href="https://seleneheart.dreamwidth.org/calendar"  alt="Archive">
  area name="Profile" shape="poly" coords="692,143,804,167,777,295,686,277,695,138,695,138" href="https://seleneheart.dreamwidth.org/profile"  alt="Userinfo">


        """;	
}




I imagine it's the difference between the core code language in DW versus LJ.


The favicon will compile with no errors, but isn't showing up. I copy/pasted the code I used previously, so it should still be working (it was working a couple hours ago):

function Page::print_custom_head()

{
"""
link rel="shortcut icon" href="http://www.iconj.com/ico/6/8/68zs2jn2z0.ico" type="image/x-icon" />
link rel="icon" type="image/ico" href="http://www.iconj.com/ico/6/8/68zs2jn2z0.ico" type="image/x-icon" />

""";
}


I took several '<' out so the code will show up; I'm aware they should be there, but that's not the source of the errors. I don't see a way to link to the theme layer with the syntax showing, but both the new theme layer and old one are set to viewable.

Thanks for the help!

Date: 2020-07-24 09:46 pm (UTC)
momijizukamori: (dreamsheep | styles)
From: [personal profile] momijizukamori
There's some info on the Dreamscapes submission guidelines on how to link theme layers - the system is sadly not particularly intuitive, I know (someday......).

For the first bit, Page::print_header() is the function you want, I think. For the second, I will do some digging - three guesses offhand are either 1) caching issue, 2) something doesn't like the mix of of HTTP and HTTPS content, or 3) something in the compile step is stripping it out.

EDIT: Okay, Page::print_header() does seem to do the trick, and the favicon is loading for me (though firefox prints a mixed content warning in the browser console). I think https://momijizukamori.dreamwidth.org/?s2id=3802293 should show you my extremely quick'n'dirty test with a theme layer I had stashed.
Edited Date: 2020-07-24 09:54 pm (UTC)

Date: 2020-07-24 11:23 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Yep, I could look it up with that! Are you sure you actually have the custom theme layer applied? I just copied it into a new theme layer for Abstractia and it looks like it's working properly there - https://momijizukamori.dreamwidth.org/?s2id=3802316

Date: 2020-07-25 12:10 am (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

It depends on the LJ theme, but yeah, a decent number of them (and anything custom) roll the layout layer and the theme layer into a single file - which you could do here but you'd have to copy over the entire source code for Abstractia, and it's probably faster to just copy your CSS, heh.

Glad I could help!

Profile

Dreamwidth style system discussion

April 2025

S M T W T F S
  12345
6 78910 1112
13 141516171819
2021 2223242526
27282930   

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 10th, 2025 12:59 pm
Powered by Dreamwidth Studios