Apache-SetWWWTheme

 view release on metacpan or  search on metacpan

SetWWWTheme.pm  view on Meta::CPAN

	$r->log_error("Couldn't open $filename for reading: $!");
	return SERVER_ERROR;
      }
    
    $r->register_cleanup(sub {close $fh});        # register a cleanup for the filehandle

    local $/ = undef;                             # Read in the whole schmear at once.

    while (<$fh>)                                 # I suppose this while isn't necessary.
      {
	# this block looks through the HTML to find our comment block that contains directives
	# for controlling the "Look and Feel" of the pages. 
	
	(/\@NAVBAR\s*=\s*(.*?[^\\]);/)    && ($usenavbar = $1);
	(/\@TOPBAR\s*=\s*(.*?[^\\]);/)    && ($topbar = $1);
	(/\@BOTTOMBAR\s*=\s*(.*?[^\\]);/) && ($bottombar = $1);

	# this is the part where we let the HTML override the server-set defaults
	# A few things we may or may not be able to change (like the BGCOLOR)

	( /\@NEXTLINK\s*?=\s*?(.*?[^\\]);/s )        && ($nextlink  = $1);

SetWWWTheme.pm  view on Meta::CPAN

#############################################################################  
# this constructs the side nav bar.  First we set the settings appropriately,
# then we grab a sidebar from it.  We use the JAC::Theme module to make a body
# given all of these settings.  We set them all manually according to the settings
# that we've collected from the server, the file, and the HTML.  

sub MakeBody
  {
    
    # First, we have to clean up the variables.  Since we've started escaping out
    # semicolons, we'll have to replace everything that looks like \; with ;

    $BGCOLOR      =~ s/\\;/;/g;
    $bgpicture    =~ s/\\;/;/g;
    $alink        =~ s/\\;/;/g;
    $link         =~ s/\\;/;/g;
    $text         =~ s/\\;/;/g;
    $vlink        =~ s/\\;/;/g;
    $sidebarcolor =~ s/\\;/;/g;
    $sidebarwidth =~ s/\\;/;/g;
    $blankgif     =~ s/\\;/;/g;

SetWWWTheme.pm  view on Meta::CPAN

This tag is used to set the HTML BODY setting "link". This is the
normal link color. It is subject to the setting of the @ALLOWBODYMOD
tag. If @ALLOWBODYMOD is set to a non-zero value, @LINK will set this
attribute in the page. Here is an example:

 @LINK=#FFFFFF;

=item @LOCALCONFIGFILE

Valid only in server configuration.  This directive tells the module what
file to look for when it looks for local configuration files.  The default is
LookAndFeelConfig.  It may be set to any valid filename.

 @LOCALCONFIGFILE=LOOKANDFEEL;

=item @MORELINKSTITLE

Valid in HTML, local configuration, and server configuration, subject
to the server's configuration (@ALLOWSIDEBARMOD must be on in the server's
configuration in order for local and HTML directives to be obeyed).  



( run in 0.440 second using v1.01-cache-2.11-cpan-64827b87656 )