if ($_POST['route_to_pa_home'] == 1) {
     auto_email_notification('content_posted_to_comm_blog', $params);
 }
 //for rivers of people
 $activity = 'user_post_a_blog';
 $activity_extra['info'] = $user->first_name . 'posted a new blog';
 $activity_extra['blog_name'] = $params['content_title'];
 $activity_extra['blog_id'] = $permalink_cid;
 $activity_extra['blog_url'] = $params['content_url'];
 $extra = serialize($activity_extra);
 $object = $permalink_cid;
 Activities::save($user->user_id, $activity, $object, $extra, $activities_array);
 //save post in groups
 $routed_to_groups = route2groups();
 // save post to outputthis
 route_to_outputthis($_POST["blog_title"], $_POST["description"]);
 //we have saved it in all the locations lets redirect it to various locations
 if ($_GET['ccid']) {
     $gid = $_GET['ccid'];
     $group = ContentCollection::load_collection((int) $gid, $login_uid);
     $is_member = Group::get_user_type((int) $login_uid, (int) $gid);
     if ($is_member == NOT_A_MEMBER) {
         $msg = "&msg_id=7028";
     } else {
         if ($group->reg_type == REG_MODERATED) {
             $msg = "&msg_id=1004";
         } else {
             $msg = "&msg_id=7027";
         }
     }
     // it means user is coming from group's page then redirect it to group
Example #2
0
                if ($res['msg']) {
                    $succ_msg = $res['msg'];
                }
                add_tags_to_content($res['content_id'], $tag_string);
            }
        }
    }
    if (!empty($created_album_id)) {
        // add the content to created album
        $res = save_post(NULL, $created_album_id, TRUE);
        if ($res['msg']) {
            $succ_msg = $res['msg'];
        }
        add_tags_to_content($res['content_id'], $tag_string);
    }
    route_to_outputthis($permalink_title, $permalink_body);
    //redirect to group if user has come from group's page
    //redirect to permalink
    if ($_GET['ccid']) {
        $loc = $base_url . '/group.php?gid=' . $_GET['ccid'] . $save_res;
    } else {
        $msg = "&err=" . urlencode(MessagesHandler::get_message($succ_msg));
        $loc = $base_url . '/content.php?cid=' . $permalink_cid . $msg;
    }
    header("location:{$loc}");
    exit;
}
//.. end of $_POST['publish']
function save_post($cid = NULL, $ccid = NULL, $is_album = FALSE, $display_on = 1)
{
    global $user, $network_info;