mxmapinfo comment update
This commit is contained in:
		| @@ -16,7 +16,7 @@ class MXMapInfo { | |||||||
| 	public $prefix, $id, $uid, $name, $userid, $author, $uploaded, $updated, $type, $maptype; | 	public $prefix, $id, $uid, $name, $userid, $author, $uploaded, $updated, $type, $maptype; | ||||||
| 	public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; | 	public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; | ||||||
| 	public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; | 	public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; | ||||||
| 	public $replaytyp, $replayid, $replaycnt, $acomment, $awards, $comments; | 	public $replaytyp, $replayid, $replaycnt, $authorComment, $commentCount, $awards; | ||||||
| 	public $pageurl, $replayurl, $imageurl, $thumburl, $downloadurl, $dir; | 	public $pageurl, $replayurl, $imageurl, $thumburl, $downloadurl, $dir; | ||||||
| 	public $ratingVoteCount, $ratingVoteAverage, $vehicleName; | 	public $ratingVoteCount, $ratingVoteAverage, $vehicleName; | ||||||
|  |  | ||||||
| @@ -75,11 +75,12 @@ class MXMapInfo { | |||||||
| 		$this->replaytyp   = isset($mx->ReplayTypeName) ? $mx->ReplayTypeName : ''; | 		$this->replaytyp   = isset($mx->ReplayTypeName) ? $mx->ReplayTypeName : ''; | ||||||
| 		$this->replayid    = isset($mx->ReplayWRID) ? $mx->ReplayWRID : 0; | 		$this->replayid    = isset($mx->ReplayWRID) ? $mx->ReplayWRID : 0; | ||||||
| 		$this->replaycnt   = isset($mx->ReplayCount) ? $mx->ReplayCount : 0; | 		$this->replaycnt   = isset($mx->ReplayCount) ? $mx->ReplayCount : 0; | ||||||
| 		$this->acomment    = $mx->Comments; |  | ||||||
| 		$this->awards      = isset($mx->AwardCount) ? $mx->AwardCount : 0; | 		$this->awards      = isset($mx->AwardCount) ? $mx->AwardCount : 0; | ||||||
| 		$this->comments    = $mx->CommentCount; |  | ||||||
| 		$this->vehicleName = isset($mx->VehicleName) ? $mx->VehicleName : ''; | 		$this->vehicleName = isset($mx->VehicleName) ? $mx->VehicleName : ''; | ||||||
|  |  | ||||||
|  | 		$this->authorComment = $mx->Comments; | ||||||
|  | 		$this->commentCount  = $mx->CommentCount; | ||||||
|  |  | ||||||
| 		$this->ratingVoteCount   = isset($mx->RatingVoteCount) ? $mx->RatingVoteCount : 0; | 		$this->ratingVoteCount   = isset($mx->RatingVoteCount) ? $mx->RatingVoteCount : 0; | ||||||
| 		$this->ratingVoteAverage = isset($mx->RatingVoteAverage) ? $mx->RatingVoteAverage : 0; | 		$this->ratingVoteAverage = isset($mx->RatingVoteAverage) ? $mx->RatingVoteAverage : 0; | ||||||
|  |  | ||||||
| @@ -89,15 +90,9 @@ class MXMapInfo { | |||||||
| 			$this->lbrating = $this->trkvalue; | 			$this->lbrating = $this->trkvalue; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$search         = array(chr(31), '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[url]', '[/url]'); |  | ||||||
| 		$replace        = array('<br/>', '<b>', '</b>', '<i>', '</i>', '<u>', '</u>', '<i>', '</i>'); |  | ||||||
| 		$this->acomment = str_ireplace($search, $replace, $this->acomment); |  | ||||||
| 		$this->acomment = preg_replace('/\[url=.*\]/', '<i>', $this->acomment); |  | ||||||
|  |  | ||||||
| 		$this->pageurl     = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/view/' . $this->id; | 		$this->pageurl     = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/view/' . $this->id; | ||||||
| 		$this->downloadurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/download/' . $this->id; | 		$this->downloadurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/download/' . $this->id; | ||||||
|  |  | ||||||
|  |  | ||||||
| 		if ($mx->HasScreenshot) { | 		if ($mx->HasScreenshot) { | ||||||
| 			$this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/screenshot/normal/' . $this->id; | 			$this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/screenshot/normal/' . $this->id; | ||||||
| 		} else { | 		} else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user