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/icon.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 mod/groups/graphics/icon.php (limited to 'mod/groups/graphics/icon.php') 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 -- cgit v1.2.3