Skip to content
This repository
Browse code

robots standard restricted robots

text helper fix
bugs fix
  • Loading branch information...
commit 095838eff335d8532ab64a53bb927030bece8ccf 1 parent ae027bf
Fabio Borraccetti authored January 28, 2012
42  application/helpers/my_text_helper.php
@@ -313,6 +313,40 @@ function gen_seo_url($str, $separator = 'dash', $lowercase = FALSE)
313 313
 	return trim(stripslashes($str));
314 314
 }
315 315
 
  316
+function strip_article($str){
  317
+	$articles= array(
  318
+						' e ', 
  319
+						' il ', 
  320
+						' lo ', 
  321
+						' la ', 
  322
+						' i ',
  323
+						' gli ',
  324
+						' li ',
  325
+						' di ',
  326
+						' a ',
  327
+						' da ',
  328
+						' in ',
  329
+						' con ',
  330
+						' su ',
  331
+						' per ', 
  332
+						' tra ', 
  333
+						' fra ',
  334
+						' sull’',
  335
+						' sullo ',
  336
+						' sulla ',
  337
+						' sul ',
  338
+						' nel ',
  339
+						' nell’',
  340
+						' nella ',
  341
+						' nello ',
  342
+						' del ',
  343
+						' dell’',
  344
+						' dello ',
  345
+						' della '
  346
+						
  347
+						);
  348
+	return str_replace("  "," ",str_replace($articles, ' ',$str));
  349
+}
316 350
 
317 351
 function clean_and_close($text, $length, $suffix = '', $isHTML = true, $link = "")
318 352
 	{
@@ -328,7 +362,7 @@ function clean_and_close($text, $length, $suffix = '', $isHTML = true, $link = "
328 362
 		if ($considerHtml) {
329 363
 			// if the plain text is shorter than the maximum length, return the whole text
330 364
 			if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
331  
-				return $text;
  365
+				return str_replace("  "," ",$text);
332 366
 			}
333 367
 			// splits all html-tags to scanable lines
334 368
 			preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
@@ -389,7 +423,7 @@ function clean_and_close($text, $length, $suffix = '', $isHTML = true, $link = "
389 423
 			}
390 424
 		} else {
391 425
 			if (strlen($text) <= $length) {
392  
-				return $text;
  426
+				return str_replace("  "," ",$text);
393 427
 			} else {
394 428
 				$truncate = substr($text, 0, $length - strlen($ending));
395 429
 			}
@@ -415,7 +449,7 @@ function clean_and_close($text, $length, $suffix = '', $isHTML = true, $link = "
415 449
 			$truncate = strip_tags($truncate);
416 450
 		}
417 451
 		
418  
-		return $truncate." ... ";		
  452
+		return str_replace("  "," ",$truncate)." ... ";		
419 453
 	}
420 454
 
421 455
 	/*function _gen_comment(){
@@ -482,7 +516,7 @@ function treegraph($array){
482 516
 
483 517
 }
484 518
 
485  
-function date_i18n($format,$time){
  519
+function date_i18n($format="d F Y",$time=null){
486 520
 	
487 521
 	//setlocale(LC_ALL, 'id_IT');
488 522
 	//$pub_date = strftime("%d %B %Y",strtotime($page->pub_date));
4  euphoria/admin/controllers/bugs.php
@@ -123,9 +123,9 @@ function salva(){
123 123
 		$this->email->initialize($config);
124 124
 		
125 125
         $this->email->from('Euphoria@entula.net', 'Euhporia '.$this->_default_module().' bug manager');
126  
-		$this->email->reply_to("fabio@borraccetti.it");
  126
+		$this->email->reply_to($this->user_info[0]['email']);
127 127
 		$list=array();
128  
-		$list[]="Euphoria@entula.net";
  128
+		//$list[]="Euphoria@entula.net";
129 129
 		$list[]=$this->user_info[0]['email'];
130 130
         $this->email->to($list);
131 131
 
4  robots.txt
... ...
@@ -1,2 +1,2 @@
1  
-User-agent: *
2  
-Disallow: /remove/
  1
+User-agent: *
  2
+Disallow: /

0 notes on commit 095838e

Please sign in to comment.
Something went wrong with that request. Please try again.