Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- for($i = $lastReplyPos; $i < $replyCount; $i++) {
- $reply = $replies[$i];
- $postID = isset($reply["no"]) ? $reply["no"] : null;
- $subject = isset($reply["sub"]) ? $reply["sub"] : null;
- $name = isset($reply["name"]) ? $reply["name"] : "";
- $posterId = isset($reply["id"]) ? $reply["id"] : null;
- $tripCode = isset($reply["trip"]) ? $reply["trip"] : null;
- $capCode = isset($reply["capcode"]) ? $reply["capcode"] : null;
- $postTimestamp = isset($reply["time"]) ? $reply["time"] : null;
- $postBody = isset($reply["com"]) ? $reply["com"] : null;
- $imageName = null;
- $imageSize = 0;
- $thumbWidth = 0;
- $thumbHeight = 0;
- $imageWidth = 0;
- $imageHeight = 0;
- $imageUrl = null;
- $originalImageName = null;
- $imageDeleteHash = null;
- $chanImageName = isset($reply["tim"]) ? $reply["tim"] : null;
- if($chanImageName !== null) {
- $chanImageName .= $reply["ext"];
- $imgLink = "http://i.4cdn.org/" . $board . "/src/" . $chanImageName;
- $thumbWidth = $reply["tn_w"];
- $thumbHeight = $reply["tn_h"];
- $imageWidth = $reply["w"];
- $imageHeight = $reply["h"];
- $originalImageName = $reply["filename"] . $reply["ext"];
- $imageSize = $reply["fsize"];
- /* ... SNIP ... */
- /* ... SNIP ... */
- /* ... SNIP ... */
- $postsToAdd[] = array(
- "chan_id" => $postID,
- "threads_id" => $threadId,
- "body" => $postBody,
- "subject" => $subject,
- "name" => $name,
- "chan_image_name" => $chanImageName,
- "thumb_dimensions" => $thumbWidth . 'x'. $thumbHeight,
- "image_dimensions" => $imageWidth . 'x'. $imageHeight,
- "image_url" => $imageUrl,
- "original_image_name" => $originalImageName,
- "chan_user_id" => $posterId,
- "tripcode" => $tripCode,
- "capcode" => $capCode,
- "chan_post_date" => Database::fromUnix($postTimestamp),
- "available" => 1
- );
Advertisement
Add Comment
Please, Sign In to add comment