($remote); } if ($disabled) { $body = 'Sorry, the portal is disabled at this time.'; return; } my $remote = LJ::get_remote; # browser caching causes lots of issues $head = ''; if (!$remote) { $body = "Sorry, you must be logged in and have cookies enabled to use your modules."; return; } # include the default style: LJ::need_res('stc/portal/MainStyle.css'); # javascript crap LJ::need_res('js/x/x_core.js'); LJ::need_res('js/x/x_dom.js'); LJ::need_res('js/portal.js'); LJ::need_res('js/x/x_event.js'); LJ::need_res('js/commentmanage.js'); LJ::need_res('js/dom.js'); LJ::need_res('js/core.js'); LJ::need_res('js/hourglass.js'); # get the current scheme and load the correct style my $scheme = BML::get_scheme(); if ($scheme eq 'dystopia' && -e "$LJ::HOME/htdocs/stc/portal/Dystopia.css") { LJ::need_res('stc/portal/Dystopia.css'); } elsif (-e "$LJ::HOME/htdocs/stc/portal/XColibur.css") { LJ::need_res('stc/portal/XColibur.css'); } #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # this is the url to do XML HTTP posts to my $selflink = $LJ::SITEROOT . BML::get_uri(); $selflink =~ s/\?.*//; # fading special effects? my $doFadeDefault = 1; my $doFade = $LJ::DISABLED{'portal_fade'} ? 0 : $doFadeDefault; # parameters for portal.js $head .= qq{ }; my $portalconfig = LJ::Portal::Config->new($remote); return unless $portalconfig; my $boxes = $portalconfig->get_boxes; unless (scalar keys %$boxes) { $body = 'You have no modules defined.'; return; } $body .= ''; foreach my $pboxid (keys %$boxes) { my $box = $boxes->{$pboxid}; my $classname = $box->box_class || ''; $body .= qq { }; } $body .= '
} . $box->generate_content . qq {
Module Link
ig
'; return; } #_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- return; _code?>