Browse Source

Style details

ravenlp 16 years ago
parent
commit
8e141a5239

+ 2 - 2
admin/bm.php View File

57
 			$_POST["description"] = addslashes($_POST["description"]);
57
 			$_POST["description"] = addslashes($_POST["description"]);
58
 		}		
58
 		}		
59
 		
59
 		
60
-		$_POST["title"] = removeBadTags($_POST["title"],true);
61
-		$_POST["description"] = removeBadTags($_POST["description"]);
60
+		$_POST["title"] = util::removeBadTags($_POST["title"],true);
61
+		$_POST["description"] = util::removeBadTags($_POST["description"]);
62
 
62
 
63
 		if ($tumble->addPost($_POST)) {
63
 		if ($tumble->addPost($_POST)) {
64
 			$input = array("{type}");
64
 			$input = array("{type}");

+ 3 - 3
admin/css/style.css View File

29
 
29
 
30
 /*********** LAYOUT *************/
30
 /*********** LAYOUT *************/
31
 
31
 
32
-body{ background: #e0e0e0; text-align:center; font-family:"Trebuchet Ms", Verdana, Tahoma; font-size:1em;}
32
+body{ background-color: #e0e0e0; text-align:center; font-family:"Trebuchet Ms", Verdana, Tahoma; font-size:1em;}
33
 
33
 
34
-#cont{ width:600px; margin:30px auto 20px auto; text-align:left; border: 1px solid #999;}
34
+#cont{ width:600px; margin:30px auto 20px auto; text-align:left; border: 1px solid #999; background-color: #FFF; padding:10px 0 0 0;}
35
 
35
 
36
 #head{ background: #fff url(images/head_bg.png) bottom center no-repeat; position: relative; padding:10px 0 20px 20px; height:73px;}
36
 #head{ background: #fff url(images/head_bg.png) bottom center no-repeat; position: relative; padding:10px 0 20px 20px; height:73px;}
37
 	h1 a{ display:block; height:77px; width:161px; background:#fff url(images/gelato-logo.png) top left no-repeat; text-indent:-9999px; overflow:hidden;}
37
 	h1 a{ display:block; height:77px; width:161px; background:#fff url(images/gelato-logo.png) top left no-repeat; text-indent:-9999px; overflow:hidden;}
119
 .post .audio{}
119
 .post .audio{}
120
 
120
 
121
 
121
 
122
-#foot { border-top:1px solid #999999; color:#000000; font-size:10px; padding:5px 10px; text-align:center;}
122
+#foot { border-top:1px solid #999999; color:#000000; font-size:10px; padding:5px 10px; text-align:center; background-color: #e0e0e0;}
123
 
123
 
124
 	#footer a { color: #000; }
124
 	#footer a { color: #000; }
125
 	
125
 	

+ 10 - 10
admin/index.php View File

40
 
40
 
41
         if(isset($_POST["btnAdd"])){
41
         if(isset($_POST["btnAdd"])){
42
                 unset($_POST["btnAdd"]);
42
                 unset($_POST["btnAdd"]);
43
-                $_POST['type'] = type2Number($_POST['type']);
43
+                $_POST['type'] = util::type2Number($_POST['type']);
44
 
44
 
45
                 if ($_POST["type"]=="2") { // is Photo type
45
                 if ($_POST["type"]=="2") { // is Photo type
46
                         if (isset($_POST["url"]) && $_POST["url"]!="")  {
46
                         if (isset($_POST["url"]) && $_POST["url"]!="")  {
47
-                                $photoName = getFileName($_POST["url"]);
47
+                                $photoName = util::getFileName($_POST["url"]);
48
                                 if (!$tumble->savePhoto($_POST["url"])) {
48
                                 if (!$tumble->savePhoto($_POST["url"])) {
49
                                         header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
49
                                         header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
50
                                         die();
50
                                         die();
51
                                 }
51
                                 }
52
-                                $_POST["url"] = "../uploads/".sanitizeName($photoName);
52
+                                $_POST["url"] = "../uploads/".util::sanitizeName($photoName);
53
                         }
53
                         }
54
 
54
 
55
-                        if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) {
56
-                                $_POST["url"] = "../uploads/".sanitizeName($_FILES['photo']['name']);
55
+                        if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".util::sanitizeName($_FILES['photo']['name']) ) ) {
56
+                                $_POST["url"] = "../uploads/".util::sanitizeName($_FILES['photo']['name']);
57
                         }
57
                         }
58
 
58
 
59
                         unset($_POST["photo"]);
59
                         unset($_POST["photo"]);
62
 
62
 
63
                 if ($_POST["type"]=="7") { // is MP3 type
63
                 if ($_POST["type"]=="7") { // is MP3 type
64
                         set_time_limit(300);
64
                         set_time_limit(300);
65
-                        $mp3Name = getFileName($_POST["url"]);
65
+                        $mp3Name = util::getFileName($_POST["url"]);
66
                         if (!$tumble->saveMP3($_POST["url"])) {
66
                         if (!$tumble->saveMP3($_POST["url"])) {
67
                                 header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
67
                                 header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
68
                                 die();
68
                                 die();
84
                 $_POST["description"] = $textile->TextileThis(removeBadTags($_POST["description"]));
84
                 $_POST["description"] = $textile->TextileThis(removeBadTags($_POST["description"]));
85
                 */
85
                 */
86
 
86
 
87
-                $_POST["title"] = removeBadTags($_POST["title"],true);
88
-                $_POST["description"] = removeBadTags($_POST["description"]);
87
+                $_POST["title"] = util::removeBadTags($_POST["title"],true);
88
+                $_POST["description"] = util::removeBadTags($_POST["description"]);
89
 
89
 
90
                 if (isset($_POST["id_post"]) and  is_numeric($_POST["id_post"]) and $_POST["id_post"]>0) {
90
                 if (isset($_POST["id_post"]) and  is_numeric($_POST["id_post"]) and $_POST["id_post"]>0) {
91
                         $tumble->modifyPost($_POST, $_POST["id_post"]);
91
                         $tumble->modifyPost($_POST, $_POST["id_post"]);
249
                                                         $row['Body'] = $register["description"];
249
                                                         $row['Body'] = $register["description"];
250
                                                         break;
250
                                                         break;
251
                                                 case "2":
251
                                                 case "2":
252
-                                                        $fileName = "../uploads/".getFileName($register["url"]);
252
+                                                        $fileName = "../uploads/".util::getFileName($register["url"]);
253
 
253
 
254
                                                         $x = @getimagesize($fileName);
254
                                                         $x = @getimagesize($fileName);
255
                                                         if ($x[0] > 100)
255
                                                         if ($x[0] > 100)
270
                                                         break;
270
                                                         break;
271
                                                 case "4":
271
                                                 case "4":
272
                                                         if($conf->shorten_links)
272
                                                         if($conf->shorten_links)
273
-                                                                $register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
273
+                                                                $register["url"] = util::_file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
274
                                                         $register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
274
                                                         $register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
275
 
275
 
276
                                                         $row['URL'] = $register["url"];
276
                                                         $row['URL'] = $register["url"];

+ 1 - 1
admin/settings.php View File

18
 	
18
 	
19
 	if(isset($_POST["btnsubmit"]))	{		
19
 	if(isset($_POST["btnsubmit"]))	{		
20
 		unset($_POST["btnsubmit"]);
20
 		unset($_POST["btnsubmit"]);
21
-		$_POST["url_installation"] = (endsWith($_POST["url_installation"], "/")) ? substr($_POST["url_installation"], 0, strlen($_POST["url_installation"])-1) : $_POST["url_installation"] ;
21
+		$_POST["url_installation"] = (util::endsWith($_POST["url_installation"], "/")) ? substr($_POST["url_installation"], 0, strlen($_POST["url_installation"])-1) : $_POST["url_installation"] ;
22
 		$tumble->saveSettings($_POST);
22
 		$tumble->saveSettings($_POST);
23
 	} else {
23
 	} else {
24
 ?>
24
 ?>

File diff suppressed because it is too large
+ 1 - 1
admin/themes/admin/index.htm


+ 1 - 1
admin/themes/admin/template_add_photo.htm View File

13
 
13
 
14
 	<div id="photo_url">
14
 	<div id="photo_url">
15
 		<label for="description">Photo URL</label>
15
 		<label for="description">Photo URL</label>
16
-		<br /><input class="input-text" type="text" name="url" id="url" size="80" value="{editUrl}" />
16
+		<br /><input class="input-text" type="text" name="url" id="url" value="{editUrl}" style="width:400px"/>
17
 		<div style="font-size:11px; color:#666; margin-top:5px;">
17
 		<div style="font-size:11px; color:#666; margin-top:5px;">
18
 			<a href="#" class="linkFrm">Use a upload form instead</a>
18
 			<a href="#" class="linkFrm">Use a upload form instead</a>
19
 		</div>
19
 		</div>

+ 19 - 19
classes/gelato.class.php View File

142
 	}
142
 	}
143
 
143
 
144
 	function saveMP3($remoteFileName) {
144
 	function saveMP3($remoteFileName) {
145
-		if (getMP3File($remoteFileName)) {
145
+		if (util::getMP3File($remoteFileName)) {
146
 			return true;
146
 			return true;
147
 		} else {
147
 		} else {
148
 			return false;
148
 			return false;
150
 	}
150
 	}
151
 
151
 
152
 	function savePhoto($remoteFileName) {
152
 	function savePhoto($remoteFileName) {
153
-		if (getPhotoFile($remoteFileName)) {
153
+		if (util::getPhotoFile($remoteFileName)) {
154
 			return true;
154
 			return true;
155
 		} else {
155
 		} else {
156
 			return false;
156
 			return false;
158
 	}
158
 	}
159
 
159
 
160
 	function getVideoPlayer($url) {
160
 	function getVideoPlayer($url) {
161
-		if (isYoutubeVideo($url)) {
162
-			$id_video = getYoutubeVideoUrl($url);
161
+		if (util::isYoutubeVideo($url)) {
162
+			$id_video = util::getYoutubeVideoUrl($url);
163
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.youtube.com/v/".$id_video."\"><param name=\"movie\" value=\"http://www.youtube.com/v/".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
163
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.youtube.com/v/".$id_video."\"><param name=\"movie\" value=\"http://www.youtube.com/v/".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
164
-		} elseif (isVimeoVideo($url)) {
165
-			$id_video = getVimeoVideoUrl($url);
164
+		} elseif (util::isVimeoVideo($url)) {
165
+			$id_video = util::getVimeoVideoUrl($url);
166
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.vimeo.com/moogaloop.swf?clip_id=".$id_video."\"><param name=\"movie\" value=\"http://www.vimeo.com/moogaloop.swf?clip_id=".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
166
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.vimeo.com/moogaloop.swf?clip_id=".$id_video."\"><param name=\"movie\" value=\"http://www.vimeo.com/moogaloop.swf?clip_id=".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
167
-		} elseif (isDailymotionVideo($url)) {
168
-			$id_video = getDailymotionVideoUrl($url);
167
+		} elseif (util::isDailymotionVideo($url)) {
168
+			$id_video = util::getDailymotionVideoUrl($url);
169
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.dailymotion.com/swf/".$id_video."\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
169
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.dailymotion.com/swf/".$id_video."\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/".$id_video."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
170
-		} elseif (isYahooVideo($url)) {
171
-			$id_video = getYahooVideoCode($url);
170
+		} elseif (util::isYahooVideo($url)) {
171
+			$id_video = util::getYahooVideoCode($url);
172
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"event_function=YAHOO.yv.Player.SWFInterface&amp;id=".$id_video[1]."&amp;vid=".$id_video[0]."&amp;onsite=1&amp;site=video.yahoo.com&amp;page=792730258&amp;lang=en-US&amp;intl=us\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
172
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"event_function=YAHOO.yv.Player.SWFInterface&amp;id=".$id_video[1]."&amp;vid=".$id_video[0]."&amp;onsite=1&amp;site=video.yahoo.com&amp;page=792730258&amp;lang=en-US&amp;intl=us\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
173
-		} elseif (isSlideSharePresentation($url)) {
174
-			$id_video = getSlideSharePresentationCode($url);
173
+		} elseif (util::isSlideSharePresentation($url)) {
174
+			$id_video = util::getSlideSharePresentationCode($url);
175
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.slideshare.net/swf/player.swf?presentationId=".$id_video[0]."&amp;doc=".$id_video[1]."&amp;inContest=0&amp;startSlide=1\"><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
175
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.slideshare.net/swf/player.swf?presentationId=".$id_video[0]."&amp;doc=".$id_video[1]."&amp;inContest=0&amp;startSlide=1\"><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
176
-		} elseif (isGoogleVideoUrl($url)) {
177
-			$id_video = getGoogleVideoCode($url);
176
+		} elseif (util::isGoogleVideoUrl($url)) {
177
+			$id_video = util::getGoogleVideoCode($url);
178
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://video.google.com/googleplayer.swf?docid=".$id_video."&amp;hl=es&amp;fs=true\"><param name=\"movie\" value=\"http://video.google.com/googleplayer.swf?docid=".$id_video."&amp;hl=es&amp;fs=true\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
178
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://video.google.com/googleplayer.swf?docid=".$id_video."&amp;hl=es&amp;fs=true\"><param name=\"movie\" value=\"http://video.google.com/googleplayer.swf?docid=".$id_video."&amp;hl=es&amp;fs=true\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
179
-		} elseif (isMTVVideoUrl($url)) {
180
-			$id_video = getMTVVideoCode($url);
179
+		} elseif (util::isMTVVideoUrl($url)) {
180
+			$id_video = util::getMTVVideoCode($url);
181
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://media.mtvnservices.com/mgid:uma:video:mtvmusic.com:".$id_video."\"><param name=\"movie\" value=\"http://media.mtvnservices.com/mgid:uma:video:mtvmusic.com:".$id_video."\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"never\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";	
181
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://media.mtvnservices.com/mgid:uma:video:mtvmusic.com:".$id_video."\"><param name=\"movie\" value=\"http://media.mtvnservices.com/mgid:uma:video:mtvmusic.com:".$id_video."\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"never\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";	
182
 		} else {
182
 		} else {
183
 			return "This URL is not a supported video (YouTube, Google Video, Vimeo, DailyMotion, Yahoo Video, MTV or SlideShare)";
183
 			return "This URL is not a supported video (YouTube, Google Video, Vimeo, DailyMotion, Yahoo Video, MTV or SlideShare)";
184
 		}
184
 		}
185
 	}
185
 	}
186
 	function getMp3Player($url) {
186
 	function getMp3Player($url) {
187
-		if (isMP3($url)) {
187
+		if (util::isMP3($url)) {
188
 			$playerUrl = $conf->urlGelato."/admin/scripts/player.swf?soundFile=".$url;
188
 			$playerUrl = $conf->urlGelato."/admin/scripts/player.swf?soundFile=".$url;
189
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"" . $playerUrl . "\" width=\"290\" height=\"24\"><param name=\"movie\" value=\"" . $playerUrl . "\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
189
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"" . $playerUrl . "\" width=\"290\" height=\"24\"><param name=\"movie\" value=\"" . $playerUrl . "\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
190
-		} elseif (isGoEar($url)) {
190
+		} elseif (util::isGoEar($url)) {
191
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/external.swf\" width=\"366\" height=\"130\"><param name=\"movie\" value=\"http://www.goear.com/files/external.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=".getGoEarCode($url)."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
191
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/external.swf\" width=\"366\" height=\"130\"><param name=\"movie\" value=\"http://www.goear.com/files/external.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=".getGoEarCode($url)."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
192
-		} elseif (isOdeo($url)) {
192
+		} elseif (util::isOdeo($url)) {
193
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://media.odeo.com/flash/odeo_player.swf?v=3\" width=\"366\" height=\"75\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"type=audio&amp;id=".getOdeoCode($url)."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
193
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://media.odeo.com/flash/odeo_player.swf?v=3\" width=\"366\" height=\"75\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"type=audio&amp;id=".getOdeoCode($url)."\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
194
 		} else {
194
 		} else {
195
 			return "This URL is not an MP3 file.";
195
 			return "This URL is not an MP3 file.";

+ 8 - 8
index.php View File

60
 			$register = $tumble->getPost($id_post);
60
 			$register = $tumble->getPost($id_post);
61
 			if (empty($register["title"])) {
61
 			if (empty($register["title"])) {
62
 				if (!empty($register["description"])) {
62
 				if (!empty($register["description"])) {
63
-					$page_title_data = trimString($register["description"], $page_title_len);
63
+					$page_title_data = util::trimString($register["description"], $page_title_len);
64
 				} else {
64
 				} else {
65
-					$page_title_data =  type2Text($register["type"]);
65
+					$page_title_data =  util::type2Text($register["type"]);
66
 				}
66
 				}
67
 			} else {
67
 			} else {
68
 				$page_title_data = $register["title"];
68
 				$page_title_data = $register["title"];
123
 											$row['Body'] = $register["description"];
123
 											$row['Body'] = $register["description"];
124
 											break;
124
 											break;
125
 											case "2":
125
 											case "2":
126
-											$fileName = "uploads/".getFileName($register["url"]);
126
+											$fileName = "uploads/".util::getFileName($register["url"]);
127
 											$x = @getimagesize($fileName);
127
 											$x = @getimagesize($fileName);
128
 												if ($x[0] > 500) {
128
 												if ($x[0] > 500) {
129
 													$photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
129
 													$photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
144
 												break;
144
 												break;
145
                                         case "4":
145
                                         case "4":
146
 												if($conf->shorten_links){
146
 												if($conf->shorten_links){
147
-													$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
147
+													$register["url"] = util::_file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
148
 												}
148
 												}
149
 												$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
149
 												$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
150
 
150
 
219
 								$row['Body'] = $register["description"];
219
 								$row['Body'] = $register["description"];
220
 								break;
220
 								break;
221
 						case "2":
221
 						case "2":
222
-								$fileName = "uploads/".getFileName($register["url"]);
222
+								$fileName = "uploads/".util::getFileName($register["url"]);
223
 
223
 
224
 								$x = @getimagesize($fileName);
224
 								$x = @getimagesize($fileName);
225
 								if ($x[0] > 500) {
225
 								if ($x[0] > 500) {
241
 								break;
241
 								break;
242
 						case "4":
242
 						case "4":
243
 							if($conf->shorten_links){
243
 							if($conf->shorten_links){
244
-									$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
244
+									$register["url"] = util::_file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
245
 								}
245
 								}
246
 								$row['URL'] = $register["url"];
246
 								$row['URL'] = $register["url"];
247
 								$row['Name'] = $register["title"];
247
 								$row['Name'] = $register["title"];
268
 
268
 
269
 					if (empty($register["title"])) {
269
 					if (empty($register["title"])) {
270
 						if (!empty($register["description"])) {
270
 						if (!empty($register["description"])) {
271
-							$postTitle = trimString($register["description"]);
271
+							$postTitle = util::trimString($register["description"]);
272
 						} else {
272
 						} else {
273
-							$postTitle =  type2Text($register["type"]);
273
+							$postTitle =  util::type2Text($register["type"]);
274
 						}
274
 						}
275
 					} else {
275
 					} else {
276
 						$postTitle = $register["title"];
276
 						$postTitle = $register["title"];