示例#1
0
     // Gr�nden nicht mehr: $picture_id hat hier keinen (vern�nftigen) Wert. Bei der Umstellung
     // auf das neue API sollten die Attribute aber wieder gesetzt werden.
     //    $picture = new steam_object($picture_id);
     //    $steam->set_attribute($picture, "bid:doctype", "portlet:picture");
     //    $steam->set_attribute($picture, "OBJ_DESC", $_FILES["picture"]["name"]);
 }
 if ($_POST["headline"] != "") {
     $msg->set_attribute("OBJ_NAME", norm_post("headline"));
 } else {
     $msg->set_attribute("OBJ_NAME", $language == "ge" ? "KEINE Überschrift gesetzt" : "NO headline set");
 }
 $msg->set_attribute("OBJ_DESC", norm_post("subheadline"));
 $msg->set_attribute("bid:portlet:msg:picture_alignment", isset($_POST["picture_alignment"]) ? $_POST["picture_alignment"] : "left");
 /** Check the picture width */
 $picture_width = isset($_POST["picture_width"]) ? $_POST["picture_width"] : "";
 $picture_width = check_width_string($picture_width, 5, 100, 5, $column_width - 25, "");
 $msg->set_attribute("bid:portlet:msg:picture_width", $picture_width);
 $msg->set_attribute("bid:portlet:msg:link_url", norm_post("link_url"));
 $msg->set_attribute("bid:portlet:msg:link_url_label", norm_post("link_url_label"));
 $msg->set_attribute("bid:portlet:msg:link_open", isset($_POST["link_open"]) ? $_POST["link_open"] == open ? "checked" : "" : "");
 $msg->set_content(stripslashes($_POST["content"]));
 $oldimage_id = $msg->get_attribute("bid:portlet:msg:picture_id");
 // new picture, no old one
 if (isset($picture_id) && ($oldimage_id == null || $oldimage_id == "")) {
     $msg->set_attribute("bid:portlet:msg:picture_id", $picture_id->get_id());
     unset($oldimage_id);
 } else {
     if (isset($picture_id) && $oldimage_id != $picture_id) {
         $msg->set_attribute("bid:portlet:msg:picture_id", $picture_id->get_id());
     } else {
         if (isset($picture_id) && $oldimage_id == $picture_id) {
示例#2
0
$column_title = isset($column_attributes[OBJ_DESC]) ? $column_attributes[OBJ_DESC] : $column_attributes[OBJ_NAME];
if ($column->get_attribute(OBJ_TYPE) != "container_portalColumn_bid") {
    // Fehlerbehandlung einfügen
}
// fetch portlets of currrent column
$portlets_tmp = $column->get_inventory("", array("bid:portlet", "bid:portlet:content"));
$portlets = array();
foreach ($portlets_tmp as $value) {
    if ($value->get_attribute("bid:portlet")) {
        $portlets[$value->get_id()] = $value;
    }
}
//action performed
if ($action == "save") {
    $error = array();
    $column_width = isset($_POST["column_width"]) ? check_width_string($_POST["column_width"], 5, 99, 20, 100000, "") : "";
    if (!$writeable) {
        $error[count($error)] = "error_no_access";
    } else {
        if ($column_width == "") {
            $error[count($error)] = "error_column_width";
        } else {
            $column->set_attributes(array("bid:portal:column:width" => $column_width), 1);
            // Save order of portlets in column
            $sorting = trim($_POST["bid:sorting"]);
            $sorting = explode(" ", $sorting);
            if (sizeof($sorting) > 0) {
                foreach ($sorting as $key => $id) {
                    if ($id == 0) {
                        continue;
                    }