     // MARK: Custom Functionality
     //
     
+    func userHasCommentedOnReport(_report: JSON, _current_user_id: Int) -> Bool {
+        
+        if (_report["comments"].count != 0) {
+            for _comment in _report["comments"] {
+                if (_comment.1["properties"]["owner_id"].intValue == _current_user_id) {
+                    return true
+                }
+            }
+        }
+        
+        return false
+        
+    }
+    
+    func openDirectionsURL(postId: Int) {
+        
+        let report = self.userPostsObjects[postId]
+        
+        let reportGeometry = report.objectForKey("geometry")
+        let reportGeometries = reportGeometry!.objectForKey("geometries")
+        let reportCoordinates = reportGeometries![0].objectForKey("coordinates") as! Array<Double>
+        
+        UIApplication.sharedApplication().openURL(NSURL(string: "https://www.google.com/maps/dir//" + String(reportCoordinates[1]) + "," + String(reportCoordinates[0]))!)
+    }
+    
+    func openOpenGraphURL(sender: AnyObject) {
+        
+        let reportId = sender.tag
+        
+        //        print("The value of `sender` is \(sender)")
+        //
+        //        print("The value of `sender` > `view` is \(sender.view)")
+        
+        let report = JSON(self.userPostsObjects[reportId])
+        
+        let reportURL = "\(report["properties"]["social"][0]["properties"]["og_url"])"
+        
+        print("openOpenGraphURL \(reportURL)")
+        
+        UIApplication.sharedApplication().openURL(NSURL(string: "\(reportURL)")!)
+    }
+    
     func openUserActionsList(gesture: UITapGestureRecognizer) {
         
         print("Open user actions list")

        
    }
    
    @IBAction func openActionsLikesList(sender: UIButton) {
        
        let nextViewController = self.storyBoard.instantiateViewControllerWithIdentifier("LikesTableViewController") as! LikesTableViewController
        
        let report = self.userActionsObjects[(sender.tag)]
        nextViewController.report = report
        
        self.navigationController?.pushViewController(nextViewController, animated: true)
        
    }
    
    @IBAction func openSubmissionOpenGraphURL(sender: UIButton) {
        
        let reportId = sender.tag
        let report = JSON(self.userPostsObjects[reportId])
        
        let reportURL = "\(report["properties"]["social"][0]["properties"]["og_url"])"
        
        print("openOpenGraphURL \(reportURL)")
        
        UIApplication.sharedApplication().openURL(NSURL(string: "\(reportURL)")!)
    }

    @IBAction func openActionsOpenGraphURL(sender: UIButton) {
        
        let reportId = sender.tag
        let report = JSON(self.userActionsObjects[reportId])
        
        let reportURL = "\(report["properties"]["social"][0]["properties"]["og_url"])"
        

        })

    }

    @IBAction func openUserSubmissionMapView(sender: UIButton) {
        let nextViewController = self.storyBoard.instantiateViewControllerWithIdentifier("ActivityMapViewController") as! ActivityMapViewController
