From 8df88145aa6f0fef6aff752d4ca31c9ca5bc7940 Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Sat, 17 Apr 2021 23:45:04 +0200 Subject: [PATCH] Added community icon zone object printing class --- .../communityzoneicon/communityzoneicon.php | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 lib/object_printing/communityzoneicon/communityzoneicon.php diff --git a/lib/object_printing/communityzoneicon/communityzoneicon.php b/lib/object_printing/communityzoneicon/communityzoneicon.php new file mode 100755 index 0000000..5f6ab11 --- /dev/null +++ b/lib/object_printing/communityzoneicon/communityzoneicon.php @@ -0,0 +1,83 @@ + +* @copyright Copyright © 2015, Comendatore.net +* @since 2009/05/14 +* @version 0.3 +* @link www.comendatore.net +* @package object_printing +* @subpackage CommunityZoneIcon +*/ + +if ( !defined('SYSTEM_IN') ) +{ + die("Hacking attempt"); +} + +/** +* Classe CommunityZoneIcon +*

Cette classe permet la recuperation des CommunityZoneIcon

+* @package object_printing +* @subpackage CommunityZoneIcon +*/ + +class CommunityZoneIcon extends Printing +{ + // + // Constructor + // +/** +* Constructeur de la classe CommunityZoneIcon +* @access public +*/ + function CommunityZoneIcon() + { + $this->__construct(); + } + + function __construct() + { + parent::__construct("1.0", "Rooty", "Bloc d'affichage de l'icone de communauté"); + } + +/** +* Remplace dans la template principale +* @access public +*/ + function __print() + { + global $SERVER_NAME, $SCRIPT_NAME, $CONF_AUTH_SECURE; + + $MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/communityzoneicon/communityzoneicon.mxt"); + $MaTemplate->SetModeliXe(true); + + /* recuperation de l'icone de la communauté */ + if (file_exists($GLOBALS['CONF_DATA_PATH']."data/image/communities/".recupCommunity()."_logo.svg")) + { + $imgCommunity=$GLOBALS['CONF_DATA_PATH']."data/image/communities/".recupCommunity()."_logo.svg"; + }else{ + $imgCommunity=$GLOBALS['CONF_DATA_PATH']."data/image/communities/3_logo.svg"; + } + + $MaTemplate->MxImage("imageCommunity", $imgCommunity); + + $data=$MaTemplate->MxWrite(); + + $GLOBALS["SYSTEM_TEMPLATE"]->MxText("communityzoneicon", $data); // Et voila!!!!! + return true; + } +} +?>