1- <?
2-
3- class Curated
4- {
1+ <?
2+
3+ class Curated
4+ {
55 var $ name ;
66 var $ by ;
7+
78 var $ scroll ;
9+
810 var $ resize ;
11+
912 var $ width ;
13+
1014 var $ height ;
15+
1116 var $ image ;
17+
1218 var $ description ;
19+
1320 var $ location ;
14- var $ links = array ();
15-
16- function Curated ($ xml )
17- {
21+
22+ var $ links = array ();
23+
24+ function Curated ($ xml )
25+ {
1826 $ this ->name = getAttribute ($ xml , 'name ' );
1927 $ this ->by = getAttribute ($ xml , 'by ' );
28+
2029 $ this ->scroll = getAttribute ($ xml , 'scroll ' );
30+
2131 $ this ->resize = getAttribute ($ xml , 'resize ' );
32+
2233 $ this ->width = getAttribute ($ xml , 'width ' );
23- $ this ->height = getAttribute ($ xml , 'height ' );
24-
25- $ this ->image = getValue ($ xml , 'image ' );
26- $ this ->description = innerHTML ($ xml , 'description ' );
27- $ this ->location = getValue ($ xml , 'location ' );
28-
34+
35+ $ this ->height = getAttribute ($ xml , 'height ' );
36+
37+ $ this ->image = getValue ($ xml , 'image ' );
38+ $ this ->description = innerHTML ($ xml , 'description ' );
39+ $ this ->location = getValue ($ xml , 'location ' );
40+
2941 $ links = $ xml ->getElementsByTagName ('link ' );
42+
3043 $ links = $ links ->toArray ();
44+
3145 foreach ($ links as $ link ) {
46+
3247 $ this ->links [] = array ('href ' => $ link ->getAttribute ('href ' ), 'title ' => $ link ->getText ());
33- }
34- }
35-
36- function display ()
48+
49+ }
50+ }
51+
52+ function display ()
3753 {
38- $ html = $ this ->display_piece ();
39- $ html .= "\t<p> {$ this ->description }</p><p>Links: \n" ;
54+ $ html = $ this ->display_piece ();
55+ $ html .= "\t<p> {$ this ->description }</p><p>Links: \n" ;
4056 $ linkcount = count ($ links );
4157 $ ii = 0 ;
42- foreach ($ this ->links as $ link ) {
58+ foreach ($ this ->links as $ link ) {
4359 if ($ ii > 0 ) {
4460 $ html .= sprintf (", " );
4561 }
46- $ html .= sprintf ("<a href= \"%s \">%s</a> " , $ link ['href ' ], $ link ['title ' ]);
62+ $ html .= sprintf ("<a href= \"%s \">%s</a> " , $ link ['href ' ], $ link ['title ' ]);
4763 $ ii ++;
48- }
49- $ html .= "</p></div> \n\n" ;
50- return $ html ;
64+ }
65+ $ html .= "</p></div> \n\n" ;
66+ return $ html ;
5167 }
5268
69+
70+
5371 function display_short ()
5472 {
55- $ html = $ this ->display_piece ();
56- $ html .= "</div> \n\n" ;
73+
74+ $ html = $ this ->display_piece ();
75+
76+ $ html .= "</div> \n\n" ;
5777 return $ html ;
58- }
5978
60- function display_piece ()
61- {
79+ }
80+
81+ function display_piece ()
82+ {
6283 //$link = sprintf("<a href=\"%s\" onclick=\"javascript:MM_openBrWindow(this.href,'%s','menubar=yes,location=yes,
84+
6385 // status=yes,scrollbars=%s,resizable=%s,width=%d,height=%d');return false;\">",
86+
6487 // $this->location, $this->name, $this->scroll, $this->resize, $this->width, $this->height);
65- $ link = sprintf ("<a href= \"%s \" onclick= \"javascript:MM_openBrWindow(this.href,'%s',''toolbar=yes,
66- status=yes,
67- scrollbars=yes,
68- menubar=yes,
69- location=yes,
70- status=yes,
71- resizable=yes,
72- width=%d,height=%d');return false; \"> " ,
73- $ this ->location , $ this ->name , $ this ->width , $ this ->height );
74-
75- $ html = "<div class= \"curated-item \"> \n" ;
76- $ html .= "\t$ link<img src= \"/exhibition/ {$ this ->image }\" width= \"223 \" height= \"72 \" alt= \"preview image \" title= \"{$ this ->name } by {$ this ->by }\" /></a> \n" ;
77- $ html .= "\t<p><br /> $ link {$ this ->name }</a><br /> \n" ;
78- $ html .= "\tby {$ this ->by }</p> \n" ;
79- return $ html ;
80- }
81- }
82-
88+
89+
90+ // Removed window open link 20 Sep 2011 --CR
91+ //$link = sprintf("<a href=\"%s\" onclick=\"javascript:MM_openBrWindow(this.href,'%s',''toolbar=yes,
92+
93+ //status=yes,
94+
95+ //scrollbars=yes,
96+
97+ //menubar=yes,
98+
99+ //location=yes,
100+
101+ //status=yes,
102+
103+ //resizable=yes,
104+
105+ //width=%d,height=%d');return false;\">",
106+
107+ //$this->location, $this->name, $this->width, $this->height);
108+
109+
110+ $ link = sprintf ("<a href= \"%s \"> " ,
111+
112+ $ this ->location , $ this ->name , $ this ->width , $ this ->height );
113+ $ html = "<div class= \"curated-item \"> \n" ;
114+ $ html .= "\t$ link<img src= \"/exhibition/ {$ this ->image }\" width= \"223 \" height= \"72 \" alt= \"preview image \" title= \"{$ this ->name } by {$ this ->by }\" /></a> \n" ;
115+ $ html .= "\t<p> $ link {$ this ->name }</a><br /> \n" ;
116+ $ html .= "\tby {$ this ->by }</p> \n" ;
117+ return $ html ;
118+ }
119+ }
120+
83121?>
0 commit comments