Custom Sidebar Modules

Dec 03, 2006 00:07

Is there a basic code for creating custom sidebar modules? I found the code for adding the Tags list, but didn't really see a way of making it more general.

Leave a comment

Comments 5

kunzite1 December 3 2006, 17:16:38 UTC

function Page::lay_print_paraphernalia() {
# profile box
$this->lay_print_journalinfo();

# viewlinks
$this->lay_print_viewsel();

# page-specific viewlinks
$this->lay_print_viewspec();

# custom box
$this->lay_print_custom_paraphernalia();

# linklist
$this->lay_print_userlinks();
}

function Page::lay_print_custom_paraphernalia() {
var string id = "";
var string header = "";
var string content = "";

# custom1
$id = "custom1";
$header = "header";
$content = """
... )

Reply


sreya December 3 2006, 20:14:09 UTC
Thanks! Took a little figuring, though - I wasn't sure whether that had to go inside the same function as the tag list.

To clarify for others how I got it working, you only do ONE function for custom paraphernalia, but can have multiple sidebar boxes like this:

function Page::lay_print_custom_paraphernalia() {
var string id = "";
var string header = "";
var string content = "";

# custom1
$id = "custom1";
$header = "header";
$content = """box content""";

paraphernalia_box_open ($id, $header);
print $content;
paraphernalia_box_close($id, $header);

# custom2
$id = "custom2";
$header = "header2";
$content = """box content2""";

paraphernalia_box_open ($id, $header);
print $content;
paraphernalia_box_close($id, $header);
}

Reply

stereofonic July 4 2007, 15:55:47 UTC
Thanks! The summed up version was MUCH easier to understand. Appreciate it ;)

Reply


(The comment has been removed)

ebony_srpnt January 24 2007, 09:59:55 UTC
The above code has to go in the S2 layers, and you can't use them as a free user.

Reply

foreignconcepts December 9 2007, 20:34:51 UTC
I have the same issue. I would like custom modules in the sidebat and a tag cloud as well, but none of the code i've tried that has been posted in this entry or the entry regarding getting tags into a QL layout works. Will they work on Plus accounts, or do we have to go to Paid?

Reply


Leave a comment

Up