kunzite (kunzite1) wrote in component_help,
kunzite
kunzite1
component_help

[theme] - [component] - [m\b\t comps (v4.0)]

###################################
#     MUSIC\BOOK\TV COMPONENT     #
# kunzite1, component-help/855542 #
# add to print_free_text(Page p)  #
###################################
var string k1Mheader = "Music";   # title of component
var string k1Mheight = "175px";   # height of component
var Color  k1Mborder = "#000000"; # bordercolor for images

var Color    k1Mbg;
var string[] k1Msrc;
var string[] k1Malt;
var string[] k1Mtitle;
var string[] k1Msubtitle;
var string[] k1Murl;
var int      k1Mindex = 0;

# set one
$k1Msrc[$k1Mindex]      = ""; # image url
$k1Malt[$k1Mindex]      = ""; # image alt text
$k1Mtitle[$k1Mindex]    = ""; # bolded title
$k1Msubtitle[$k1Mindex] = ""; # italicized subtitle
$k1Murl[$k1Mindex]      = ""; # optional image linking url
$k1Mindex++;

# set two
$k1Msrc[$k1Mindex]      = ""; # image url
$k1Malt[$k1Mindex]      = ""; # image alt text
$k1Mtitle[$k1Mindex]    = ""; # bolded title
$k1Msubtitle[$k1Mindex] = ""; # italicized subtitle
$k1Murl[$k1Mindex]      = ""; # optional image linking url
$k1Mindex++;

# copy sets as necessary

print_comp_header($k1Mheader);

"""
<div id="Layer1" style="position:relative; width:100%; height:$k1Mheight; z-index:1; overflow: auto; overflow-x: hidden;">
<table width="100%" cellpadding="3" cellspacing="0">
""";

foreach var int k1Mi (0 .. (size($k1Msrc) - 1)){
  $k1Mbg = ($k1Mi % 2 == 0) ? $*main_bgcolor : $*comp_bgcolor;
  """
  <tr style="background-color:$k1Mbg;">
  <td style="text-align:left;">""";
if($k1Murl[$k1Mi] != "") { """<a href="$k1Murl[$k1Mi]">"""; }
  """<img src="$k1Msrc[$k1Mi]" border="0" style="border: 1px solid $k1Mborder" alt="$k1Malt[$k1Mi]" title="$k1Malt[$k1Mi]" />""";
if($k1Murl[$k1Mi] != "") { """</a>"""; }
  """</td>
  <td>
    <b>$k1Mtitle[$k1Mi]</b><br />
    <i>$k1Msubtitle[$k1Mi]</i>
  </td>
  </tr>
  """;
}

"""
</table>
</div>
""";
print_comp_footer();
Tags: admin: deprecated, user: kunzite1
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 8 comments