From 4e8b886e21a893d83ffcf8c2924e318bea5b6e2c Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 16 Sep 2018 16:34:19 -0400 Subject: Add object background preview widget Similar to objHeadCircle() but for displaying a bg img on page, rather than as the actual background. --- app/model/objBgPrev.php | 40 ++++++++++++++++++++++++++++++++++++++++ app/view/datalsts.php | 6 ++++++ 2 files changed, 46 insertions(+) create mode 100644 app/model/objBgPrev.php diff --git a/app/model/objBgPrev.php b/app/model/objBgPrev.php new file mode 100644 index 0000000..f8d024a --- /dev/null +++ b/app/model/objBgPrev.php @@ -0,0 +1,40 @@ +getBgImg(); + +if ($src == NULL) + $src = ar() . "/static/img/null.jpg"; + +switch ($obj->objtype) +{ + case "user": + case "group": + $alt = $obj->getDisplayName() . " background"; + break; + + default: + $alt = $obj->name . " background"; + break; +} + +?> diff --git a/app/view/datalsts.php b/app/view/datalsts.php index 82a0f1f..16df7d7 100644 --- a/app/view/datalsts.php +++ b/app/view/datalsts.php @@ -22,6 +22,12 @@ require_once "class/obj.class.php"; <?=$alt?> + + + + + <?=$alt?> + -- cgit v1.2.3