Added feature to log sums from profiling data to the DB
[lhc/web/wiklou.git] / includes / SkinFramed.php
1 <?
2 # See skin.doc
3
4 class SkinFramed extends Skin {
5
6 function useBodyTag()
7 {
8 global $frame;
9 return ( "set" != $frame );
10 }
11
12 function qbSetting() { return 0; }
13 function beforeContent() { return ""; }
14 function afterContent() { return ""; }
15 function qbLogo() { return ""; }
16 function isFramed() { return true; }
17
18 function getBaseTag()
19 {
20 global $wgServer, $wgScript;
21
22 $s = "<base href=\"{$wgServer}{$wgScript}\" target=\"_top\">\n";
23 return $s;
24 }
25
26 function getTopFrame()
27 {
28 $t = $this->pageTitleLinks();
29 $t = explode ( "<br>" , $t );
30 while ( count ( $t ) < 4 ) { array_push ( $t, "" ); }
31 $t = implode ( "<br>", $t );
32
33 $s = "";
34 $s .= "<table width='100%' border=0><tr height=152>\n";
35 $s .= "<td class='top' valign=top>" . $this->logoText() . "</td>\n";
36 $s .= "<td class='top'>&nbsp;&nbsp;</td>\n";
37 $s .= "<td class='top' valign=top width='100%'>\n";
38 $s .= $this->topLinks();
39 $s .= $t;
40
41 $s .= $this->pageTitle();
42 $s .= $this->pageSubtitle();
43
44 $s .= "</td>\n<td class='top' valign=top align=right width=200 nowrap>";
45 $s .= $this->nameAndLogin();
46 $s .= "\n<br>" . $this->searchForm() . "</td>";
47 $s .= "</tr></table>";
48 return $s;
49 }
50
51 function transformContent( $text )
52 {
53 global $frame, $HTTP_SERVER_VARS;
54 global $wgOut, $wgServer, $wgScript;
55
56 $qs = $HTTP_SERVER_VARS["QUERY_STRING"];
57 $qs = wfEscapeHTML( $qs );
58
59 if ( "" == $qs ) { $qs = "?frame="; }
60 else { $qs = "?{$qs}&amp;frame="; }
61 $url = "{$wgServer}{$wgScript}{$qs}";
62
63 if ( "set" == $frame ) {
64 $s = "<frameset rows='152,*' border=0>\n" .
65 "<frame marginwidth=0 marginheight=0 frameborder=1 " .
66 "src=\"{$url}top\" noresize scrolling=no>\n" .
67 "<frameset cols='152,*' border=0>\n" .
68 "<frame marginwidth=0 marginheight=0 frameborder=1 " .
69 "src=\"{$url}side\">\n" .
70 "<frame marginwidth=0 marginheight=0 frameborder=1 " .
71 "src=\"{$url}body\">\n" .
72 "</frameset>\n</frameset>\n";
73 } else if ( "top" == $frame ) {
74 $s = $this->getTopFrame();
75 } else if ( "side" == $frame ) {
76 $s = $this->quickBar();
77 # $s = spliti( "<hr>", $s, 2 );
78 # $s = $s[1] ;
79 } else if ( "body" == $frame ) {
80 $s = $text;
81 # Bottom links?
82 }
83 return $s;
84 }
85 }
86
87 ?>