CssWork: Difference between revisions

From SoylentNews
Jump to navigation Jump to search
No edit summary
No edit summary
Line 122: Line 122:
(EOF)
(EOF)


</pre>
<h2>Slash.pm</h2>
in /usr/local/lib64/perl5/
<pre>
in root@mike2 perl5 # grep '^sub' Slash.pm
sub dispStory {
sub displayStory {
sub displayRelatedStories {
sub getOlderStories {
sub getOlderDays {
sub getOlderDaysFromDay {
sub getData {
sub _dataCacheRefresh {
</pre>
</pre>

Revision as of 03:00, 19 February 2014

This is a title

The is an index for css discoveries, etc. Testing idea... Brought to you by the Frontend Team.


test


Order css files are loaded when simple switch on user prefs page is selected viewing main page main page

  • base.css?T_2_5_0_272
  • slashcode.css?T_2_5__0_272
  • slashcode_lite.css?T_2_5__0_272
  • slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)
  • print.cssT_2_5__0_272

Follow a page link from the main page to an individual article page

article.pl

The stuff of interest to us


use Slash;  -------- located in /local/lib64/perl5/slash.pm
use Slash::Display;     
use Slash::Utility;

sub main {
        my $slashdb   = getCurrentDB();
        my $constants = getCurrentStatic();
        my $user      = getCurrentUser();
        my $form      = getCurrentForm();
        my $gSkin     = getCurrentSkin();
         
        my $story;
        my $reader = getObject('Slash::DB', { db_type => 'reader' });

                # Make sure the reader is viewing this story in the
                # proper skin.
                my $cur_skid = determineCurrentSkin();
                if ($story->{primaryskid} != $cur_skid) {
                        my $cur_skin = $reader->getSkin($cur_skid);
                        my $story_skin = $reader->getSkin($story->{primaryskid});
                        if ($story_skin && $story_skin->{rootdir}
                                && $story_skin->{rootdir} ne $cur_skin->{rootdir})$
                                redirect("$story_skin->{rootdir}$ENV{REQUEST_URI}"$
                                return;

               # XXXSECTIONTOPICS this needs to be updated
                my $SECT = $reader->getSection($story->{section});
                # This should be a getData call for title
                my $title = "$constants->{sitename} | $story->{title}";
                if ($gSkin->{name} && $gSkin->{name} eq "idle") {
                        $title = "$gSkin->{hostname} | $story->{title}";
                
if (my $pollbooth_db = getObject('Slash::PollBooth')) {


slashDisplay('display', {
                        poll                    => $pollbooth,
                        section                 => $SECT,
                        section_block           => $reader->getBlock($SECT->{secti$
                        show_poll               => $pollbooth ? 1 : 0,
                        story                   => $story,
                        stories                 => \%stories,
                });


               my $called_pc = 0;
                if ($story->{discussion}) {
                        # Still not happy with this logic -Brian
                        my $discussion = $reader->getDiscussion($story->{discussio$

                        }
                        # If no comments ever have existed and commentstatus is di$
                        # just skip the display of the comment header bar -Brian

                               &&  $discussion->{commentstatus} eq 'disabled'
                        )) {
                                printComments($discussion);
                                $called_pc = 1;
                        }
                 if (!$called_pc && $form->{ssi} && $form->{ssi} eq 'yes' && $form-$
                        # This is a real hack, we're kind of skipping down
                        # two levels of code.  But the cchp printing is an
                        # important optimization;  we avoid having to do
                        # multiple expensive comment selects.  One problem
                        # is that if there's no discussion with a story,
                        # printComments() doesn't get called, which means
                        # selectComments() doesn't get called, which means
                        # the cchp file won't be written.  If article.pl
                       # is being called by slashd, and we need to write
                        # that file, then here's where we print an empty
                        # file that will satisfy slashd. - Jamie

                        Slash::Utility::Comments::_print_cchp({ stoid => "dummy" }$
                }
        } else {
                header('Error', $form->{section}) or return;
       
       my $plugins = $slashdb->getDescriptions('plugins');
        if (!$user->{is_anon} && $plugins->{Tags} && $story) {
                my $tagsdb = getObject('Slash::Tags');
                $tagsdb->markViewed($user->{uid},
                        $reader->getGlobjidCreate('stories', $story->{stoid}));
        }
                        
        footer();
        if ($story) {
                writeLog($story->{sid} || $sid);
        } else { 
                writeLog($sid);

               
createEnvironment();
main();  
1; 

(EOF)


Slash.pm

in /usr/local/lib64/perl5/

in root@mike2 perl5 # grep '^sub' Slash.pm 
sub dispStory {
sub displayStory {
sub displayRelatedStories {
sub getOlderStories {
sub getOlderDays {
sub getOlderDaysFromDay {
sub getData {
sub _dataCacheRefresh {