amethystia (amethystia) wrote in component_help,
amethystia
amethystia
component_help

Links

I can't get my links to show (i.e. friends' entries, calendar, etc.). Is there something wrong with my code?



layerinfo "type" = "theme";

layerinfo "name" = "Nightwish";

layerinfo "source_viewable" = 1;





set text_read_comments = "1 Has wished for an angel // # Hath wished";

set text_post_comment = "Wish for an angel";





set nav_entries_text      = "Dead Poetry";

set nav_friends_text      = "Oceansouls";

set nav_calendar_text     = "End of All Hope";

set nav_info_text         = "Nemo";



set page_background_image = "http://www.livejournal.com/palimg/textures/ridge.png/pt7D002Cffffff";

set header_fgcolor_lt = "#8ebcf2";

set comp_bgcolor = "white";

set header_fgcolor = "#000000";

set entry_link_visited = "#000000";

set main_bgcolor = "#8ebcf2";

set entry_bgcolor = "white";

set comp_fgcolor = "#347688";

set entry_link = "#000000";

set header_bgcolor = "#347688";

set entry_fgcolor = "#000000";







#### SHRINKING ENTRIES / BANNER ####



function page_layout(Page p) {

  # Set this to the width that you want both the navbar (if it exists) and the whole journal to be

  # may be percentage (70%) or number of pixels (700px).

  var string k1Swidth = "737px";



  # Start the html document and print the head section which controls the page title, stylesheet information,

  # server supplied head content, and custom header informtion from the print_custom_head function.

  var string title = $p->title();

  """

  <html>

  <head>

    <link rel="stylesheet" href="$p.stylesheet_url" type="text/css"/>

    $p.head_content

    """; $p->print_custom_head(); """

    <title>$title</title>

  </head>

  """;

  

  # Start the body section of the html document which controls the visible parts of the page.

  """<body style="text-align:center;">""";



  # If you want a picture to be at the top of your journal, edit and decomment this section.

  """<div align="center"><img src="http://img.photobucket.com/albums/v712/luvinta/layouts/nightwishheader.png" alt="The light of the Evenstar does not wax and wane"/></div>""";



"""<div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="4" alt="" border="0" /></div>""";



#### TITLE ####



    # Because we are going to override the Page title, and there is no function to draw the component borders for such

    # a thing, we need to do it all by hand. For the curved corner pieces, we need to match the color to the rest of your

    # component. To do this, we need to set a variable to be used since it cannot be obtained from the stylesheet.

    var Color header = $*header_bgcolor;

    var Color headerMinus5  = $header->darker(50);

    var Color headerPlus3   = $header->lighter(30);

    var string corner_color = "/p0"+$headerPlus3->substr(1,6)+"1"+$headerMinus5->substr(1,6)+"2"+$header->substr(1,6);

    var string k1Twidth = "730px";



    # Start the new title component.

    """



            <table cellspacing="0" cellpadding="0" align="center" border="0" style="width:$k1Twidth;">

                <!-- <tr>

                    <td colspan="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="1" alt="" border="0"></td>

                </tr> -->

                <tr>

            <td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-top-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td>

                    <td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                    <td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-top-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td>

                </tr><tr>

                    <td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                </tr><tr>

                    <td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>

                </tr><tr>

                    <td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                    <td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                    <td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>

                    <td class="tabBg" width="100%">

    """;



    # Now we put the actual title content in. You can put whatever you want here. As an example, I've the following lines

    # will insert the Title on all pages and Subtitle only on the recent page, and centered in the component. If you don't

    # want something centered, remove the <center> and </center> tags surrounding it it.  

    # Also, as an example, the blue line shows how to add an image above your title, but it is commented since it is incomplete.

    # If you'd like to an an image above the title, decomment the line by removing the # in front it and complete the URL.

    # If you are curious, the different "views" for condition checking are {recent, friends, day, reply, entry, month, year}.

                        

                        #"""<center><img src="YOUR IMAGE URL" border="0" alt="" /></center>""";

                        # print the Full Title of the page [Journal title and Page specific title]:

                        """ <div class="userTitle"><center> """; print $p->title(); """ </center></div> """;

                        # print the Journal Subtitle if it exists, and if we're on the recent page :

                        if ($p.global_subtitle!="") {

                           """ <div class="userSubTitle"><center> """;

                           if($p.view=="recent") {

                             print $p.global_subtitle;

                           } else {

                             print "";

                           }







""" </center></div> """;

                        }





#Close off the title component and place a spacer after it.

    """

                    </td>

                    <td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>

                    <td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                    <td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                </tr><tr>

                    <td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td>

                    <td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>

                    <td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td>

                </tr><tr>

                    <td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                </tr><tr>

                    <td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>

                </tr>

            </table>

    """;



#### END OF TITLE ####    





  if($k1Swidth != "") {

    """<table style="border: 0px; margin: auto; padding: 0px; width:$k1Swidth;"><tr><td>""";

  }







  # Print a spacer at the top of the page above the components and main area.







  """<div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></div>""";



  # Start the table which lays out the components and main area in side-by-side layout

  """

  <table cellspacing="0" cellpadding="0" valign="top">

    <tr valign="top" width="100%">

      <td width="3">

        <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

      </td>

  """;

  

  # If the components are supposed to be on the left side of the page, then print them, followed by a column

  # with a spacer which is to seperate the components and the main area.

  if ($*comp_state == "left" ) {

    print_my_components($p);

    """

    <td width="3">

      <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

    </td>

    """;

  }







  # Print the main area of the page.

  print_my_entries($p, $title);





# Print the navigation bar if it is needed. This can be incorporated into any other tutorials which override

  # the page_layout() function, and should be placed immediately after the <body> tag above.

  if ($p.view=="friends") {

    """    <div class="header">""";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"recent"}+"\">$*nav_entries_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"friends"}+"\">$*nav_friends_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"archive"}+"\">$*nav_calendar_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"userinfo"}+"\">$*nav_info_text</a></span>";

    if ($p.journal.website_url != "") {

        print "<span class=\"header-item\"><a href=\"$p.journal.website_url\">$p.journal.website_name</a></span>";

    }

    $p->lay_viewspec_nav();  # prints previous / next links including arrow images

    """

    </div>

    """;

  }





# If the components are supposed to be on the right side of the page, then first print a column with a spacer

  # and then print the components after the spacer.

  if ($*comp_state == "right") {

    """

    <td width="3">

      <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

    </td>

    """;

    print_my_components($p);

}



  # Finish off the table for the body

  """

      <td width="3">

        <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

      </td>

    </tr>

  </table>

  """;



  if($k1Swidth != "") {

    """</td></tr></table>""";



  }



  # End the body section and end the html document

  """

  </body>

  </html>

  """;

}







function print_my_entries(Page p, string title) {

"""<td valign="top" width="100%">""";

    if ($p.view=="recent") {

        # print the component header, and start it off like a normal entry component with no usericons or journal names

        print_system_box_top();

        print_content_top();

        # print the content of the custom component - eg. my welcome note. You can put whatever html you want here as long

        # as it's properly tagged and encompassed by the """ and """;

        """<img src="http://img.photobucket.com/albums/v712/luvinta/layouts/friendsonly.png">""";

        # close off the component and place a spacer.

        print_content_bottom();

        print_system_box_bottom();}

print_spacer();

$p->print_body();



}





##############



function Page::print_custom_head() {

"""<meta content="revealTrans(transition=12, duration=1.0)" http-equiv="Page-Enter">

<meta content="revealTrans(transition=12, duration=1.0)" http-equiv="Page-Exit">



<style type="text/css">

        

html {

scrollbar-base-color: #bfc9d0;

scrollbar-track-color: #223746;

scrollbar-face-color: #000000;

scrollbar-highlight-color: #076c9f;

scrollbar-3dlight-color: #bfc9d0;

scrollbar-darkshadow-color: #bfc9d0;

scrollbar-shadow-color: #000000;

scrollbar-arrow-color: #bfc9d0;

}



a:hover {

filter: blur(Strength=3,Direction=45);

height: 0;}



.entry {

font-size: 11px;}

  

table.fixed

    {

     table-layout:fixed;    

    }

    div.scrollentry

    {

     width:100%;

     overflow:auto;

     overflow-y:hidden;

     padding-bottom:17px;}



.userTitle {

text-align:center;}



.userSubTitle {

text-align:center;

font-size: 11px;}



.userPic { border: 0px; }



img { border-width: 0px }



}

</style>

""";

}


Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 1 comment