Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00033 require_once "./include/inc.header.php";
00034 require_once "classes/class.ilForum.php";
00035
00036 $lng->loadLanguageModule("forum");
00037
00038 $ref_obj =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
00039 if($ref_obj->getType() == "frm")
00040 {
00041 $forumObj = new ilObjForum($_GET["ref_id"]);
00042 $frm =& $forumObj->Forum;
00043 $frm->setForumId($forumObj->getId());
00044 $frm->setForumRefId($forumObj->getRefId());
00045 }
00046 else
00047 {
00048 $frm =& new ilForum();
00049 }
00050
00051 $tpl->addBlockFile("CONTENT", "content", "tpl.forums_user_view.html");
00052 $tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00053 $tpl->addBlockFile("BUTTONS", "buttons", "tpl.buttons.html");
00054 $tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00055
00056
00057 require_once("classes/class.ilForumLocatorGUI.php");
00058 $frm_loc =& new ilForumLocatorGUI();
00059 $frm_loc->setRefId($_GET["ref_id"]);
00060 if ($ref_obj->getType() == "frm")
00061 {
00062 $frm_loc->setForum($frm);
00063 }
00064 if (!empty($_GET["thr_pk"]))
00065 {
00066 $frm->setWhereCondition("thr_pk = ".$_GET["thr_pk"]);
00067 $threadData = $frm->getOneThread();
00068 $frm_loc->setThread($_GET["thr_pk"], $threadData["thr_subject"]);
00069 }
00070 $frm_loc->showUser(true);
00071 $frm_loc->display();
00072
00073 require_once ("classes/class.ilObjUserGUI.php");
00074
00075 $_GET["obj_id"]=$_GET["user"];
00076 $user_gui = new ilObjUserGUI("",$_GET["user"], false, false);
00077
00078 $numPosts = $frm->countUserArticles($_GET["user"]);
00079 $add = array($lng->txt("forums_posts") => $numPosts);
00080 $user_gui->insertPublicProfile("USR_PROFILE","usr_profile", $add);
00081
00082
00083 infoPanel();
00084
00085
00086 if($_GET['backurl'])
00087 {
00088 $tpl->setCurrentBlock("btn_cell");
00089 $tpl->setVariable("BTN_LINK",urldecode($_GET["backurl"]));
00090 $tpl->setVariable("BTN_TXT", $lng->txt("back"));
00091 $tpl->parseCurrentBlock();
00092 }
00093
00094 if (!$rbacsystem->checkAccess("read", $_GET["ref_id"]))
00095 {
00096 $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
00097 }
00098
00099 $tpl->setVariable("TXT_PAGEHEADLINE", $lng->txt("userdata"));
00100
00101
00102 $author = $frm->getUser($_GET["user"]);
00103
00104 $tpl->setVariable("TPLPATH", $tpl->vars["TPLPATH"]);
00105
00106 $tpl->show();
00107 ?>