| 195 | | |
|---|
| 196 | | <element id="4f4cfd5e84e49950a70cf6585cce7dcd" changed="20050804193526"> |
|---|
| | 195 | <element id="1faadab39aa15b73e0a31aa13df15fc8" changed="20050804195925"> |
|---|
| | 196 | <value><![CDATA["default" => array ( |
|---|
| | 197 | |
|---|
| | 198 | "name" => "default", |
|---|
| | 199 | "description" => "Kubrick layout configuration", |
|---|
| | 200 | "fields" => array ( |
|---|
| | 201 | "header_background" => array ( |
|---|
| | 202 | "description" => "Header background image", |
|---|
| | 203 | "helptext" => "Big image, at minimum 760 pixels wide", |
|---|
| | 204 | "datatype" => "image", |
|---|
| | 205 | "location" => "attachment", |
|---|
| | 206 | "widget_image_simple" => true, |
|---|
| | 207 | "datatype_image_thumbwidth" => 760, |
|---|
| | 208 | "datatype_image_thumbheight" => 4000, // Don't limit this so width will rule |
|---|
| | 209 | "start_fieldgroup" => array(), |
|---|
| | 210 | "end_fieldgroup" => "", |
|---|
| | 211 | ), |
|---|
| | 212 | ), |
|---|
| | 213 | ),]]></value> |
|---|
| | 214 | <style>9f78a8384a425feb0cfb22d9461f5a71</style> |
|---|
| | 215 | <name><![CDATA[__schema]]></name> |
|---|
| | 216 | </element> |
|---|
| | 217 | |
|---|
| | 218 | <element id="4f4cfd5e84e49950a70cf6585cce7dcd" changed="20050804200318"> |
|---|
| 239 | | |
|---|
| 240 | | /* To ease the insertion of a personal header image, I have done it in such a way, |
|---|
| 241 | | that you simply drop in an image called 'personalheader.jpg' into your /images/ |
|---|
| 242 | | directory. Dimensions should be at least 760px x 200px. Anything above that will |
|---|
| 243 | | get cropped off of the image. */ |
|---|
| 244 | | |
|---|
| 245 | | /*#headerimg { background: url('&(midcom_site["uri"]);/images/personalheader.jpg') no-repeat top;}*/ |
|---|
| | 261 | <?php |
|---|
| | 262 | // Check if user has defined other settings |
|---|
| | 263 | $style = mgd_get_style($_MIDGARD["style"]); |
|---|
| | 264 | if ($style) |
|---|
| | 265 | { |
|---|
| | 266 | // Customize header |
|---|
| | 267 | $atts = $style->listattachments(); |
|---|
| | 268 | if ($atts) |
|---|
| | 269 | { |
|---|
| | 270 | while ($atts->fetch()) |
|---|
| | 271 | { |
|---|
| | 272 | if ($atts->parameter("midcom.helper.datamanager.datatype.blob","fieldname") == "header_background") |
|---|
| | 273 | { |
|---|
| | 274 | $guid = $atts->guid(); |
|---|
| | 275 | |
|---|
| | 276 | // Use thumbnail instead if available |
|---|
| | 277 | $thumbguid = $atts->parameter("midcom.helper.datamanager.datatype.image","thumbguid"); |
|---|
| | 278 | if ($thumbguid) { |
|---|
| | 279 | $guid = $thumbguid; |
|---|
| | 280 | } |
|---|
| | 281 | |
|---|
| | 282 | echo "#headerimg { background: url('{$GLOBALS['midcom_site']['uri']}midcom-serveattachmentguid-{$guid}/{$atts->name}'); }"; |
|---|
| | 283 | break; |
|---|
| | 284 | } |
|---|
| | 285 | } |
|---|
| | 286 | } |
|---|
| | 287 | } |
|---|
| | 288 | ?> |
|---|