Apache-SetWWWTheme

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	  to send out un-themed pages without subverting
	  the entire theming process.

1.05  Tues Mar 21 19:01:11 2000
	- fixed "printable" generation so that it 
          uses GET methods rather than the ridiculous
	  virtual directory method I had cooked up
	  in 1.04.  :) 

1.06  Thurs Mar 23 22:02:42 2000
    - added support for escaped semi-colons in directives
      (eg @MORELINKSTITLE=More Links\;; goes to "More Links;"
      This was added at the request of the JAC for embedding 
      Javascript.  Use it wisely.  Note that the escaping is
      simple-minded..... You can't escape escapes, for example.
    - added support for @SIDEBARWIDTH directive.  The sidebar
      width was previously set to 150 pixels.
    - added support for @NOSIDEBAREXTRAS directive.  This turns
      off all but the @SIDEBARMENULINKS (ie no search box,
      stuff like that).   

SetWWWTheme.pm  view on Meta::CPAN

	  "All Rights Reserved.\n" .
	  "Apache::SetWWWTheme is free software, licensed under the GNU General\n" .
	  "Public License as published by the Free Software Foundation.  Please\n" .
	  "see the source code for details.\n" .
          "-->\n";

	$newbody = $copyrightnotice . $newbody;

	if ($topbar)                                    # if we have a top links bar, we'll put it in
	  {
	    # first, we'll clean up the vars and remove all escapes before semicolons.
	    
	    my $marker;
	    for ($marker = 0; $marker <= $#topbottomlinks; $marker++)
	      {
		$topbottomlinks[$marker] =~ s/\\;/;/;
	      }
	    
	    # now that our vars are clean, we'll use them.

	    $Theme->SetTopBottomLinks(\@topbottomlinks) if (@topbottomlinks);
	    $newbody .= $Theme->MakeTopBottomBar();
	  }

	if ($usenavbar)                                      # This puts the top/bottom nav bars into the
	  {                                                  # newly-created HTML
	    # first we have to remove the escapes from our strings.

	    $nextlink =~ s/\\;/;/g;
	    $lastlink =~ s/\\;/;/g;
            $uplink   =~ s/\\;/;/g;

            # now we'll do our stuff.

	    $Theme->SetNextLink($nextlink) if $nextlink;
	    $Theme->SetLastLink($lastlink) if $lastlink;
	    $Theme->SetUpLink($uplink)     if $uplink;

SetWWWTheme.pm  view on Meta::CPAN

    $searchtemplate  =~ s/\\;/;/g;
   
    for ($marker = 0; $marker <= $#sidebarmenulinks; $marker++)
      {
	$sidebarmenulinks[$marker] =~ s/\\;/;/g;
      }

    $sidebarmenutitle =~ s/\\;/;/g;
    $morelinkstitle   =~ s/\\;/;/g;

    # Ok, now we have cleaned up all the escaped semicolons.  It's time to feed these to
    # our module and have fun.


    $Theme->SetBGColor($BGCOLOR)                    if ($BGCOLOR);
    $Theme->SetBGPicture($bgpicture)                if ($bgpicture);
    $Theme->SetALink($alink)                        if ($alink);
    $Theme->SetLink($link)                          if ($link);
    $Theme->SetText($text)                          if ($text);
    $Theme->SetVLink($vlink)                        if ($vlink);

SetWWWTheme.pm  view on Meta::CPAN

within a comment tag in an HTML file, as long as this tag appears before the
<BODY> tag. Directives that are explicitly set override the local
configuration and/or server settings (if allowed). Otherwise, the local
settings and the server settings persist.

=item Module directives

Directives consist of a series of tags within a text file, or within an html
comment block before the <BODY> tag. Valid directive tags are always
terminated with a semicolon. For tags that accept lists as values, elements
are separated by commas.  Semicolons may be escaped within a tag.  Any 
semicolon preceded by a backslash will be considered text, and will not terminate
the directive.  The final text will have the escaped semicolon replaced with
a bare semicolon.  

 @DIRECTIVE=Some string of text\; semicolons are escaped.;

The above directive would set a value of "Some string of text; semicolons 
are escaped."

=item @ALINK

HTML and local configuration subject to server configuration
This tag is used to set the HTML BODY setting "alink". This is the
active link color. It is subject to the setting of the @ALLOWBODYMOD
tag. If @ALLOWBODYMOD is set to a non-zero value, @ALINK will set this
attribute in the page. Here is an example:

 @ALINK=#FF00FF;



( run in 0.358 second using v1.01-cache-2.11-cpan-c21f80fb71c )