oh wicked one (wicked_goddess) wrote in component_help,
oh wicked one
wicked_goddess
component_help

  • Mood:

Music/Book/TV Component Help

I successfully managed to add the music component, but when I try to add the book component, the header is there, but all of the entries end up in the book component.

You can see my journal here and my layer source is
function print_free_text(Page p) {
var string k1Mheader1 = "currently reading:"; # title of component
var string k1Mheight1 = "200px"; # height of component
var Color k1Mborder1 = "#000000"; # bordercolor for images

var Color k1Mbg1;
var string[] k1Msrc1;
var string[] k1Malt1;
var string[] k1Mtitle1;
var string[] k1Murl1;

# set one
$k1Msrc1[0] = "http://www.wickedgoddess.com/lj/1602book.jpg";
$k1Malt1[0] = "1602 - Neil Gaiman";
$k1Mtitle1[0] = "1602 - Neil Gaiman";
$k1Murl1[0] = "optional linking url 1";

# set two
$k1Msrc1[1] = "http://www.wickedgoddess.com/lj/goldencompassbook.gif";
$k1Malt1[1] = "The Golden Compass - Philip Pullman";
$k1Mtitle1[1] = "The Golden Compass - Philip Pullman";
$k1Murl1[1] = "optional linking url 2";

# comment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
print_comp_header($k1Mheader1);

# decomment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
# print $comp_header_open; print $k1Mheader1; print $comp_header_close;



var string k1Mheader2 = "currently listening to:"; # title of component
var string k1Mheight2 = "275px"; # height of component
var Color k1Mborder2 = "#000000"; # bordercolor for images

var Color k1Mbg2;
var string[] k1Msrc2;
var string[] k1Malt2;
var string[] k1Mtitle2;
var string[] k1Murl2;

# set one
$k1Msrc2[0] = "http://www.wickedgoddess.com/lj/finnbroscd.jpg";
$k1Malt2[0] = "The Finn Brothers - Everyone is Here";
$k1Mtitle2[0] = "The Finn Brothers - Everyone is Here";
$k1Murl2[0] = "optional linking url 1";

# set two
$k1Msrc2[1] = "http://www.wickedgoddess.com/lj/keanecd.jpg";
$k1Malt2[1] = "Keane - Hopes & Fears";
$k1Mtitle2[1] = "Keane - Hopes & Fears";
$k1Murl2[1] = "optional linking url 2";

# set three
$k1Msrc2[2] = "http://www.wickedgoddess.com/lj/westerbergcd.jpg";
$k1Malt2[2] = "Paul Westerberg - Folker";
$k1Mtitle2[2] = "Paul Westerberg - Folker";
$k1Murl2[2] = "optional linking url 3";


# copy sets as necessary
# make sure that the index numbers (bolded numbers) are the same in each group
# this program will step thru them in numerical order


# comment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
print_comp_header($k1Mheader2);

# decomment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
# print $comp_header_open; print $k1Mheader2; print $comp_header_close;

"""

"""; foreach var int i (0 .. (size($k1Msrc1) - 1)){ $k1Mbg1 = ($i % 2 == 0) ? $*main_bgcolor : $*comp_bgcolor; """ """; } """
""";
if($k1Murl1[$i] != "") { """"""; }
"""$k1Malt1[$i]""";
if($k1Murl1[$i] != "") { """
"""; }
"""
$k1Mtitle1[$i]


""";

"""

"""; foreach var int i (0 .. (size($k1Msrc2) - 1)){ $k1Mbg2 = ($i % 2 == 0) ? $*main_bgcolor : $*comp_bgcolor; """ """; } """
""";
if($k1Murl2[$i] != "") { """"""; }
"""$k1Malt2[$i]""";
if($k1Murl2[$i] != "") { """
"""; }
"""
$k1Mtitle2[$i]


""";
# comment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
print_comp_footer();

# decomment this section if this is in the non-print_free_text section of the page_layout function when using the components on both sides tutorial
# print $comp_footer;


}

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 5 comments