From 6faba7480f02a248ba9d10c59c9a92f27aac48a1 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 4 Jul 2008 17:50:32 +0000 Subject: Refs #109: Default graphics set. Custom graphics must be in groups/{$GROUP_GUID}{$size}.jpg git-svn-id: https://code.elgg.org/elgg/trunk@1303 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/graphics/defaultlarge.jpg | Bin 0 -> 10840 bytes mod/groups/graphics/defaultmedium.jpg | Bin 0 -> 2517 bytes mod/groups/graphics/defaultsmall.jpg | Bin 0 -> 1117 bytes mod/groups/graphics/defaulttiny.jpg | Bin 0 -> 965 bytes mod/groups/graphics/icon.php | 43 +++++++++++++++++++++++++++++++ mod/groups/views/default/groups/icon.php | 2 +- 6 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 mod/groups/graphics/defaultlarge.jpg create mode 100644 mod/groups/graphics/defaultmedium.jpg create mode 100644 mod/groups/graphics/defaultsmall.jpg create mode 100644 mod/groups/graphics/defaulttiny.jpg create mode 100644 mod/groups/graphics/icon.php (limited to 'mod') diff --git a/mod/groups/graphics/defaultlarge.jpg b/mod/groups/graphics/defaultlarge.jpg new file mode 100644 index 000000000..8b7576c47 Binary files /dev/null and b/mod/groups/graphics/defaultlarge.jpg differ diff --git a/mod/groups/graphics/defaultmedium.jpg b/mod/groups/graphics/defaultmedium.jpg new file mode 100644 index 000000000..996efac47 Binary files /dev/null and b/mod/groups/graphics/defaultmedium.jpg differ diff --git a/mod/groups/graphics/defaultsmall.jpg b/mod/groups/graphics/defaultsmall.jpg new file mode 100644 index 000000000..3bda4a3c7 Binary files /dev/null and b/mod/groups/graphics/defaultsmall.jpg differ diff --git a/mod/groups/graphics/defaulttiny.jpg b/mod/groups/graphics/defaulttiny.jpg new file mode 100644 index 000000000..a83495ee6 Binary files /dev/null and b/mod/groups/graphics/defaulttiny.jpg differ diff --git a/mod/groups/graphics/icon.php b/mod/groups/graphics/icon.php new file mode 100644 index 000000000..cb44ad1b5 --- /dev/null +++ b/mod/groups/graphics/icon.php @@ -0,0 +1,43 @@ +owner_guid = $group->owner_guid; + $filehandler->setFilename("groups/" . $group->guid . $size . ".jpg"); + + $success = false; + if ($filehandler->open("read")) { + if ($contents = $filehandler->read($filehandler->size())) { + $success = true; + } + } + + if (!$success) { + $contents = @file_get_contents($CONFIG->pluginspath . "groups/graphics/default{$size}.jpg"); + } + + header("Content-type: image/jpeg"); + header("Pragma: public"); + header("Cache-Control: public"); + echo $contents; +?> \ No newline at end of file diff --git a/mod/groups/views/default/groups/icon.php b/mod/groups/views/default/groups/icon.php index 26c6b622d..5e8729942 100644 --- a/mod/groups/views/default/groups/icon.php +++ b/mod/groups/views/default/groups/icon.php @@ -36,5 +36,5 @@ ?>
- title="" /> + title="" />
\ No newline at end of file -- cgit v1.2.3