ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCInteractiveImageGUI Class Reference

User interface class for interactive images. More...

+ Inheritance diagram for ilPCInteractiveImageGUI:
+ Collaboration diagram for ilPCInteractiveImageGUI:

Public Member Functions

 __construct ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
executeCommand ()
 execute command
 getTabs (&$tab_gui, $a_create=false, $a_change_obj_ref=false)
 Add tabs to ilTabsGUI object.
 insert ($a_post_cmd="edpost", $a_submit_cmd="create_mob", $a_input_error=false)
 Insert new media object form.
 edit ()
 Edit.
 editBaseImage ($a_form=null)
 Edit base image.
 initForm ($a_mode="edit")
 Init creation/base image form.
 create ()
 Create new content element.
 update ()
 Update (base image)
 centerAlign ()
 Align media object to center.
 leftAlign ()
 align media object to left
 rightAlign ()
 align media object to right
 leftFloatAlign ()
 align media object to left, floating text
 rightFloatAlign ()
 align media object to right, floating text
 listOverlayImages ()
 List overlay images.
 addOverlayImages ($a_form=null)
 Add overlay images.
 initAddOverlaysForm ()
 Init add overlays form.
 uploadOverlayImages ()
 Upload overlay images.
 confirmDeleteOverlays ()
 Confirm overlay deletion.
 deleteOverlays ()
 Delete overlays.
 listContentPopups ()
 List content popups.
 addPopup ()
 Add popup.
 savePopups ()
 Save popups.
 confirmPopupDeletion ()
 Confirm popup deletion.
 deletePopups ()
 Delete popups.
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public.
 setStyleId ($a_styleid)
 Set Style Id.
 getStyleId ()
 Get Style Id.
 setEnableInternalLinks ($a_val)
 Set enable internal links.
 getEnableInternalLinks ()
 Get enable internal links.
 setEnableKeywords ($a_val)
 Set enable keywords handling.
 getEnableKeywords ()
 Get enable keywords handling.
 setEnableAnchors ($a_val)
 Set enable anchors.
 getEnableAnchors ()
 Get enable anchors.
 getStyle ()
 Get style object.
 setCharacteristics ($a_chars)
 Set Characteristics.
 getCharacteristics ()
 Get characteristics.
 getHierId ()
 get hierarchical id in dom object
 setHierId ($a_hier_id)
 get hierarchical id in dom object
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl.
 delete ()
 delete content element
 moveAfter ()
 move content element after another element
 moveBefore ()
 move content element before another element
 splitPage ()
 split page to new page at specified position
 splitPageNext ()
 split page to next page at specified position
 displayValidationError ()
 display validation errors
 cancelCreate ()
 cancel creating page content
 cancelUpdate ()
 cancel update
 cancel ()
 Cancel.
 deactivate ()
 gui function set enabled if is not enabled and vice versa
 cut ()
 Cut single element.
 copy ()
 Copy single element.
 getTemplateOptions ($a_type)
 Get table templates.

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons.
- Data Fields inherited from ilPageContentGUI
 $content_obj
 $ilias
 $tpl
 $lng
 $ctrl
 $pg_obj
 $hier_id
 $dom
 $updated
 $target_script
 $return_location
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style.
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons

Detailed Description

User interface class for interactive images.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilPCInteractiveImageGUI: ilPCIIMTriggerEditorGUI

Definition at line 19 of file class.ilPCInteractiveImageGUI.php.

Constructor & Destructor Documentation

ilPCInteractiveImageGUI::__construct (   $a_pg_obj,
  $a_content_obj,
  $a_hier_id = 0,
  $a_pc_id = "" 
)

Definition at line 21 of file class.ilPCInteractiveImageGUI.php.

References ilPageContentGUI\ilPageContentGUI().

{
parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
}

+ Here is the call graph for this function:

Member Function Documentation

ilPCInteractiveImageGUI::addOverlayImages (   $a_form = null)

Add overlay images.

Definition at line 416 of file class.ilPCInteractiveImageGUI.php.

References ilPageContentGUI\$tpl, and initAddOverlaysForm().

Referenced by uploadOverlayImages().

{
global $tpl;
if ($a_form)
{
$form = $a_form;
}
else
{
$form = $this->initAddOverlaysForm();
}
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImageGUI::addPopup ( )

Add popup.

Parameters
@return

Definition at line 587 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
$this->content_obj->addContentPopup();
$this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "listContentPopups");
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::centerAlign ( )

Align media object to center.

Definition at line 329 of file class.ilPCInteractiveImageGUI.php.

References $_SESSION, ilPageContentGUI\getHierId(), and ilMediaAliasItem\setHorizontalAlign().

{
$std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setHorizontalAlign("Center");
$_SESSION["il_pg_error"] = $this->pg_obj->update();
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::confirmDeleteOverlays ( )

Confirm overlay deletion.

Definition at line 506 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $d, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, and ilUtil\sendFailure().

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$ilTabs->setTabActive("list_overlays");
if (!is_array($_POST["file"]) || count($_POST["file"]) == 0)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "listOverlayImages");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("cont_really_delete_overlays"));
$cgui->setCancel($lng->txt("cancel"), "listOverlayImages");
$cgui->setConfirm($lng->txt("delete"), "deleteOverlays");
foreach ($_POST["file"] as $i => $d)
{
$cgui->addItem("file[]", $i, $i);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::confirmPopupDeletion ( )

Confirm popup deletion.

Definition at line 617 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $d, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, and ilUtil\sendFailure().

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$ilTabs->setTabActive("content_popups");
if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "listContentPopups");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("cont_really_delete_popups"));
$cgui->setCancel($lng->txt("cancel"), "listContentPopups");
$cgui->setConfirm($lng->txt("delete"), "deletePopups");
foreach ($_POST["tid"] as $i => $d)
{
$cgui->addItem("tid[]", $i, $_POST["title"][$i]);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::create ( )

Create new content element.

Definition at line 233 of file class.ilPCInteractiveImageGUI.php.

References $file, $ilCtrl, ilPageContentGUI\$lng, $location, ilObjMediaObject\_getDirectory(), ilObjMediaObject\getMimeType(), insert(), ilUtil\moveUploadedFile(), ilUtil\renameExecutables(), ilUtil\sendSuccess(), and ilPageContentGUI\setHierId().

{
global $ilCtrl, $lng;
$this->content_obj = new ilPCInteractiveImage($this->dom);
$this->content_obj->createMediaObject();
$media_obj = $this->content_obj->getMediaObject();
$media_obj->setTitle($_FILES['image_file']['name']);
$media_obj->create();
$mob_dir = ilObjMediaObject::_getDirectory($media_obj->getId());
// $media_obj->setStandardType("File");
$media_obj->createDirectory();
$media_item = new ilMediaItem();
$media_obj->addMediaItem($media_item);
$media_item->setPurpose("Standard");
$file = $mob_dir."/".$_FILES['image_file']['name'];
ilUtil::moveUploadedFile($_FILES['image_file']['tmp_name'],
$_FILES['image_file']['name'], $file);
// get mime type
$location = $_FILES['image_file']['name'];
// set real meta and object data
$media_item->setFormat($format);
$media_item->setLocation($location);
$media_item->setLocationType("LocalFile");
$media_obj->update();
$this->content_obj->createAlias($this->pg_obj, $this->hier_id, $this->pc_id);
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->pg_obj->stripHierIDs();
$this->pg_obj->addHierIDs();
$ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
$ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
$this->content_obj->setHierId($this->content_obj->readHierId());
$this->setHierId($this->content_obj->readHierId());
$this->content_obj->setPCId($this->content_obj->readPCId());
ilUtil::sendSuccess($lng->txt("cont_saved_interactive_image"), true);
$this->ctrl->redirectByClass("ilpcinteractiveimagegui", "edit");
//$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
else
{
$this->insert();
}
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::deleteOverlays ( )

Delete overlays.

Definition at line 538 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $ilCtrl, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $ilCtrl, $lng;
if (is_array($_POST["file"]) && count($_POST["file"]) != 0)
{
foreach ($_POST["file"] as $f)
{
$f = str_replace("..", "", ilUtil::stripSlashes($f));
$this->content_obj->getMediaObject()
->removeAdditionalFile("overlays/".$f);
}
ilUtil::sendSuccess($lng->txt("cont_overlays_have_been_deleted"), true);
}
$ilCtrl->redirect($this, "listOverlayImages");
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::deletePopups ( )

Delete popups.

Parameters
@return

Definition at line 652 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $ilCtrl, ilPageContentGUI\$lng, and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
if (is_array($_POST["tid"]) && count($_POST["tid"]) != 0)
{
foreach ($_POST["tid"] as $id)
{
$id = explode(":", $id);
$this->content_obj->deletePopup($id[0], $id[1]);
}
$this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("cont_popups_have_been_deleted"), true);
}
$ilCtrl->redirect($this, "listContentPopups");
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::edit ( )

Edit.

Definition at line 152 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, and ilPageContentGUI\$tpl.

{
global $tpl, $ilCtrl;
$ilCtrl->redirectByClass(array("ilpcinteractiveimagegui", "ilpciimtriggereditorgui"), "editMapAreas");
//$tpl->setContent("hh");
}
ilPCInteractiveImageGUI::editBaseImage (   $a_form = null)

Edit base image.

Parameters
@return

Definition at line 166 of file class.ilPCInteractiveImageGUI.php.

References ilPageContentGUI\$lng, ilPageContentGUI\$tpl, and initForm().

{
global $tpl, $ilTabs, $lng;
$ilTabs->activateTab("edit_base_image");
$form = $this->initForm();
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

& ilPCInteractiveImageGUI::executeCommand ( )

execute command

Definition at line 29 of file class.ilPCInteractiveImageGUI.php.

References $cmd, ilPageContentGUI\$lng, $ret, ilPageContentGUI\$tpl, ilUtil\getImagePath(), and getTabs().

{
global $tpl, $lng, $ilTabs;
// $this->getCharacteristicsOfCurrentStyle("media_cont"); // scorm-2004
// get next class that processes or forwards current command
$next_class = $this->ctrl->getNextClass($this);
// get current command
$cmd = $this->ctrl->getCmd();
if (is_object ($this->content_obj))
{
$tpl->setTitleIcon(ilUtil::getImagePath("icon_mob_b.png"));
$this->getTabs($this->tabs_gui);
/* $mob = $this->content_obj->getMediaObject();
if (is_object($mob))
{
$tpl->setVariable("HEADER", $lng->txt("mob").": ".
$this->content_obj->getMediaObject()->getTitle());
$mob_gui =& new ilObjMediaObjectGUI("", $this->content_obj->getMediaObject()->getId(),false, false);
$mob_gui->setBackTitle($this->page_back_title);
$mob_gui->setEnabledMapAreas($this->getEnabledMapAreas());
$mob_gui->getTabs($this->tabs_gui);
}*/
}
else
{
}
switch($next_class)
{
// trigger editor
case "ilpciimtriggereditorgui":
require_once("./Services/COPage/classes/class.ilPCIIMTriggerEditorGUI.php");
$ilTabs->setTabActive("triggers");
$image_map_edit = new ilPCIIMTriggerEditorGUI($this->content_obj,
$this->pg_obj);
$ret = $this->ctrl->forwardCommand($image_map_edit);
$tpl->setContent($ret);
break;
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::getTabs ( $tab_gui,
  $a_create = false,
  $a_change_obj_ref = false 
)

Add tabs to ilTabsGUI object.

Parameters
object$tab_guiilTabsGUI object
boolean$a_createnew creation true/false

Definition at line 88 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, and ilPageContentGUI\$lng.

Referenced by executeCommand().

{
global $ilCtrl, $ilTabs, $lng;
if (!$a_create)
{
$ilTabs->setBackTarget($lng->txt("pg"),
$ilCtrl->getParentReturn($this)
);
$ilTabs->addTab("triggers",
$lng->txt("cont_active_areas"),
$ilCtrl->getLinkTargetByClass("ilpciimtriggereditorgui", "editMapAreas")
);
$ilTabs->addTab("list_overlays",
$lng->txt("cont_overlay_images"),
$ilCtrl->getLinkTarget($this, "listOverlayImages")
);
$ilTabs->addTab("content_popups",
$lng->txt("cont_content_popups"),
$ilCtrl->getLinkTarget($this, "listContentPopups")
);
$ilTabs->addTab("edit_base_image",
$lng->txt("cont_base_image")." & ".$lng->txt("cont_caption"),
$ilCtrl->getLinkTarget($this, "editBaseImage")
);
}
}

+ Here is the caller graph for this function:

ilPCInteractiveImageGUI::initAddOverlaysForm ( )

Init add overlays form.

Parameters
@return

Definition at line 438 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, and ilFileInputGUI\setSuffixes().

Referenced by addOverlayImages(), and uploadOverlayImages().

{
global $lng, $ilCtrl, $ilTabs;
$ilTabs->setTabActive("list_overlays");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setTitle($lng->txt("cont_add_images"));
$form->setFormAction($ilCtrl->getFormAction($this));
// file input
include_once("./Services/Form/classes/class.ilFileWizardInputGUI.php");
$fi = new ilFileWizardInputGUI($lng->txt("file"), "ovfile");
$fi->setSuffixes(array("gif", "jpeg", "jpg", "png"));
$fi->setFilenames(array(0 => ''));
$fi->setRequired(true);
$form->addItem($fi);
$form->addCommandButton("uploadOverlayImages", $lng->txt("upload"));
$form->addCommandButton("listOverlayImages", $lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImageGUI::initForm (   $a_mode = "edit")

Init creation/base image form.

Parameters
int$a_modeEdit Mode

Definition at line 182 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\getHierId(), ilImageFileInputGUI\setImage(), and ilTextInputGUI\setMaxLength().

Referenced by editBaseImage(), and insert().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
// image file
$fi = new ilImageFileInputGUI($lng->txt("cont_file"), "image_file");
$fi->setAllowDeletion(false);
if ($a_mode == "edit")
{
$fi->setImage($this->content_obj->getBaseThumbnailTarget());
}
$form->addItem($fi);
if ($a_mode == "edit")
{
// caption
$ti = new ilTextInputGUI($this->lng->txt("cont_caption"), "caption");
$ti->setMaxLength(200);
$ti->setSize(50);
$form->addItem($ti);
}
// save and cancel commands
if ($a_mode == "create")
{
$form->setTitle($lng->txt("cont_ed_insert_iim"));
$form->addCommandButton("create_iim", $lng->txt("save"));
$form->addCommandButton("cancelCreate", $lng->txt("cancel"));
}
else
{
// get caption
$std_alias_item = new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$ti->setValue($std_alias_item->getCaption());
$form->setTitle($lng->txt("cont_edit_base_image"));
$form->addCommandButton("update", $lng->txt("save"));
}
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImageGUI::insert (   $a_post_cmd = "edpost",
  $a_submit_cmd = "create_mob",
  $a_input_error = false 
)

Insert new media object form.

Definition at line 125 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ilUtil\sendInfo().

Referenced by create().

{
global $ilTabs, $tpl, $ilCtrl, $lng;
ilUtil::sendInfo($lng->txt("cont_iim_create_info"));
// $this->getTabs($ilTabs, true);
// $ilTabs->setSubTabActive("cont_new_mob");
if ($a_input_error)
{
$form = $this->form;
}
else
{
$form = $this->initForm("create");
}
$form->setFormAction($ilCtrl->getFormAction($this));
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCInteractiveImageGUI::leftAlign ( )

align media object to left

Definition at line 341 of file class.ilPCInteractiveImageGUI.php.

References $_SESSION, ilPageContentGUI\getHierId(), and ilMediaAliasItem\setHorizontalAlign().

{
$std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setHorizontalAlign("Left");
$_SESSION["il_pg_error"] = $this->pg_obj->update();
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::leftFloatAlign ( )

align media object to left, floating text

Definition at line 365 of file class.ilPCInteractiveImageGUI.php.

References $_SESSION, ilPageContentGUI\getHierId(), and ilMediaAliasItem\setHorizontalAlign().

{
$std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setHorizontalAlign("LeftFloat");
$_SESSION["il_pg_error"] = $this->pg_obj->update();
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::listContentPopups ( )

List content popups.

Definition at line 564 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, $tab, ilPageContentGUI\$tpl, and ilUtil\sendInfo().

{
global $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
ilUtil::sendInfo($lng->txt("cont_iim_content_popups_info"));
$ilTabs->setTabActive("content_popups");
$ilToolbar->addButton($lng->txt("cont_add_popup"),
$ilCtrl->getLinkTarget($this, "addPopup"));
include_once("./Services/COPage/classes/class.ilPCIIMPopupTableGUI.php");
$tab = new ilPCIIMPopupTableGUI($this, "listContentPopups",
$this->content_obj);
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::listOverlayImages ( )

List overlay images.

Parameters
@return

Definition at line 396 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, $tab, ilPageContentGUI\$tpl, and ilUtil\sendInfo().

{
global $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
ilUtil::sendInfo($lng->txt("cont_iim_overlay_info"));
$ilTabs->setTabActive("list_overlays");
$ilToolbar->addButton($lng->txt("cont_add_images"),
$ilCtrl->getLinkTarget($this, "addOverlayImages"));
include_once("./Services/COPage/classes/class.ilPCIIMOverlaysTableGUI.php");
$tab = new ilPCIIMOverlaysTableGUI($this, "listOverlayImages",
$this->content_obj->getMediaObject());
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::rightAlign ( )

align media object to right

Definition at line 353 of file class.ilPCInteractiveImageGUI.php.

References $_SESSION, ilPageContentGUI\getHierId(), and ilMediaAliasItem\setHorizontalAlign().

{
$std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setHorizontalAlign("Right");
$_SESSION["il_pg_error"] = $this->pg_obj->update();
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::rightFloatAlign ( )

align media object to right, floating text

Definition at line 377 of file class.ilPCInteractiveImageGUI.php.

References $_SESSION, ilPageContentGUI\getHierId(), and ilMediaAliasItem\setHorizontalAlign().

{
$std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setHorizontalAlign("RightFloat");
$_SESSION["il_pg_error"] = $this->pg_obj->update();
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::savePopups ( )

Save popups.

Definition at line 600 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $ilCtrl, ilPageContentGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashesArray().

{
global $ilCtrl, $lng;
if (is_array($_POST["title"]))
{
$titles = ilUtil::stripSlashesArray($_POST["title"]);
$this->content_obj->savePopUps($titles);
$this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "listContentPopups");
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::update ( )

Update (base image)

Definition at line 290 of file class.ilPCInteractiveImageGUI.php.

References $_POST, $_SESSION, $file, $ilCtrl, ilPageContentGUI\$lng, $location, ilObjMediaObject\_getDirectory(), ilPageContentGUI\getHierId(), ilObjMediaObject\getMimeType(), ilUtil\moveUploadedFile(), ilUtil\sendSuccess(), ilMediaAliasItem\setCaption(), and ilUtil\stripSlashes().

{
global $ilCtrl, $lng;
$mob = $this->content_obj->getMediaObject();
$mob_dir = ilObjMediaObject::_getDirectory($mob->getId());
$std_item = $mob->getMediaItem("Standard");
$location = $_FILES['image_file']['name'];
if ($location != "" && is_file($_FILES['image_file']['tmp_name']))
{
$file = $mob_dir."/".$_FILES['image_file']['name'];
ilUtil::moveUploadedFile($_FILES['image_file']['tmp_name'],
$_FILES['image_file']['name'], $file);
// get mime type
$location = $_FILES['image_file']['name'];
$std_item->setFormat($format);
$std_item->setLocation($location);
$std_item->setLocationType("LocalFile");
$mob->setDescription($format);
$mob->update();
}
// set caption
$std_alias_item = new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard",
$this->content_obj->getPcId(), "InteractiveImage");
$std_alias_item->setCaption(ilUtil::stripSlashes($_POST["caption"]));
$_SESSION["il_pg_error"] = $this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirectByClass("ilpcinteractiveimagegui", "editBaseImage");
}

+ Here is the call graph for this function:

ilPCInteractiveImageGUI::uploadOverlayImages ( )

Upload overlay images.

Parameters
@return

Definition at line 470 of file class.ilPCInteractiveImageGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, $size, addOverlayImages(), initAddOverlaysForm(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
$form = $this->initAddOverlaysForm();
if ($form->checkInput())
{
if (is_array($_FILES["ovfile"]["name"]))
{
foreach ($_FILES["ovfile"]["name"] as $k => $v)
{
$name = $_FILES["ovfile"]["name"][$k];
$mime = $_FILES["ovfile"]["type"][$k];
$tmp_name = $_FILES["ovfile"]["tmp_name"][$k];
$size = $_FILES["ovfile"]["size"][$k];
$this->content_obj->getMediaObject()->uploadAdditionalFile($name,
$tmp_name, "overlays");
$piname = pathinfo($name);
$this->content_obj->getMediaObject()->makeThumbnail("overlays/".$name,
basename($name, ".".$piname['extension']).".png");
}
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"));
$ilCtrl->redirect($this, "listOverlayImages");
}
else
{
$form->setValuesByPost();
$this->addOverlayImages($form);
}
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: