Bonjour. (mariadoll) wrote in component_help,
Bonjour.
mariadoll
component_help

I'm having trouble with the marquee and the Announcement Component!

I really want an announcement in my journal, but I do not want the comments box, or the subject on it. Just actual annoucnement. I also want it to stay ON TOP right underneath where it says "Bonjour" but every time I update my journal it gets sent to the bottom. How can I freeze it on top of all my actual entries so it won't move anymore. And how can I remove the comment box and entry title? Please help!

Here is the code I have for the announcement:

function DayPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();

if ($e.comments.enabled) {
if (not ($e.comments.count == 0)) {
"""
""";
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""
""";
}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}

function DayPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();

if ($e.comments.enabled) {
if (not ($e.comments.count == 0)) {
"""
""";
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""
""";
}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}

function RecentPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();
if ($e.comments.enabled) {
"""
""";
if (not ($e.comments.count == 0)) {
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""
""";

}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}


function FriendsPage::print_entry(Entry e) {
print_entry($this, $e, $.friends{$e.journal.username}.bgcolor, $.friends{$e.journal.username}.fgcolor, false);
}

I want it where it stays on TOP. But EVERY time I update it, the announcement goes to the bottom. What am I doing wrong? Also, how can I take the comments part out of the annoucement box?

And as for the marquee, I have everything in my source code with no errors, but it's not showing up? What am I doing wrong? Here is the code for this as well:

##################################################
# Marquee component #
# Tutorialized by kunzite1 #
# Inspirialized by bring_me_sugar #
##################################################
# MARQUEE START #
#################
# This is the title of the component #
function print_free_text(Page p){
var string k1Mtitle = "Finds of the Week";
#
# This is the height of the marquee #
var string k1Mheight = "250";
#
# This is the width of the marquee #
var string k1Mwidth = "";
#
# This is the css class to attach to the marquee #
var string k1Mclass = "marquee";
#
# This is the direction of the marquee #
var string k1Mdirection = "up";
#
# This is the speed of the marquee #
var int k1Mscrollamount = 2;
##################################################



print_comp_header("$k1Mtitle");
var string k1MmarqueeBegin = "
[Error: Irreparable invalid markup ('<marquee";>') in entry. Owner must fix manually. Raw contents below.]

I really want an announcement in my journal, but I do not want the comments box, or the subject on it. Just actual annoucnement. I also want it to stay ON TOP right underneath where it says "Bonjour" but every time I update my journal it gets sent to the bottom. How can I freeze it on top of all my actual entries so it won't move anymore. And how can I remove the comment box and entry title? Please help!

Here is the code I have for the announcement:<lj-cut>

function DayPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();

if ($e.comments.enabled) {
if (not ($e.comments.count == 0)) {
"""<div class="entryComments">""";
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""</div>""";
}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}

function DayPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();

if ($e.comments.enabled) {
if (not ($e.comments.count == 0)) {
"""<div class="entryComments">""";
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""</div>""";
}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}

function RecentPage::print_entry(Entry e) {
var Color fg;
var Color bg;

if (($e.metadata{"mood"} == "special/announcement") and ($.args{"unmask"} != "true")) {
print_system_box_top();
print_content_top();
print $e.text;
print_content_bottom();
if ($e.comments.enabled) {
"""<div class="entryComments">""";
if (not ($e.comments.count == 0)) {
$e.comments->print_readlink();
""" """;
print $*comment_divider;
""" """;
}
$e.comments->print_postlink();
"""</div>""";

}

print_system_box_bottom();
print_spacer();
} elseif ((not ($e.metadata{"mood"} == "special/hidden")) or ($.args{"unmask"} == "true")) {
print_entry($this, $e, $bg->Color("#ffffff"), $fg->Color("#000000"), false);
}
}


function FriendsPage::print_entry(Entry e) {
print_entry($this, $e, $.friends{$e.journal.username}.bgcolor, $.friends{$e.journal.username}.fgcolor, false);
}

I want it where it stays on TOP. But EVERY time I update it, the announcement goes to the bottom. What am I doing wrong? Also, how can I take the comments part out of the annoucement box?

And as for the marquee, I have everything in my source code with no errors, but it's not showing up? What am I doing wrong? Here is the code for this as well:

##################################################
# Marquee component #
# Tutorialized by kunzite1 #
# Inspirialized by bring_me_sugar #
##################################################
# MARQUEE START #
#################
# This is the title of the component #
function print_free_text(Page p){
var string k1Mtitle = "Finds of the Week";
#
# This is the height of the marquee #
var string k1Mheight = "250";
#
# This is the width of the marquee #
var string k1Mwidth = "";
#
# This is the css class to attach to the marquee #
var string k1Mclass = "marquee";
#
# This is the direction of the marquee #
var string k1Mdirection = "up";
#
# This is the speed of the marquee #
var int k1Mscrollamount = 2;
##################################################



print_comp_header("$k1Mtitle");
var string k1MmarqueeBegin = "<marquee";
var string k1MmarqueeEnd = "</marquee>";

var string k1MscrollamountString = $k1Mscrollamount + "";
if($k1Mheight != ""){
$k1MmarqueeBegin = $k1MmarqueeBegin + " height='$k1Mheight'";
}
if($k1Mwidth != ""){
$k1MmarqueeBegin = $k1MmarqueeBegin + " width='$k1Mwidth'";
}
if($k1Mclass != ""){
$k1MmarqueeBegin = $k1MmarqueeBegin + " class='$k1Mclass'";
}
if($k1Mdirection != ""){
$k1MmarqueeBegin = $k1MmarqueeBegin + " direction='$k1Mdirection'";
}
if($k1MscrollamountString != ""){
$k1MmarqueeBegin = $k1MmarqueeBegin + " scrollamount='$k1MscrollamountString'";
}
$k1MmarqueeBegin = $k1MmarqueeBegin + ">";

# this is where you put the stuff that you want to marquee
# in between $k1MmarqueeBegin and $k1MmarqueeEnd
# it currently has the default userpic of the currently viewed journal
"""
$k1MmarqueeBegin
<p>
<center>
Just Testing
</center>
</p>
$k1MmarqueeEnd
""";
print_comp_footer();
###############
# MARQUEE END #
###############
}

Please help as I am excited about testing out my new journal but I want it to look nice first. I'm also currently tweaking all the colors and images so please disregard anything that looks off :P

Thanks for the help! My e-mail is neggyteal@hotmail.com if you need to reply to me personally.

Maria</lj-cut>
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 9 comments